diff --git a/build/index.js b/build/index.js index 000f8a61..6d6d78c0 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,6 @@ /*! * - * lattice-fabricate - v0.14.6 + * lattice-fabricate - v0.15.0 * React HOCs for components dependent on the OpenLattice EDM. * https://github.com/openlattice/lattice-fabricate * @@ -16,7 +16,7 @@ exports["LatticeFabricate"] = factory(require("react"), require("immutable"), require("lattice-ui-kit"), require("styled-components"), require("@fortawesome/react-fontawesome")); else root["LatticeFabricate"] = factory(root["react"], root["immutable"], root["lattice-ui-kit"], root[undefined], root["@fortawesome/react-fontawesome"]); -})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__18__, __WEBPACK_EXTERNAL_MODULE__285__) { +})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__278__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -100,7 +100,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 299); +/******/ return __webpack_require__(__webpack_require__.s = 291); /******/ }) /************************************************************************/ /******/ ([ @@ -111,14 +111,27 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__0__; /***/ }), /* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(537); +} else {} + + +/***/ }), +/* 2 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return evaluateGuard; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return flatten; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getEventType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isBuiltInEvent; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isActor; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isArray; }); +/* unused harmony export isBuiltInEvent */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isFunction; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isMachine; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return isObservable; }); @@ -127,34 +140,35 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__0__; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return isString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return keys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return mapContext; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return mapFilterValues; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return mapValues; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return matchesState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return nestedPath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return normalizeTarget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return partition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return path; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return pathToStateValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return reportUnhandledExceptionOnInvocation; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return symbolObservable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return toArray; }); +/* unused harmony export mapFilterValues */ +/* unused harmony export mapValues */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return matchesState; }); +/* unused harmony export nestedPath */ +/* unused harmony export normalizeTarget */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return partition; }); +/* unused harmony export path */ +/* unused harmony export pathToStateValue */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return reportUnhandledExceptionOnInvocation; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return symbolObservable; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return toArray; }); /* unused harmony export toArrayStrict */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return toEventObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return toGuard; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return toInvokeSource; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return toSCXMLEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return toStatePath; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return toStatePaths; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return toStateValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return toTransitionConfigArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return uniqueId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return updateContext; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return toEventObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return toGuard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toInvokeSource; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return toObserver; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return toSCXMLEvent; }); +/* unused harmony export toStatePath */ +/* unused harmony export toStatePaths */ +/* unused harmony export toStateValue */ +/* unused harmony export toTransitionConfigArray */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return uniqueId; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return updateContext; }); /* unused harmony export updateHistoryStates */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return updateHistoryValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return warn; }); -/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51); -/* harmony import */ var _environment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22); +/* unused harmony export updateHistoryValue */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return warn; }); +/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41); +/* harmony import */ var _environment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23); @@ -651,6 +665,10 @@ function isMachine(value) { } } +function isActor(value) { + return !!value && typeof value.send === 'function'; +} + var uniqueId = /*#__PURE__*/function () { var currentId = 0; return function () { @@ -754,10 +772,44 @@ function toInvokeSource(src) { return src; } +function toObserver(nextHandler, errorHandler, completionHandler) { + if (typeof nextHandler === 'object') { + return nextHandler; + } + + var noop = function () { + return void 0; + }; + + return { + next: nextHandler, + error: errorHandler || noop, + complete: completionHandler || noop + }; +} + /***/ }), -/* 2 */ +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (false) { var throwOnDirectAccess, ReactIs; } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(324)(); +} + + +/***/ }), +/* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -767,18 +819,18 @@ function toInvokeSource(src) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __spread; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __values; }); /*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -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 +Copyright (c) Microsoft Corporation. -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. +THE 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. ***************************************************************************** */ var __assign = function () { __assign = Object.assign || function __assign(t) { @@ -806,10 +858,11 @@ function __rest(s, e) { } function __values(o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], + var s = typeof Symbol === "function" && Symbol.iterator, + m = s && o[s], i = 0; if (m) return m.call(o); - return { + if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { @@ -818,6 +871,7 @@ function __values(o) { }; } }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function __read(o, n) { @@ -854,3173 +908,2827 @@ function __spread() { /***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ADDITIONAL_PROPERTY_FLAG", function() { return ADDITIONAL_PROPERTY_FLAG; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canExpand", function() { return canExpand; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultRegistry", function() { return getDefaultRegistry; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSchemaType", function() { return getSchemaType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getWidget", function() { return getWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasWidget", function() { return hasWidget; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDefaultFormState", function() { return getDefaultFormState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeDefaultsWithFormData", function() { return mergeDefaultsWithFormData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUiOptions", function() { return getUiOptions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDisplayLabel", function() { return getDisplayLabel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeObjects", function() { return mergeObjects; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asNumber", function() { return asNumber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orderProperties", function() { return orderProperties; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isConstant", function() { return isConstant; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toConstant", function() { return toConstant; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelect", function() { return isSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMultiSelect", function() { return isMultiSelect; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFilesArray", function() { return isFilesArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFixedItems", function() { return isFixedItems; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "allowAdditionalItems", function() { return allowAdditionalItems; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optionsList", function() { return optionsList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findSchemaDefinition", function() { return findSchemaDefinition; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "guessType", function() { return guessType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stubExistingAdditionalProperties", function() { return stubExistingAdditionalProperties; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resolveSchema", function() { return resolveSchema; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retrieveSchema", function() { return retrieveSchema; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeSchemas", function() { return mergeSchemas; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deepEquals", function() { return deepEquals; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shouldRender", function() { return shouldRender; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toIdSchema", function() { return toIdSchema; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toPathSchema", function() { return toPathSchema; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDateString", function() { return parseDateString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toDateString", function() { return toDateString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcToLocal", function() { return utcToLocal; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "localToUTC", function() { return localToUTC; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pad", function() { return pad; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataURItoBlob", function() { return dataURItoBlob; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rangeSpec", function() { return rangeSpec; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMatchingOption", function() { return getMatchingOption; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schemaRequiresTrueValue", function() { return schemaRequiresTrueValue; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_symbol_to_primitive__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(279); -/* harmony import */ var _babel_runtime_corejs2_core_js_symbol_to_primitive__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_symbol_to_primitive__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _babel_runtime_corejs2_core_js_set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83); -/* harmony import */ var _babel_runtime_corejs2_core_js_set__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_set__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84); -/* harmony import */ var _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42); -/* harmony import */ var _babel_runtime_corejs2_core_js_number_is_nan__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(194); -/* harmony import */ var _babel_runtime_corejs2_core_js_number_is_nan__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_number_is_nan__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8); -/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(13); -/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(39); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(11); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(10); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11__); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(0); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(133); -/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_13__); -/* harmony import */ var json_schema_merge_allof__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(183); -/* harmony import */ var json_schema_merge_allof__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(json_schema_merge_allof__WEBPACK_IMPORTED_MODULE_14__); -/* harmony import */ var core_js_library_fn_array_fill__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(185); -/* harmony import */ var core_js_library_fn_array_fill__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_library_fn_array_fill__WEBPACK_IMPORTED_MODULE_15__); -/* harmony import */ var _validate__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(52); -/* harmony import */ var lodash_union__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(188); -/* harmony import */ var lodash_union__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash_union__WEBPACK_IMPORTED_MODULE_17__); -/* harmony import */ var jsonpointer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(189); -/* harmony import */ var jsonpointer__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(jsonpointer__WEBPACK_IMPORTED_MODULE_18__); - - - - - - - - - - - - - -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(key) === "symbol" ? key : String(key); } - -function _toPrimitive(input, hint) { if (Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(input) !== "object" || input === null) return input; var prim = input[_babel_runtime_corejs2_core_js_symbol_to_primitive__WEBPACK_IMPORTED_MODULE_0___default.a]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - - - +/* 5 */ +/***/ (function(module, exports) { +function _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; +} +module.exports = _defineProperty; +/***/ }), +/* 6 */ +/***/ (function(module, exports) { -var ADDITIONAL_PROPERTY_FLAG = "__additional_property"; -var widgetMap = { - "boolean": { - checkbox: "CheckboxWidget", - radio: "RadioWidget", - select: "SelectWidget", - hidden: "HiddenWidget" - }, - string: { - text: "TextWidget", - password: "PasswordWidget", - email: "EmailWidget", - hostname: "TextWidget", - ipv4: "TextWidget", - ipv6: "TextWidget", - uri: "URLWidget", - "data-url": "FileWidget", - radio: "RadioWidget", - select: "SelectWidget", - textarea: "TextareaWidget", - hidden: "HiddenWidget", - date: "DateWidget", - datetime: "DateTimeWidget", - "date-time": "DateTimeWidget", - "alt-date": "AltDateWidget", - "alt-datetime": "AltDateTimeWidget", - color: "ColorWidget", - file: "FileWidget" - }, - number: { - text: "TextWidget", - select: "SelectWidget", - updown: "UpDownWidget", - range: "RangeWidget", - radio: "RadioWidget", - hidden: "HiddenWidget" - }, - integer: { - text: "TextWidget", - select: "SelectWidget", - updown: "UpDownWidget", - range: "RangeWidget", - radio: "RadioWidget", - hidden: "HiddenWidget" - }, - array: { - select: "SelectWidget", - checkboxes: "CheckboxesWidget", - files: "FileWidget", - hidden: "HiddenWidget" - } -}; -function canExpand(schema, uiSchema, formData) { - if (!schema.additionalProperties) { - return false; - } +module.exports = __WEBPACK_EXTERNAL_MODULE__6__; - var _getUiOptions = getUiOptions(uiSchema), - expandable = _getUiOptions.expandable; +/***/ }), +/* 7 */ +/***/ (function(module, exports) { - if (expandable === false) { - return expandable; - } // if ui:options.expandable was not explicitly set to false, we can add - // another property if we have not exceeded maxProperties yet +module.exports = __WEBPACK_EXTERNAL_MODULE__7__; +/***/ }), +/* 8 */ +/***/ (function(module, exports) { - if (schema.maxProperties !== undefined) { - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(formData).length < schema.maxProperties; +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } - return true; -} -function getDefaultRegistry() { - return { - fields: __webpack_require__(584)["default"], - widgets: __webpack_require__(583)["default"], - definitions: {}, - rootSchema: {}, - formContext: {} - }; + return self; } -/* Gets the type of a given schema. */ - -function getSchemaType(schema) { - var type = schema.type; - - if (!type && schema["const"]) { - return guessType(schema["const"]); - } - if (!type && schema["enum"]) { - return "string"; - } +module.exports = _assertThisInitialized; - if (!type && (schema.properties || schema.additionalProperties)) { - return "object"; - } +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { - if (type instanceof Array && type.length === 2 && type.includes("null")) { - return type.find(function (type) { - return type !== "null"; - }); - } +module.exports = __webpack_require__(307); - return type; -} -function getWidget(schema, widget) { - var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var type = getSchemaType(schema); +/***/ }), +/* 10 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - function mergeOptions(Widget) { - // cache return value as property of widget for proper react reconciliation - if (!Widget.MergedWidget) { - var defaultOptions = Widget.defaultProps && Widget.defaultProps.options || {}; +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SpecialTargets; }); +var ActionTypes; - Widget.MergedWidget = function (_ref) { - var _ref$options = _ref.options, - options = _ref$options === void 0 ? {} : _ref$options, - props = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_ref, ["options"]); +(function (ActionTypes) { + ActionTypes["Start"] = "xstate.start"; + ActionTypes["Stop"] = "xstate.stop"; + ActionTypes["Raise"] = "xstate.raise"; + ActionTypes["Send"] = "xstate.send"; + ActionTypes["Cancel"] = "xstate.cancel"; + ActionTypes["NullEvent"] = ""; + ActionTypes["Assign"] = "xstate.assign"; + ActionTypes["After"] = "xstate.after"; + ActionTypes["DoneState"] = "done.state"; + ActionTypes["DoneInvoke"] = "done.invoke"; + ActionTypes["Log"] = "xstate.log"; + ActionTypes["Init"] = "xstate.init"; + ActionTypes["Invoke"] = "xstate.invoke"; + ActionTypes["ErrorExecution"] = "error.execution"; + ActionTypes["ErrorCommunication"] = "error.communication"; + ActionTypes["ErrorPlatform"] = "error.platform"; + ActionTypes["ErrorCustom"] = "xstate.error"; + ActionTypes["Update"] = "xstate.update"; + ActionTypes["Pure"] = "xstate.pure"; + ActionTypes["Choose"] = "xstate.choose"; +})(ActionTypes || (ActionTypes = {})); - return react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(Widget, Object(_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({ - options: Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, defaultOptions, options) - }, props)); - }; - } +var SpecialTargets; - return Widget.MergedWidget; - } +(function (SpecialTargets) { + SpecialTargets["Parent"] = "#_parent"; + SpecialTargets["Internal"] = "#_internal"; +})(SpecialTargets || (SpecialTargets = {})); - if (typeof widget === "function" || react_is__WEBPACK_IMPORTED_MODULE_13__["isForwardRef"](react__WEBPACK_IMPORTED_MODULE_12___default.a.createElement(widget)) || react_is__WEBPACK_IMPORTED_MODULE_13__["isMemo"](widget)) { - return mergeOptions(widget); - } - if (typeof widget !== "string") { - throw new Error("Unsupported widget definition: ".concat(Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(widget))); - } - if (registeredWidgets.hasOwnProperty(widget)) { - var registeredWidget = registeredWidgets[widget]; - return getWidget(schema, registeredWidget, registeredWidgets); - } +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { - if (!widgetMap.hasOwnProperty(type)) { - throw new Error("No widget for type \"".concat(type, "\"")); - } +module.exports = __webpack_require__(303); - if (widgetMap[type].hasOwnProperty(widget)) { - var _registeredWidget = registeredWidgets[widgetMap[type][widget]]; - return getWidget(schema, _registeredWidget, registeredWidgets); - } +/***/ }), +/* 12 */ +/***/ (function(module, exports) { - throw new Error("No widget \"".concat(widget, "\" for type \"").concat(type, "\"")); -} -function hasWidget(schema, widget) { - var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +module.exports = __WEBPACK_EXTERNAL_MODULE__12__; - try { - getWidget(schema, widget, registeredWidgets); - return true; - } catch (e) { - if (e.message && (e.message.startsWith("No widget") || e.message.startsWith("Unsupported widget"))) { - return false; - } +/***/ }), +/* 13 */ +/***/ (function(module, exports) { - throw e; - } +function _getPrototypeOf(o) { + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); } -function computeDefaults(_schema, parentDefaults, rootSchema) { - var rawFormData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var includeUndefinedValues = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - var schema = isObject(_schema) ? _schema : {}; - var formData = isObject(rawFormData) ? rawFormData : {}; // Compute the defaults recursively: give highest priority to deepest nodes. +module.exports = _getPrototypeOf; - var defaults = parentDefaults; +/***/ }), +/* 14 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (isObject(defaults) && isObject(schema["default"])) { - // For object defaults, only override parent defaults that are defined in - // schema.default. - defaults = mergeObjects(defaults, schema["default"]); - } else if ("default" in schema) { - // Use schema defaults for this node. - defaults = schema["default"]; - } else if ("$ref" in schema) { - // Use referenced schema defaults for this node. - var refSchema = findSchemaDefinition(schema.$ref, rootSchema); - return computeDefaults(refSchema, defaults, rootSchema, formData, includeUndefinedValues); - } else if ("dependencies" in schema) { - var resolvedSchema = resolveDependencies(schema, rootSchema, formData); - return computeDefaults(resolvedSchema, defaults, rootSchema, formData, includeUndefinedValues); - } else if (isFixedItems(schema)) { - defaults = schema.items.map(function (itemSchema, idx) { - return computeDefaults(itemSchema, _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(parentDefaults) ? parentDefaults[idx] : undefined, rootSchema, formData, includeUndefinedValues); - }); - } else if ("oneOf" in schema) { - schema = schema.oneOf[getMatchingOption(undefined, schema.oneOf, rootSchema)]; - } else if ("anyOf" in schema) { - schema = schema.anyOf[getMatchingOption(undefined, schema.anyOf, rootSchema)]; - } // Not defaults defined for this node, fallback to generic typed ones. +"use strict"; +/* unused harmony export after */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assign; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return cancel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return choose; }); +/* unused harmony export doneState */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return error; }); +/* unused harmony export errorExecution */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return errorPlatform; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return init; }); +/* unused harmony export invoke */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return log; }); +/* unused harmony export nullEvent */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return pure; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return raise; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return send; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return start; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return stop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return update; }); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10); + // xstate-specific action types +var start = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Start; +var stop = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Stop; +var raise = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Raise; +var send = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Send; +var cancel = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Cancel; +var nullEvent = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].NullEvent; +var assign = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Assign; +var after = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].After; +var doneState = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].DoneState; +var log = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Log; +var init = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Init; +var invoke = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Invoke; +var errorExecution = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].ErrorExecution; +var errorPlatform = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].ErrorPlatform; +var error = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].ErrorCustom; +var update = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Update; +var choose = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Choose; +var pure = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Pure; - if (typeof defaults === "undefined") { - defaults = schema["default"]; - } - switch (getSchemaType(schema)) { - // We need to recur for object schema inner default values. - case "object": - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(schema.properties || {}).reduce(function (acc, key) { - // Compute the defaults for this node, with the parent defaults we might - // have from a previous run: defaults[key]. - var computedDefault = computeDefaults(schema.properties[key], (defaults || {})[key], rootSchema, (formData || {})[key], includeUndefinedValues); +/***/ }), +/* 15 */ +/***/ (function(module, exports) { - if (includeUndefinedValues || computedDefault !== undefined) { - acc[key] = computedDefault; - } +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef - return acc; - }, {}); - case "array": - // Inject defaults into existing array defaults - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(defaults)) { - defaults = defaults.map(function (item, idx) { - return computeDefaults(schema.items[idx] || schema.additionalItems || {}, item, rootSchema); - }); - } // Deeply inject defaults into already existing form data +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { +var baseGetTag = __webpack_require__(39), + isObject = __webpack_require__(29); - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(rawFormData)) { - defaults = rawFormData.map(function (item, idx) { - return computeDefaults(schema.items, (defaults || {})[idx], rootSchema, item); - }); - } +/** `Object#toString` result references. */ +var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; - if (schema.minItems) { - if (!isMultiSelect(schema, rootSchema)) { - var defaultsLength = defaults ? defaults.length : 0; +/** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ +function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +} - if (schema.minItems > defaultsLength) { - var defaultEntries = defaults || []; // populate the array with the defaults +module.exports = isFunction; - var fillerSchema = _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(schema.items) ? schema.additionalItems : schema.items; - var fillerEntries = core_js_library_fn_array_fill__WEBPACK_IMPORTED_MODULE_15___default()(new Array(schema.minItems - defaultsLength), computeDefaults(fillerSchema, fillerSchema.defaults, rootSchema)); // then fill up the rest with either the item default or empty, up to minItems - return defaultEntries.concat(fillerEntries); - } - } else { - return defaults ? defaults : []; - } - } +/***/ }), +/* 17 */ +/***/ (function(module, exports) { +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } - - return defaults; } -function getDefaultFormState(_schema, formData) { - var rootSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var includeUndefinedValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; +module.exports = _classCallCheck; - if (!isObject(_schema)) { - throw new Error("Invalid schema: " + _schema); +/***/ }), +/* 18 */ +/***/ (function(module, exports) { + +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); } +} - var schema = retrieveSchema(_schema, rootSchema, formData); - var defaults = computeDefaults(schema, _schema["default"], rootSchema, formData, includeUndefinedValues); +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} - if (typeof formData === "undefined") { - // No form data? Use schema defaults. - return defaults; - } +module.exports = _createClass; - if (isObject(formData) || _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(formData)) { - return mergeDefaultsWithFormData(defaults, formData); - } +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { - if (formData === 0 || formData === false || formData === "") { - return formData; +var setPrototypeOf = __webpack_require__(167); + +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); } - return formData || defaults; + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + if (superClass) setPrototypeOf(subClass, superClass); } -/** - * When merging defaults and form data, we want to merge in this specific way: - * - objects are deeply merged - * - arrays are merged in such a way that: - * - when the array is set in form data, only array entries set in form data - * are deeply merged; additional entries from the defaults are ignored - * - when the array is not set in form data, the default is copied over - * - scalars are overwritten/set by form data - */ -function mergeDefaultsWithFormData(defaults, formData) { - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(formData)) { - if (!_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(defaults)) { - defaults = []; - } +module.exports = _inherits; - return formData.map(function (value, idx) { - if (defaults[idx]) { - return mergeDefaultsWithFormData(defaults[idx], value); - } +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { - return value; - }); - } else if (isObject(formData)) { - var acc = Object(_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({}, defaults); // Prevent mutation of source object. +var _typeof = __webpack_require__(117); +var assertThisInitialized = __webpack_require__(8); - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(formData).reduce(function (acc, key) { - acc[key] = mergeDefaultsWithFormData(defaults ? defaults[key] : {}, formData[key]); - return acc; - }, acc); - } else { - return formData; +function _possibleConstructorReturn(self, call) { + if (call && (_typeof(call) === "object" || typeof call === "function")) { + return call; } + + return assertThisInitialized(self); } -function getUiOptions(uiSchema) { - // get all passed options from ui:widget, ui:options, and ui: - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(uiSchema).filter(function (key) { - return key.indexOf("ui:") === 0; - }).reduce(function (options, key) { - var value = uiSchema[key]; - if (key === "ui:widget" && isObject(value)) { - console.warn("Setting options via ui:widget object is deprecated, use ui:options instead"); - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, options, value.options || {}, { - widget: value.component - }); - } +module.exports = _possibleConstructorReturn; - if (key === "ui:options" && isObject(value)) { - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, options, value); - } +/***/ }), +/* 21 */ +/***/ (function(module, exports) { - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, options, Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, key.substring(3), value)); - }, {}); -} -function getDisplayLabel(schema, uiSchema, rootSchema) { - var uiOptions = getUiOptions(uiSchema); - var _uiOptions$label = uiOptions.label, - displayLabel = _uiOptions$label === void 0 ? true : _uiOptions$label; - - if (schema.type === "array") { - displayLabel = isMultiSelect(schema, rootSchema) || isFilesArray(schema, uiSchema, rootSchema); - } - - if (schema.type === "object") { - displayLabel = false; - } - - if (schema.type === "boolean" && !uiSchema["ui:widget"]) { - displayLabel = false; - } - - if (uiSchema["ui:field"]) { - displayLabel = false; - } - - return displayLabel; -} -function isObject(thing) { - if (typeof File !== "undefined" && thing instanceof File) { - return false; - } +/** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ +var isArray = Array.isArray; - return Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(thing) === "object" && thing !== null && !_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(thing); -} -function mergeObjects(obj1, obj2) { - var concatArrays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; +module.exports = isArray; - // Recursively merge deeply nested objects. - var acc = Object(_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({}, obj1); // Prevent mutation of source object. +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(obj2).reduce(function (acc, key) { - var left = obj1 ? obj1[key] : {}, - right = obj2[key]; +var global = __webpack_require__(24); +var core = __webpack_require__(15); +var ctx = __webpack_require__(40); +var hide = __webpack_require__(43); +var has = __webpack_require__(50); +var PROTOTYPE = 'prototype'; - if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) { - acc[key] = mergeObjects(left, right, concatArrays); - } else if (concatArrays && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(left) && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(right)) { - acc[key] = left.concat(right); - } else { - acc[key] = right; +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && has(exports, key)) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } - - return acc; - }, acc); -} -function asNumber(value) { - if (value === "") { - return undefined; } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; - if (value === null) { - return null; - } - if (/\.$/.test(value)) { - // "3." can't really be considered a number even if it parses in js. The - // user is most likely entering a float. - return value; - } +/***/ }), +/* 23 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - if (/\.0$/.test(value)) { - // we need to return this as a string here, to allow for input like 3.07 - return value; - } +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IS_PRODUCTION; }); +var IS_PRODUCTION = "production" === 'production'; - var n = Number(value); - var valid = typeof n === "number" && !_babel_runtime_corejs2_core_js_number_is_nan__WEBPACK_IMPORTED_MODULE_4___default()(n); - if (/\.\d*0$/.test(value)) { - // It's a number, that's cool - but we need it as a string so it doesn't screw - // with the user when entering dollar amounts or other values (such as those with - // specific precision or number of significant digits) - return value; - } +/***/ }), +/* 24 */ +/***/ (function(module, exports) { - return valid ? n : value; -} -function orderProperties(properties, order) { - if (!_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(order)) { - return properties; - } +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - var arrayToHash = function arrayToHash(arr) { - return arr.reduce(function (prev, curr) { - prev[curr] = true; - return prev; - }, {}); - }; - var errorPropList = function errorPropList(arr) { - return arr.length > 1 ? "properties '".concat(arr.join("', '"), "'") : "property '".concat(arr[0], "'"); - }; +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { - var propertyHash = arrayToHash(properties); - var orderFiltered = order.filter(function (prop) { - return prop === "*" || propertyHash[prop]; - }); - var orderHash = arrayToHash(orderFiltered); - var rest = properties.filter(function (prop) { - return !orderHash[prop]; - }); - var restIndex = orderFiltered.indexOf("*"); +var baseGetTag = __webpack_require__(39), + getPrototype = __webpack_require__(107), + isObjectLike = __webpack_require__(31); - if (restIndex === -1) { - if (rest.length) { - throw new Error("uiSchema order list does not contain ".concat(errorPropList(rest))); - } +/** `Object#toString` result references. */ +var objectTag = '[object Object]'; - return orderFiltered; - } +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; - if (restIndex !== orderFiltered.lastIndexOf("*")) { - throw new Error("uiSchema order list contains more than one wildcard item"); - } +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; - var complete = Object(_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(orderFiltered); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); - complete.splice.apply(complete, [restIndex, 1].concat(Object(_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(rest))); - return complete; -} /** - * This function checks if the given schema matches a single - * constant value. + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true */ - -function isConstant(schema) { - return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(schema["enum"]) && schema["enum"].length === 1 || schema.hasOwnProperty("const"); -} -function toConstant(schema) { - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(schema["enum"]) && schema["enum"].length === 1) { - return schema["enum"][0]; - } else if (schema.hasOwnProperty("const")) { - return schema["const"]; - } else { - throw new Error("schema cannot be inferred as a constant"); - } -} -function isSelect(_schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var schema = retrieveSchema(_schema, rootSchema); - var altSchemas = schema.oneOf || schema.anyOf; - - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(schema["enum"])) { - return true; - } else if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(altSchemas)) { - return altSchemas.every(function (altSchemas) { - return isConstant(altSchemas); - }); - } - - return false; -} -function isMultiSelect(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (!schema.uniqueItems || !schema.items) { +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } - - return isSelect(schema.items, rootSchema); -} -function isFilesArray(schema, uiSchema) { - var rootSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (uiSchema["ui:widget"] === "files") { + var proto = getPrototype(value); + if (proto === null) { return true; - } else if (schema.items) { - var itemsSchema = retrieveSchema(schema.items, rootSchema); - return itemsSchema.type === "string" && itemsSchema.format === "data-url"; - } - - return false; -} -function isFixedItems(schema) { - return _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(schema.items) && schema.items.length > 0 && schema.items.every(function (item) { - return isObject(item); - }); -} -function allowAdditionalItems(schema) { - if (schema.additionalItems === true) { - console.warn("additionalItems=true is currently not supported"); - } - - return isObject(schema.additionalItems); -} -function optionsList(schema) { - if (schema["enum"]) { - return schema["enum"].map(function (value, i) { - var label = schema.enumNames && schema.enumNames[i] || String(value); - return { - label: label, - value: value - }; - }); - } else { - var altSchemas = schema.oneOf || schema.anyOf; - return altSchemas.map(function (schema, i) { - var value = toConstant(schema); - var label = schema.title || String(value); - return { - label: label, - value: value - }; - }); } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } -function findSchemaDefinition($ref) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var origRef = $ref; - - if ($ref.startsWith("#")) { - // Decode URI fragment representation. - $ref = decodeURIComponent($ref.substring(1)); - } else { - throw new Error("Could not find a definition for ".concat(origRef, ".")); - } - var current = jsonpointer__WEBPACK_IMPORTED_MODULE_18___default.a.get(rootSchema, $ref); +module.exports = isPlainObject; - if (current === undefined) { - throw new Error("Could not find a definition for ".concat(origRef, ".")); - } - if (current.hasOwnProperty("$ref")) { - return findSchemaDefinition(current.$ref, rootSchema); - } +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { - return current; -} // In the case where we have to implicitly create a schema, it is useful to know what type to use -// based on the data we are defining +var store = __webpack_require__(128)('wks'); +var uid = __webpack_require__(90); +var Symbol = __webpack_require__(24).Symbol; +var USE_SYMBOL = typeof Symbol == 'function'; -var guessType = function guessType(value) { - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(value)) { - return "array"; - } else if (typeof value === "string") { - return "string"; - } else if (value == null) { - return "null"; - } else if (typeof value === "boolean") { - return "boolean"; - } else if (!isNaN(value)) { - return "number"; - } else if (Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(value) === "object") { - return "object"; - } // Default to string if we can't figure it out +var $exports = module.exports = function (name) { + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; +$exports.store = store; - return "string"; -}; // This function will create new "properties" items for each key in our formData -function stubExistingAdditionalProperties(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - // Clone the schema so we don't ruin the consumer's original - schema = Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, schema, { - properties: Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, schema.properties) - }); +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { - _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(formData).forEach(function (key) { - if (schema.properties.hasOwnProperty(key)) { - // No need to stub, our schema already has the property - return; - } +"use strict"; - var additionalProperties; - if (schema.additionalProperties.hasOwnProperty("$ref")) { - additionalProperties = retrieveSchema({ - $ref: schema.additionalProperties["$ref"] - }, rootSchema, formData); - } else if (schema.additionalProperties.hasOwnProperty("type")) { - additionalProperties = Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, schema.additionalProperties); - } else { - additionalProperties = { - type: guessType(formData[key]) - }; - } // The type of our new key should match the additionalProperties value; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.canExpand = canExpand; +exports.getDefaultRegistry = getDefaultRegistry; +exports.getSchemaType = getSchemaType; +exports.getWidget = getWidget; +exports.hasWidget = hasWidget; +exports.getDefaultFormState = getDefaultFormState; +exports.mergeDefaultsWithFormData = mergeDefaultsWithFormData; +exports.getUiOptions = getUiOptions; +exports.getDisplayLabel = getDisplayLabel; +exports.isObject = isObject; +exports.mergeObjects = mergeObjects; +exports.asNumber = asNumber; +exports.orderProperties = orderProperties; +exports.isConstant = isConstant; +exports.toConstant = toConstant; +exports.isSelect = isSelect; +exports.isMultiSelect = isMultiSelect; +exports.isFilesArray = isFilesArray; +exports.isFixedItems = isFixedItems; +exports.allowAdditionalItems = allowAdditionalItems; +exports.optionsList = optionsList; +exports.findSchemaDefinition = findSchemaDefinition; +exports.stubExistingAdditionalProperties = stubExistingAdditionalProperties; +exports.resolveSchema = resolveSchema; +exports.retrieveSchema = retrieveSchema; +exports.mergeSchemas = mergeSchemas; +exports.deepEquals = deepEquals; +exports.shouldRender = shouldRender; +exports.toIdSchema = toIdSchema; +exports.toPathSchema = toPathSchema; +exports.parseDateString = parseDateString; +exports.toDateString = toDateString; +exports.utcToLocal = utcToLocal; +exports.localToUTC = localToUTC; +exports.pad = pad; +exports.dataURItoBlob = dataURItoBlob; +exports.rangeSpec = rangeSpec; +exports.getMatchingOption = getMatchingOption; +exports.schemaRequiresTrueValue = schemaRequiresTrueValue; +exports.guessType = exports.ADDITIONAL_PROPERTY_FLAG = void 0; +var _react = _interopRequireDefault(__webpack_require__(0)); - schema.properties[key] = additionalProperties; // Set our additional property flag so we know it was dynamically added +var ReactIs = _interopRequireWildcard(__webpack_require__(115)); - schema.properties[key][ADDITIONAL_PROPERTY_FLAG] = true; - }); +var _jsonSchemaMergeAllof = _interopRequireDefault(__webpack_require__(170)); - return schema; -} -function resolveSchema(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +var _fill = _interopRequireDefault(__webpack_require__(172)); - if (schema.hasOwnProperty("$ref")) { - return resolveReference(schema, rootSchema, formData); - } else if (schema.hasOwnProperty("dependencies")) { - var resolvedSchema = resolveDependencies(schema, rootSchema, formData); - return retrieveSchema(resolvedSchema, rootSchema, formData); - } else if (schema.hasOwnProperty("allOf")) { - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, schema, { - allOf: schema.allOf.map(function (allOfSubschema) { - return retrieveSchema(allOfSubschema, rootSchema, formData); - }) - }); - } else { - // No $ref or dependencies attribute found, returning the original schema. - return schema; - } -} +var _union = _interopRequireDefault(__webpack_require__(173)); -function resolveReference(schema, rootSchema, formData) { - // Retrieve the referenced schema definition. - var $refSchema = findSchemaDefinition(schema.$ref, rootSchema); // Drop the $ref property of the source schema. +var _jsonpointer = _interopRequireDefault(__webpack_require__(174)); - var $ref = schema.$ref, - localSchema = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(schema, ["$ref"]); // Update referenced schema definition with local schema properties. +var _fields = _interopRequireDefault(__webpack_require__(546)); +var _widgets = _interopRequireDefault(__webpack_require__(557)); - return retrieveSchema(Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, $refSchema, localSchema), rootSchema, formData); -} +var _validate = _interopRequireWildcard(__webpack_require__(576)); -function retrieveSchema(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } - if (!isObject(schema)) { - return {}; - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var resolvedSchema = resolveSchema(schema, rootSchema, formData); +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } - if ("allOf" in schema) { - try { - resolvedSchema = json_schema_merge_allof__WEBPACK_IMPORTED_MODULE_14___default()(Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, resolvedSchema, { - allOf: resolvedSchema.allOf - })); - } catch (e) { - console.warn("could not merge subschemas in allOf:\n" + e); +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - var _resolvedSchema = resolvedSchema, - allOf = _resolvedSchema.allOf, - resolvedSchemaWithoutAllOf = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_resolvedSchema, ["allOf"]); +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - return resolvedSchemaWithoutAllOf; - } - } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - var hasAdditionalProperties = resolvedSchema.hasOwnProperty("additionalProperties") && resolvedSchema.additionalProperties !== false; +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - if (hasAdditionalProperties) { - return stubExistingAdditionalProperties(resolvedSchema, rootSchema, formData); - } +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - return resolvedSchema; -} +function _typeof(obj) { 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); } -function resolveDependencies(schema, rootSchema, formData) { - // Drop the dependencies from the source schema. - var _schema$dependencies = schema.dependencies, - dependencies = _schema$dependencies === void 0 ? {} : _schema$dependencies, - resolvedSchema = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(schema, ["dependencies"]); +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); } - if ("oneOf" in resolvedSchema) { - resolvedSchema = resolvedSchema.oneOf[getMatchingOption(formData, resolvedSchema.oneOf, rootSchema)]; - } else if ("anyOf" in resolvedSchema) { - resolvedSchema = resolvedSchema.anyOf[getMatchingOption(formData, resolvedSchema.anyOf, rootSchema)]; - } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - return processDependencies(dependencies, resolvedSchema, rootSchema, formData); -} +function _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; } -function processDependencies(dependencies, resolvedSchema, rootSchema, formData) { - // Process dependencies updating the local schema properties as appropriate. - for (var dependencyKey in dependencies) { - // Skip this dependency if its trigger property is not present. - if (formData[dependencyKey] === undefined) { - continue; - } // Skip this dependency if it is not included in the schema (such as when dependencyKey is itself a hidden dependency.) +function _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; } +function _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; } - if (resolvedSchema.properties && !(dependencyKey in resolvedSchema.properties)) { - continue; - } - - var dependencyValue = dependencies[dependencyKey], - remainingDependencies = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(dependencies, [dependencyKey].map(_toPropertyKey)); - - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(dependencyValue)) { - resolvedSchema = withDependentProperties(resolvedSchema, dependencyValue); - } else if (isObject(dependencyValue)) { - resolvedSchema = withDependentSchema(resolvedSchema, rootSchema, formData, dependencyKey, dependencyValue); - } - - return processDependencies(remainingDependencies, resolvedSchema, rootSchema, formData); +var ADDITIONAL_PROPERTY_FLAG = "__additional_property"; +exports.ADDITIONAL_PROPERTY_FLAG = ADDITIONAL_PROPERTY_FLAG; +var widgetMap = { + "boolean": { + checkbox: "CheckboxWidget", + radio: "RadioWidget", + select: "SelectWidget", + hidden: "HiddenWidget" + }, + string: { + text: "TextWidget", + password: "PasswordWidget", + email: "EmailWidget", + hostname: "TextWidget", + ipv4: "TextWidget", + ipv6: "TextWidget", + uri: "URLWidget", + "data-url": "FileWidget", + radio: "RadioWidget", + select: "SelectWidget", + textarea: "TextareaWidget", + hidden: "HiddenWidget", + date: "DateWidget", + datetime: "DateTimeWidget", + "date-time": "DateTimeWidget", + "alt-date": "AltDateWidget", + "alt-datetime": "AltDateTimeWidget", + color: "ColorWidget", + file: "FileWidget" + }, + number: { + text: "TextWidget", + select: "SelectWidget", + updown: "UpDownWidget", + range: "RangeWidget", + radio: "RadioWidget", + hidden: "HiddenWidget" + }, + integer: { + text: "TextWidget", + select: "SelectWidget", + updown: "UpDownWidget", + range: "RangeWidget", + radio: "RadioWidget", + hidden: "HiddenWidget" + }, + array: { + select: "SelectWidget", + checkboxes: "CheckboxesWidget", + files: "FileWidget", + hidden: "HiddenWidget" } +}; - return resolvedSchema; -} - -function withDependentProperties(schema, additionallyRequired) { - if (!additionallyRequired) { - return schema; +function canExpand(schema, uiSchema, formData) { + if (!schema.additionalProperties) { + return false; } - var required = _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(schema.required) ? _babel_runtime_corejs2_core_js_array_from__WEBPACK_IMPORTED_MODULE_2___default()(new _babel_runtime_corejs2_core_js_set__WEBPACK_IMPORTED_MODULE_1___default.a([].concat(Object(_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(schema.required), Object(_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(additionallyRequired)))) : additionallyRequired; - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, schema, { - required: required - }); -} + var _getUiOptions = getUiOptions(uiSchema), + expandable = _getUiOptions.expandable; -function withDependentSchema(schema, rootSchema, formData, dependencyKey, dependencyValue) { - var _retrieveSchema = retrieveSchema(dependencyValue, rootSchema, formData), - oneOf = _retrieveSchema.oneOf, - dependentSchema = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_retrieveSchema, ["oneOf"]); + if (expandable === false) { + return expandable; + } // if ui:options.expandable was not explicitly set to false, we can add + // another property if we have not exceeded maxProperties yet - schema = mergeSchemas(schema, dependentSchema); // Since it does not contain oneOf, we return the original schema. - if (oneOf === undefined) { - return schema; - } else if (!_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(oneOf)) { - throw new Error("invalid: it is some ".concat(Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(oneOf), " instead of an array")); - } // Resolve $refs inside oneOf. + if (schema.maxProperties !== undefined) { + return Object.keys(formData).length < schema.maxProperties; + } + return true; +} - var resolvedOneOf = oneOf.map(function (subschema) { - return subschema.hasOwnProperty("$ref") ? resolveReference(subschema, rootSchema, formData) : subschema; - }); - return withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, resolvedOneOf); +function getDefaultRegistry() { + return { + fields: _fields["default"], + widgets: _widgets["default"], + definitions: {}, + rootSchema: {}, + formContext: {} + }; } +/* Gets the type of a given schema. */ -function withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, oneOf) { - var validSubschemas = oneOf.filter(function (subschema) { - if (!subschema.properties) { - return false; - } - var conditionPropertySchema = subschema.properties[dependencyKey]; +function getSchemaType(schema) { + var type = schema.type; - if (conditionPropertySchema) { - var conditionSchema = { - type: "object", - properties: Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, dependencyKey, conditionPropertySchema) - }; + if (!type && schema["const"]) { + return guessType(schema["const"]); + } - var _validateFormData = Object(_validate__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"])(formData, conditionSchema), - errors = _validateFormData.errors; + if (!type && schema["enum"]) { + return "string"; + } - return errors.length === 0; - } - }); + if (!type && (schema.properties || schema.additionalProperties)) { + return "object"; + } - if (validSubschemas.length !== 1) { - console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"); - return schema; + if (type instanceof Array && type.length === 2 && type.includes("null")) { + return type.find(function (type) { + return type !== "null"; + }); } - var subschema = validSubschemas[0]; + return type; +} - var _subschema$properties = subschema.properties, - conditionPropertySchema = _subschema$properties[dependencyKey], - dependentSubschema = Object(_babel_runtime_corejs2_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(_subschema$properties, [dependencyKey].map(_toPropertyKey)); +function getWidget(schema, widget) { + var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var type = getSchemaType(schema); - var dependentSchema = Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])({}, subschema, { - properties: dependentSubschema - }); + function mergeOptions(Widget) { + // cache return value as property of widget for proper react reconciliation + if (!Widget.MergedWidget) { + var defaultOptions = Widget.defaultProps && Widget.defaultProps.options || {}; - return mergeSchemas(schema, retrieveSchema(dependentSchema, rootSchema, formData)); -} // Recursively merge deeply nested schemas. -// The difference between mergeSchemas and mergeObjects -// is that mergeSchemas only concats arrays for -// values under the "required" keyword, and when it does, -// it doesn't include duplicate values. + Widget.MergedWidget = function (_ref) { + var _ref$options = _ref.options, + options = _ref$options === void 0 ? {} : _ref$options, + props = _objectWithoutProperties(_ref, ["options"]); + return _react["default"].createElement(Widget, _extends({ + options: _objectSpread({}, defaultOptions, options) + }, props)); + }; + } -function mergeSchemas(obj1, obj2) { - var acc = Object(_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({}, obj1); // Prevent mutation of source object. + return Widget.MergedWidget; + } + if (typeof widget === "function" || ReactIs.isForwardRef(_react["default"].createElement(widget)) || ReactIs.isMemo(widget)) { + return mergeOptions(widget); + } - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(obj2).reduce(function (acc, key) { - var left = obj1 ? obj1[key] : {}, - right = obj2[key]; + if (typeof widget !== "string") { + throw new Error("Unsupported widget definition: ".concat(_typeof(widget))); + } - if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) { - acc[key] = mergeSchemas(left, right); - } else if (obj1 && obj2 && (getSchemaType(obj1) === "object" || getSchemaType(obj2) === "object") && key === "required" && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(left) && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(right)) { - // Don't include duplicate values when merging - // "required" fields. - acc[key] = lodash_union__WEBPACK_IMPORTED_MODULE_17___default()(left, right); - } else { - acc[key] = right; - } + if (registeredWidgets.hasOwnProperty(widget)) { + var registeredWidget = registeredWidgets[widget]; + return getWidget(schema, registeredWidget, registeredWidgets); + } - return acc; - }, acc); -} + if (!widgetMap.hasOwnProperty(type)) { + throw new Error("No widget for type \"".concat(type, "\"")); + } -function isArguments(object) { - return Object.prototype.toString.call(object) === "[object Arguments]"; + if (widgetMap[type].hasOwnProperty(widget)) { + var _registeredWidget = registeredWidgets[widgetMap[type][widget]]; + return getWidget(schema, _registeredWidget, registeredWidgets); + } + + throw new Error("No widget \"".concat(widget, "\" for type \"").concat(type, "\"")); } -function deepEquals(a, b) { - var ca = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - var cb = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; +function hasWidget(schema, widget) { + var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - // Partially extracted from node-deeper and adapted to exclude comparison - // checks for functions. - // https://github.com/othiym23/node-deeper - if (a === b) { - return true; - } else if (typeof a === "function" || typeof b === "function") { - // Assume all functions are equivalent - // see https://github.com/rjsf-team/react-jsonschema-form/issues/255 + try { + getWidget(schema, widget, registeredWidgets); return true; - } else if (Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(a) !== "object" || Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(b) !== "object") { - return false; - } else if (a === null || b === null) { - return false; - } else if (a instanceof Date && b instanceof Date) { - return a.getTime() === b.getTime(); - } else if (a instanceof RegExp && b instanceof RegExp) { - return a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.lastIndex === b.lastIndex && a.ignoreCase === b.ignoreCase; - } else if (isArguments(a) || isArguments(b)) { - if (!(isArguments(a) && isArguments(b))) { + } catch (e) { + if (e.message && (e.message.startsWith("No widget") || e.message.startsWith("Unsupported widget"))) { return false; } - var slice = Array.prototype.slice; - return deepEquals(slice.call(a), slice.call(b), ca, cb); - } else { - if (a.constructor !== b.constructor) { - return false; - } + throw e; + } +} + +function computeDefaults(_schema, parentDefaults, rootSchema) { + var rawFormData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var includeUndefinedValues = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var schema = isObject(_schema) ? _schema : {}; + var formData = isObject(rawFormData) ? rawFormData : {}; // Compute the defaults recursively: give highest priority to deepest nodes. + + var defaults = parentDefaults; - var ka = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(a); + if (isObject(defaults) && isObject(schema["default"])) { + // For object defaults, only override parent defaults that are defined in + // schema.default. + defaults = mergeObjects(defaults, schema["default"]); + } else if ("default" in schema) { + // Use schema defaults for this node. + defaults = schema["default"]; + } else if ("$ref" in schema) { + // Use referenced schema defaults for this node. + var refSchema = findSchemaDefinition(schema.$ref, rootSchema); + return computeDefaults(refSchema, defaults, rootSchema, formData, includeUndefinedValues); + } else if ("dependencies" in schema) { + var resolvedSchema = resolveDependencies(schema, rootSchema, formData); + return computeDefaults(resolvedSchema, defaults, rootSchema, formData, includeUndefinedValues); + } else if (isFixedItems(schema)) { + defaults = schema.items.map(function (itemSchema, idx) { + return computeDefaults(itemSchema, Array.isArray(parentDefaults) ? parentDefaults[idx] : undefined, rootSchema, formData, includeUndefinedValues); + }); + } else if ("oneOf" in schema) { + schema = schema.oneOf[getMatchingOption(undefined, schema.oneOf, rootSchema)]; + } else if ("anyOf" in schema) { + schema = schema.anyOf[getMatchingOption(undefined, schema.anyOf, rootSchema)]; + } // Not defaults defined for this node, fallback to generic typed ones. - var kb = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(b); // don't bother with stack acrobatics if there's nothing there + if (typeof defaults === "undefined") { + defaults = schema["default"]; + } - if (ka.length === 0 && kb.length === 0) { - return true; - } + switch (getSchemaType(schema)) { + // We need to recur for object schema inner default values. + case "object": + return Object.keys(schema.properties || {}).reduce(function (acc, key) { + // Compute the defaults for this node, with the parent defaults we might + // have from a previous run: defaults[key]. + var computedDefault = computeDefaults(schema.properties[key], (defaults || {})[key], rootSchema, (formData || {})[key], includeUndefinedValues); - if (ka.length !== kb.length) { - return false; - } + if (includeUndefinedValues || computedDefault !== undefined) { + acc[key] = computedDefault; + } - var cal = ca.length; + return acc; + }, {}); - while (cal--) { - if (ca[cal] === a) { - return cb[cal] === b; - } - } + case "array": + // Inject defaults into existing array defaults + if (Array.isArray(defaults)) { + defaults = defaults.map(function (item, idx) { + return computeDefaults(schema.items[idx] || schema.additionalItems || {}, item, rootSchema); + }); + } // Deeply inject defaults into already existing form data - ca.push(a); - cb.push(b); - ka.sort(); - kb.sort(); - for (var j = ka.length - 1; j >= 0; j--) { - if (ka[j] !== kb[j]) { - return false; + if (Array.isArray(rawFormData)) { + defaults = rawFormData.map(function (item, idx) { + return computeDefaults(schema.items, (defaults || {})[idx], rootSchema, item); + }); } - } - var key; + if (schema.minItems) { + if (!isMultiSelect(schema, rootSchema)) { + var defaultsLength = defaults ? defaults.length : 0; - for (var k = ka.length - 1; k >= 0; k--) { - key = ka[k]; + if (schema.minItems > defaultsLength) { + var defaultEntries = defaults || []; // populate the array with the defaults - if (!deepEquals(a[key], b[key], ca, cb)) { - return false; + var fillerSchema = Array.isArray(schema.items) ? schema.additionalItems : schema.items; + var fillerEntries = (0, _fill["default"])(new Array(schema.minItems - defaultsLength), computeDefaults(fillerSchema, fillerSchema.defaults, rootSchema)); // then fill up the rest with either the item default or empty, up to minItems + + return defaultEntries.concat(fillerEntries); + } + } else { + return defaults ? defaults : []; + } } - } - ca.pop(); - cb.pop(); - return true; } + + return defaults; } -function shouldRender(comp, nextProps, nextState) { - var props = comp.props, - state = comp.state; - return !deepEquals(props, nextProps) || !deepEquals(state, nextState); -} -function toIdSchema(schema, id, rootSchema) { - var formData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var idPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "root"; - var idSchema = { - $id: id || idPrefix - }; - if ("$ref" in schema || "dependencies" in schema || "allOf" in schema) { - var _schema = retrieveSchema(schema, rootSchema, formData); +function getDefaultFormState(_schema, formData) { + var rootSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var includeUndefinedValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - return toIdSchema(_schema, id, rootSchema, formData, idPrefix); + if (!isObject(_schema)) { + throw new Error("Invalid schema: " + _schema); } - if ("items" in schema && !schema.items.$ref) { - return toIdSchema(schema.items, id, rootSchema, formData, idPrefix); + var schema = retrieveSchema(_schema, rootSchema, formData); + var defaults = computeDefaults(schema, _schema["default"], rootSchema, formData, includeUndefinedValues); + + if (typeof formData === "undefined") { + // No form data? Use schema defaults. + return defaults; } - if (schema.type !== "object") { - return idSchema; + if (isObject(formData) || Array.isArray(formData)) { + return mergeDefaultsWithFormData(defaults, formData); } - for (var name in schema.properties || {}) { - var field = schema.properties[name]; - var fieldId = idSchema.$id + "_" + name; - idSchema[name] = toIdSchema(isObject(field) ? field : {}, fieldId, rootSchema, // It's possible that formData is not an object -- this can happen if an - // array item has just been added, but not populated with data yet - (formData || {})[name], idPrefix); + if (formData === 0 || formData === false || formData === "") { + return formData; } - return idSchema; + return formData || defaults; } -function toPathSchema(schema) { - var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - var rootSchema = arguments.length > 2 ? arguments[2] : undefined; - var formData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var pathSchema = { - $name: name.replace(/^\./, "") - }; +/** + * When merging defaults and form data, we want to merge in this specific way: + * - objects are deeply merged + * - arrays are merged in such a way that: + * - when the array is set in form data, only array entries set in form data + * are deeply merged; additional entries from the defaults are ignored + * - when the array is not set in form data, the default is copied over + * - scalars are overwritten/set by form data + */ - if ("$ref" in schema || "dependencies" in schema || "allOf" in schema) { - var _schema = retrieveSchema(schema, rootSchema, formData); - return toPathSchema(_schema, name, rootSchema, formData); - } +function mergeDefaultsWithFormData(defaults, formData) { + if (Array.isArray(formData)) { + if (!Array.isArray(defaults)) { + defaults = []; + } - if (schema.hasOwnProperty("additionalProperties")) { - pathSchema.__rjsf_additionalProperties = true; - } + return formData.map(function (value, idx) { + if (defaults[idx]) { + return mergeDefaultsWithFormData(defaults[idx], value); + } - if (schema.hasOwnProperty("items") && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_6___default()(formData)) { - formData.forEach(function (element, i) { - pathSchema[i] = toPathSchema(schema.items, "".concat(name, ".").concat(i), rootSchema, element); + return value; }); - } else if (schema.hasOwnProperty("properties")) { - for (var property in schema.properties) { - pathSchema[property] = toPathSchema(schema.properties[property], "".concat(name, ".").concat(property), rootSchema, // It's possible that formData is not an object -- this can happen if an - // array item has just been added, but not populated with data yet - (formData || {})[property]); - } + } else if (isObject(formData)) { + var acc = _extends({}, defaults); // Prevent mutation of source object. + + + return Object.keys(formData).reduce(function (acc, key) { + acc[key] = mergeDefaultsWithFormData(defaults ? defaults[key] : {}, formData[key]); + return acc; + }, acc); + } else { + return formData; } +} - return pathSchema; +function getUiOptions(uiSchema) { + // get all passed options from ui:widget, ui:options, and ui: + return Object.keys(uiSchema).filter(function (key) { + return key.indexOf("ui:") === 0; + }).reduce(function (options, key) { + var value = uiSchema[key]; + + if (key === "ui:widget" && isObject(value)) { + console.warn("Setting options via ui:widget object is deprecated, use ui:options instead"); + return _objectSpread({}, options, value.options || {}, { + widget: value.component + }); + } + + if (key === "ui:options" && isObject(value)) { + return _objectSpread({}, options, value); + } + + return _objectSpread({}, options, _defineProperty({}, key.substring(3), value)); + }, {}); } -function parseDateString(dateString) { - var includeTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - if (!dateString) { - return { - year: -1, - month: -1, - day: -1, - hour: includeTime ? -1 : 0, - minute: includeTime ? -1 : 0, - second: includeTime ? -1 : 0 - }; +function getDisplayLabel(schema, uiSchema, rootSchema) { + var uiOptions = getUiOptions(uiSchema); + var _uiOptions$label = uiOptions.label, + displayLabel = _uiOptions$label === void 0 ? true : _uiOptions$label; + + if (schema.type === "array") { + displayLabel = isMultiSelect(schema, rootSchema) || isFilesArray(schema, uiSchema, rootSchema); } - var date = new Date(dateString); + if (schema.type === "object") { + displayLabel = false; + } - if (_babel_runtime_corejs2_core_js_number_is_nan__WEBPACK_IMPORTED_MODULE_4___default()(date.getTime())) { - throw new Error("Unable to parse date " + dateString); + if (schema.type === "boolean" && !uiSchema["ui:widget"]) { + displayLabel = false; } - return { - year: date.getUTCFullYear(), - month: date.getUTCMonth() + 1, - // oh you, javascript. - day: date.getUTCDate(), - hour: includeTime ? date.getUTCHours() : 0, - minute: includeTime ? date.getUTCMinutes() : 0, - second: includeTime ? date.getUTCSeconds() : 0 - }; -} -function toDateString(_ref2) { - var year = _ref2.year, - month = _ref2.month, - day = _ref2.day, - _ref2$hour = _ref2.hour, - hour = _ref2$hour === void 0 ? 0 : _ref2$hour, - _ref2$minute = _ref2.minute, - minute = _ref2$minute === void 0 ? 0 : _ref2$minute, - _ref2$second = _ref2.second, - second = _ref2$second === void 0 ? 0 : _ref2$second; - var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var utcTime = Date.UTC(year, month - 1, day, hour, minute, second); - var datetime = new Date(utcTime).toJSON(); - return time ? datetime : datetime.slice(0, 10); + if (uiSchema["ui:field"]) { + displayLabel = false; + } + + return displayLabel; } -function utcToLocal(jsonDate) { - if (!jsonDate) { - return ""; - } // required format of `"yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS" - // https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type%3Ddatetime-local) - // > should be a _valid local date and time string_ (not GMT) - // Note - date constructor passed local ISO-8601 does not correctly - // change time to UTC in node pre-8 - - var date = new Date(jsonDate); - var yyyy = pad(date.getFullYear(), 4); - var MM = pad(date.getMonth() + 1, 2); - var dd = pad(date.getDate(), 2); - var hh = pad(date.getHours(), 2); - var mm = pad(date.getMinutes(), 2); - var ss = pad(date.getSeconds(), 2); - var SSS = pad(date.getMilliseconds(), 3); - return "".concat(yyyy, "-").concat(MM, "-").concat(dd, "T").concat(hh, ":").concat(mm, ":").concat(ss, ".").concat(SSS); -} -function localToUTC(dateString) { - if (dateString) { - return new Date(dateString).toJSON(); - } -} -function pad(num, size) { - var s = String(num); - - while (s.length < size) { - s = "0" + s; +function isObject(thing) { + if (typeof File !== "undefined" && thing instanceof File) { + return false; } - return s; + return _typeof(thing) === "object" && thing !== null && !Array.isArray(thing); } -function dataURItoBlob(dataURI) { - // Split metadata from data - var splitted = dataURI.split(","); // Split params - - var params = splitted[0].split(";"); // Get mime-type from params - - var type = params[0].replace("data:", ""); // Filter the name property from params - var properties = params.filter(function (param) { - return param.split("=")[0] === "name"; - }); // Look for the name and use unknown if no name property. +function mergeObjects(obj1, obj2) { + var concatArrays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var name; + // Recursively merge deeply nested objects. + var acc = _extends({}, obj1); // Prevent mutation of source object. - if (properties.length !== 1) { - name = "unknown"; - } else { - // Because we filtered out the other property, - // we only have the name case here. - name = properties[0].split("=")[1]; - } // Built the Uint8Array Blob parameter from the base64 string. + return Object.keys(obj2).reduce(function (acc, key) { + var left = obj1 ? obj1[key] : {}, + right = obj2[key]; - var binary = atob(splitted[1]); - var array = []; + if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) { + acc[key] = mergeObjects(left, right, concatArrays); + } else if (concatArrays && Array.isArray(left) && Array.isArray(right)) { + acc[key] = left.concat(right); + } else { + acc[key] = right; + } - for (var i = 0; i < binary.length; i++) { - array.push(binary.charCodeAt(i)); - } // Create the blob object + return acc; + }, acc); +} +function asNumber(value) { + if (value === "") { + return undefined; + } - var blob = new window.Blob([new Uint8Array(array)], { - type: type - }); - return { - blob: blob, - name: name - }; -} -function rangeSpec(schema) { - var spec = {}; + if (value === null) { + return null; + } - if (schema.multipleOf) { - spec.step = schema.multipleOf; + if (/\.$/.test(value)) { + // "3." can't really be considered a number even if it parses in js. The + // user is most likely entering a float. + return value; } - if (schema.minimum || schema.minimum === 0) { - spec.min = schema.minimum; + if (/\.0$/.test(value)) { + // we need to return this as a string here, to allow for input like 3.07 + return value; } - if (schema.maximum || schema.maximum === 0) { - spec.max = schema.maximum; + var n = Number(value); + var valid = typeof n === "number" && !Number.isNaN(n); + + if (/\.\d*0$/.test(value)) { + // It's a number, that's cool - but we need it as a string so it doesn't screw + // with the user when entering dollar amounts or other values (such as those with + // specific precision or number of significant digits) + return value; } - return spec; + return valid ? n : value; } -function getMatchingOption(formData, options, rootSchema) { - for (var i = 0; i < options.length; i++) { - var option = options[i]; // If the schema describes an object then we need to add slightly more - // strict matching to the schema, because unless the schema uses the - // "requires" keyword, an object will match the schema as long as it - // doesn't have matching keys with a conflicting type. To do this we use an - // "anyOf" with an array of requires. This augmentation expresses that the - // schema should match if any of the keys in the schema are present on the - // object and pass validation. - if (option.properties) { - // Create an "anyOf" schema that requires at least one of the keys in the - // "properties" object - var requiresAnyOf = { - anyOf: _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(option.properties).map(function (key) { - return { - required: [key] - }; - }) - }; - var augmentedSchema = void 0; // If the "anyOf" keyword already exists, wrap the augmentation in an "allOf" +function orderProperties(properties, order) { + if (!Array.isArray(order)) { + return properties; + } - if (option.anyOf) { - // Create a shallow clone of the option - var shallowClone = Object(_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({}, option); + var arrayToHash = function arrayToHash(arr) { + return arr.reduce(function (prev, curr) { + prev[curr] = true; + return prev; + }, {}); + }; - if (!shallowClone.allOf) { - shallowClone.allOf = []; - } else { - // If "allOf" already exists, shallow clone the array - shallowClone.allOf = shallowClone.allOf.slice(); - } + var errorPropList = function errorPropList(arr) { + return arr.length > 1 ? "properties '".concat(arr.join("', '"), "'") : "property '".concat(arr[0], "'"); + }; - shallowClone.allOf.push(requiresAnyOf); - augmentedSchema = shallowClone; - } else { - augmentedSchema = Object(_babel_runtime_corejs2_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])({}, option, requiresAnyOf); - } // Remove the "required" field as it's likely that not all fields have - // been filled in yet, which will mean that the schema is not valid + var propertyHash = arrayToHash(properties); + var orderFiltered = order.filter(function (prop) { + return prop === "*" || propertyHash[prop]; + }); + var orderHash = arrayToHash(orderFiltered); + var rest = properties.filter(function (prop) { + return !orderHash[prop]; + }); + var restIndex = orderFiltered.indexOf("*"); + if (restIndex === -1) { + if (rest.length) { + throw new Error("uiSchema order list does not contain ".concat(errorPropList(rest))); + } - delete augmentedSchema.required; + return orderFiltered; + } - if (Object(_validate__WEBPACK_IMPORTED_MODULE_16__[/* isValid */ "b"])(augmentedSchema, formData)) { - return i; - } - } else if (Object(_validate__WEBPACK_IMPORTED_MODULE_16__[/* isValid */ "b"])(options[i], formData)) { - return i; - } + if (restIndex !== orderFiltered.lastIndexOf("*")) { + throw new Error("uiSchema order list contains more than one wildcard item"); } - return 0; -} // Check to see if a schema specifies that a value must be true + var complete = _toConsumableArray(orderFiltered); -function schemaRequiresTrueValue(schema) { - // Check if const is a truthy value - if (schema["const"]) { - return true; - } // Check if an enum has a single value of true + complete.splice.apply(complete, [restIndex, 1].concat(_toConsumableArray(rest))); + return complete; +} +/** + * This function checks if the given schema matches a single + * constant value. + */ - if (schema["enum"] && schema["enum"].length === 1 && schema["enum"][0] === true) { - return true; - } // If anyOf has a single value, evaluate the subschema +function isConstant(schema) { + return Array.isArray(schema["enum"]) && schema["enum"].length === 1 || schema.hasOwnProperty("const"); +} +function toConstant(schema) { + if (Array.isArray(schema["enum"]) && schema["enum"].length === 1) { + return schema["enum"][0]; + } else if (schema.hasOwnProperty("const")) { + return schema["const"]; + } else { + throw new Error("schema cannot be inferred as a constant"); + } +} - if (schema.anyOf && schema.anyOf.length === 1) { - return schemaRequiresTrueValue(schema.anyOf[0]); - } // If oneOf has a single value, evaluate the subschema +function isSelect(_schema) { + var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var schema = retrieveSchema(_schema, rootSchema); + var altSchemas = schema.oneOf || schema.anyOf; + if (Array.isArray(schema["enum"])) { + return true; + } else if (Array.isArray(altSchemas)) { + return altSchemas.every(function (altSchemas) { + return isConstant(altSchemas); + }); + } - if (schema.oneOf && schema.oneOf.length === 1) { - return schemaRequiresTrueValue(schema.oneOf[0]); - } // Evaluate each subschema in allOf, to see if one of them requires a true - // value + return false; +} +function isMultiSelect(schema) { + var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - if (schema.allOf) { - return schema.allOf.some(schemaRequiresTrueValue); + if (!schema.uniqueItems || !schema.items) { + return false; } - return false; + return isSelect(schema.items, rootSchema); } -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { +function isFilesArray(schema, uiSchema) { + var rootSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ + if (uiSchema["ui:widget"] === "files") { + return true; + } else if (schema.items) { + var itemsSchema = retrieveSchema(schema.items, rootSchema); + return itemsSchema.type === "string" && itemsSchema.format === "data-url"; + } -if (false) { var throwOnDirectAccess, ReactIs; } else { - // By explicitly using `prop-types` you are opting into new production behavior. - // http://fb.me/prop-types-in-prod - module.exports = __webpack_require__(329)(); + return false; } +function isFixedItems(schema) { + return Array.isArray(schema.items) && schema.items.length > 0 && schema.items.every(function (item) { + return isObject(item); + }); +} -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE__5__; +function allowAdditionalItems(schema) { + if (schema.additionalItems === true) { + console.warn("additionalItems=true is currently not supported"); + } -/***/ }), -/* 6 */ -/***/ (function(module, exports) { + return isObject(schema.additionalItems); +} -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true +function optionsList(schema) { + if (schema["enum"]) { + return schema["enum"].map(function (value, i) { + var label = schema.enumNames && schema.enumNames[i] || String(value); + return { + label: label, + value: value + }; }); } else { - obj[key] = value; + var altSchemas = schema.oneOf || schema.anyOf; + return altSchemas.map(function (schema, i) { + var value = toConstant(schema); + var label = schema.title || String(value); + return { + label: label, + value: value + }; + }); } - - return obj; } -module.exports = _defineProperty; +function findSchemaDefinition($ref) { + var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var origRef = $ref; -/***/ }), -/* 7 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if ($ref.startsWith("#")) { + // Decode URI fragment representation. + $ref = decodeURIComponent($ref.substring(1)); + } else { + throw new Error("Could not find a definition for ".concat(origRef, ".")); + } -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return after; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return assign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return cancel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return choose; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return done; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return doneInvoke; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return error; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return escalate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return forwardTo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getActionFunction; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return initEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return log; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return pure; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return raise; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return resolveActions; }); -/* unused harmony export resolveLog */ -/* unused harmony export resolveRaise */ -/* unused harmony export resolveSend */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return respond; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return send; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return sendParent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return sendUpdate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return start; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return stop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return toActionObject; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return toActionObjects; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return toActivityDefinition; }); -/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _environment_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14); -/* harmony import */ var _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15); + var current = _jsonpointer["default"].get(rootSchema, $ref); + if (current === undefined) { + throw new Error("Could not find a definition for ".concat(origRef, ".")); + } + if (current.hasOwnProperty("$ref")) { + return findSchemaDefinition(current.$ref, rootSchema); + } + return current; +} // In the case where we have to implicitly create a schema, it is useful to know what type to use +// based on the data we are defining -var initEvent = /*#__PURE__*/Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])({ - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* init */ "f"] -}); +var guessType = function guessType(value) { + if (Array.isArray(value)) { + return "array"; + } else if (typeof value === "string") { + return "string"; + } else if (value == null) { + return "null"; + } else if (typeof value === "boolean") { + return "boolean"; + } else if (!isNaN(value)) { + return "number"; + } else if (_typeof(value) === "object") { + return "object"; + } // Default to string if we can't figure it out -function getActionFunction(actionType, actionFunctionMap) { - return actionFunctionMap ? actionFunctionMap[actionType] || undefined : undefined; -} -function toActionObject(action, actionFunctionMap) { - var actionObject; + return "string"; +}; // This function will create new "properties" items for each key in our formData - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action) || typeof action === 'number') { - var exec = getActionFunction(action, actionFunctionMap); - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(exec)) { - actionObject = { - type: action, - exec: exec - }; - } else if (exec) { - actionObject = exec; - } else { - actionObject = { - type: action, - exec: undefined - }; - } - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action)) { - actionObject = { - // Convert action to string if unnamed - type: action.name || action.toString(), - exec: action - }; - } else { - var exec = getActionFunction(action.type, actionFunctionMap); +exports.guessType = guessType; - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(exec)) { - actionObject = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { - exec: exec - }); - } else if (exec) { - var actionType = exec.type || action.type; - actionObject = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, exec), action), { - type: actionType - }); - } else { - actionObject = action; +function stubExistingAdditionalProperties(schema) { + var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + // Clone the schema so we don't ruin the consumer's original + schema = _objectSpread({}, schema, { + properties: _objectSpread({}, schema.properties) + }); + Object.keys(formData).forEach(function (key) { + if (schema.properties.hasOwnProperty(key)) { + // No need to stub, our schema already has the property + return; } - } - Object.defineProperty(actionObject, 'toString', { - value: function () { - return actionObject.type; - }, - enumerable: false, - configurable: true - }); - return actionObject; -} + var additionalProperties; -var toActionObjects = function (action, actionFunctionMap) { - if (!action) { - return []; - } + if (schema.additionalProperties.hasOwnProperty("$ref")) { + additionalProperties = retrieveSchema({ + $ref: schema.additionalProperties["$ref"] + }, rootSchema, formData); + } else if (schema.additionalProperties.hasOwnProperty("type")) { + additionalProperties = _objectSpread({}, schema.additionalProperties); + } else { + additionalProperties = { + type: guessType(formData[key]) + }; + } // The type of our new key should match the additionalProperties value; - var actions = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isArray */ "d"])(action) ? action : [action]; - return actions.map(function (subAction) { - return toActionObject(subAction, actionFunctionMap); - }); -}; -function toActivityDefinition(action) { - var actionObject = toActionObject(action); - return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ - id: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action) ? action : actionObject.id - }, actionObject), { - type: actionObject.type + schema.properties[key] = additionalProperties; // Set our additional property flag so we know it was dynamically added + + schema.properties[key][ADDITIONAL_PROPERTY_FLAG] = true; }); + return schema; } -/** - * Raises an event. This places the event in the internal event queue, so that - * the event is immediately consumed by the machine in the current step. - * - * @param eventType The event to raise. - */ +function resolveSchema(schema) { + var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; -function raise(event) { - if (!Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(event)) { - return send(event, { - to: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Internal + if (schema.hasOwnProperty("$ref")) { + return resolveReference(schema, rootSchema, formData); + } else if (schema.hasOwnProperty("dependencies")) { + var resolvedSchema = resolveDependencies(schema, rootSchema, formData); + return retrieveSchema(resolvedSchema, rootSchema, formData); + } else if (schema.hasOwnProperty("allOf")) { + return _objectSpread({}, schema, { + allOf: schema.allOf.map(function (allOfSubschema) { + return retrieveSchema(allOfSubschema, rootSchema, formData); + }) }); + } else { + // No $ref or dependencies attribute found, returning the original schema. + return schema; } - - return { - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* raise */ "k"], - event: event - }; } -function resolveRaise(action) { - return { - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* raise */ "k"], - _event: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(action.event) - }; -} -/** - * Sends an event. This returns an action that will be read by an interpreter to - * send the event in the next step, after the current step is finished executing. - * - * @param event The event to send. - * @param options Options to pass into the send event: - * - `id` - The unique send event identifier (used with `cancel()`). - * - `delay` - The number of milliseconds to delay the sending of the event. - * - `to` - The target of this event (by default, the machine the event was sent from). - */ +function resolveReference(schema, rootSchema, formData) { + // Retrieve the referenced schema definition. + var $refSchema = findSchemaDefinition(schema.$ref, rootSchema); // Drop the $ref property of the source schema. + var $ref = schema.$ref, + localSchema = _objectWithoutProperties(schema, ["$ref"]); // Update referenced schema definition with local schema properties. -function send(event, options) { - return { - to: options ? options.to : undefined, - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* send */ "l"], - event: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(event) ? event : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toEventObject */ "x"])(event), - delay: options ? options.delay : undefined, - id: options && options.id !== undefined ? options.id : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(event) ? event.name : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* getEventType */ "c"])(event) - }; -} -function resolveSend(action, ctx, _event, delaysMap) { - var meta = { - _event: _event - }; // TODO: helper function for resolving Expr + return retrieveSchema(_objectSpread({}, $refSchema, localSchema), rootSchema, formData); +} - var resolvedEvent = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.event) ? action.event(ctx, _event.data, meta) : action.event); - var resolvedDelay; +function retrieveSchema(schema) { + var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action.delay)) { - var configDelay = delaysMap && delaysMap[action.delay]; - resolvedDelay = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay; - } else { - resolvedDelay = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay; + if (!isObject(schema)) { + return {}; } - var resolvedTarget = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.to) ? action.to(ctx, _event.data, meta) : action.to; - return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { - to: resolvedTarget, - _event: resolvedEvent, - event: resolvedEvent.data, - delay: resolvedDelay - }); -} -/** - * Sends an event to this machine's parent. - * - * @param event The event to send to the parent machine. - * @param options Options to pass into the send event. - */ + var resolvedSchema = resolveSchema(schema, rootSchema, formData); + if ("allOf" in schema) { + try { + resolvedSchema = (0, _jsonSchemaMergeAllof["default"])(_objectSpread({}, resolvedSchema, { + allOf: resolvedSchema.allOf + })); + } catch (e) { + console.warn("could not merge subschemas in allOf:\n" + e); -function sendParent(event, options) { - return send(event, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { - to: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Parent - })); -} -/** - * Sends an update event to this machine's parent. - */ + var _resolvedSchema = resolvedSchema, + allOf = _resolvedSchema.allOf, + resolvedSchemaWithoutAllOf = _objectWithoutProperties(_resolvedSchema, ["allOf"]); + return resolvedSchemaWithoutAllOf; + } + } -function sendUpdate() { - return sendParent(_actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* update */ "o"]); -} -/** - * Sends an event back to the sender of the original event. - * - * @param event The event to send back to the sender - * @param options Options to pass into the send event - */ + var hasAdditionalProperties = resolvedSchema.hasOwnProperty("additionalProperties") && resolvedSchema.additionalProperties !== false; + if (hasAdditionalProperties) { + return stubExistingAdditionalProperties(resolvedSchema, rootSchema, formData); + } -function respond(event, options) { - return send(event, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { - to: function (_, __, _a) { - var _event = _a._event; - return _event.origin; // TODO: handle when _event.origin is undefined - } - })); + return resolvedSchema; } -var defaultLogExpr = function (context, event) { - return { - context: context, - event: event - }; -}; -/** - * - * @param expr The expression function to evaluate which will be logged. - * Takes in 2 arguments: - * - `ctx` - the current state context - * - `event` - the event that caused this action to be executed. - * @param label The label to give to the logged expression. - */ - +function resolveDependencies(schema, rootSchema, formData) { + // Drop the dependencies from the source schema. + var _schema$dependencies = schema.dependencies, + dependencies = _schema$dependencies === void 0 ? {} : _schema$dependencies, + resolvedSchema = _objectWithoutProperties(schema, ["dependencies"]); -function log(expr, label) { - if (expr === void 0) { - expr = defaultLogExpr; + if ("oneOf" in resolvedSchema) { + resolvedSchema = resolvedSchema.oneOf[getMatchingOption(formData, resolvedSchema.oneOf, rootSchema)]; + } else if ("anyOf" in resolvedSchema) { + resolvedSchema = resolvedSchema.anyOf[getMatchingOption(formData, resolvedSchema.anyOf, rootSchema)]; } - return { - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* log */ "h"], - label: label, - expr: expr - }; + return processDependencies(dependencies, resolvedSchema, rootSchema, formData); } -var resolveLog = function (action, ctx, _event) { - return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { - value: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action.expr) ? action.expr : action.expr(ctx, _event.data, { - _event: _event - }) - }); -}; -/** - * Cancels an in-flight `send(...)` action. A canceled sent action will not - * be executed, nor will its event be sent, unless it has already been sent - * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`). - * - * @param sendId The `id` of the `send(...)` action to cancel. - */ +function processDependencies(dependencies, resolvedSchema, rootSchema, formData) { + // Process dependencies updating the local schema properties as appropriate. + for (var dependencyKey in dependencies) { + // Skip this dependency if its trigger property is not present. + if (formData[dependencyKey] === undefined) { + continue; + } // Skip this dependency if it is not included in the schema (such as when dependencyKey is itself a hidden dependency.) -var cancel = function (sendId) { - return { - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* cancel */ "b"], - sendId: sendId - }; -}; -/** - * Starts an activity. - * - * @param activity The activity to start. - */ + if (resolvedSchema.properties && !(dependencyKey in resolvedSchema.properties)) { + continue; + } + var dependencyValue = dependencies[dependencyKey], + remainingDependencies = _objectWithoutProperties(dependencies, [dependencyKey].map(_toPropertyKey)); -function start(activity) { - var activityDef = toActivityDefinition(activity); - return { - type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Start, - activity: activityDef, - exec: undefined - }; -} -/** - * Stops an activity. - * - * @param activity The activity to stop. - */ + if (Array.isArray(dependencyValue)) { + resolvedSchema = withDependentProperties(resolvedSchema, dependencyValue); + } else if (isObject(dependencyValue)) { + resolvedSchema = withDependentSchema(resolvedSchema, rootSchema, formData, dependencyKey, dependencyValue); + } + return processDependencies(remainingDependencies, resolvedSchema, rootSchema, formData); + } -function stop(activity) { - var activityDef = toActivityDefinition(activity); - return { - type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Stop, - activity: activityDef, - exec: undefined - }; + return resolvedSchema; } -/** - * Updates the current context of the machine. - * - * @param assignment An object that represents the partial context to update. - */ - - -var assign = function (assignment) { - return { - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* assign */ "a"], - assignment: assignment - }; -}; -/** - * Returns an event type that represents an implicit event that - * is sent after the specified `delay`. - * - * @param delayRef The delay in milliseconds - * @param id The state node ID where this event is handled - */ +function withDependentProperties(schema, additionallyRequired) { + if (!additionallyRequired) { + return schema; + } -function after(delayRef, id) { - var idSuffix = id ? "#" + id : ''; - return _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].After + "(" + delayRef + ")" + idSuffix; + var required = Array.isArray(schema.required) ? Array.from(new Set([].concat(_toConsumableArray(schema.required), _toConsumableArray(additionallyRequired)))) : additionallyRequired; + return _objectSpread({}, schema, { + required: required + }); } -/** - * Returns an event that represents that a final state node - * has been reached in the parent state node. - * - * @param id The final state node's parent state node `id` - * @param data The data to pass into the event - */ +function withDependentSchema(schema, rootSchema, formData, dependencyKey, dependencyValue) { + var _retrieveSchema = retrieveSchema(dependencyValue, rootSchema, formData), + oneOf = _retrieveSchema.oneOf, + dependentSchema = _objectWithoutProperties(_retrieveSchema, ["oneOf"]); -function done(id, data) { - var type = _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].DoneState + "." + id; - var eventObject = { - type: type, - data: data - }; + schema = mergeSchemas(schema, dependentSchema); // Since it does not contain oneOf, we return the original schema. - eventObject.toString = function () { - return type; - }; + if (oneOf === undefined) { + return schema; + } else if (!Array.isArray(oneOf)) { + throw new Error("invalid: it is some ".concat(_typeof(oneOf), " instead of an array")); + } // Resolve $refs inside oneOf. - return eventObject; + + var resolvedOneOf = oneOf.map(function (subschema) { + return subschema.hasOwnProperty("$ref") ? resolveReference(subschema, rootSchema, formData) : subschema; + }); + return withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, resolvedOneOf); } -/** - * Returns an event that represents that an invoked service has terminated. - * - * An invoked service is terminated when it has reached a top-level final state node, - * but not when it is canceled. - * - * @param id The final state node ID - * @param data The data to pass into the event - */ +function withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, oneOf) { + var validSubschemas = oneOf.filter(function (subschema) { + if (!subschema.properties) { + return false; + } -function doneInvoke(id, data) { - var type = _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].DoneInvoke + "." + id; - var eventObject = { - type: type, - data: data - }; + var conditionPropertySchema = subschema.properties[dependencyKey]; - eventObject.toString = function () { - return type; - }; + if (conditionPropertySchema) { + var conditionSchema = { + type: "object", + properties: _defineProperty({}, dependencyKey, conditionPropertySchema) + }; - return eventObject; -} + var _validateFormData = (0, _validate["default"])(formData, conditionSchema), + errors = _validateFormData.errors; -function error(id, data) { - var type = _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].ErrorPlatform + "." + id; - var eventObject = { - type: type, - data: data - }; + return errors.length === 0; + } + }); - eventObject.toString = function () { - return type; - }; + if (validSubschemas.length !== 1) { + console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"); + return schema; + } - return eventObject; -} + var subschema = validSubschemas[0]; -function pure(getActions) { - return { - type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Pure, - get: getActions - }; -} -/** - * Forwards (sends) an event to a specified service. - * - * @param target The target service to forward the event to. - * @param options Options to pass into the send action creator. - */ + var _subschema$properties = subschema.properties, + conditionPropertySchema = _subschema$properties[dependencyKey], + dependentSubschema = _objectWithoutProperties(_subschema$properties, [dependencyKey].map(_toPropertyKey)); + var dependentSchema = _objectSpread({}, subschema, { + properties: dependentSubschema + }); -function forwardTo(target, options) { - return send(function (_, event) { - return event; - }, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { - to: target - })); -} -/** - * Escalates an error by sending it as an event to this machine's parent. - * - * @param errorData The error data to send, or the expression function that - * takes in the `context`, `event`, and `meta`, and returns the error data to send. - * @param options Options to pass into the send action creator. - */ + return mergeSchemas(schema, retrieveSchema(dependentSchema, rootSchema, formData)); +} // Recursively merge deeply nested schemas. +// The difference between mergeSchemas and mergeObjects +// is that mergeSchemas only concats arrays for +// values under the "required" keyword, and when it does, +// it doesn't include duplicate values. -function escalate(errorData, options) { - return sendParent(function (context, event, meta) { - return { - type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* error */ "d"], - data: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(errorData) ? errorData(context, event, meta) : errorData - }; - }, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { - to: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Parent - })); -} +function mergeSchemas(obj1, obj2) { + var acc = _extends({}, obj1); // Prevent mutation of source object. -function choose(conds) { - return { - type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Choose, - conds: conds - }; -} -function resolveActions(machine, currentState, currentContext, _event, actions) { - var _a = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "b"])(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* partition */ "r"])(actions, function (action) { - return action.type === _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* assign */ "a"]; - }), 2), - assignActions = _a[0], - otherActions = _a[1]; + return Object.keys(obj2).reduce(function (acc, key) { + var left = obj1 ? obj1[key] : {}, + right = obj2[key]; - var updatedContext = assignActions.length ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* updateContext */ "G"])(currentContext, _event, assignActions, currentState) : currentContext; - var resolvedActions = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* flatten */ "b"])(otherActions.map(function (actionObject) { - var _a; + if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) { + acc[key] = mergeSchemas(left, right); + } else if (obj1 && obj2 && (getSchemaType(obj1) === "object" || getSchemaType(obj2) === "object") && key === "required" && Array.isArray(left) && Array.isArray(right)) { + // Don't include duplicate values when merging + // "required" fields. + acc[key] = (0, _union["default"])(left, right); + } else { + acc[key] = right; + } - switch (actionObject.type) { - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* raise */ "k"]: - return resolveRaise(actionObject); + return acc; + }, acc); +} - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* send */ "l"]: - var sendAction = resolveSend(actionObject, updatedContext, _event, machine.options.delays); // TODO: fix ActionTypes.Init +function isArguments(object) { + return Object.prototype.toString.call(object) === "[object Arguments]"; +} - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - // warn after resolving as we can create better contextual message here - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(!Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(actionObject.delay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length - "No delay reference for delay expression '" + actionObject.delay + "' was found on machine '" + machine.id + "'"); - } +function deepEquals(a, b) { + var ca = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var cb = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; - return sendAction; + // Partially extracted from node-deeper and adapted to exclude comparison + // checks for functions. + // https://github.com/othiym23/node-deeper + if (a === b) { + return true; + } else if (typeof a === "function" || typeof b === "function") { + // Assume all functions are equivalent + // see https://github.com/rjsf-team/react-jsonschema-form/issues/255 + return true; + } else if (_typeof(a) !== "object" || _typeof(b) !== "object") { + return false; + } else if (a === null || b === null) { + return false; + } else if (a instanceof Date && b instanceof Date) { + return a.getTime() === b.getTime(); + } else if (a instanceof RegExp && b instanceof RegExp) { + return a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.lastIndex === b.lastIndex && a.ignoreCase === b.ignoreCase; + } else if (isArguments(a) || isArguments(b)) { + if (!(isArguments(a) && isArguments(b))) { + return false; + } - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* log */ "h"]: - return resolveLog(actionObject, updatedContext, _event); + var slice = Array.prototype.slice; + return deepEquals(slice.call(a), slice.call(b), ca, cb); + } else { + if (a.constructor !== b.constructor) { + return false; + } - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* choose */ "c"]: - { - var chooseAction = actionObject; - var matchedActions = (_a = chooseAction.conds.find(function (condition) { - var guard = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toGuard */ "y"])(condition.cond, machine.options.guards); - return !guard || Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* evaluateGuard */ "a"])(machine, guard, updatedContext, _event, currentState); - })) === null || _a === void 0 ? void 0 : _a.actions; + var ka = Object.keys(a); + var kb = Object.keys(b); // don't bother with stack acrobatics if there's nothing there - if (!matchedActions) { - return []; - } + if (ka.length === 0 && kb.length === 0) { + return true; + } - var resolved = resolveActions(machine, currentState, updatedContext, _event, toActionObjects(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toArray */ "w"])(matchedActions), machine.options.actions)); - updatedContext = resolved[1]; - return resolved[0]; - } + if (ka.length !== kb.length) { + return false; + } - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* pure */ "j"]: - { - var matchedActions = actionObject.get(updatedContext, _event.data); + var cal = ca.length; - if (!matchedActions) { - return []; - } + while (cal--) { + if (ca[cal] === a) { + return cb[cal] === b; + } + } - var resolved = resolveActions(machine, currentState, updatedContext, _event, toActionObjects(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toArray */ "w"])(matchedActions), machine.options.actions)); - updatedContext = resolved[1]; - return resolved[0]; - } + ca.push(a); + cb.push(b); + ka.sort(); + kb.sort(); - default: - return toActionObject(actionObject, machine.options.actions); + for (var j = ka.length - 1; j >= 0; j--) { + if (ka[j] !== kb[j]) { + return false; + } } - })); - return [resolvedActions, updatedContext]; -} - + var _key; -/***/ }), -/* 8 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + for (var k = ka.length - 1; k >= 0; k--) { + _key = ka[k]; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(131); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__); + if (!deepEquals(a[_key], b[_key], ca, cb)) { + return false; + } + } -function _defineProperty(obj, key, value) { - if (key in obj) { - _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; + ca.pop(); + cb.pop(); + return true; } - - return obj; } -/***/ }), -/* 9 */ -/***/ (function(module, exports) { +function shouldRender(comp, nextProps, nextState) { + var props = comp.props, + state = comp.state; + return !deepEquals(props, nextProps) || !deepEquals(state, nextState); +} -module.exports = __WEBPACK_EXTERNAL_MODULE__9__; +function toIdSchema(schema, id, rootSchema) { + var formData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var idPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "root"; + var idSchema = { + $id: id || idPrefix + }; -/***/ }), -/* 10 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if ("$ref" in schema || "dependencies" in schema || "allOf" in schema) { + var _schema = retrieveSchema(schema, rootSchema, formData); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(275); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8); + return toIdSchema(_schema, id, rootSchema, formData, idPrefix); + } + if ("items" in schema && !schema.items.$ref) { + return toIdSchema(schema.items, id, rootSchema, formData, idPrefix); + } + if (schema.type !== "object") { + return idSchema; + } + for (var name in schema.properties || {}) { + var field = schema.properties[name]; + var fieldId = idSchema.$id + "_" + name; + idSchema[name] = toIdSchema(isObject(field) ? field : {}, fieldId, rootSchema, // It's possible that formData is not an object -- this can happen if an + // array item has just been added, but not populated with data yet + (formData || {})[name], idPrefix); + } -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? Object(arguments[i]) : {}; + return idSchema; +} - var ownKeys = _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(source); +function toPathSchema(schema) { + var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; + var rootSchema = arguments.length > 2 ? arguments[2] : undefined; + var formData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + var pathSchema = { + $name: name.replace(/^\./, "") + }; - if (typeof _babel_runtime_corejs2_core_js_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default.a === 'function') { - ownKeys = ownKeys.concat(_babel_runtime_corejs2_core_js_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(source).filter(function (sym) { - return _babel_runtime_corejs2_core_js_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_0___default()(source, sym).enumerable; - })); - } + if ("$ref" in schema || "dependencies" in schema || "allOf" in schema) { + var _schema = retrieveSchema(schema, rootSchema, formData); - ownKeys.forEach(function (key) { - Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(target, key, source[key]); - }); + return toPathSchema(_schema, name, rootSchema, formData); } - return target; -} + if (schema.hasOwnProperty("additionalProperties")) { + pathSchema.__rjsf_additionalProperties = true; + } -/***/ }), -/* 11 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (schema.hasOwnProperty("items") && Array.isArray(formData)) { + formData.forEach(function (element, i) { + pathSchema[i] = toPathSchema(schema.items, "".concat(name, ".").concat(i), rootSchema, element); + }); + } else if (schema.hasOwnProperty("properties")) { + for (var property in schema.properties) { + pathSchema[property] = toPathSchema(schema.properties[property], "".concat(name, ".").concat(property), rootSchema, // It's possible that formData is not an object -- this can happen if an + // array item has just been added, but not populated with data yet + (formData || {})[property]); + } + } -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(281); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_0__); + return pathSchema; +} -function _extends() { - _extends = _babel_runtime_corejs2_core_js_object_assign__WEBPACK_IMPORTED_MODULE_0___default.a || function (target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; +function parseDateString(dateString) { + var includeTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } + if (!dateString) { + return { + year: -1, + month: -1, + day: -1, + hour: includeTime ? -1 : 0, + minute: includeTime ? -1 : 0, + second: includeTime ? -1 : 0 + }; + } - return target; + var date = new Date(dateString); + + if (Number.isNaN(date.getTime())) { + throw new Error("Unable to parse date " + dateString); + } + + return { + year: date.getUTCFullYear(), + month: date.getUTCMonth() + 1, + // oh you, javascript. + day: date.getUTCDate(), + hour: includeTime ? date.getUTCHours() : 0, + minute: includeTime ? date.getUTCMinutes() : 0, + second: includeTime ? date.getUTCSeconds() : 0 }; +} - return _extends.apply(this, arguments); +function toDateString(_ref2) { + var year = _ref2.year, + month = _ref2.month, + day = _ref2.day, + _ref2$hour = _ref2.hour, + hour = _ref2$hour === void 0 ? 0 : _ref2$hour, + _ref2$minute = _ref2.minute, + minute = _ref2$minute === void 0 ? 0 : _ref2$minute, + _ref2$second = _ref2.second, + second = _ref2$second === void 0 ? 0 : _ref2$second; + var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var utcTime = Date.UTC(year, month - 1, day, hour, minute, second); + var datetime = new Date(utcTime).toJSON(); + return time ? datetime : datetime.slice(0, 10); } -/***/ }), -/* 12 */ -/***/ (function(module, exports) { +function utcToLocal(jsonDate) { + if (!jsonDate) { + return ""; + } // required format of `"yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS" + // https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type%3Ddatetime-local) + // > should be a _valid local date and time string_ (not GMT) + // Note - date constructor passed local ISO-8601 does not correctly + // change time to UTC in node pre-8 -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return self; + var date = new Date(jsonDate); + var yyyy = pad(date.getFullYear(), 4); + var MM = pad(date.getMonth() + 1, 2); + var dd = pad(date.getDate(), 2); + var hh = pad(date.getHours(), 2); + var mm = pad(date.getMinutes(), 2); + var ss = pad(date.getSeconds(), 2); + var SSS = pad(date.getMilliseconds(), 3); + return "".concat(yyyy, "-").concat(MM, "-").concat(dd, "T").concat(hh, ":").concat(mm, ":").concat(ss, ".").concat(SSS); } -module.exports = _assertThisInitialized; - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(313); +function localToUTC(dateString) { + if (dateString) { + return new Date(dateString).toJSON(); + } +} -/***/ }), -/* 14 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function pad(num, size) { + var s = String(num); -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SpecialTargets; }); -var ActionTypes; + while (s.length < size) { + s = "0" + s; + } -(function (ActionTypes) { - ActionTypes["Start"] = "xstate.start"; - ActionTypes["Stop"] = "xstate.stop"; - ActionTypes["Raise"] = "xstate.raise"; - ActionTypes["Send"] = "xstate.send"; - ActionTypes["Cancel"] = "xstate.cancel"; - ActionTypes["NullEvent"] = ""; - ActionTypes["Assign"] = "xstate.assign"; - ActionTypes["After"] = "xstate.after"; - ActionTypes["DoneState"] = "done.state"; - ActionTypes["DoneInvoke"] = "done.invoke"; - ActionTypes["Log"] = "xstate.log"; - ActionTypes["Init"] = "xstate.init"; - ActionTypes["Invoke"] = "xstate.invoke"; - ActionTypes["ErrorExecution"] = "error.execution"; - ActionTypes["ErrorCommunication"] = "error.communication"; - ActionTypes["ErrorPlatform"] = "error.platform"; - ActionTypes["ErrorCustom"] = "xstate.error"; - ActionTypes["Update"] = "xstate.update"; - ActionTypes["Pure"] = "xstate.pure"; - ActionTypes["Choose"] = "xstate.choose"; -})(ActionTypes || (ActionTypes = {})); + return s; +} -var SpecialTargets; +function dataURItoBlob(dataURI) { + // Split metadata from data + var splitted = dataURI.split(","); // Split params -(function (SpecialTargets) { - SpecialTargets["Parent"] = "#_parent"; - SpecialTargets["Internal"] = "#_internal"; -})(SpecialTargets || (SpecialTargets = {})); + var params = splitted[0].split(";"); // Get mime-type from params + var type = params[0].replace("data:", ""); // Filter the name property from params + var properties = params.filter(function (param) { + return param.split("=")[0] === "name"; + }); // Look for the name and use unknown if no name property. -/***/ }), -/* 15 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + var name; -"use strict"; -/* unused harmony export after */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return assign; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return cancel; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return choose; }); -/* unused harmony export doneState */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return error; }); -/* unused harmony export errorExecution */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return errorPlatform; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return init; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return invoke; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return log; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return nullEvent; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return pure; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return raise; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return send; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return start; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return stop; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return update; }); -/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); - // xstate-specific action types + if (properties.length !== 1) { + name = "unknown"; + } else { + // Because we filtered out the other property, + // we only have the name case here. + name = properties[0].split("=")[1]; + } // Built the Uint8Array Blob parameter from the base64 string. -var start = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Start; -var stop = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Stop; -var raise = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Raise; -var send = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Send; -var cancel = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Cancel; -var nullEvent = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].NullEvent; -var assign = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Assign; -var after = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].After; -var doneState = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].DoneState; -var log = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Log; -var init = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Init; -var invoke = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Invoke; -var errorExecution = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].ErrorExecution; -var errorPlatform = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].ErrorPlatform; -var error = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].ErrorCustom; -var update = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Update; -var choose = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Choose; -var pure = _types_js__WEBPACK_IMPORTED_MODULE_0__[/* ActionTypes */ "a"].Pure; + var binary = atob(splitted[1]); + var array = []; -/***/ }), -/* 16 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + for (var _i = 0; _i < binary.length; _i++) { + array.push(binary.charCodeAt(_i)); + } // Create the blob object -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; }); -function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - return self; + var blob = new window.Blob([new Uint8Array(array)], { + type: type + }); + return { + blob: blob, + name: name + }; } -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(309); +function rangeSpec(schema) { + var spec = {}; -/***/ }), -/* 18 */ -/***/ (function(module, exports) { + if (schema.multipleOf) { + spec.step = schema.multipleOf; + } -module.exports = __WEBPACK_EXTERNAL_MODULE__18__; + if (schema.minimum || schema.minimum === 0) { + spec.min = schema.minimum; + } -/***/ }), -/* 19 */ -/***/ (function(module, exports) { + if (schema.maximum || schema.maximum === 0) { + spec.max = schema.maximum; + } -function _getPrototypeOf(o) { - module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); + return spec; } -module.exports = _getPrototypeOf; +function getMatchingOption(formData, options, rootSchema) { + for (var _i2 = 0; _i2 < options.length; _i2++) { + var option = options[_i2]; // If the schema describes an object then we need to add slightly more + // strict matching to the schema, because unless the schema uses the + // "requires" keyword, an object will match the schema as long as it + // doesn't have matching keys with a conflicting type. To do this we use an + // "anyOf" with an array of requires. This augmentation expresses that the + // schema should match if any of the keys in the schema are present on the + // object and pass validation. -/***/ }), -/* 20 */ -/***/ (function(module, exports) { + if (option.properties) { + // Create an "anyOf" schema that requires at least one of the keys in the + // "properties" object + var requiresAnyOf = { + anyOf: Object.keys(option.properties).map(function (key) { + return { + required: [key] + }; + }) + }; + var augmentedSchema = void 0; // If the "anyOf" keyword already exists, wrap the augmentation in an "allOf" -var core = module.exports = { version: '2.6.11' }; -if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef + if (option.anyOf) { + // Create a shallow clone of the option + var shallowClone = _extends({}, option); + if (!shallowClone.allOf) { + shallowClone.allOf = []; + } else { + // If "allOf" already exists, shallow clone the array + shallowClone.allOf = shallowClone.allOf.slice(); + } -/***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + shallowClone.allOf.push(requiresAnyOf); + augmentedSchema = shallowClone; + } else { + augmentedSchema = _extends({}, option, requiresAnyOf); + } // Remove the "required" field as it's likely that not all fields have + // been filled in yet, which will mean that the schema is not valid -"use strict"; -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _objectWithoutProperties; }); + delete augmentedSchema.required; -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/get-own-property-symbols.js -var get_own_property_symbols = __webpack_require__(86); -var get_own_property_symbols_default = /*#__PURE__*/__webpack_require__.n(get_own_property_symbols); + if ((0, _validate.isValid)(augmentedSchema, formData)) { + return _i2; + } + } else if ((0, _validate.isValid)(options[_i2], formData)) { + return _i2; + } + } -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/keys.js -var keys = __webpack_require__(17); -var keys_default = /*#__PURE__*/__webpack_require__.n(keys); + return 0; +} // Check to see if a schema specifies that a value must be true -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; +function schemaRequiresTrueValue(schema) { + // Check if const is a truthy value + if (schema["const"]) { + return true; + } // Check if an enum has a single value of true - var sourceKeys = keys_default()(source); - var key, i; + if (schema["enum"] && schema["enum"].length === 1 && schema["enum"][0] === true) { + return true; + } // If anyOf has a single value, evaluate the subschema - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - return target; -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutProperties.js + if (schema.anyOf && schema.anyOf.length === 1) { + return schemaRequiresTrueValue(schema.anyOf[0]); + } // If oneOf has a single value, evaluate the subschema -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - var target = _objectWithoutPropertiesLoose(source, excluded); - var key, i; + if (schema.oneOf && schema.oneOf.length === 1) { + return schemaRequiresTrueValue(schema.oneOf[0]); + } // Evaluate each subschema in allOf, to see if one of them requires a true + // value - if (get_own_property_symbols_default.a) { - var sourceSymbolKeys = get_own_property_symbols_default()(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]; - } + if (schema.allOf) { + return schema.allOf.some(schemaRequiresTrueValue); } - return target; + return false; } /***/ }), -/* 22 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return IS_PRODUCTION; }); -var IS_PRODUCTION = "production" === 'production'; +var arrayWithHoles = __webpack_require__(577); +var iterableToArrayLimit = __webpack_require__(578); -/***/ }), -/* 23 */ -/***/ (function(module, exports, __webpack_require__) { +var unsupportedIterableToArray = __webpack_require__(264); -var baseGetTag = __webpack_require__(55), - isObject = __webpack_require__(44); +var nonIterableRest = __webpack_require__(579); -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; + +/***/ }), +/* 29 */ +/***/ (function(module, exports) { /** - * Checks if `value` is classified as a `Function` object. + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * - * _.isFunction(_); + * _.isObject({}); * // => true * - * _.isFunction(/abc/); + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); * // => false */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; +function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } -module.exports = isFunction; +module.exports = isObject; /***/ }), -/* 24 */ -/***/ (function(module, exports) { +/* 30 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} +"use strict"; +/* unused harmony export after */ +/* unused harmony export assign */ +/* unused harmony export cancel */ +/* unused harmony export choose */ +/* unused harmony export done */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return doneInvoke; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return error; }); +/* unused harmony export escalate */ +/* unused harmony export forwardTo */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getActionFunction; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initEvent; }); +/* unused harmony export log */ +/* unused harmony export pure */ +/* unused harmony export raise */ +/* unused harmony export resolveActions */ +/* unused harmony export resolveLog */ +/* unused harmony export resolveRaise */ +/* unused harmony export resolveSend */ +/* unused harmony export resolveStop */ +/* unused harmony export respond */ +/* unused harmony export send */ +/* unused harmony export sendParent */ +/* unused harmony export sendUpdate */ +/* unused harmony export start */ +/* unused harmony export stop */ +/* unused harmony export toActionObject */ +/* unused harmony export toActionObjects */ +/* unused harmony export toActivityDefinition */ +/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var _environment_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2); +/* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10); +/* harmony import */ var _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14); -module.exports = _classCallCheck; -/***/ }), -/* 25 */ -/***/ (function(module, exports) { -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); - } -} -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; + +var initEvent = /*#__PURE__*/Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])({ + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* init */ "f"] +}); + +function getActionFunction(actionType, actionFunctionMap) { + return actionFunctionMap ? actionFunctionMap[actionType] || undefined : undefined; } -module.exports = _createClass; +function toActionObject(action, actionFunctionMap) { + var actionObject; -/***/ }), -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action) || typeof action === 'number') { + var exec = getActionFunction(action, actionFunctionMap); -var setPrototypeOf = __webpack_require__(180); + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(exec)) { + actionObject = { + type: action, + exec: exec + }; + } else if (exec) { + actionObject = exec; + } else { + actionObject = { + type: action, + exec: undefined + }; + } + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action)) { + actionObject = { + // Convert action to string if unnamed + type: action.name || action.toString(), + exec: action + }; + } else { + var exec = getActionFunction(action.type, actionFunctionMap); -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(exec)) { + actionObject = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { + exec: exec + }); + } else if (exec) { + var actionType = exec.type || action.type; + actionObject = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, exec), action), { + type: actionType + }); + } else { + actionObject = action; + } } - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } + Object.defineProperty(actionObject, 'toString', { + value: function () { + return actionObject.type; + }, + enumerable: false, + configurable: true }); - if (superClass) setPrototypeOf(subClass, superClass); + return actionObject; } -module.exports = _inherits; - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __webpack_require__) { +var toActionObjects = function (action, actionFunctionMap) { + if (!action) { + return []; + } -var global = __webpack_require__(37); -var core = __webpack_require__(20); -var ctx = __webpack_require__(56); -var hide = __webpack_require__(59); -var has = __webpack_require__(67); -var PROTOTYPE = 'prototype'; + var actions = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isArray */ "e"])(action) ? action : [action]; + return actions.map(function (subAction) { + return toActionObject(subAction, actionFunctionMap); + }); +}; -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && has(exports, key)) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } - } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -var _typeof = __webpack_require__(135); +function toActivityDefinition(action) { + var actionObject = toActionObject(action); + return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ + id: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action) ? action : actionObject.id + }, actionObject), { + type: actionObject.type + }); +} +/** + * Raises an event. This places the event in the internal event queue, so that + * the event is immediately consumed by the machine in the current step. + * + * @param eventType The event to raise. + */ -var assertThisInitialized = __webpack_require__(12); -function _possibleConstructorReturn(self, call) { - if (call && (_typeof(call) === "object" || typeof call === "function")) { - return call; +function raise(event) { + if (!Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(event)) { + return send(event, { + to: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Internal + }); } - return assertThisInitialized(self); + return { + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* raise */ "i"], + event: event + }; } -module.exports = _possibleConstructorReturn; +function resolveRaise(action) { + return { + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* raise */ "i"], + _event: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(action.event) + }; +} +/** + * Sends an event. This returns an action that will be read by an interpreter to + * send the event in the next step, after the current step is finished executing. + * + * @param event The event to send. + * @param options Options to pass into the send event: + * - `id` - The unique send event identifier (used with `cancel()`). + * - `delay` - The number of milliseconds to delay the sending of the event. + * - `to` - The target of this event (by default, the machine the event was sent from). + */ -/***/ }), -/* 29 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* unused harmony export getAdjList */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getAllStateNodes; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getChildren; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getConfiguration; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return has; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isInFinalState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return isLeafNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return nextEvents; }); -/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1); +function send(event, options) { + return { + to: options ? options.to : undefined, + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* send */ "j"], + event: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(event) ? event : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toEventObject */ "r"])(event), + delay: options ? options.delay : undefined, + id: options && options.id !== undefined ? options.id : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(event) ? event.name : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* getEventType */ "c"])(event) + }; +} +function resolveSend(action, ctx, _event, delaysMap) { + var meta = { + _event: _event + }; // TODO: helper function for resolving Expr + var resolvedEvent = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.event) ? action.event(ctx, _event.data, meta) : action.event); + var resolvedDelay; -var isLeafNode = function (stateNode) { - return stateNode.type === 'atomic' || stateNode.type === 'final'; -}; + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action.delay)) { + var configDelay = delaysMap && delaysMap[action.delay]; + resolvedDelay = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay; + } else { + resolvedDelay = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay; + } -function getChildren(stateNode) { - return Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__[/* keys */ "k"])(stateNode.states).map(function (key) { - return stateNode.states[key]; + var resolvedTarget = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.to) ? action.to(ctx, _event.data, meta) : action.to; + return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { + to: resolvedTarget, + _event: resolvedEvent, + event: resolvedEvent.data, + delay: resolvedDelay }); } +/** + * Sends an event to this machine's parent. + * + * @param event The event to send to the parent machine. + * @param options Options to pass into the send event. + */ -function getAllStateNodes(stateNode) { - var stateNodes = [stateNode]; - - if (isLeafNode(stateNode)) { - return stateNodes; - } - return stateNodes.concat(Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__[/* flatten */ "b"])(getChildren(stateNode).map(getAllStateNodes))); +function sendParent(event, options) { + return send(event, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { + to: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Parent + })); } +/** + * Sends an update event to this machine's parent. + */ -function getConfiguration(prevStateNodes, stateNodes) { - var e_1, _a, e_2, _b, e_3, _c, e_4, _d; - var prevConfiguration = new Set(prevStateNodes); - var prevAdjList = getAdjList(prevConfiguration); - var configuration = new Set(stateNodes); +function sendUpdate() { + return sendParent(_actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* update */ "m"]); +} +/** + * Sends an event back to the sender of the original event. + * + * @param event The event to send back to the sender + * @param options Options to pass into the send event + */ - try { - // add all ancestors - for (var configuration_1 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_1_1 = configuration_1.next(); !configuration_1_1.done; configuration_1_1 = configuration_1.next()) { - var s = configuration_1_1.value; - var m = s.parent; - while (m && !configuration.has(m)) { - configuration.add(m); - m = m.parent; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (configuration_1_1 && !configuration_1_1.done && (_a = configuration_1.return)) _a.call(configuration_1); - } finally { - if (e_1) throw e_1.error; +function respond(event, options) { + return send(event, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { + to: function (_, __, _a) { + var _event = _a._event; + return _event.origin; // TODO: handle when _event.origin is undefined } - } + })); +} - var adjList = getAdjList(configuration); +var defaultLogExpr = function (context, event) { + return { + context: context, + event: event + }; +}; +/** + * + * @param expr The expression function to evaluate which will be logged. + * Takes in 2 arguments: + * - `ctx` - the current state context + * - `event` - the event that caused this action to be executed. + * @param label The label to give to the logged expression. + */ - try { - // add descendants - for (var configuration_2 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_2_1 = configuration_2.next(); !configuration_2_1.done; configuration_2_1 = configuration_2.next()) { - var s = configuration_2_1.value; // if previously active, add existing child nodes - if (s.type === 'compound' && (!adjList.get(s) || !adjList.get(s).length)) { - if (prevAdjList.get(s)) { - prevAdjList.get(s).forEach(function (sn) { - return configuration.add(sn); - }); - } else { - s.initialStateNodes.forEach(function (sn) { - return configuration.add(sn); - }); - } - } else { - if (s.type === 'parallel') { - try { - for (var _e = (e_3 = void 0, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(getChildren(s))), _f = _e.next(); !_f.done; _f = _e.next()) { - var child = _f.value; +function log(expr, label) { + if (expr === void 0) { + expr = defaultLogExpr; + } - if (child.type === 'history') { - continue; - } + return { + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* log */ "g"], + label: label, + expr: expr + }; +} - if (!configuration.has(child)) { - configuration.add(child); +var resolveLog = function (action, ctx, _event) { + return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { + value: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(action.expr) ? action.expr : action.expr(ctx, _event.data, { + _event: _event + }) + }); +}; +/** + * Cancels an in-flight `send(...)` action. A canceled sent action will not + * be executed, nor will its event be sent, unless it has already been sent + * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`). + * + * @param sendId The `id` of the `send(...)` action to cancel. + */ - if (prevAdjList.get(child)) { - prevAdjList.get(child).forEach(function (sn) { - return configuration.add(sn); - }); - } else { - child.initialStateNodes.forEach(function (sn) { - return configuration.add(sn); - }); - } - } - } - } catch (e_3_1) { - e_3 = { - error: e_3_1 - }; - } finally { - try { - if (_f && !_f.done && (_c = _e.return)) _c.call(_e); - } finally { - if (e_3) throw e_3.error; - } - } - } - } - } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (configuration_2_1 && !configuration_2_1.done && (_b = configuration_2.return)) _b.call(configuration_2); - } finally { - if (e_2) throw e_2.error; - } - } - try { - // add all ancestors - for (var configuration_3 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_3_1 = configuration_3.next(); !configuration_3_1.done; configuration_3_1 = configuration_3.next()) { - var s = configuration_3_1.value; - var m = s.parent; +var cancel = function (sendId) { + return { + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* cancel */ "b"], + sendId: sendId + }; +}; +/** + * Starts an activity. + * + * @param activity The activity to start. + */ - while (m && !configuration.has(m)) { - configuration.add(m); - m = m.parent; - } - } - } catch (e_4_1) { - e_4 = { - error: e_4_1 - }; - } finally { - try { - if (configuration_3_1 && !configuration_3_1.done && (_d = configuration_3.return)) _d.call(configuration_3); - } finally { - if (e_4) throw e_4.error; - } - } - return configuration; +function start(activity) { + var activityDef = toActivityDefinition(activity); + return { + type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Start, + activity: activityDef, + exec: undefined + }; } +/** + * Stops an activity. + * + * @param actorRef The activity to stop. + */ -function getValueFromAdj(baseNode, adjList) { - var childStateNodes = adjList.get(baseNode); - - if (!childStateNodes) { - return {}; // todo: fix? - } - - if (baseNode.type === 'compound') { - var childStateNode = childStateNodes[0]; - if (childStateNode) { - if (isLeafNode(childStateNode)) { - return childStateNode.key; - } - } else { - return {}; - } - } +function stop(actorRef) { + var activity = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(actorRef) ? actorRef : toActivityDefinition(actorRef); + return { + type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Stop, + activity: activity, + exec: undefined + }; +} - var stateValue = {}; - childStateNodes.forEach(function (csn) { - stateValue[csn.key] = getValueFromAdj(csn, adjList); - }); - return stateValue; +function resolveStop(action, context, _event) { + var actorRefOrString = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(action.activity) ? action.activity(context, _event.data) : action.activity; + var resolvedActorRef = typeof actorRefOrString === 'string' ? { + id: actorRefOrString + } : actorRefOrString; + var actionObject = { + type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Stop, + activity: resolvedActorRef + }; + return actionObject; } +/** + * Updates the current context of the machine. + * + * @param assignment An object that represents the partial context to update. + */ -function getAdjList(configuration) { - var e_5, _a; - var adjList = new Map(); +var assign = function (assignment) { + return { + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* assign */ "a"], + assignment: assignment + }; +}; +/** + * Returns an event type that represents an implicit event that + * is sent after the specified `delay`. + * + * @param delayRef The delay in milliseconds + * @param id The state node ID where this event is handled + */ - try { - for (var configuration_4 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_4_1 = configuration_4.next(); !configuration_4_1.done; configuration_4_1 = configuration_4.next()) { - var s = configuration_4_1.value; - if (!adjList.has(s)) { - adjList.set(s, []); - } +function after(delayRef, id) { + var idSuffix = id ? "#" + id : ''; + return _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].After + "(" + delayRef + ")" + idSuffix; +} +/** + * Returns an event that represents that a final state node + * has been reached in the parent state node. + * + * @param id The final state node's parent state node `id` + * @param data The data to pass into the event + */ - if (s.parent) { - if (!adjList.has(s.parent)) { - adjList.set(s.parent, []); - } - adjList.get(s.parent).push(s); - } - } - } catch (e_5_1) { - e_5 = { - error: e_5_1 - }; - } finally { - try { - if (configuration_4_1 && !configuration_4_1.done && (_a = configuration_4.return)) _a.call(configuration_4); - } finally { - if (e_5) throw e_5.error; - } - } +function done(id, data) { + var type = _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].DoneState + "." + id; + var eventObject = { + type: type, + data: data + }; - return adjList; -} + eventObject.toString = function () { + return type; + }; -function getValue(rootNode, configuration) { - var config = getConfiguration([rootNode], configuration); - return getValueFromAdj(rootNode, getAdjList(config)); + return eventObject; } +/** + * Returns an event that represents that an invoked service has terminated. + * + * An invoked service is terminated when it has reached a top-level final state node, + * but not when it is canceled. + * + * @param id The final state node ID + * @param data The data to pass into the event + */ -function has(iterable, item) { - if (Array.isArray(iterable)) { - return iterable.some(function (member) { - return member === item; - }); - } - if (iterable instanceof Set) { - return iterable.has(item); - } +function doneInvoke(id, data) { + var type = _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].DoneInvoke + "." + id; + var eventObject = { + type: type, + data: data + }; - return false; // TODO: fix -} + eventObject.toString = function () { + return type; + }; -function nextEvents(configuration) { - return Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__[/* flatten */ "b"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __spread */ "d"])(new Set(configuration.map(function (sn) { - return sn.ownEvents; - })))); + return eventObject; } -function isInFinalState(configuration, stateNode) { - if (stateNode.type === 'compound') { - return getChildren(stateNode).some(function (s) { - return s.type === 'final' && has(configuration, s); - }); - } +function error(id, data) { + var type = _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].ErrorPlatform + "." + id; + var eventObject = { + type: type, + data: data + }; - if (stateNode.type === 'parallel') { - return getChildren(stateNode).every(function (sn) { - return isInFinalState(configuration, sn); - }); - } + eventObject.toString = function () { + return type; + }; - return false; + return eventObject; } +function pure(getActions) { + return { + type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Pure, + get: getActions + }; +} +/** + * Forwards (sends) an event to a specified service. + * + * @param target The target service to forward the event to. + * @param options Options to pass into the send action creator. + */ -/***/ }), -/* 30 */ -/***/ (function(module, exports) { - -/** - * Checks if `value` is classified as an `Array` object. - * +function forwardTo(target, options) { + return send(function (_, event) { + return event; + }, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { + to: target + })); +} +/** + * Escalates an error by sending it as an event to this machine's parent. + * + * @param errorData The error data to send, or the expression function that + * takes in the `context`, `event`, and `meta`, and returns the error data to send. + * @param options Options to pass into the send action creator. + */ + + +function escalate(errorData, options) { + return sendParent(function (context, event, meta) { + return { + type: _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* error */ "d"], + data: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(errorData) ? errorData(context, event, meta) : errorData + }; + }, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { + to: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Parent + })); +} + +function choose(conds) { + return { + type: _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Choose, + conds: conds + }; +} + +function resolveActions(machine, currentState, currentContext, _event, actions) { + var _a = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __read */ "b"])(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* partition */ "n"])(actions, function (action) { + return action.type === _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* assign */ "a"]; + }), 2), + assignActions = _a[0], + otherActions = _a[1]; + + var updatedContext = assignActions.length ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* updateContext */ "x"])(currentContext, _event, assignActions, currentState) : currentContext; + var resolvedActions = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* flatten */ "b"])(otherActions.map(function (actionObject) { + var _a; + + switch (actionObject.type) { + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* raise */ "i"]: + return resolveRaise(actionObject); + + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* send */ "j"]: + var sendAction = resolveSend(actionObject, updatedContext, _event, machine.options.delays); // TODO: fix ActionTypes.Init + + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + // warn after resolving as we can create better contextual message here + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(!Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(actionObject.delay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length + "No delay reference for delay expression '" + actionObject.delay + "' was found on machine '" + machine.id + "'"); + } + + return sendAction; + + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* log */ "g"]: + return resolveLog(actionObject, updatedContext, _event); + + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* choose */ "c"]: + { + var chooseAction = actionObject; + var matchedActions = (_a = chooseAction.conds.find(function (condition) { + var guard = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toGuard */ "s"])(condition.cond, machine.options.guards); + return !guard || Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* evaluateGuard */ "a"])(machine, guard, updatedContext, _event, currentState); + })) === null || _a === void 0 ? void 0 : _a.actions; + + if (!matchedActions) { + return []; + } + + var resolved = resolveActions(machine, currentState, updatedContext, _event, toActionObjects(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toArray */ "q"])(matchedActions), machine.options.actions)); + updatedContext = resolved[1]; + return resolved[0]; + } + + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* pure */ "h"]: + { + var matchedActions = actionObject.get(updatedContext, _event.data); + + if (!matchedActions) { + return []; + } + + var resolved = resolveActions(machine, currentState, updatedContext, _event, toActionObjects(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toArray */ "q"])(matchedActions), machine.options.actions)); + updatedContext = resolved[1]; + return resolved[0]; + } + + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_4__[/* stop */ "l"]: + { + return resolveStop(actionObject, updatedContext, _event); + } + + default: + return toActionObject(actionObject, machine.options.actions); + } + })); + return [resolvedActions, updatedContext]; +} + + + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * * @static * @memberOf _ - * @since 0.1.0 + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * - * _.isArray([1, 2, 3]); + * _.isObjectLike({}); * // => true * - * _.isArray(document.body.children); - * // => false + * _.isObjectLike([1, 2, 3]); + * // => true * - * _.isArray('abc'); + * _.isObjectLike(_.noop); * // => false * - * _.isArray(_.noop); + * _.isObjectLike(null); * // => false */ -var isArray = Array.isArray; - -module.exports = isArray; - +function isObjectLike(value) { + return value != null && typeof value == 'object'; +} -/***/ }), -/* 31 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +module.exports = isObjectLike; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; }); -function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -} /***/ }), /* 32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(131); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0__); +var baseKeys = __webpack_require__(205), + getTag = __webpack_require__(80), + isArguments = __webpack_require__(78), + isArray = __webpack_require__(21), + isArrayLike = __webpack_require__(45), + isBuffer = __webpack_require__(62), + isPrototype = __webpack_require__(103), + isTypedArray = __webpack_require__(81); +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; -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; +/** Used for built-in method references. */ +var objectProto = Object.prototype; - _babel_runtime_corejs2_core_js_object_define_property__WEBPACK_IMPORTED_MODULE_0___default()(target, descriptor.key, descriptor); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Checks if `value` is an empty object, collection, map, or set. + * + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ +function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; } -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; -} +module.exports = isEmpty; + /***/ }), /* 33 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; }); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16); +var freeGlobal = __webpack_require__(187); +/** Detect free variable `self`. */ +var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -function _possibleConstructorReturn(self, call) { - if (call && (Object(_babel_runtime_corejs2_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) { - return call; - } +/** Used as a reference to the global object. */ +var root = freeGlobal || freeSelf || Function('return this')(); + +module.exports = root; - return Object(_babel_runtime_corejs2_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self); -} /***/ }), /* 34 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(193); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(132); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_1__); +/***/ (function(module, exports) { +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; -function _getPrototypeOf(o) { - _getPrototypeOf = _babel_runtime_corejs2_core_js_object_set_prototype_of__WEBPACK_IMPORTED_MODULE_1___default.a ? _babel_runtime_corejs2_core_js_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_0___default.a : function _getPrototypeOf(o) { - return o.__proto__ || _babel_runtime_corejs2_core_js_object_get_prototype_of__WEBPACK_IMPORTED_MODULE_0___default()(o); - }; - return _getPrototypeOf(o); -} /***/ }), /* 35 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; +/***/ (function(module, exports, __webpack_require__) { -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; }); +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(42)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/create.js -var create = __webpack_require__(277); -var create_default = /*#__PURE__*/__webpack_require__.n(create); -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js -var set_prototype_of = __webpack_require__(132); -var set_prototype_of_default = /*#__PURE__*/__webpack_require__.n(set_prototype_of); +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js +var anObject = __webpack_require__(37); +var IE8_DOM_DEFINE = __webpack_require__(188); +var toPrimitive = __webpack_require__(124); +var dP = Object.defineProperty; -function _setPrototypeOf(o, p) { - _setPrototypeOf = set_prototype_of_default.a || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; +exports.f = __webpack_require__(35) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; - return _setPrototypeOf(o, p); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/inherits.js +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { -function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } +var isObject = __webpack_require__(34); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; - subClass.prototype = create_default()(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); -} /***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return State; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bindActionToState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isState; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return stateValuesEqual; }); -/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); -/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(51); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1); -/* harmony import */ var _stateUtils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29); -/* harmony import */ var _actions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7); +var arrayWithoutHoles = __webpack_require__(585); +var iterableToArray = __webpack_require__(586); +var unsupportedIterableToArray = __webpack_require__(264); +var nonIterableSpread = __webpack_require__(587); +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} +module.exports = _toConsumableArray; -function stateValuesEqual(a, b) { - if (a === b) { - return true; - } +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { - if (a === undefined || b === undefined) { - return false; - } +var Symbol = __webpack_require__(56), + getRawTag = __webpack_require__(293), + objectToString = __webpack_require__(294); - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(a) || Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(b)) { - return a === b; - } +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; - var aKeys = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(a); - var bKeys = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(b); - return aKeys.length === bKeys.length && aKeys.every(function (key) { - return stateValuesEqual(a[key], b[key]); - }); -} +/** Built-in value references. */ +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; -function isState(state) { - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(state)) { - return false; +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } - - return 'value' in state && 'history' in state; + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } -function bindActionToState(action, state) { - var exec = action.exec; - - var boundAction = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { - exec: exec !== undefined ? function () { - return exec(state.context, state.event, { - action: action, - state: state, - _event: state._event - }); - } : undefined - }); - - return boundAction; -} +module.exports = baseGetTag; -var State = -/*#__PURE__*/ -/** @class */ -function () { - /** - * Creates a new State instance. - * @param value The state value - * @param context The extended state - * @param historyValue The tree representing historical values of the state nodes - * @param history The previous state - * @param actions An array of action objects to execute as side-effects - * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`). - * @param meta - * @param events Internal event queue. Should be empty with run-to-completion semantics. - * @param configuration - */ - function State(config) { - var _this = this; +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { - this.actions = []; - this.activities = _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* EMPTY_ACTIVITY_MAP */ "b"]; - this.meta = {}; - this.events = []; - this.value = config.value; - this.context = config.context; - this._event = config._event; - this._sessionid = config._sessionid; - this.event = this._event.data; - this.historyValue = config.historyValue; - this.history = config.history; - this.actions = config.actions || []; - this.activities = config.activities || _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* EMPTY_ACTIVITY_MAP */ "b"]; - this.meta = config.meta || {}; - this.events = config.events || []; - this.matches = this.matches.bind(this); - this.toStrings = this.toStrings.bind(this); - this.configuration = config.configuration; - this.transitions = config.transitions; - this.children = config.children; - this.done = !!config.done; - Object.defineProperty(this, 'nextEvents', { - get: function () { - return Object(_stateUtils_js__WEBPACK_IMPORTED_MODULE_3__[/* nextEvents */ "h"])(_this.configuration); - } - }); +// optional / simple context binding +var aFunction = __webpack_require__(73); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; } - /** - * Creates a new State instance for the given `stateValue` and `context`. - * @param stateValue - * @param context - */ + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; - State.from = function (stateValue, context) { - if (stateValue instanceof State) { - if (stateValue.context !== context) { - return new State({ - value: stateValue.value, - context: context, - _event: stateValue._event, - _sessionid: null, - historyValue: stateValue.historyValue, - history: stateValue.history, - actions: [], - activities: stateValue.activities, - meta: {}, - events: [], - configuration: [], - transitions: [], - children: {} - }); - } +/***/ }), +/* 41 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return stateValue; - } +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_GUARD_TYPE; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return EMPTY_ACTIVITY_MAP; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STATE_DELIMITER; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return TARGETLESS_KEY; }); +var STATE_DELIMITER = '.'; +var EMPTY_ACTIVITY_MAP = {}; +var DEFAULT_GUARD_TYPE = 'xstate.guard'; +var TARGETLESS_KEY = ''; - var _event = _actions_js__WEBPACK_IMPORTED_MODULE_4__[/* initEvent */ "k"]; - return new State({ - value: stateValue, - context: context, - _event: _event, - _sessionid: null, - historyValue: undefined, - history: undefined, - actions: [], - activities: undefined, - meta: undefined, - events: [], - configuration: [], - transitions: [], - children: {} - }); - }; - /** - * Creates a new State instance for the given `config`. - * @param config The state config - */ +/***/ }), +/* 42 */ +/***/ (function(module, exports) { - State.create = function (config) { - return new State(config); - }; - /** - * Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects). - * @param stateValue - * @param context - */ +module.exports = function (exec) { + try { + return !!exec(); + } catch (e) { + return true; + } +}; - State.inert = function (stateValue, context) { - if (stateValue instanceof State) { - if (!stateValue.actions.length) { - return stateValue; - } - - var _event = _actions_js__WEBPACK_IMPORTED_MODULE_4__[/* initEvent */ "k"]; - return new State({ - value: stateValue.value, - context: context, - _event: _event, - _sessionid: null, - historyValue: stateValue.historyValue, - history: stateValue.history, - activities: stateValue.activities, - configuration: stateValue.configuration, - transitions: [], - children: {} - }); - } - - return State.from(stateValue, context); - }; - /** - * Returns an array of all the string leaf state node paths. - * @param stateValue - * @param delimiter The character(s) that separate each subpath in the string state node path. - */ - - - State.prototype.toStrings = function (stateValue, delimiter) { - var _this = this; - - if (stateValue === void 0) { - stateValue = this.value; - } - - if (delimiter === void 0) { - delimiter = '.'; - } - - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(stateValue)) { - return [stateValue]; - } - - var valueKeys = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(stateValue); - return valueKeys.concat.apply(valueKeys, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __spread */ "d"])(valueKeys.map(function (key) { - return _this.toStrings(stateValue[key], delimiter).map(function (s) { - return key + delimiter + s; - }); - }))); - }; - - State.prototype.toJSON = function () { - var _a = this, - configuration = _a.configuration, - transitions = _a.transitions, - jsonValues = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __rest */ "c"])(_a, ["configuration", "transitions"]); - - return jsonValues; - }; - /** - * Whether the current state value is a subset of the given parent state value. - * @param parentStateValue - */ - - - State.prototype.matches = function (parentStateValue) { - return Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* matchesState */ "o"])(parentStateValue, this.value); - }; - - return State; -}(); +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { +var dP = __webpack_require__(36); +var createDesc = __webpack_require__(72); +module.exports = __webpack_require__(35) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; /***/ }), -/* 37 */ +/* 44 */ /***/ (function(module, exports) { -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseGetTag = __webpack_require__(55), - getPrototype = __webpack_require__(124), - isObjectLike = __webpack_require__(45); +/** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ +function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; +} -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; +module.exports = arrayMap; -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); +var isFunction = __webpack_require__(16), + isLength = __webpack_require__(142); /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ - * @since 0.8.0 + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false + * _.isArrayLike([1, 2, 3]); + * // => true * - * _.isPlainObject({ 'x': 0, 'y': 0 }); + * _.isArrayLike(document.body.children); * // => true * - * _.isPlainObject(Object.create(null)); + * _.isArrayLike('abc'); * // => true + * + * _.isArrayLike(_.noop); + * // => false */ -function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; +function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); } -module.exports = isPlainObject; - - -/***/ }), -/* 39 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; }); -/* harmony import */ var _babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(276); -/* harmony import */ var _babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71); -/* harmony import */ var _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1__); - - -function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1___default.a === "function" && typeof _babel_runtime_corejs2_core_js_symbol_iterator__WEBPACK_IMPORTED_MODULE_0___default.a === "symbol") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && typeof _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1___default.a === "function" && obj.constructor === _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1___default.a && obj !== _babel_runtime_corejs2_core_js_symbol__WEBPACK_IMPORTED_MODULE_1___default.a.prototype ? "symbol" : typeof obj; - }; - } +module.exports = isArrayLike; - return _typeof(obj); -} /***/ }), -/* 40 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(143)('wks'); -var uid = __webpack_require__(108); -var Symbol = __webpack_require__(37).Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; +var identity = __webpack_require__(79), + overRest = __webpack_require__(202), + setToString = __webpack_require__(204); -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; +/** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); +} -$exports.store = store; +module.exports = baseRest; /***/ }), -/* 41 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4029,23814 +3737,20945 @@ $exports.store = store; Object.defineProperty(exports, "__esModule", { value: true }); -exports.canExpand = canExpand; -exports.getDefaultRegistry = getDefaultRegistry; -exports.getSchemaType = getSchemaType; -exports.getWidget = getWidget; -exports.hasWidget = hasWidget; -exports.getDefaultFormState = getDefaultFormState; -exports.mergeDefaultsWithFormData = mergeDefaultsWithFormData; -exports.getUiOptions = getUiOptions; -exports.getDisplayLabel = getDisplayLabel; -exports.isObject = isObject; -exports.mergeObjects = mergeObjects; -exports.asNumber = asNumber; -exports.orderProperties = orderProperties; -exports.isConstant = isConstant; -exports.toConstant = toConstant; -exports.isSelect = isSelect; -exports.isMultiSelect = isMultiSelect; -exports.isFilesArray = isFilesArray; -exports.isFixedItems = isFixedItems; -exports.allowAdditionalItems = allowAdditionalItems; -exports.optionsList = optionsList; -exports.findSchemaDefinition = findSchemaDefinition; -exports.stubExistingAdditionalProperties = stubExistingAdditionalProperties; -exports.resolveSchema = resolveSchema; -exports.retrieveSchema = retrieveSchema; -exports.mergeSchemas = mergeSchemas; -exports.deepEquals = deepEquals; -exports.shouldRender = shouldRender; -exports.toIdSchema = toIdSchema; -exports.toPathSchema = toPathSchema; -exports.parseDateString = parseDateString; -exports.toDateString = toDateString; -exports.utcToLocal = utcToLocal; -exports.localToUTC = localToUTC; -exports.pad = pad; -exports.dataURItoBlob = dataURItoBlob; -exports.rangeSpec = rangeSpec; -exports.getMatchingOption = getMatchingOption; -exports.schemaRequiresTrueValue = schemaRequiresTrueValue; -exports.guessType = exports.ADDITIONAL_PROPERTY_FLAG = void 0; - -var _react = _interopRequireDefault(__webpack_require__(0)); - -var ReactIs = _interopRequireWildcard(__webpack_require__(133)); - -var _jsonSchemaMergeAllof = _interopRequireDefault(__webpack_require__(183)); - -var _fill = _interopRequireDefault(__webpack_require__(185)); +exports.fieldProps = exports.registry = void 0; -var _validate = _interopRequireWildcard(__webpack_require__(535)); +var _propTypes = _interopRequireDefault(__webpack_require__(3)); -var _union = _interopRequireDefault(__webpack_require__(188)); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -var _jsonpointer = _interopRequireDefault(__webpack_require__(189)); +var registry = _propTypes["default"].shape({ + ArrayFieldTemplate: _propTypes["default"].elementType, + FieldTemplate: _propTypes["default"].elementType, + ObjectFieldTemplate: _propTypes["default"].elementType, + definitions: _propTypes["default"].object.isRequired, + rootSchema: _propTypes["default"].object, + fields: _propTypes["default"].objectOf(_propTypes["default"].elementType).isRequired, + formContext: _propTypes["default"].object.isRequired, + widgets: _propTypes["default"].objectOf(_propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].object])).isRequired +}); -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } +exports.registry = registry; +var fieldProps = { + autofocus: _propTypes["default"].bool, + disabled: _propTypes["default"].bool, + errorSchema: _propTypes["default"].object, + formData: _propTypes["default"].any, + idSchema: _propTypes["default"].object, + onBlur: _propTypes["default"].func, + onChange: _propTypes["default"].func.isRequired, + onFocus: _propTypes["default"].func, + rawErrors: _propTypes["default"].arrayOf(_propTypes["default"].string), + readonly: _propTypes["default"].bool, + registry: registry.isRequired, + required: _propTypes["default"].bool, + schema: _propTypes["default"].object.isRequired, + uiSchema: _propTypes["default"].shape({ + "ui:options": _propTypes["default"].shape({ + addable: _propTypes["default"].bool, + orderable: _propTypes["default"].bool, + removable: _propTypes["default"].bool + }) + }) +}; +exports.fieldProps = fieldProps; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +/***/ }), +/* 48 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return consume; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return provide; }); +/** + * Maintains a stack of the current service in scope. + * This is used to provide the correct service to spawn(). + */ +var serviceStack = []; -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } +var provide = function (service, fn) { + serviceStack.push(service); + var result = fn(service); + serviceStack.pop(); + return result; +}; -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } +var consume = function (fn) { + return fn(serviceStack[serviceStack.length - 1]); +}; -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { -function _typeof(obj) { 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); } +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(122); +var defined = __webpack_require__(88); +module.exports = function (it) { + return IObject(defined(it)); +}; -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); } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } +/***/ }), +/* 50 */ +/***/ (function(module, exports) { -function _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; } +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; -function _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; } -function _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; } +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { -var ADDITIONAL_PROPERTY_FLAG = "__additional_property"; -exports.ADDITIONAL_PROPERTY_FLAG = ADDITIONAL_PROPERTY_FLAG; -var widgetMap = { - "boolean": { - checkbox: "CheckboxWidget", - radio: "RadioWidget", - select: "SelectWidget", - hidden: "HiddenWidget" - }, - string: { - text: "TextWidget", - password: "PasswordWidget", - email: "EmailWidget", - hostname: "TextWidget", - ipv4: "TextWidget", - ipv6: "TextWidget", - uri: "URLWidget", - "data-url": "FileWidget", - radio: "RadioWidget", - select: "SelectWidget", - textarea: "TextareaWidget", - hidden: "HiddenWidget", - date: "DateWidget", - datetime: "DateTimeWidget", - "date-time": "DateTimeWidget", - "alt-date": "AltDateWidget", - "alt-datetime": "AltDateTimeWidget", - color: "ColorWidget", - file: "FileWidget" - }, - number: { - text: "TextWidget", - select: "SelectWidget", - updown: "UpDownWidget", - range: "RangeWidget", - radio: "RadioWidget", - hidden: "HiddenWidget" - }, - integer: { - text: "TextWidget", - select: "SelectWidget", - updown: "UpDownWidget", - range: "RangeWidget", - radio: "RadioWidget", - hidden: "HiddenWidget" - }, - array: { - select: "SelectWidget", - checkboxes: "CheckboxesWidget", - files: "FileWidget", - hidden: "HiddenWidget" - } +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(88); +module.exports = function (it) { + return Object(defined(it)); }; -function canExpand(schema, uiSchema, formData) { - if (!schema.additionalProperties) { - return false; - } - var _getUiOptions = getUiOptions(uiSchema), - expandable = _getUiOptions.expandable; +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { - if (expandable === false) { - return expandable; - } // if ui:options.expandable was not explicitly set to false, we can add - // another property if we have not exceeded maxProperties yet +var baseIsNative = __webpack_require__(333), + getValue = __webpack_require__(336); +/** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ +function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; +} - if (schema.maxProperties !== undefined) { - return Object.keys(formData).length < schema.maxProperties; - } +module.exports = getNative; - return true; -} -function getDefaultRegistry() { - return { - fields: __webpack_require__(536)["default"], - widgets: __webpack_require__(547)["default"], - definitions: {}, - rootSchema: {}, - formContext: {} +/***/ }), +/* 53 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ +function baseUnary(func) { + return function(value) { + return func(value); }; } -/* Gets the type of a given schema. */ +module.exports = baseUnary; -function getSchemaType(schema) { - var type = schema.type; - - if (!type && schema["const"]) { - return guessType(schema["const"]); - } - if (!type && schema["enum"]) { - return "string"; - } +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { - if (!type && (schema.properties || schema.additionalProperties)) { - return "object"; - } +var baseGetTag = __webpack_require__(39), + isArray = __webpack_require__(21), + isObjectLike = __webpack_require__(31); - if (type instanceof Array && type.length === 2 && type.includes("null")) { - return type.find(function (type) { - return type !== "null"; - }); - } +/** `Object#toString` result references. */ +var stringTag = '[object String]'; - return type; +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } -function getWidget(schema, widget) { - var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var type = getSchemaType(schema); - - function mergeOptions(Widget) { - // cache return value as property of widget for proper react reconciliation - if (!Widget.MergedWidget) { - var defaultOptions = Widget.defaultProps && Widget.defaultProps.options || {}; +module.exports = isString; - Widget.MergedWidget = function (_ref) { - var _ref$options = _ref.options, - options = _ref$options === void 0 ? {} : _ref$options, - props = _objectWithoutProperties(_ref, ["options"]); - return _react["default"].createElement(Widget, _extends({ - options: _objectSpread({}, defaultOptions, options) - }, props)); - }; - } +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { - return Widget.MergedWidget; - } +module.exports = __webpack_require__(314); - if (typeof widget === "function" || ReactIs.isForwardRef(_react["default"].createElement(widget)) || ReactIs.isMemo(widget)) { - return mergeOptions(widget); - } +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { - if (typeof widget !== "string") { - throw new Error("Unsupported widget definition: ".concat(_typeof(widget))); - } +var root = __webpack_require__(33); - if (registeredWidgets.hasOwnProperty(widget)) { - var registeredWidget = registeredWidgets[widget]; - return getWidget(schema, registeredWidget, registeredWidgets); - } - - if (!widgetMap.hasOwnProperty(type)) { - throw new Error("No widget for type \"".concat(type, "\"")); - } +/** Built-in value references. */ +var Symbol = root.Symbol; - if (widgetMap[type].hasOwnProperty(widget)) { - var _registeredWidget = registeredWidgets[widgetMap[type][widget]]; - return getWidget(schema, _registeredWidget, registeredWidgets); - } +module.exports = Symbol; - throw new Error("No widget \"".concat(widget, "\" for type \"").concat(type, "\"")); -} -function hasWidget(schema, widget) { - var registeredWidgets = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { - try { - getWidget(schema, widget, registeredWidgets); - return true; - } catch (e) { - if (e.message && (e.message.startsWith("No widget") || e.message.startsWith("Unsupported widget"))) { - return false; - } +"use strict"; - throw e; - } -} +var $at = __webpack_require__(310)(true); -function computeDefaults(_schema, parentDefaults, rootSchema) { - var rawFormData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var includeUndefinedValues = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; - var schema = isObject(_schema) ? _schema : {}; - var formData = isObject(rawFormData) ? rawFormData : {}; // Compute the defaults recursively: give highest priority to deepest nodes. +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(135)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); - var defaults = parentDefaults; - if (isObject(defaults) && isObject(schema["default"])) { - // For object defaults, only override parent defaults that are defined in - // schema.default. - defaults = mergeObjects(defaults, schema["default"]); - } else if ("default" in schema) { - // Use schema defaults for this node. - defaults = schema["default"]; - } else if ("$ref" in schema) { - // Use referenced schema defaults for this node. - var refSchema = findSchemaDefinition(schema.$ref, rootSchema); - return computeDefaults(refSchema, defaults, rootSchema, formData, includeUndefinedValues); - } else if ("dependencies" in schema) { - var resolvedSchema = resolveDependencies(schema, rootSchema, formData); - return computeDefaults(resolvedSchema, defaults, rootSchema, formData, includeUndefinedValues); - } else if (isFixedItems(schema)) { - defaults = schema.items.map(function (itemSchema, idx) { - return computeDefaults(itemSchema, Array.isArray(parentDefaults) ? parentDefaults[idx] : undefined, rootSchema, formData, includeUndefinedValues); - }); - } else if ("oneOf" in schema) { - schema = schema.oneOf[getMatchingOption(undefined, schema.oneOf, rootSchema)]; - } else if ("anyOf" in schema) { - schema = schema.anyOf[getMatchingOption(undefined, schema.anyOf, rootSchema)]; - } // Not defaults defined for this node, fallback to generic typed ones. +/***/ }), +/* 58 */ +/***/ (function(module, exports) { +module.exports = {}; - if (typeof defaults === "undefined") { - defaults = schema["default"]; - } - switch (getSchemaType(schema)) { - // We need to recur for object schema inner default values. - case "object": - return Object.keys(schema.properties || {}).reduce(function (acc, key) { - // Compute the defaults for this node, with the parent defaults we might - // have from a previous run: defaults[key]. - var computedDefault = computeDefaults(schema.properties[key], (defaults || {})[key], rootSchema, (formData || {})[key], includeUndefinedValues); +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { - if (includeUndefinedValues || computedDefault !== undefined) { - acc[key] = computedDefault; - } +var baseGetTag = __webpack_require__(39), + isObjectLike = __webpack_require__(31); - return acc; - }, {}); +/** `Object#toString` result references. */ +var symbolTag = '[object Symbol]'; - case "array": - // Inject defaults into existing array defaults - if (Array.isArray(defaults)) { - defaults = defaults.map(function (item, idx) { - return computeDefaults(schema.items[idx] || schema.additionalItems || {}, item, rootSchema); - }); - } // Deeply inject defaults into already existing form data +/** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} +module.exports = isSymbol; - if (Array.isArray(rawFormData)) { - defaults = rawFormData.map(function (item, idx) { - return computeDefaults(schema.items, (defaults || {})[idx], rootSchema, item); - }); - } - if (schema.minItems) { - if (!isMultiSelect(schema, rootSchema)) { - var defaultsLength = defaults ? defaults.length : 0; +/***/ }), +/* 60 */ +/***/ (function(module, exports) { - if (schema.minItems > defaultsLength) { - var defaultEntries = defaults || []; // populate the array with the defaults +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || (value !== value && other !== other); +} - var fillerSchema = Array.isArray(schema.items) ? schema.additionalItems : schema.items; - var fillerEntries = (0, _fill["default"])(new Array(schema.minItems - defaultsLength), computeDefaults(fillerSchema, fillerSchema.defaults, rootSchema)); // then fill up the rest with either the item default or empty, up to minItems +module.exports = eq; - return defaultEntries.concat(fillerEntries); - } - } else { - return defaults ? defaults : []; - } - } - } +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { - return defaults; -} +var isSymbol = __webpack_require__(59); -function getDefaultFormState(_schema, formData) { - var rootSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var includeUndefinedValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; - if (!isObject(_schema)) { - throw new Error("Invalid schema: " + _schema); +/** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ +function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} - var schema = retrieveSchema(_schema, rootSchema, formData); - var defaults = computeDefaults(schema, _schema["default"], rootSchema, formData, includeUndefinedValues); +module.exports = toKey; - if (typeof formData === "undefined") { - // No form data? Use schema defaults. - return defaults; - } - if (isObject(formData) || Array.isArray(formData)) { - return mergeDefaultsWithFormData(defaults, formData); - } +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { - if (formData === 0 || formData === false || formData === "") { - return formData; - } +/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(33), + stubFalse = __webpack_require__(364); - return formData || defaults; -} -/** - * When merging defaults and form data, we want to merge in this specific way: - * - objects are deeply merged - * - arrays are merged in such a way that: - * - when the array is set in form data, only array entries set in form data - * are deeply merged; additional entries from the defaults are ignored - * - when the array is not set in form data, the default is copied over - * - scalars are overwritten/set by form data - */ +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; -function mergeDefaultsWithFormData(defaults, formData) { - if (Array.isArray(formData)) { - if (!Array.isArray(defaults)) { - defaults = []; - } +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; - return formData.map(function (value, idx) { - if (defaults[idx]) { - return mergeDefaultsWithFormData(defaults[idx], value); - } +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; - return value; - }); - } else if (isObject(formData)) { - var acc = _extends({}, defaults); // Prevent mutation of source object. +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; +/** + * Checks if `value` is a buffer. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @example + * + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false + */ +var isBuffer = nativeIsBuffer || stubFalse; - return Object.keys(formData).reduce(function (acc, key) { - acc[key] = mergeDefaultsWithFormData(defaults ? defaults[key] : {}, formData[key]); - return acc; - }, acc); - } else { - return formData; - } -} +module.exports = isBuffer; -function getUiOptions(uiSchema) { - // get all passed options from ui:widget, ui:options, and ui: - return Object.keys(uiSchema).filter(function (key) { - return key.indexOf("ui:") === 0; - }).reduce(function (options, key) { - var value = uiSchema[key]; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(144)(module))) - if (key === "ui:widget" && isObject(value)) { - console.warn("Setting options via ui:widget object is deprecated, use ui:options instead"); - return _objectSpread({}, options, value.options || {}, { - widget: value.component - }); - } +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { - if (key === "ui:options" && isObject(value)) { - return _objectSpread({}, options, value); - } +var arrayLikeKeys = __webpack_require__(213), + baseKeys = __webpack_require__(205), + isArrayLike = __webpack_require__(45); - return _objectSpread({}, options, _defineProperty({}, key.substring(3), value)); - }, {}); +/** + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ +function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } -function getDisplayLabel(schema, uiSchema, rootSchema) { - var uiOptions = getUiOptions(uiSchema); - var _uiOptions$label = uiOptions.label, - displayLabel = _uiOptions$label === void 0 ? true : _uiOptions$label; - - if (schema.type === "array") { - displayLabel = isMultiSelect(schema, rootSchema) || isFilesArray(schema, uiSchema, rootSchema); - } +module.exports = keys; - if (schema.type === "object") { - displayLabel = false; - } - if (schema.type === "boolean" && !uiSchema["ui:widget"]) { - displayLabel = false; - } +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { - if (uiSchema["ui:field"]) { - displayLabel = false; - } +var arrayLikeKeys = __webpack_require__(213), + baseKeysIn = __webpack_require__(402), + isArrayLike = __webpack_require__(45); - return displayLabel; +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } -function isObject(thing) { - if (typeof File !== "undefined" && thing instanceof File) { - return false; - } +module.exports = keysIn; - return _typeof(thing) === "object" && thing !== null && !Array.isArray(thing); -} -function mergeObjects(obj1, obj2) { - var concatArrays = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { - // Recursively merge deeply nested objects. - var acc = _extends({}, obj1); // Prevent mutation of source object. +"use strict"; - return Object.keys(obj2).reduce(function (acc, key) { - var left = obj1 ? obj1[key] : {}, - right = obj2[key]; - if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) { - acc[key] = mergeObjects(left, right, concatArrays); - } else if (concatArrays && Array.isArray(left) && Array.isArray(right)) { - acc[key] = left.concat(right); - } else { - acc[key] = right; - } +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __webpack_require__(165), + ucs2length: __webpack_require__(506), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; - return acc; - }, acc); -} -function asNumber(value) { - if (value === "") { - return undefined; - } +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} - if (value === null) { - return null; - } - if (/\.$/.test(value)) { - // "3." can't really be considered a number even if it parses in js. The - // user is most likely entering a float. - return value; +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; } +} - if (/\.0$/.test(value)) { - // we need to return this as a string here, to allow for input like 3.07 - return value; - } - var n = Number(value); - var valid = typeof n === "number" && !Number.isNaN(n); +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); - if (/\.\d*0$/.test(value)) { - // It's a number, that's cool - but we need it as a string so it doesn't screw - // with the user when entering dollar amounts or other values (such as those with - // specific precision or number of significant digits) - return value; + return code; } - - return valid ? n : value; } -function orderProperties(properties, order) { - if (!Array.isArray(order)) { - return properties; - } - - var arrayToHash = function arrayToHash(arr) { - return arr.reduce(function (prev, curr) { - prev[curr] = true; - return prev; - }, {}); - }; - var errorPropList = function errorPropList(arr) { - return arr.length > 1 ? "properties '".concat(arr.join("', '"), "'") : "property '".concat(arr[0], "'"); - }; - - var propertyHash = arrayToHash(properties); - var orderFiltered = order.filter(function (prop) { - return prop === "*" || propertyHash[prop]; - }); - var orderHash = arrayToHash(orderFiltered); - var rest = properties.filter(function (prop) { - return !orderHash[prop]; - }); - var restIndex = orderFiltered.indexOf("*"); - - if (restIndex === -1) { - if (rest.length) { - throw new Error("uiSchema order list does not contain ".concat(errorPropList(rest))); +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i 1 && arguments[1] !== undefined ? arguments[1] : {}; - var schema = retrieveSchema(_schema, rootSchema); - var altSchemas = schema.oneOf || schema.anyOf; +function escapeQuotes(str) { + return str.replace(SINGLE_QUOTE, '\\$&') + .replace(/\n/g, '\\n') + .replace(/\r/g, '\\r') + .replace(/\f/g, '\\f') + .replace(/\t/g, '\\t'); +} - if (Array.isArray(schema["enum"])) { - return true; - } else if (Array.isArray(altSchemas)) { - return altSchemas.every(function (altSchemas) { - return isConstant(altSchemas); - }); - } - return false; +function varOccurences(str, dataVar) { + dataVar += '[^0-9]'; + var matches = str.match(new RegExp(dataVar, 'g')); + return matches ? matches.length : 0; } -function isMultiSelect(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (!schema.uniqueItems || !schema.items) { - return false; - } - return isSelect(schema.items, rootSchema); +function varReplace(str, dataVar, expr) { + dataVar += '([^0-9])'; + expr = expr.replace(/\$/g, '$$$$'); + return str.replace(new RegExp(dataVar, 'g'), expr + '$1'); } -function isFilesArray(schema, uiSchema) { - var rootSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (uiSchema["ui:widget"] === "files") { - return true; - } else if (schema.items) { - var itemsSchema = retrieveSchema(schema.items, rootSchema); - return itemsSchema.type === "string" && itemsSchema.format === "data-url"; - } - return false; +var EMPTY_ELSE = /else\s*{\s*}/g + , EMPTY_IF_NO_ELSE = /if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g + , EMPTY_IF_WITH_ELSE = /if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g; +function cleanUpCode(out) { + return out.replace(EMPTY_ELSE, '') + .replace(EMPTY_IF_NO_ELSE, '') + .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))'); } -function isFixedItems(schema) { - return Array.isArray(schema.items) && schema.items.length > 0 && schema.items.every(function (item) { - return isObject(item); - }); -} -function allowAdditionalItems(schema) { - if (schema.additionalItems === true) { - console.warn("additionalItems=true is currently not supported"); +var ERRORS_REGEXP = /[^v.]errors/g + , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g + , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g + , RETURN_VALID = 'return errors === 0;' + , RETURN_TRUE = 'validate.errors = null; return true;' + , RETURN_ASYNC = /if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/ + , RETURN_DATA_ASYNC = 'return data;' + , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g + , REMOVE_ROOTDATA = /if \(rootData === undefined\) rootData = data;/; + +function finalCleanUpCode(out, async) { + var matches = out.match(ERRORS_REGEXP); + if (matches && matches.length == 2) { + out = async + ? out.replace(REMOVE_ERRORS_ASYNC, '') + .replace(RETURN_ASYNC, RETURN_DATA_ASYNC) + : out.replace(REMOVE_ERRORS, '') + .replace(RETURN_VALID, RETURN_TRUE); } - return isObject(schema.additionalItems); + matches = out.match(ROOTDATA_REGEXP); + if (!matches || matches.length !== 3) return out; + return out.replace(REMOVE_ROOTDATA, ''); } -function optionsList(schema) { - if (schema["enum"]) { - return schema["enum"].map(function (value, i) { - var label = schema.enumNames && schema.enumNames[i] || String(value); - return { - label: label, - value: value - }; - }); - } else { - var altSchemas = schema.oneOf || schema.anyOf; - return altSchemas.map(function (schema, i) { - var value = toConstant(schema); - var label = schema.title || String(value); - return { - label: label, - value: value - }; - }); - } -} -function findSchemaDefinition($ref) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var origRef = $ref; +function schemaHasRules(schema, rules) { + if (typeof schema == 'boolean') return !schema; + for (var key in schema) if (rules[key]) return true; +} - if ($ref.startsWith("#")) { - // Decode URI fragment representation. - $ref = decodeURIComponent($ref.substring(1)); - } else { - throw new Error("Could not find a definition for ".concat(origRef, ".")); - } - var current = _jsonpointer["default"].get(rootSchema, $ref); +function schemaHasRulesExcept(schema, rules, exceptKeyword) { + if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not'; + for (var key in schema) if (key != exceptKeyword && rules[key]) return true; +} - if (current === undefined) { - throw new Error("Could not find a definition for ".concat(origRef, ".")); - } - if (current.hasOwnProperty("$ref")) { - return findSchemaDefinition(current.$ref, rootSchema); - } +function schemaUnknownRules(schema, rules) { + if (typeof schema == 'boolean') return; + for (var key in schema) if (!rules[key]) return key; +} - return current; -} // In the case where we have to implicitly create a schema, it is useful to know what type to use -// based on the data we are defining +function toQuotedString(str) { + return '\'' + escapeQuotes(str) + '\''; +} -var guessType = function guessType(value) { - if (Array.isArray(value)) { - return "array"; - } else if (typeof value === "string") { - return "string"; - } else if (value == null) { - return "null"; - } else if (typeof value === "boolean") { - return "boolean"; - } else if (!isNaN(value)) { - return "number"; - } else if (_typeof(value) === "object") { - return "object"; - } // Default to string if we can't figure it out +function getPathExpr(currentPath, expr, jsonPointers, isNumber) { + var path = jsonPointers // false by default + ? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')') + : (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\''); + return joinPaths(currentPath, path); +} - return "string"; -}; // This function will create new "properties" items for each key in our formData +function getPath(currentPath, prop, jsonPointers) { + var path = jsonPointers // false by default + ? toQuotedString('/' + escapeJsonPointer(prop)) + : toQuotedString(getProperty(prop)); + return joinPaths(currentPath, path); +} -exports.guessType = guessType; -function stubExistingAdditionalProperties(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - // Clone the schema so we don't ruin the consumer's original - schema = _objectSpread({}, schema, { - properties: _objectSpread({}, schema.properties) - }); - Object.keys(formData).forEach(function (key) { - if (schema.properties.hasOwnProperty(key)) { - // No need to stub, our schema already has the property - return; +var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; +var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; +function getData($data, lvl, paths) { + var up, jsonPointer, data, matches; + if ($data === '') return 'rootData'; + if ($data[0] == '/') { + if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data); + jsonPointer = $data; + data = 'rootData'; + } else { + matches = $data.match(RELATIVE_JSON_POINTER); + if (!matches) throw new Error('Invalid JSON-pointer: ' + $data); + up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer == '#') { + if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; } - var additionalProperties; + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } - if (schema.additionalProperties.hasOwnProperty("$ref")) { - additionalProperties = retrieveSchema({ - $ref: schema.additionalProperties["$ref"] - }, rootSchema, formData); - } else if (schema.additionalProperties.hasOwnProperty("type")) { - additionalProperties = _objectSpread({}, schema.additionalProperties); - } else { - additionalProperties = { - type: guessType(formData[key]) - }; - } // The type of our new key should match the additionalProperties value; + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i 1 && arguments[1] !== undefined ? arguments[1] : {}; - var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (schema.hasOwnProperty("$ref")) { - return resolveReference(schema, rootSchema, formData); - } else if (schema.hasOwnProperty("dependencies")) { - var resolvedSchema = resolveDependencies(schema, rootSchema, formData); - return retrieveSchema(resolvedSchema, rootSchema, formData); - } else if (schema.hasOwnProperty("allOf")) { - return _objectSpread({}, schema, { - allOf: schema.allOf.map(function (allOfSubschema) { - return retrieveSchema(allOfSubschema, rootSchema, formData); - }) - }); - } else { - // No $ref or dependencies attribute found, returning the original schema. - return schema; - } +function escapeFragment(str) { + return encodeURIComponent(escapeJsonPointer(str)); } -function resolveReference(schema, rootSchema, formData) { - // Retrieve the referenced schema definition. - var $refSchema = findSchemaDefinition(schema.$ref, rootSchema); // Drop the $ref property of the source schema. - var $ref = schema.$ref, - localSchema = _objectWithoutProperties(schema, ["$ref"]); // Update referenced schema definition with local schema properties. +function escapeJsonPointer(str) { + return str.replace(/~/g, '~0').replace(/\//g, '~1'); +} - return retrieveSchema(_objectSpread({}, $refSchema, localSchema), rootSchema, formData); +function unescapeJsonPointer(str) { + return str.replace(/~1/g, '/').replace(/~0/g, '~'); } -function retrieveSchema(schema) { - var rootSchema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var formData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (!isObject(schema)) { - return {}; - } +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { - var resolvedSchema = resolveSchema(schema, rootSchema, formData); +var objectWithoutPropertiesLoose = __webpack_require__(292); - if ("allOf" in schema) { - try { - resolvedSchema = (0, _jsonSchemaMergeAllof["default"])(_objectSpread({}, resolvedSchema, { - allOf: resolvedSchema.allOf - })); - } catch (e) { - console.warn("could not merge subschemas in allOf:\n" + e); +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = objectWithoutPropertiesLoose(source, excluded); + var key, i; - var _resolvedSchema = resolvedSchema, - allOf = _resolvedSchema.allOf, - resolvedSchemaWithoutAllOf = _objectWithoutProperties(_resolvedSchema, ["allOf"]); + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - return resolvedSchemaWithoutAllOf; + 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]; } } - var hasAdditionalProperties = resolvedSchema.hasOwnProperty("additionalProperties") && resolvedSchema.additionalProperties !== false; + return target; +} - if (hasAdditionalProperties) { - return stubExistingAdditionalProperties(resolvedSchema, rootSchema, formData); - } +module.exports = _objectWithoutProperties; - return resolvedSchema; -} +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { -function resolveDependencies(schema, rootSchema, formData) { - // Drop the dependencies from the source schema. - var _schema$dependencies = schema.dependencies, - dependencies = _schema$dependencies === void 0 ? {} : _schema$dependencies, - resolvedSchema = _objectWithoutProperties(schema, ["dependencies"]); +module.exports = __webpack_require__(367); - if ("oneOf" in resolvedSchema) { - resolvedSchema = resolvedSchema.oneOf[getMatchingOption(formData, resolvedSchema.oneOf, rootSchema)]; - } else if ("anyOf" in resolvedSchema) { - resolvedSchema = resolvedSchema.anyOf[getMatchingOption(formData, resolvedSchema.anyOf, rootSchema)]; - } +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { - return processDependencies(dependencies, resolvedSchema, rootSchema, formData); -} +module.exports = __webpack_require__(381); -function processDependencies(dependencies, resolvedSchema, rootSchema, formData) { - // Process dependencies updating the local schema properties as appropriate. - for (var dependencyKey in dependencies) { - // Skip this dependency if its trigger property is not present. - if (formData[dependencyKey] === undefined) { - continue; - } // Skip this dependency if it is not included in the schema (such as when dependencyKey is itself a hidden dependency.) +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = __webpack_require__(496); - if (resolvedSchema.properties && !(dependencyKey in resolvedSchema.properties)) { - continue; - } +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { - var dependencyValue = dependencies[dependencyKey], - remainingDependencies = _objectWithoutProperties(dependencies, [dependencyKey].map(_toPropertyKey)); +module.exports = __webpack_require__(297); - if (Array.isArray(dependencyValue)) { - resolvedSchema = withDependentProperties(resolvedSchema, dependencyValue); - } else if (isObject(dependencyValue)) { - resolvedSchema = withDependentSchema(resolvedSchema, rootSchema, formData, dependencyKey, dependencyValue); - } +/***/ }), +/* 71 */ +/***/ (function(module, exports) { - return processDependencies(remainingDependencies, resolvedSchema, rootSchema, formData); - } +var toString = {}.toString; - return resolvedSchema; -} +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; -function withDependentProperties(schema, additionallyRequired) { - if (!additionallyRequired) { - return schema; - } - var required = Array.isArray(schema.required) ? Array.from(new Set([].concat(_toConsumableArray(schema.required), _toConsumableArray(additionallyRequired)))) : additionallyRequired; - return _objectSpread({}, schema, { - required: required - }); -} +/***/ }), +/* 72 */ +/***/ (function(module, exports) { -function withDependentSchema(schema, rootSchema, formData, dependencyKey, dependencyValue) { - var _retrieveSchema = retrieveSchema(dependencyValue, rootSchema, formData), - oneOf = _retrieveSchema.oneOf, - dependentSchema = _objectWithoutProperties(_retrieveSchema, ["oneOf"]); +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; - schema = mergeSchemas(schema, dependentSchema); // Since it does not contain oneOf, we return the original schema. - if (oneOf === undefined) { - return schema; - } else if (!Array.isArray(oneOf)) { - throw new Error("invalid: it is some ".concat(_typeof(oneOf), " instead of an array")); - } // Resolve $refs inside oneOf. +/***/ }), +/* 73 */ +/***/ (function(module, exports) { +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; - var resolvedOneOf = oneOf.map(function (subschema) { - return subschema.hasOwnProperty("$ref") ? resolveReference(subschema, rootSchema, formData) : subschema; - }); - return withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, resolvedOneOf); -} -function withExactlyOneSubschema(schema, rootSchema, formData, dependencyKey, oneOf) { - var validSubschemas = oneOf.filter(function (subschema) { - if (!subschema.properties) { - return false; - } +/***/ }), +/* 74 */ +/***/ (function(module, exports) { - var conditionPropertySchema = subschema.properties[dependencyKey]; +module.exports = true; - if (conditionPropertySchema) { - var conditionSchema = { - type: "object", - properties: _defineProperty({}, dependencyKey, conditionPropertySchema) - }; - var _validateFormData = (0, _validate["default"])(formData, conditionSchema), - errors = _validateFormData.errors; +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { - return errors.length === 0; - } - }); +var def = __webpack_require__(36).f; +var has = __webpack_require__(50); +var TAG = __webpack_require__(26)('toStringTag'); - if (validSubschemas.length !== 1) { - console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"); - return schema; - } +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; - var subschema = validSubschemas[0]; - var _subschema$properties = subschema.properties, - conditionPropertySchema = _subschema$properties[dependencyKey], - dependentSubschema = _objectWithoutProperties(_subschema$properties, [dependencyKey].map(_toPropertyKey)); +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { - var dependentSchema = _objectSpread({}, subschema, { - properties: dependentSubschema - }); +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(191); +var enumBugKeys = __webpack_require__(132); - return mergeSchemas(schema, retrieveSchema(dependentSchema, rootSchema, formData)); -} // Recursively merge deeply nested schemas. -// The difference between mergeSchemas and mergeObjects -// is that mergeSchemas only concats arrays for -// values under the "required" keyword, and when it does, -// it doesn't include duplicate values. +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; -function mergeSchemas(obj1, obj2) { - var acc = _extends({}, obj1); // Prevent mutation of source object. - - - return Object.keys(obj2).reduce(function (acc, key) { - var left = obj1 ? obj1[key] : {}, - right = obj2[key]; +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { - if (obj1 && obj1.hasOwnProperty(key) && isObject(right)) { - acc[key] = mergeSchemas(left, right); - } else if (obj1 && obj2 && (getSchemaType(obj1) === "object" || getSchemaType(obj2) === "object") && key === "required" && Array.isArray(left) && Array.isArray(right)) { - // Don't include duplicate values when merging - // "required" fields. - acc[key] = (0, _union["default"])(left, right); - } else { - acc[key] = right; - } +__webpack_require__(312); +var global = __webpack_require__(24); +var hide = __webpack_require__(43); +var Iterators = __webpack_require__(58); +var TO_STRING_TAG = __webpack_require__(26)('toStringTag'); - return acc; - }, acc); -} +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); -function isArguments(object) { - return Object.prototype.toString.call(object) === "[object Arguments]"; +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; } -function deepEquals(a, b) { - var ca = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - var cb = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; - - // Partially extracted from node-deeper and adapted to exclude comparison - // checks for functions. - // https://github.com/othiym23/node-deeper - if (a === b) { - return true; - } else if (typeof a === "function" || typeof b === "function") { - // Assume all functions are equivalent - // see https://github.com/rjsf-team/react-jsonschema-form/issues/255 - return true; - } else if (_typeof(a) !== "object" || _typeof(b) !== "object") { - return false; - } else if (a === null || b === null) { - return false; - } else if (a instanceof Date && b instanceof Date) { - return a.getTime() === b.getTime(); - } else if (a instanceof RegExp && b instanceof RegExp) { - return a.source === b.source && a.global === b.global && a.multiline === b.multiline && a.lastIndex === b.lastIndex && a.ignoreCase === b.ignoreCase; - } else if (isArguments(a) || isArguments(b)) { - if (!(isArguments(a) && isArguments(b))) { - return false; - } - var slice = Array.prototype.slice; - return deepEquals(slice.call(a), slice.call(b), ca, cb); - } else { - if (a.constructor !== b.constructor) { - return false; - } +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { - var ka = Object.keys(a); - var kb = Object.keys(b); // don't bother with stack acrobatics if there's nothing there +var baseIsArguments = __webpack_require__(354), + isObjectLike = __webpack_require__(31); - if (ka.length === 0 && kb.length === 0) { - return true; - } +/** Used for built-in method references. */ +var objectProto = Object.prototype; - if (ka.length !== kb.length) { - return false; - } +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - var cal = ca.length; +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; - while (cal--) { - if (ca[cal] === a) { - return cb[cal] === b; - } - } +/** + * Checks if `value` is likely an `arguments` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; - ca.push(a); - cb.push(b); - ka.sort(); - kb.sort(); +module.exports = isArguments; - for (var j = ka.length - 1; j >= 0; j--) { - if (ka[j] !== kb[j]) { - return false; - } - } - var _key; +/***/ }), +/* 79 */ +/***/ (function(module, exports) { - for (var k = ka.length - 1; k >= 0; k--) { - _key = ka[k]; +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true + */ +function identity(value) { + return value; +} - if (!deepEquals(a[_key], b[_key], ca, cb)) { - return false; - } - } +module.exports = identity; - ca.pop(); - cb.pop(); - return true; - } -} -function shouldRender(comp, nextProps, nextState) { - var props = comp.props, - state = comp.state; - return !deepEquals(props, nextProps) || !deepEquals(state, nextState); -} +/***/ }), +/* 80 */ +/***/ (function(module, exports, __webpack_require__) { -function toIdSchema(schema, id, rootSchema) { - var formData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var idPrefix = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "root"; - var idSchema = { - $id: id || idPrefix - }; +var DataView = __webpack_require__(361), + Map = __webpack_require__(139), + Promise = __webpack_require__(362), + Set = __webpack_require__(207), + WeakMap = __webpack_require__(363), + baseGetTag = __webpack_require__(39), + toSource = __webpack_require__(197); - if ("$ref" in schema || "dependencies" in schema || "allOf" in schema) { - var _schema = retrieveSchema(schema, rootSchema, formData); +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + setTag = '[object Set]', + weakMapTag = '[object WeakMap]'; - return toIdSchema(_schema, id, rootSchema, formData, idPrefix); - } +var dataViewTag = '[object DataView]'; - if ("items" in schema && !schema.items.$ref) { - return toIdSchema(schema.items, id, rootSchema, formData, idPrefix); - } +/** Used to detect maps, sets, and weakmaps. */ +var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); - if (schema.type !== "object") { - return idSchema; - } +/** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ +var getTag = baseGetTag; - for (var name in schema.properties || {}) { - var field = schema.properties[name]; - var fieldId = idSchema.$id + "_" + name; - idSchema[name] = toIdSchema(isObject(field) ? field : {}, fieldId, rootSchema, // It's possible that formData is not an object -- this can happen if an - // array item has just been added, but not populated with data yet - (formData || {})[name], idPrefix); - } +// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. +if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; - return idSchema; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; + } + } + return result; + }; } -function toPathSchema(schema) { - var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; - var rootSchema = arguments.length > 2 ? arguments[2] : undefined; - var formData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - var pathSchema = { - $name: name.replace(/^\./, "") - }; +module.exports = getTag; - if ("$ref" in schema || "dependencies" in schema || "allOf" in schema) { - var _schema = retrieveSchema(schema, rootSchema, formData); - return toPathSchema(_schema, name, rootSchema, formData); - } +/***/ }), +/* 81 */ +/***/ (function(module, exports, __webpack_require__) { - if (schema.hasOwnProperty("additionalProperties")) { - pathSchema.__rjsf_additionalProperties = true; - } +var baseIsTypedArray = __webpack_require__(365), + baseUnary = __webpack_require__(53), + nodeUtil = __webpack_require__(145); - if (schema.hasOwnProperty("items") && Array.isArray(formData)) { - formData.forEach(function (element, i) { - pathSchema[i] = toPathSchema(schema.items, "".concat(name, ".").concat(i), rootSchema, element); - }); - } else if (schema.hasOwnProperty("properties")) { - for (var property in schema.properties) { - pathSchema[property] = toPathSchema(schema.properties[property], "".concat(name, ".").concat(property), rootSchema, // It's possible that formData is not an object -- this can happen if an - // array item has just been added, but not populated with data yet - (formData || {})[property]); - } - } +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; - return pathSchema; -} +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; -function parseDateString(dateString) { - var includeTime = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; +module.exports = isTypedArray; - if (!dateString) { - return { - year: -1, - month: -1, - day: -1, - hour: includeTime ? -1 : 0, - minute: includeTime ? -1 : 0, - second: includeTime ? -1 : 0 - }; - } - var date = new Date(dateString); +/***/ }), +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { - if (Number.isNaN(date.getTime())) { - throw new Error("Unable to parse date " + dateString); +var ctx = __webpack_require__(40); +var call = __webpack_require__(208); +var isArrayIter = __webpack_require__(209); +var anObject = __webpack_require__(37); +var toLength = __webpack_require__(92); +var getIterFn = __webpack_require__(148); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; - return { - year: date.getUTCFullYear(), - month: date.getUTCMonth() + 1, - // oh you, javascript. - day: date.getUTCDate(), - hour: includeTime ? date.getUTCHours() : 0, - minute: includeTime ? date.getUTCMinutes() : 0, - second: includeTime ? date.getUTCSeconds() : 0 - }; -} -function toDateString(_ref2) { - var year = _ref2.year, - month = _ref2.month, - day = _ref2.day, - _ref2$hour = _ref2.hour, - hour = _ref2$hour === void 0 ? 0 : _ref2$hour, - _ref2$minute = _ref2.minute, - minute = _ref2$minute === void 0 ? 0 : _ref2$minute, - _ref2$second = _ref2.second, - second = _ref2$second === void 0 ? 0 : _ref2$second; - var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - var utcTime = Date.UTC(year, month - 1, day, hour, minute, second); - var datetime = new Date(utcTime).toJSON(); - return time ? datetime : datetime.slice(0, 10); -} +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { -function utcToLocal(jsonDate) { - if (!jsonDate) { - return ""; - } // required format of `"yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS" - // https://html.spec.whatwg.org/multipage/input.html#local-date-and-time-state-(type%3Ddatetime-local) - // > should be a _valid local date and time string_ (not GMT) - // Note - date constructor passed local ISO-8601 does not correctly - // change time to UTC in node pre-8 +var assignValue = __webpack_require__(141), + baseAssignValue = __webpack_require__(100); +/** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. + */ +function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); - var date = new Date(jsonDate); - var yyyy = pad(date.getFullYear(), 4); - var MM = pad(date.getMonth() + 1, 2); - var dd = pad(date.getDate(), 2); - var hh = pad(date.getHours(), 2); - var mm = pad(date.getMinutes(), 2); - var ss = pad(date.getSeconds(), 2); - var SSS = pad(date.getMilliseconds(), 3); - return "".concat(yyyy, "-").concat(MM, "-").concat(dd, "T").concat(hh, ":").concat(mm, ":").concat(ss, ".").concat(SSS); -} + var index = -1, + length = props.length; -function localToUTC(dateString) { - if (dateString) { - return new Date(dateString).toJSON(); - } -} + while (++index < length) { + var key = props[index]; -function pad(num, size) { - var s = String(num); + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; - while (s.length < size) { - s = "0" + s; + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } - - return s; + return object; } -function dataURItoBlob(dataURI) { - // Split metadata from data - var splitted = dataURI.split(","); // Split params +module.exports = copyObject; - var params = splitted[0].split(";"); // Get mime-type from params - var type = params[0].replace("data:", ""); // Filter the name property from params +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { - var properties = params.filter(function (param) { - return param.split("=")[0] === "name"; - }); // Look for the name and use unknown if no name property. +var baseMatches = __webpack_require__(426), + baseMatchesProperty = __webpack_require__(429), + identity = __webpack_require__(79), + isArray = __webpack_require__(21), + property = __webpack_require__(430); - var name; +/** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ +function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); +} - if (properties.length !== 1) { - name = "unknown"; - } else { - // Because we filtered out the other property, - // we only have the name case here. - name = properties[0].split("=")[1]; - } // Built the Uint8Array Blob parameter from the base64 string. +module.exports = baseIteratee; - var binary = atob(splitted[1]); - var array = []; +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { - for (var _i = 0; _i < binary.length; _i++) { - array.push(binary.charCodeAt(_i)); - } // Create the blob object +module.exports = __webpack_require__(477); +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { - var blob = new window.Blob([new Uint8Array(array)], { - type: type - }); - return { - blob: blob, - name: name - }; -} +var toInteger = __webpack_require__(266); -function rangeSpec(schema) { - var spec = {}; +/** + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @example + * + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false + */ +function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); +} - if (schema.multipleOf) { - spec.step = schema.multipleOf; - } +module.exports = isInteger; - if (schema.minimum || schema.minimum === 0) { - spec.min = schema.minimum; - } - if (schema.maximum || schema.maximum === 0) { - spec.max = schema.maximum; - } +/***/ }), +/* 87 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - return spec; -} +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registry; }); +var children = /*#__PURE__*/new Map(); +var sessionIdIndex = 0; +var registry = { + bookId: function () { + return "x:" + sessionIdIndex++; + }, + register: function (id, actor) { + children.set(id, actor); + return id; + }, + get: function (id) { + return children.get(id); + }, + free: function (id) { + children.delete(id); + } +}; -function getMatchingOption(formData, options, rootSchema) { - for (var _i2 = 0; _i2 < options.length; _i2++) { - var option = options[_i2]; // If the schema describes an object then we need to add slightly more - // strict matching to the schema, because unless the schema uses the - // "requires" keyword, an object will match the schema as long as it - // doesn't have matching keys with a conflicting type. To do this we use an - // "anyOf" with an array of requires. This augmentation expresses that the - // schema should match if any of the keys in the schema are present on the - // object and pass validation. - if (option.properties) { - // Create an "anyOf" schema that requires at least one of the keys in the - // "properties" object - var requiresAnyOf = { - anyOf: Object.keys(option.properties).map(function (key) { - return { - required: [key] - }; - }) - }; - var augmentedSchema = void 0; // If the "anyOf" keyword already exists, wrap the augmentation in an "allOf" +/***/ }), +/* 88 */ +/***/ (function(module, exports) { - if (option.anyOf) { - // Create a shallow clone of the option - var shallowClone = _extends({}, option); +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; - if (!shallowClone.allOf) { - shallowClone.allOf = []; - } else { - // If "allOf" already exists, shallow clone the array - shallowClone.allOf = shallowClone.allOf.slice(); - } - shallowClone.allOf.push(requiresAnyOf); - augmentedSchema = shallowClone; - } else { - augmentedSchema = _extends({}, option, requiresAnyOf); - } // Remove the "required" field as it's likely that not all fields have - // been filled in yet, which will mean that the schema is not valid +/***/ }), +/* 89 */ +/***/ (function(module, exports) { +exports.f = {}.propertyIsEnumerable; - delete augmentedSchema.required; - if ((0, _validate.isValid)(augmentedSchema, formData)) { - return _i2; - } - } else if ((0, _validate.isValid)(options[_i2], formData)) { - return _i2; - } - } +/***/ }), +/* 90 */ +/***/ (function(module, exports) { - return 0; -} // Check to see if a schema specifies that a value must be true +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; -function schemaRequiresTrueValue(schema) { - // Check if const is a truthy value - if (schema["const"]) { - return true; - } // Check if an enum has a single value of true +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { +exports.f = __webpack_require__(26); - if (schema["enum"] && schema["enum"].length === 1 && schema["enum"][0] === true) { - return true; - } // If anyOf has a single value, evaluate the subschema +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { - if (schema.anyOf && schema.anyOf.length === 1) { - return schemaRequiresTrueValue(schema.anyOf[0]); - } // If oneOf has a single value, evaluate the subschema +// 7.1.15 ToLength +var toInteger = __webpack_require__(130); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; - if (schema.oneOf && schema.oneOf.length === 1) { - return schemaRequiresTrueValue(schema.oneOf[0]); - } // Evaluate each subschema in allOf, to see if one of them requires a true - // value +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(37); +var dPs = __webpack_require__(301); +var enumBugKeys = __webpack_require__(132); +var IE_PROTO = __webpack_require__(131)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; - if (schema.allOf) { - return schema.allOf.some(schemaRequiresTrueValue); - } +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(125)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(192).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; - return false; -} +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; -/***/ }), -/* 42 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { -// EXPORTS -__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); +var castPath = __webpack_require__(95), + toKey = __webpack_require__(61); -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js -var is_array = __webpack_require__(13); -var is_array_default = /*#__PURE__*/__webpack_require__.n(is_array); +/** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ +function baseGet(object, path) { + path = castPath(path, object); -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayLikeToArray.js -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; + var index = 0, + length = path.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; + while (object != null && index < length) { + object = object[toKey(path[index++])]; } - - return arr2; -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayWithoutHoles.js - - -function _arrayWithoutHoles(arr) { - if (is_array_default()(arr)) return _arrayLikeToArray(arr); + return (index && index == length) ? object : undefined; } -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/from.js -var from = __webpack_require__(84); -var from_default = /*#__PURE__*/__webpack_require__.n(from); - -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/is-iterable.js -var is_iterable = __webpack_require__(280); -var is_iterable_default = /*#__PURE__*/__webpack_require__.n(is_iterable); -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol.js -var symbol = __webpack_require__(71); -var symbol_default = /*#__PURE__*/__webpack_require__.n(symbol); +module.exports = baseGet; -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/iterableToArray.js +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { +var isArray = __webpack_require__(21), + isKey = __webpack_require__(137), + stringToPath = __webpack_require__(196), + toString = __webpack_require__(140); -function _iterableToArray(iter) { - if (typeof symbol_default.a !== "undefined" && is_iterable_default()(Object(iter))) return from_default()(iter); +/** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ +function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); } -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/unsupportedIterableToArray.js +module.exports = castPath; -function _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 from_default()(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/nonIterableSpread.js -function _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."); -} -// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/toConsumableArray.js +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { +var getNative = __webpack_require__(52); +/* Built-in method references that are verified to be native. */ +var nativeCreate = getNative(Object, 'create'); + +module.exports = nativeCreate; -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} /***/ }), -/* 43 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithHoles = __webpack_require__(566); +var listCacheClear = __webpack_require__(341), + listCacheDelete = __webpack_require__(342), + listCacheGet = __webpack_require__(343), + listCacheHas = __webpack_require__(344), + listCacheSet = __webpack_require__(345); -var iterableToArrayLimit = __webpack_require__(567); +/** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -var unsupportedIterableToArray = __webpack_require__(270); + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} -var nonIterableRest = __webpack_require__(568); +// Add methods to `ListCache`. +ListCache.prototype.clear = listCacheClear; +ListCache.prototype['delete'] = listCacheDelete; +ListCache.prototype.get = listCacheGet; +ListCache.prototype.has = listCacheHas; +ListCache.prototype.set = listCacheSet; -function _slicedToArray(arr, i) { - return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); -} +module.exports = ListCache; -module.exports = _slicedToArray; /***/ }), -/* 44 */ -/***/ (function(module, exports) { +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + +var eq = __webpack_require__(60); /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true + * Gets the index at which the `key` is found in `array` of key-value pairs. * - * _.isObject(null); - * // => false + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); +function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; } -module.exports = isObject; +module.exports = assocIndexOf; /***/ }), -/* 45 */ -/***/ (function(module, exports) { +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { + +var isKeyable = __webpack_require__(347); /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false + * Gets the data for `map`. * - * _.isObjectLike(null); - * // => false + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; +function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; } -module.exports = isObjectLike; +module.exports = getMapData; /***/ }), -/* 46 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { -var baseKeys = __webpack_require__(219), - getTag = __webpack_require__(98), - isArguments = __webpack_require__(96), - isArray = __webpack_require__(30), - isArrayLike = __webpack_require__(62), - isBuffer = __webpack_require__(78), - isPrototype = __webpack_require__(120), - isTypedArray = __webpack_require__(99); +var defineProperty = __webpack_require__(199); -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - setTag = '[object Set]'; +/** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } +} -/** Used for built-in method references. */ -var objectProto = Object.prototype; +module.exports = baseAssignValue; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + +/***/ }), +/* 101 */ +/***/ (function(module, exports) { + +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; + +/** Used to detect unsigned integer values. */ +var reIsUint = /^(?:0|[1-9]\d*)$/; /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. - * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * Checks if `value` is a valid array-like index. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang + * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; - } - if (isPrototype(value)) { - return !baseKeys(value).length; - } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } - } - return true; +function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } -module.exports = isEmpty; +module.exports = isIndex; /***/ }), -/* 47 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { -var freeGlobal = __webpack_require__(198); +var arrayPush = __webpack_require__(143), + isFlattenable = __webpack_require__(356); -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; +/** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ +function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); + predicate || (predicate = isFlattenable); + result || (result = []); -module.exports = root; + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; +} + +module.exports = baseFlatten; /***/ }), -/* 48 */ +/* 103 */ /***/ (function(module, exports) { -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/***/ }), -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Checks if `value` is likely a prototype object. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + */ +function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(58)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); + return value === proto; +} + +module.exports = isPrototype; /***/ }), -/* 50 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(53); -var IE8_DOM_DEFINE = __webpack_require__(200); -var toPrimitive = __webpack_require__(139); -var dP = Object.defineProperty; +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(71); +var TAG = __webpack_require__(26)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; -exports.f = __webpack_require__(49) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; } catch (e) { /* empty */ } - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; }; - -/***/ }), -/* 51 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DEFAULT_GUARD_TYPE; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return EMPTY_ACTIVITY_MAP; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return STATE_DELIMITER; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return TARGETLESS_KEY; }); -var STATE_DELIMITER = '.'; -var EMPTY_ACTIVITY_MAP = {}; -var DEFAULT_GUARD_TYPE = 'xstate.guard'; -var TARGETLESS_KEY = ''; +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; /***/ }), -/* 52 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return toErrorList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return validateFormData; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isValid; }); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8); -/* harmony import */ var _babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17); -/* harmony import */ var _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _babel_runtime_corejs2_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(134); -/* harmony import */ var _babel_runtime_corejs2_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13); -/* harmony import */ var _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var lodash_toPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(186); -/* harmony import */ var lodash_toPath__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_toPath__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var ajv__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(187); -/* harmony import */ var ajv__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(ajv__WEBPACK_IMPORTED_MODULE_7__); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3); - - +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { +var ListCache = __webpack_require__(97), + stackClear = __webpack_require__(394), + stackDelete = __webpack_require__(395), + stackGet = __webpack_require__(396), + stackHas = __webpack_require__(397), + stackSet = __webpack_require__(398); +/** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; +} +// Add methods to `Stack`. +Stack.prototype.clear = stackClear; +Stack.prototype['delete'] = stackDelete; +Stack.prototype.get = stackGet; +Stack.prototype.has = stackHas; +Stack.prototype.set = stackSet; +module.exports = Stack; -var ajv = createAjvInstance(); +/***/ }), +/* 106 */ +/***/ (function(module, exports) { -var formerCustomFormats = null; -var formerMetaSchema = null; +/** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ +function copyArray(source, array) { + var index = -1, + length = source.length; + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; +} -function createAjvInstance() { - var ajv = new ajv__WEBPACK_IMPORTED_MODULE_7___default.a({ - errorDataPath: "property", - allErrors: true, - multipleOfPrecision: 8, - schemaId: "auto", - unknownFormats: "ignore" - }); // add custom formats +module.exports = copyArray; - ajv.addFormat("data-url", /^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/); - ajv.addFormat("color", /^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/); - return ajv; -} -function toErrorSchema(errors) { - // Transforms a ajv validation errors list: - // [ - // {property: ".level1.level2[2].level3", message: "err a"}, - // {property: ".level1.level2[2].level3", message: "err b"}, - // {property: ".level1.level2[4].level3", message: "err b"}, - // ] - // Into an error tree: - // { - // level1: { - // level2: { - // 2: {level3: {errors: ["err a", "err b"]}}, - // 4: {level3: {errors: ["err b"]}}, - // } - // } - // }; - if (!errors.length) { - return {}; - } +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { - return errors.reduce(function (errorSchema, error) { - var property = error.property, - message = error.message; - var path = lodash_toPath__WEBPACK_IMPORTED_MODULE_6___default()(property); - var parent = errorSchema; // If the property is at the root (.level1) then toPath creates - // an empty array element at the first index. Remove it. +var overArg = __webpack_require__(206); - if (path.length > 0 && path[0] === "") { - path.splice(0, 1); - } +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; +module.exports = getPrototype; - try { - for (var _iterator = _babel_runtime_corejs2_core_js_get_iterator__WEBPACK_IMPORTED_MODULE_4___default()(path.slice(0)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var segment = _step.value; - if (!(segment in parent)) { - parent[segment] = {}; - } +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { - parent = parent[segment]; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator["return"] != null) { - _iterator["return"](); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } +var MapCache = __webpack_require__(138), + setCacheAdd = __webpack_require__(419), + setCacheHas = __webpack_require__(420); - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(parent.__errors)) { - // We store the list of errors for this node in a property named __errors - // to avoid name collision with a possible sub schema field named - // "errors" (see `validate.createErrorHandler`). - parent.__errors = parent.__errors.concat(message); - } else { - if (message) { - parent.__errors = [message]; - } - } +/** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ +function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; - return errorSchema; - }, {}); + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } } -function toErrorList(errorSchema) { - var fieldName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "root"; - // XXX: We should transform fieldName as a full field path string. - var errorList = []; +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; - if ("__errors" in errorSchema) { - errorList = errorList.concat(errorSchema.__errors.map(function (stack) { - return { - stack: "".concat(fieldName, ": ").concat(stack) - }; - })); - } +module.exports = SetCache; - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(errorSchema).reduce(function (acc, key) { - if (key !== "__errors") { - acc = acc.concat(toErrorList(errorSchema[key], key)); - } - return acc; - }, errorList); -} +/***/ }), +/* 109 */ +/***/ (function(module, exports) { -function createErrorHandler(formData) { - var handler = { - // We store the list of errors for this node in a property named __errors - // to avoid name collision with a possible sub schema field named - // "errors" (see `utils.toErrorSchema`). - __errors: [], - addError: function addError(message) { - this.__errors.push(message); - } - }; +/** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function cacheHas(cache, key) { + return cache.has(key); +} - if (Object(_utils__WEBPACK_IMPORTED_MODULE_8__["isObject"])(formData)) { - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(formData).reduce(function (acc, key) { - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, acc, Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, key, createErrorHandler(formData[key]))); - }, handler); - } +module.exports = cacheHas; - if (_babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(formData)) { - return formData.reduce(function (acc, value, key) { - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, acc, Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, key, createErrorHandler(value))); - }, handler); - } - return handler; -} +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { -function unwrapErrorHandler(errorHandler) { - return _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(errorHandler).reduce(function (acc, key) { - if (key === "addError") { - return acc; - } else if (key === "__errors") { - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, acc, Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, key, errorHandler[key])); - } +var baseFindIndex = __webpack_require__(231), + baseIsNaN = __webpack_require__(439), + strictIndexOf = __webpack_require__(440); - return Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, acc, Object(_babel_runtime_corejs2_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, key, unwrapErrorHandler(errorHandler[key]))); - }, {}); -} /** - * Transforming the error output from ajv to format used by jsonschema. - * At some point, components should be updated to support ajv. + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. */ +function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); +} +module.exports = baseIndexOf; -function transformAjvErrors() { - var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - if (errors === null) { - return []; - } +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { - return errors.map(function (e) { - var dataPath = e.dataPath, - keyword = e.keyword, - message = e.message, - params = e.params, - schemaPath = e.schemaPath; - var property = "".concat(dataPath); // put data in expected format +var isArrayLike = __webpack_require__(45), + isObjectLike = __webpack_require__(31); - return { - name: keyword, - property: property, - message: message, - params: params, - // specific to ajv - stack: "".concat(property, " ").concat(message).trim(), - schemaPath: schemaPath - }; - }); -} /** - * This function processes the formData with a user `validate` contributed - * function, which receives the form data and an `errorHandler` object that - * will be used to add custom validation errors for each field. + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. + * @example + * + * _.isArrayLikeObject([1, 2, 3]); + * // => true + * + * _.isArrayLikeObject(document.body.children); + * // => true + * + * _.isArrayLikeObject('abc'); + * // => false + * + * _.isArrayLikeObject(_.noop); + * // => false */ +function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); +} +module.exports = isArrayLikeObject; -function validateFormData(formData, schema, customValidate, transformErrors) { - var additionalMetaSchemas = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; - var customFormats = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; - // Include form data with undefined values, which is required for validation. - var rootSchema = schema; - formData = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["getDefaultFormState"])(schema, formData, rootSchema, true); - var newMetaSchemas = !Object(_utils__WEBPACK_IMPORTED_MODULE_8__["deepEquals"])(formerMetaSchema, additionalMetaSchemas); - var newFormats = !Object(_utils__WEBPACK_IMPORTED_MODULE_8__["deepEquals"])(formerCustomFormats, customFormats); - if (newMetaSchemas || newFormats) { - ajv = createAjvInstance(); - } // add more schemas to validate against +/***/ }), +/* 112 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; - if (additionalMetaSchemas && newMetaSchemas && _babel_runtime_corejs2_core_js_array_is_array__WEBPACK_IMPORTED_MODULE_5___default()(additionalMetaSchemas)) { - ajv.addMetaSchema(additionalMetaSchemas); - formerMetaSchema = additionalMetaSchemas; - } // add more custom formats to validate against +var randomFromSeed = __webpack_require__(487); - if (customFormats && newFormats && Object(_utils__WEBPACK_IMPORTED_MODULE_8__["isObject"])(customFormats)) { - _babel_runtime_corejs2_core_js_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(customFormats).forEach(function (formatName) { - ajv.addFormat(formatName, customFormats[formatName]); - }); +var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; +var alphabet; +var previousSeed; - formerCustomFormats = customFormats; - } +var shuffled; - var validationError = null; +function reset() { + shuffled = false; +} - try { - ajv.validate(schema, formData); - } catch (err) { - validationError = err; - } +function setCharacters(_alphabet_) { + if (!_alphabet_) { + if (alphabet !== ORIGINAL) { + alphabet = ORIGINAL; + reset(); + } + return; + } - var errors = transformAjvErrors(ajv.errors); // Clear errors to prevent persistent errors, see #1104 + if (_alphabet_ === alphabet) { + return; + } - ajv.errors = null; - var noProperMetaSchema = validationError && validationError.message && typeof validationError.message === "string" && validationError.message.includes("no schema with key or ref "); + if (_alphabet_.length !== ORIGINAL.length) { + throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_); + } - if (noProperMetaSchema) { - errors = [].concat(Object(_babel_runtime_corejs2_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(errors), [{ - stack: validationError.message - }]); - } + var unique = _alphabet_.split('').filter(function(item, ind, arr){ + return ind !== arr.lastIndexOf(item); + }); - if (typeof transformErrors === "function") { - errors = transformErrors(errors); - } + if (unique.length) { + throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', ')); + } - var errorSchema = toErrorSchema(errors); + alphabet = _alphabet_; + reset(); +} - if (noProperMetaSchema) { - errorSchema = Object(_babel_runtime_corejs2_helpers_esm_objectSpread__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, errorSchema, { - $schema: { - __errors: [validationError.message] - } - }); - } +function characters(_alphabet_) { + setCharacters(_alphabet_); + return alphabet; +} - if (typeof customValidate !== "function") { - return { - errors: errors, - errorSchema: errorSchema - }; - } +function setSeed(seed) { + randomFromSeed.seed(seed); + if (previousSeed !== seed) { + reset(); + previousSeed = seed; + } +} - var errorHandler = customValidate(formData, createErrorHandler(formData)); - var userErrorSchema = unwrapErrorHandler(errorHandler); - var newErrorSchema = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["mergeObjects"])(errorSchema, userErrorSchema, true); // XXX: The errors list produced is not fully compliant with the format - // exposed by the jsonschema lib, which contains full field paths and other - // properties. +function shuffle() { + if (!alphabet) { + setCharacters(ORIGINAL); + } - var newErrors = toErrorList(newErrorSchema); - return { - errors: newErrors, - errorSchema: newErrorSchema - }; + var sourceArray = alphabet.split(''); + var targetArray = []; + var r = randomFromSeed.nextValue(); + var characterIndex; + + while (sourceArray.length > 0) { + r = randomFromSeed.nextValue(); + characterIndex = Math.floor(r * sourceArray.length); + targetArray.push(sourceArray.splice(characterIndex, 1)[0]); + } + return targetArray.join(''); +} + +function getShuffled() { + if (shuffled) { + return shuffled; + } + shuffled = shuffle(); + return shuffled; } + /** - * Validates data against a schema, returning true if the data is valid, or - * false otherwise. If the schema is invalid, then this function will return - * false. + * lookup shuffled letter + * @param index + * @returns {string} */ +function lookup(index) { + var alphabetShuffled = getShuffled(); + return alphabetShuffled[index]; +} -function isValid(schema, data) { - try { - return ajv.validate(schema, data); - } catch (e) { - return false; - } +function get () { + return alphabet || ORIGINAL; } +module.exports = { + get: get, + characters: characters, + seed: setSeed, + lookup: lookup, + shuffled: getShuffled +}; + + /***/ }), -/* 53 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(48); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - +module.exports = __webpack_require__(305); /***/ }), -/* 54 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithoutHoles = __webpack_require__(574); +module.exports = __webpack_require__(319); -var iterableToArray = __webpack_require__(575); +/***/ }), +/* 115 */ +/***/ (function(module, exports, __webpack_require__) { -var unsupportedIterableToArray = __webpack_require__(270); +"use strict"; -var nonIterableSpread = __webpack_require__(576); -function _toConsumableArray(arr) { - return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); -} +if (true) { + module.exports = __webpack_require__(391); +} else {} -module.exports = _toConsumableArray; /***/ }), -/* 55 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(72), - getRawTag = __webpack_require__(301), - objectToString = __webpack_require__(302); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - +module.exports = __webpack_require__(494); /***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { +/* 117 */ +/***/ (function(module, exports) { -// optional / simple context binding -var aFunction = __webpack_require__(90); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); +function _typeof(obj) { + "@babel/helpers - typeof"; + + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 57 */ -/***/ (function(module, exports) { - -function _extends() { - module.exports = _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); + return _typeof(obj); } -module.exports = _extends; - -/***/ }), -/* 58 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - +module.exports = _typeof; /***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var dP = __webpack_require__(50); -var createDesc = __webpack_require__(89); -module.exports = __webpack_require__(49) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; +"use strict"; +/* unused harmony export getAdjList */ +/* unused harmony export getAllStateNodes */ +/* unused harmony export getChildren */ +/* unused harmony export getConfiguration */ +/* unused harmony export getValue */ +/* unused harmony export has */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isInFinalState; }); +/* unused harmony export isLeafNode */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return nextEvents; }); +/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2); -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(106); -module.exports = function (it) { - return Object(defined(it)); +var isLeafNode = function (stateNode) { + return stateNode.type === 'atomic' || stateNode.type === 'final'; }; - -/***/ }), -/* 61 */ -/***/ (function(module, exports) { - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; +function getChildren(stateNode) { + return Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__[/* keys */ "k"])(stateNode.states).map(function (key) { + return stateNode.states[key]; + }); } -module.exports = arrayMap; - - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { +function getAllStateNodes(stateNode) { + var stateNodes = [stateNode]; -var isFunction = __webpack_require__(23), - isLength = __webpack_require__(158); + if (isLeafNode(stateNode)) { + return stateNodes; + } -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); + return stateNodes.concat(Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__[/* flatten */ "b"])(getChildren(stateNode).map(getAllStateNodes))); } -module.exports = isArrayLike; - +function getConfiguration(prevStateNodes, stateNodes) { + var e_1, _a, e_2, _b, e_3, _c, e_4, _d; -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { + var prevConfiguration = new Set(prevStateNodes); + var prevAdjList = getAdjList(prevConfiguration); + var configuration = new Set(stateNodes); -var identity = __webpack_require__(97), - overRest = __webpack_require__(216), - setToString = __webpack_require__(218); + try { + // add all ancestors + for (var configuration_1 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_1_1 = configuration_1.next(); !configuration_1_1.done; configuration_1_1 = configuration_1.next()) { + var s = configuration_1_1.value; + var m = s.parent; -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} + while (m && !configuration.has(m)) { + configuration.add(m); + m = m.parent; + } + } + } catch (e_1_1) { + e_1 = { + error: e_1_1 + }; + } finally { + try { + if (configuration_1_1 && !configuration_1_1.done && (_a = configuration_1.return)) _a.call(configuration_1); + } finally { + if (e_1) throw e_1.error; + } + } -module.exports = baseRest; + var adjList = getAdjList(configuration); + try { + // add descendants + for (var configuration_2 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_2_1 = configuration_2.next(); !configuration_2_1.done; configuration_2_1 = configuration_2.next()) { + var s = configuration_2_1.value; // if previously active, add existing child nodes -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { + if (s.type === 'compound' && (!adjList.get(s) || !adjList.get(s).length)) { + if (prevAdjList.get(s)) { + prevAdjList.get(s).forEach(function (sn) { + return configuration.add(sn); + }); + } else { + s.initialStateNodes.forEach(function (sn) { + return configuration.add(sn); + }); + } + } else { + if (s.type === 'parallel') { + try { + for (var _e = (e_3 = void 0, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(getChildren(s))), _f = _e.next(); !_f.done; _f = _e.next()) { + var child = _f.value; -"use strict"; + if (child.type === 'history') { + continue; + } + if (!configuration.has(child)) { + configuration.add(child); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.fieldProps = exports.registry = void 0; + if (prevAdjList.get(child)) { + prevAdjList.get(child).forEach(function (sn) { + return configuration.add(sn); + }); + } else { + child.initialStateNodes.forEach(function (sn) { + return configuration.add(sn); + }); + } + } + } + } catch (e_3_1) { + e_3 = { + error: e_3_1 + }; + } finally { + try { + if (_f && !_f.done && (_c = _e.return)) _c.call(_e); + } finally { + if (e_3) throw e_3.error; + } + } + } + } + } + } catch (e_2_1) { + e_2 = { + error: e_2_1 + }; + } finally { + try { + if (configuration_2_1 && !configuration_2_1.done && (_b = configuration_2.return)) _b.call(configuration_2); + } finally { + if (e_2) throw e_2.error; + } + } -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + try { + // add all ancestors + for (var configuration_3 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_3_1 = configuration_3.next(); !configuration_3_1.done; configuration_3_1 = configuration_3.next()) { + var s = configuration_3_1.value; + var m = s.parent; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + while (m && !configuration.has(m)) { + configuration.add(m); + m = m.parent; + } + } + } catch (e_4_1) { + e_4 = { + error: e_4_1 + }; + } finally { + try { + if (configuration_3_1 && !configuration_3_1.done && (_d = configuration_3.return)) _d.call(configuration_3); + } finally { + if (e_4) throw e_4.error; + } + } -var registry = _propTypes["default"].shape({ - ArrayFieldTemplate: _propTypes["default"].elementType, - FieldTemplate: _propTypes["default"].elementType, - ObjectFieldTemplate: _propTypes["default"].elementType, - definitions: _propTypes["default"].object.isRequired, - rootSchema: _propTypes["default"].object, - fields: _propTypes["default"].objectOf(_propTypes["default"].elementType).isRequired, - formContext: _propTypes["default"].object.isRequired, - widgets: _propTypes["default"].objectOf(_propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].object])).isRequired -}); + return configuration; +} -exports.registry = registry; -var fieldProps = { - autofocus: _propTypes["default"].bool, - disabled: _propTypes["default"].bool, - errorSchema: _propTypes["default"].object, - formData: _propTypes["default"].any, - idSchema: _propTypes["default"].object, - onBlur: _propTypes["default"].func, - onChange: _propTypes["default"].func.isRequired, - onFocus: _propTypes["default"].func, - rawErrors: _propTypes["default"].arrayOf(_propTypes["default"].string), - readonly: _propTypes["default"].bool, - registry: registry.isRequired, - required: _propTypes["default"].bool, - schema: _propTypes["default"].object.isRequired, - uiSchema: _propTypes["default"].shape({ - "ui:options": _propTypes["default"].shape({ - addable: _propTypes["default"].bool, - orderable: _propTypes["default"].bool, - removable: _propTypes["default"].bool - }) - }) -}; -exports.fieldProps = fieldProps; +function getValueFromAdj(baseNode, adjList) { + var childStateNodes = adjList.get(baseNode); -/***/ }), -/* 65 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + if (!childStateNodes) { + return {}; // todo: fix? + } -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return consume; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return provide; }); -/** - * Maintains a stack of the current service in scope. - * This is used to provide the correct service to spawn(). - */ -var serviceStack = []; + if (baseNode.type === 'compound') { + var childStateNode = childStateNodes[0]; -var provide = function (service, fn) { - serviceStack.push(service); - var result = fn(service); - serviceStack.pop(); - return result; -}; + if (childStateNode) { + if (isLeafNode(childStateNode)) { + return childStateNode.key; + } + } else { + return {}; + } + } -var consume = function (fn) { - return fn(serviceStack[serviceStack.length - 1]); -}; + var stateValue = {}; + childStateNodes.forEach(function (csn) { + stateValue[csn.key] = getValueFromAdj(csn, adjList); + }); + return stateValue; +} +function getAdjList(configuration) { + var e_5, _a; + var adjList = new Map(); -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { + try { + for (var configuration_4 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(configuration), configuration_4_1 = configuration_4.next(); !configuration_4_1.done; configuration_4_1 = configuration_4.next()) { + var s = configuration_4_1.value; -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(137); -var defined = __webpack_require__(106); -module.exports = function (it) { - return IObject(defined(it)); -}; + if (!adjList.has(s)) { + adjList.set(s, []); + } + if (s.parent) { + if (!adjList.has(s.parent)) { + adjList.set(s.parent, []); + } -/***/ }), -/* 67 */ -/***/ (function(module, exports) { + adjList.get(s.parent).push(s); + } + } + } catch (e_5_1) { + e_5 = { + error: e_5_1 + }; + } finally { + try { + if (configuration_4_1 && !configuration_4_1.done && (_a = configuration_4.return)) _a.call(configuration_4); + } finally { + if (e_5) throw e_5.error; + } + } -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; + return adjList; +} +function getValue(rootNode, configuration) { + var config = getConfiguration([rootNode], configuration); + return getValueFromAdj(rootNode, getAdjList(config)); +} -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { +function has(iterable, item) { + if (Array.isArray(iterable)) { + return iterable.some(function (member) { + return member === item; + }); + } -var baseIsNative = __webpack_require__(338), - getValue = __webpack_require__(341); + if (iterable instanceof Set) { + return iterable.has(item); + } -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; + return false; // TODO: fix } -module.exports = getNative; +function nextEvents(configuration) { + return Object(_utils_js__WEBPACK_IMPORTED_MODULE_1__[/* flatten */ "b"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __spread */ "d"])(new Set(configuration.map(function (sn) { + return sn.ownEvents; + })))); +} +function isInFinalState(configuration, stateNode) { + if (stateNode.type === 'compound') { + return getChildren(stateNode).some(function (s) { + return s.type === 'final' && has(configuration, s); + }); + } -/***/ }), -/* 69 */ -/***/ (function(module, exports) { + if (stateNode.type === 'parallel') { + return getChildren(stateNode).every(function (sn) { + return isInFinalState(configuration, sn); + }); + } -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; + return false; } -module.exports = baseUnary; /***/ }), -/* 70 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(55), - isArray = __webpack_require__(30), - isObjectLike = __webpack_require__(45); +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* +* loglevel - https://github.com/pimterry/loglevel +* +* Copyright (c) 2013 Tim Perry +* Licensed under the MIT license. +*/ +(function (root, definition) { + "use strict"; + if (true) { + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (definition), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} +}(this, function () { + "use strict"; -/** `Object#toString` result references. */ -var stringTag = '[object String]'; + // Slightly dubious tricks to cut down minimized file size + var noop = function() {}; + var undefinedType = "undefined"; + var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && ( + /Trident\/|MSIE /.test(window.navigator.userAgent) + ); -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); -} + var logMethods = [ + "trace", + "debug", + "info", + "warn", + "error" + ]; -module.exports = isString; + // Cross-browser bind equivalent that works at least back to IE6 + function bindMethod(obj, methodName) { + var method = obj[methodName]; + if (typeof method.bind === 'function') { + return method.bind(obj); + } else { + try { + return Function.prototype.bind.call(method, obj); + } catch (e) { + // Missing bind shim or IE8 + Modernizr, fallback to wrapping + return function() { + return Function.prototype.apply.apply(method, [obj, arguments]); + }; + } + } + } + // Trace() doesn't print the message in IE, so for that case we need to wrap it + function traceForIE() { + if (console.log) { + if (console.log.apply) { + console.log.apply(console, arguments); + } else { + // In old IE, native console methods themselves don't have apply(). + Function.prototype.apply.apply(console.log, [console, arguments]); + } + } + if (console.trace) console.trace(); + } -/***/ }), -/* 71 */ -/***/ (function(module, exports, __webpack_require__) { + // Build the best logging method possible for this env + // Wherever possible we want to bind, not wrap, to preserve stack traces + function realMethod(methodName) { + if (methodName === 'debug') { + methodName = 'log'; + } -module.exports = __webpack_require__(319); + if (typeof console === undefinedType) { + return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives + } else if (methodName === 'trace' && isIE) { + return traceForIE; + } else if (console[methodName] !== undefined) { + return bindMethod(console, methodName); + } else if (console.log !== undefined) { + return bindMethod(console, 'log'); + } else { + return noop; + } + } -/***/ }), -/* 72 */ -/***/ (function(module, exports, __webpack_require__) { + // These private functions always need `this` to be set properly -var root = __webpack_require__(47); + function replaceLoggingMethods(level, loggerName) { + /*jshint validthis:true */ + for (var i = 0; i < logMethods.length; i++) { + var methodName = logMethods[i]; + this[methodName] = (i < level) ? + noop : + this.methodFactory(methodName, level, loggerName); + } -/** Built-in value references. */ -var Symbol = root.Symbol; + // Define log.log as an alias for log.debug + this.log = this.debug; + } -module.exports = Symbol; + // In old IE versions, the console isn't present until you first open it. + // We build realMethod() replacements here that regenerate logging methods + function enableLoggingWhenConsoleArrives(methodName, level, loggerName) { + return function () { + if (typeof console !== undefinedType) { + replaceLoggingMethods.call(this, level, loggerName); + this[methodName].apply(this, arguments); + } + }; + } + // By default, we use closely bound real methods wherever possible, and + // otherwise we wait for a console to appear, and then try again. + function defaultMethodFactory(methodName, level, loggerName) { + /*jshint validthis:true */ + return realMethod(methodName) || + enableLoggingWhenConsoleArrives.apply(this, arguments); + } -/***/ }), -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { + function Logger(name, defaultLevel, factory) { + var self = this; + var currentLevel; -"use strict"; + var storageKey = "loglevel"; + if (typeof name === "string") { + storageKey += ":" + name; + } else if (typeof name === "symbol") { + storageKey = undefined; + } -var $at = __webpack_require__(316)(true); + function persistLevelIfPossible(levelNum) { + var levelName = (logMethods[levelNum] || 'silent').toUpperCase(); -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(150)(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); + if (typeof window === undefinedType || !storageKey) return; + // Use localStorage if available + try { + window.localStorage[storageKey] = levelName; + return; + } catch (ignore) {} -/***/ }), -/* 74 */ -/***/ (function(module, exports) { + // Use session cookie as fallback + try { + window.document.cookie = + encodeURIComponent(storageKey) + "=" + levelName + ";"; + } catch (ignore) {} + } -module.exports = {}; + function getPersistedLevel() { + var storedLevel; + if (typeof window === undefinedType || !storageKey) return; -/***/ }), -/* 75 */ -/***/ (function(module, exports, __webpack_require__) { + try { + storedLevel = window.localStorage[storageKey]; + } catch (ignore) {} -var baseGetTag = __webpack_require__(55), - isObjectLike = __webpack_require__(45); + // Fallback to cookies if local storage gives us nothing + if (typeof storedLevel === undefinedType) { + try { + var cookie = window.document.cookie; + var location = cookie.indexOf( + encodeURIComponent(storageKey) + "="); + if (location !== -1) { + storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1]; + } + } catch (ignore) {} + } -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; + // If the stored level is not valid, treat it as if nothing was stored. + if (self.levels[storedLevel] === undefined) { + storedLevel = undefined; + } -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} + return storedLevel; + } -module.exports = isSymbol; + /* + * + * Public logger API - see https://github.com/pimterry/loglevel for details + * + */ + self.name = name; -/***/ }), -/* 76 */ -/***/ (function(module, exports) { + self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, + "ERROR": 4, "SILENT": 5}; -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} + self.methodFactory = factory || defaultMethodFactory; -module.exports = eq; + self.getLevel = function () { + return currentLevel; + }; + self.setLevel = function (level, persist) { + if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { + level = self.levels[level.toUpperCase()]; + } + if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { + currentLevel = level; + if (persist !== false) { // defaults to true + persistLevelIfPossible(level); + } + replaceLoggingMethods.call(self, level, name); + if (typeof console === undefinedType && level < self.levels.SILENT) { + return "No console available for logging"; + } + } else { + throw "log.setLevel() called with invalid level: " + level; + } + }; -/***/ }), -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { + self.setDefaultLevel = function (level) { + if (!getPersistedLevel()) { + self.setLevel(level, false); + } + }; -var isSymbol = __webpack_require__(75); + self.enableAll = function(persist) { + self.setLevel(self.levels.TRACE, persist); + }; -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; + self.disableAll = function(persist) { + self.setLevel(self.levels.SILENT, persist); + }; -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} + // Initialize with the right level + var initialLevel = getPersistedLevel(); + if (initialLevel == null) { + initialLevel = defaultLevel == null ? "WARN" : defaultLevel; + } + self.setLevel(initialLevel, false); + } -module.exports = toKey; + /* + * + * Top-level API + * + */ + var defaultLogger = new Logger(); -/***/ }), -/* 78 */ -/***/ (function(module, exports, __webpack_require__) { + var _loggersByName = {}; + defaultLogger.getLogger = function getLogger(name) { + if ((typeof name !== "symbol" && typeof name !== "string") || name === "") { + throw new TypeError("You must supply a name when creating a logger."); + } -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(47), - stubFalse = __webpack_require__(369); + var logger = _loggersByName[name]; + if (!logger) { + logger = _loggersByName[name] = new Logger( + name, defaultLogger.getLevel(), defaultLogger.methodFactory); + } + return logger; + }; -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; + // Grab the current global log variable in case of overwrite + var _log = (typeof window !== undefinedType) ? window.log : undefined; + defaultLogger.noConflict = function() { + if (typeof window !== undefinedType && + window.log === defaultLogger) { + window.log = _log; + } -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + return defaultLogger; + }; -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; + defaultLogger.getLoggers = function getLoggers() { + return _loggersByName; + }; -/** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined; + // ES6 default export, for compatibility + defaultLogger['default'] = defaultLogger; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + return defaultLogger; +})); -/** - * Checks if `value` is a buffer. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. - * @example - * - * _.isBuffer(new Buffer(2)); - * // => true - * - * _.isBuffer(new Uint8Array(2)); - * // => false - */ -var isBuffer = nativeIsBuffer || stubFalse; -module.exports = isBuffer; +/***/ }), +/* 120 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(160)(module))) +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return State; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bindActionToState; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isState; }); +/* unused harmony export stateValuesEqual */ +/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); +/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2); +/* harmony import */ var _stateUtils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(118); +/* harmony import */ var _actions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30); -/***/ }), -/* 79 */ -/***/ (function(module, exports, __webpack_require__) { -var arrayLikeKeys = __webpack_require__(227), - baseKeys = __webpack_require__(219), - isArrayLike = __webpack_require__(62); -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} -module.exports = keys; -/***/ }), -/* 80 */ -/***/ (function(module, exports, __webpack_require__) { +function stateValuesEqual(a, b) { + if (a === b) { + return true; + } -var arrayLikeKeys = __webpack_require__(227), - baseKeysIn = __webpack_require__(407), - isArrayLike = __webpack_require__(62); + if (a === undefined || b === undefined) { + return false; + } -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(a) || Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(b)) { + return a === b; + } + + var aKeys = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(a); + var bKeys = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(b); + return aKeys.length === bKeys.length && aKeys.every(function (key) { + return stateValuesEqual(a[key], b[key]); + }); } -module.exports = keysIn; +function isState(state) { + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(state)) { + return false; + } + return 'value' in state && 'history' in state; +} -/***/ }), -/* 81 */ -/***/ (function(module, exports, __webpack_require__) { +function bindActionToState(action, state) { + var exec = action.exec; -"use strict"; + var boundAction = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, action), { + exec: exec !== undefined ? function () { + return exec(state.context, state.event, { + action: action, + state: state, + _event: state._event + }); + } : undefined + }); + return boundAction; +} +var State = +/*#__PURE__*/ -module.exports = { - copy: copy, - checkDataType: checkDataType, - checkDataTypes: checkDataTypes, - coerceToTypes: coerceToTypes, - toHash: toHash, - getProperty: getProperty, - escapeQuotes: escapeQuotes, - equal: __webpack_require__(177), - ucs2length: __webpack_require__(475), - varOccurences: varOccurences, - varReplace: varReplace, - cleanUpCode: cleanUpCode, - finalCleanUpCode: finalCleanUpCode, - schemaHasRules: schemaHasRules, - schemaHasRulesExcept: schemaHasRulesExcept, - schemaUnknownRules: schemaUnknownRules, - toQuotedString: toQuotedString, - getPathExpr: getPathExpr, - getPath: getPath, - getData: getData, - unescapeFragment: unescapeFragment, - unescapeJsonPointer: unescapeJsonPointer, - escapeFragment: escapeFragment, - escapeJsonPointer: escapeJsonPointer -}; - - -function copy(o, to) { - to = to || {}; - for (var key in o) to[key] = o[key]; - return to; -} - +/** @class */ +function () { + /** + * Creates a new State instance. + * @param value The state value + * @param context The extended state + * @param historyValue The tree representing historical values of the state nodes + * @param history The previous state + * @param actions An array of action objects to execute as side-effects + * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`). + * @param meta + * @param events Internal event queue. Should be empty with run-to-completion semantics. + * @param configuration + */ + function State(config) { + var _this = this; -function checkDataType(dataType, data, negate) { - var EQUAL = negate ? ' !== ' : ' === ' - , AND = negate ? ' || ' : ' && ' - , OK = negate ? '!' : '' - , NOT = negate ? '' : '!'; - switch (dataType) { - case 'null': return data + EQUAL + 'null'; - case 'array': return OK + 'Array.isArray(' + data + ')'; - case 'object': return '(' + OK + data + AND + - 'typeof ' + data + EQUAL + '"object"' + AND + - NOT + 'Array.isArray(' + data + '))'; - case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + - NOT + '(' + data + ' % 1)' + - AND + data + EQUAL + data + ')'; - default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + this.actions = []; + this.activities = _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* EMPTY_ACTIVITY_MAP */ "b"]; + this.meta = {}; + this.events = []; + this.value = config.value; + this.context = config.context; + this._event = config._event; + this._sessionid = config._sessionid; + this.event = this._event.data; + this.historyValue = config.historyValue; + this.history = config.history; + this.actions = config.actions || []; + this.activities = config.activities || _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* EMPTY_ACTIVITY_MAP */ "b"]; + this.meta = config.meta || {}; + this.events = config.events || []; + this.matches = this.matches.bind(this); + this.toStrings = this.toStrings.bind(this); + this.configuration = config.configuration; + this.transitions = config.transitions; + this.children = config.children; + this.done = !!config.done; + Object.defineProperty(this, 'nextEvents', { + get: function () { + return Object(_stateUtils_js__WEBPACK_IMPORTED_MODULE_3__[/* nextEvents */ "b"])(_this.configuration); + } + }); } -} + /** + * Creates a new State instance for the given `stateValue` and `context`. + * @param stateValue + * @param context + */ -function checkDataTypes(dataTypes, data) { - switch (dataTypes.length) { - case 1: return checkDataType(dataTypes[0], data, true); - default: - var code = ''; - var types = toHash(dataTypes); - if (types.array && types.object) { - code = types.null ? '(': '(!' + data + ' || '; - code += 'typeof ' + data + ' !== "object")'; - delete types.null; - delete types.array; - delete types.object; + State.from = function (stateValue, context) { + if (stateValue instanceof State) { + if (stateValue.context !== context) { + return new State({ + value: stateValue.value, + context: context, + _event: stateValue._event, + _sessionid: null, + historyValue: stateValue.historyValue, + history: stateValue.history, + actions: [], + activities: stateValue.activities, + meta: {}, + events: [], + configuration: [], + transitions: [], + children: {} + }); } - if (types.number) delete types.integer; - for (var t in types) - code += (code ? ' && ' : '' ) + checkDataType(t, data, true); - - return code; - } -} - -var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); -function coerceToTypes(optionCoerceTypes, dataTypes) { - if (Array.isArray(dataTypes)) { - var types = []; - for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); - return paths[lvl - up]; - } - if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); - data = 'data' + ((lvl - up) || ''); - if (!jsonPointer) return data; - } +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { - var expr = data; - var segments = jsonPointer.split('/'); - for (var i=0; i= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } +/***/ }), +/* 127 */ +/***/ (function(module, exports, __webpack_require__) { - return target; -} +var META = __webpack_require__(90)('meta'); +var isObject = __webpack_require__(34); +var has = __webpack_require__(50); +var setDesc = __webpack_require__(36).f; +var id = 0; +var isExtensible = Object.isExtensible || function () { + return true; +}; +var FREEZE = !__webpack_require__(42)(function () { + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function (it) { + setDesc(it, META, { value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + } }); +}; +var fastKey = function (it, create) { + // return primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function (it, create) { + if (!has(it, META)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; -module.exports = _objectWithoutProperties; /***/ }), -/* 83 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(372); +var core = __webpack_require__(15); +var global = __webpack_require__(24); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: core.version, + mode: __webpack_require__(74) ? 'pure' : 'global', + copyright: '© 2020 Denis Pushkarev (zloirock.ru)' +}); -module.exports = __webpack_require__(386); /***/ }), -/* 85 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(519); - -/***/ }), -/* 86 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(305); - -/***/ }), -/* 87 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createDeferredActor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createInvocableActor; }); -/* unused harmony export createNullActor */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isActor; }); -/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); -/* harmony import */ var _serviceScope_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65); - - - -function createNullActor(id) { - return { - id: id, - send: function () { - return void 0; - }, - subscribe: function () { - return { - unsubscribe: function () { - return void 0; - } - }; - }, - toJSON: function () { - return { - id: id - }; - } - }; -} -/** - * Creates a deferred actor that is able to be invoked given the provided - * invocation information in its `.meta` value. - * - * @param invokeDefinition The meta information needed to invoke the actor. - */ - - -function createInvocableActor(invokeDefinition, machine, context, _event) { - var _a; - - var invokeSrc = Object(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* toInvokeSource */ "z"])(invokeDefinition.src); - var serviceCreator = (_a = machine === null || machine === void 0 ? void 0 : machine.options.services) === null || _a === void 0 ? void 0 : _a[invokeSrc.type]; - var resolvedData = invokeDefinition.data ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* mapContext */ "l"])(invokeDefinition.data, context, _event) : undefined; - var tempActor = serviceCreator ? createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); - tempActor.meta = invokeDefinition; - return tempActor; -} - -function createDeferredActor(entity, id, data) { - var tempActor = createNullActor(id); - tempActor.deferred = true; - - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* isMachine */ "g"])(entity)) { - // "mute" the existing service scope so potential spawned actors within the `.initialState` stay deferred here - tempActor.state = Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_1__[/* provide */ "b"])(undefined, function () { - return (data ? entity.withContext(data) : entity).initialState; - }); - } - - return tempActor; -} - -function isActor(item) { - try { - return typeof item.send === 'function'; - } catch (e) { - return false; - } -} - +var global = __webpack_require__(24); +var core = __webpack_require__(15); +var LIBRARY = __webpack_require__(74); +var wksExt = __webpack_require__(91); +var defineProperty = __webpack_require__(36).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; /***/ }), -/* 88 */ +/* 130 */ /***/ (function(module, exports) { -var toString = {}.toString; - +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; module.exports = function (it) { - return toString.call(it).slice(8, -1); + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), -/* 89 */ -/***/ (function(module, exports) { +/* 131 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; +var shared = __webpack_require__(128)('keys'); +var uid = __webpack_require__(90); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); }; /***/ }), -/* 90 */ +/* 132 */ /***/ (function(module, exports) { -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); /***/ }), -/* 91 */ +/* 133 */ /***/ (function(module, exports) { -module.exports = true; +exports.f = Object.getOwnPropertySymbols; /***/ }), -/* 92 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { -var def = __webpack_require__(50).f; -var has = __webpack_require__(67); -var TAG = __webpack_require__(40)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +// 7.2.2 IsArray(argument) +var cof = __webpack_require__(71); +module.exports = Array.isArray || function isArray(arg) { + return cof(arg) == 'Array'; }; /***/ }), -/* 93 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(203); -var enumBugKeys = __webpack_require__(147); +"use strict"; -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); +var LIBRARY = __webpack_require__(74); +var $export = __webpack_require__(22); +var redefine = __webpack_require__(190); +var hide = __webpack_require__(43); +var Iterators = __webpack_require__(58); +var $iterCreate = __webpack_require__(311); +var setToStringTag = __webpack_require__(75); +var getPrototypeOf = __webpack_require__(194); +var ITERATOR = __webpack_require__(26)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; + +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = $native || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; }; /***/ }), -/* 94 */ -/***/ (function(module, exports, __webpack_require__) { +/* 136 */ +/***/ (function(module, exports) { -// 7.1.15 ToLength -var toInteger = __webpack_require__(145); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; /***/ }), -/* 95 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(318); -var global = __webpack_require__(37); -var hide = __webpack_require__(59); -var Iterators = __webpack_require__(74); -var TO_STRING_TAG = __webpack_require__(40)('toStringTag'); +var isArray = __webpack_require__(21), + isSymbol = __webpack_require__(59); -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); +/** Used to match property names within property paths. */ +var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; +/** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ +function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } +module.exports = isKey; + /***/ }), -/* 96 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsArguments = __webpack_require__(359), - isObjectLike = __webpack_require__(45); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; +var mapCacheClear = __webpack_require__(330), + mapCacheDelete = __webpack_require__(346), + mapCacheGet = __webpack_require__(348), + mapCacheHas = __webpack_require__(349), + mapCacheSet = __webpack_require__(350); /** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true + * Creates a map cache object to store key-value pairs. * - * _.isArguments([1, 2, 3]); - * // => false + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ -var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); -}; +function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -module.exports = isArguments; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} + +// Add methods to `MapCache`. +MapCache.prototype.clear = mapCacheClear; +MapCache.prototype['delete'] = mapCacheDelete; +MapCache.prototype.get = mapCacheGet; +MapCache.prototype.has = mapCacheHas; +MapCache.prototype.set = mapCacheSet; + +module.exports = MapCache; /***/ }), -/* 97 */ -/***/ (function(module, exports) { +/* 139 */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(52), + root = __webpack_require__(33); + +/* Built-in method references that are verified to be native. */ +var Map = getNative(root, 'Map'); + +module.exports = Map; + + +/***/ }), +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseToString = __webpack_require__(198); /** - * This method returns the first argument it receives. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static - * @since 0.1.0 * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * - * var object = { 'a': 1 }; + * _.toString(null); + * // => '' * - * console.log(_.identity(object) === object); - * // => true + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' */ -function identity(value) { - return value; +function toString(value) { + return value == null ? '' : baseToString(value); } -module.exports = identity; +module.exports = toString; /***/ }), -/* 98 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { -var DataView = __webpack_require__(366), - Map = __webpack_require__(155), - Promise = __webpack_require__(367), - Set = __webpack_require__(221), - WeakMap = __webpack_require__(368), - baseGetTag = __webpack_require__(55), - toSource = __webpack_require__(211); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; +var baseAssignValue = __webpack_require__(100), + eq = __webpack_require__(60); -var dataViewTag = '[object DataView]'; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Gets the `toStringTag` of `value`. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; +function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } } -module.exports = getTag; +module.exports = assignValue; /***/ }), -/* 99 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseIsTypedArray = __webpack_require__(370), - baseUnary = __webpack_require__(69), - nodeUtil = __webpack_require__(161); +/* 142 */ +/***/ (function(module, exports) { -/* Node.js helper references. */ -var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; +/** Used as references for various `Number` constants. */ +var MAX_SAFE_INTEGER = 9007199254740991; /** - * Checks if `value` is classified as a typed array. + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ - * @since 3.0.0 + * @since 4.0.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * - * _.isTypedArray(new Uint8Array); + * _.isLength(3); * // => true * - * _.isTypedArray([]); + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); * // => false */ -var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - -module.exports = isTypedArray; - - -/***/ }), -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { +function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; +} -var ctx = __webpack_require__(56); -var call = __webpack_require__(222); -var isArrayIter = __webpack_require__(223); -var anObject = __webpack_require__(53); -var toLength = __webpack_require__(94); -var getIterFn = __webpack_require__(164); -var BREAK = {}; -var RETURN = {}; -var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - // fast case for arrays with default iterator - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -exports.BREAK = BREAK; -exports.RETURN = RETURN; +module.exports = isLength; /***/ }), -/* 101 */ -/***/ (function(module, exports, __webpack_require__) { - -var assignValue = __webpack_require__(157), - baseAssignValue = __webpack_require__(117); +/* 143 */ +/***/ (function(module, exports) { /** - * Copies properties of `source` to `object`. + * Appends the elements of `values` to `array`. * * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. */ -function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - +function arrayPush(array, values) { var index = -1, - length = props.length; + length = values.length, + offset = array.length; while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } + array[offset + index] = values[index]; } - return object; + return array; } -module.exports = copyObject; +module.exports = arrayPush; /***/ }), -/* 102 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseMatches = __webpack_require__(431), - baseMatchesProperty = __webpack_require__(434), - identity = __webpack_require__(97), - isArray = __webpack_require__(30), - property = __webpack_require__(435); +/* 144 */ +/***/ (function(module, exports) { -/** - * The base implementation of `_.iteratee`. - * - * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. - */ -function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); -} - -module.exports = baseIteratee; - - -/***/ }), -/* 103 */ -/***/ (function(module, exports, __webpack_require__) { +module.exports = function(module) { + if (!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } + return module; +}; -module.exports = __webpack_require__(506); /***/ }), -/* 104 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(272); +/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(187); -/** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ -function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); -} +/** Detect free variable `exports`. */ +var freeExports = true && exports && !exports.nodeType && exports; -module.exports = isInteger; +/** Detect free variable `module`. */ +var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +/** Detect the popular CommonJS extension `module.exports`. */ +var moduleExports = freeModule && freeModule.exports === freeExports; -/***/ }), -/* 105 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registry; }); -var children = /*#__PURE__*/new Map(); -var sessionIdIndex = 0; -var registry = { - bookId: function () { - return "x:" + sessionIdIndex++; - }, - register: function (id, actor) { - children.set(id, actor); - return id; - }, - get: function (id) { - return children.get(id); - }, - free: function (id) { - children.delete(id); - } -}; +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; + if (types) { + return types; + } -/***/ }), -/* 106 */ -/***/ (function(module, exports) { + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; +module.exports = nodeUtil; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(144)(module))) /***/ }), -/* 107 */ -/***/ (function(module, exports) { +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { -exports.f = {}.propertyIsEnumerable; +var hide = __webpack_require__(43); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; /***/ }), -/* 108 */ +/* 147 */ /***/ (function(module, exports) { -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; }; /***/ }), -/* 109 */ -/***/ (function(module, exports, __webpack_require__) { - -exports.f = __webpack_require__(40); - - -/***/ }), -/* 110 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(53); -var dPs = __webpack_require__(307); -var enumBugKeys = __webpack_require__(147); -var IE_PROTO = __webpack_require__(146)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(140)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(206).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); +var classof = __webpack_require__(104); +var ITERATOR = __webpack_require__(26)('iterator'); +var Iterators = __webpack_require__(58); +module.exports = __webpack_require__(15).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; }; /***/ }), -/* 111 */ -/***/ (function(module, exports, __webpack_require__) { - -var castPath = __webpack_require__(112), - toKey = __webpack_require__(77); +/* 149 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.get` without support for default values. + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; +function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; - while (object != null && index < length) { - object = object[toKey(path[index++])]; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } } - return (index && index == length) ? object : undefined; + return array; } -module.exports = baseGet; +module.exports = arrayEach; /***/ }), -/* 112 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { -var isArray = __webpack_require__(30), - isKey = __webpack_require__(153), - stringToPath = __webpack_require__(210), - toString = __webpack_require__(156); +var arrayFilter = __webpack_require__(405), + stubArray = __webpack_require__(215); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * Casts `value` to a path array if it's not one. + * Creates an array of the own enumerable symbols of `object`. * * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ -function castPath(value, object) { - if (isArray(value)) { - return value; +var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} - -module.exports = castPath; - - -/***/ }), -/* 113 */ -/***/ (function(module, exports, __webpack_require__) { - -var getNative = __webpack_require__(68); - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); +}; -module.exports = nativeCreate; +module.exports = getSymbols; /***/ }), -/* 114 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { -var listCacheClear = __webpack_require__(346), - listCacheDelete = __webpack_require__(347), - listCacheGet = __webpack_require__(348), - listCacheHas = __webpack_require__(349), - listCacheSet = __webpack_require__(350); +var Uint8Array = __webpack_require__(219); /** - * Creates an list cache object. + * Creates a clone of `arrayBuffer`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; } -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; +module.exports = cloneArrayBuffer; /***/ }), -/* 115 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { -var eq = __webpack_require__(76); +var baseIsEqualDeep = __webpack_require__(418), + isObjectLike = __webpack_require__(31); /** - * Gets the index at which the `key` is found in `array` of key-value pairs. + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. * * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } +function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; } - return -1; + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } -module.exports = assocIndexOf; +module.exports = baseIsEqual; /***/ }), -/* 116 */ -/***/ (function(module, exports, __webpack_require__) { - -var isKeyable = __webpack_require__(352); +/* 153 */ +/***/ (function(module, exports) { /** - * Gets the data for `map`. + * Converts `set` to an array of its values. * * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; +function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; } -module.exports = getMapData; +module.exports = setToArray; /***/ }), -/* 117 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { -var defineProperty = __webpack_require__(213); +var baseFor = __webpack_require__(229), + keys = __webpack_require__(63); /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. + * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. */ -function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } +function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); } -module.exports = baseAssignValue; +module.exports = baseForOwn; /***/ }), -/* 118 */ -/***/ (function(module, exports) { - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; +/* 155 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; +var eq = __webpack_require__(60), + isArrayLike = __webpack_require__(45), + isIndex = __webpack_require__(101), + isObject = __webpack_require__(29); /** - * Checks if `value` is a valid array-like index. + * Checks if the given arguments are from an iteratee call. * * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. */ -function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; } -module.exports = isIndex; +module.exports = isIterateeCall; /***/ }), -/* 119 */ +/* 156 */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(159), - isFlattenable = __webpack_require__(361); +var SetCache = __webpack_require__(108), + arrayIncludes = __webpack_require__(157), + arrayIncludesWith = __webpack_require__(158), + cacheHas = __webpack_require__(109), + createSet = __webpack_require__(441), + setToArray = __webpack_require__(153); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; /** - * The base implementation of `_.flatten` with support for restricting flattening. + * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. */ -function baseFlatten(array, depth, predicate, isStrict, result) { +function baseUniq(array, iteratee, comparator) { var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; + } + outer: while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } } - } else if (!isStrict) { - result[result.length] = value; + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); } } return result; } -module.exports = baseFlatten; +module.exports = baseUniq; /***/ }), -/* 120 */ -/***/ (function(module, exports) { +/* 157 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var baseIndexOf = __webpack_require__(110); /** - * Checks if `value` is likely a prototype object. + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -module.exports = isPrototype; - - -/***/ }), -/* 121 */ -/***/ (function(module, exports, __webpack_require__) { - -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(88); -var TAG = __webpack_require__(40)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; - -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __webpack_require__) { - -var ListCache = __webpack_require__(114), - stackClear = __webpack_require__(399), - stackDelete = __webpack_require__(400), - stackGet = __webpack_require__(401), - stackHas = __webpack_require__(402), - stackSet = __webpack_require__(403); - -/** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; +function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; } -// Add methods to `Stack`. -Stack.prototype.clear = stackClear; -Stack.prototype['delete'] = stackDelete; -Stack.prototype.get = stackGet; -Stack.prototype.has = stackHas; -Stack.prototype.set = stackSet; - -module.exports = Stack; +module.exports = arrayIncludes; /***/ }), -/* 123 */ +/* 158 */ /***/ (function(module, exports) { /** - * Copies the values of `source` to `array`. + * This function is like `arrayIncludes` except that it accepts a comparator. * * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. */ -function copyArray(source, array) { +function arrayIncludesWith(array, value, comparator) { var index = -1, - length = source.length; + length = array == null ? 0 : array.length; - array || (array = Array(length)); while (++index < length) { - array[index] = source[index]; + if (comparator(value, array[index])) { + return true; + } } - return array; + return false; } -module.exports = copyArray; +module.exports = arrayIncludesWith; /***/ }), -/* 124 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { -var overArg = __webpack_require__(220); - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -module.exports = getPrototype; +"use strict"; -/***/ }), -/* 125 */ -/***/ (function(module, exports, __webpack_require__) { +/** +* FUNCTION: isArray( value ) +* Validates if a value is an array. +* +* @param {*} value - value to be validated +* @returns {Boolean} boolean indicating whether value is an array +*/ +function isArray( value ) { + return Object.prototype.toString.call( value ) === '[object Array]'; +} // end FUNCTION isArray() -var MapCache = __webpack_require__(154), - setCacheAdd = __webpack_require__(424), - setCacheHas = __webpack_require__(425); +// EXPORTS // -/** - * - * Creates an array cache object to store unique values. - * - * @private - * @constructor - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; +module.exports = Array.isArray || isArray; - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } -} -// Add methods to `SetCache`. -SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; -SetCache.prototype.has = setCacheHas; +/***/ }), +/* 160 */ +/***/ (function(module, exports) { -module.exports = SetCache; +var core = module.exports = { version: '2.6.12' }; +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), -/* 126 */ +/* 161 */ /***/ (function(module, exports) { -/** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function cacheHas(cache, key) { - return cache.has(key); -} - -module.exports = cacheHas; +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; /***/ }), -/* 127 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { -var baseFindIndex = __webpack_require__(245), - baseIsNaN = __webpack_require__(444), - strictIndexOf = __webpack_require__(445); - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -module.exports = baseIndexOf; +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(243)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); /***/ }), -/* 128 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { -var isArrayLike = __webpack_require__(62), - isObjectLike = __webpack_require__(45); +"use strict"; -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(73); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); } -module.exports = isArrayLikeObject; +module.exports.f = function (C) { + return new PromiseCapability(C); +}; /***/ }), -/* 129 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var randomFromSeed = __webpack_require__(512); - -var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; -var alphabet; -var previousSeed; - -var shuffled; +var URI = __webpack_require__(505) + , equal = __webpack_require__(165) + , util = __webpack_require__(65) + , SchemaObject = __webpack_require__(254) + , traverse = __webpack_require__(507); -function reset() { - shuffled = false; -} +module.exports = resolve; -function setCharacters(_alphabet_) { - if (!_alphabet_) { - if (alphabet !== ORIGINAL) { - alphabet = ORIGINAL; - reset(); - } - return; - } +resolve.normalizeId = normalizeId; +resolve.fullPath = getFullPath; +resolve.url = resolveUrl; +resolve.ids = resolveIds; +resolve.inlineRef = inlineRef; +resolve.schema = resolveSchema; - if (_alphabet_ === alphabet) { - return; - } +/** + * [resolve and compile the references ($ref)] + * @this Ajv + * @param {Function} compile reference to schema compilation funciton (localCompile) + * @param {Object} root object with information about the root schema for the current schema + * @param {String} ref reference to resolve + * @return {Object|Function} schema object (if the schema can be inlined) or validation function + */ +function resolve(compile, root, ref) { + /* jshint validthis: true */ + var refVal = this._refs[ref]; + if (typeof refVal == 'string') { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve.call(this, compile, root, refVal); + } - if (_alphabet_.length !== ORIGINAL.length) { - throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_); - } + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) + ? refVal.schema + : refVal.validate || this._compile(refVal); + } - var unique = _alphabet_.split('').filter(function(item, ind, arr){ - return ind !== arr.lastIndexOf(item); - }); + var res = resolveSchema.call(this, root, ref); + var schema, v, baseId; + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } - if (unique.length) { - throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', ')); - } + if (schema instanceof SchemaObject) { + v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); + } else if (schema !== undefined) { + v = inlineRef(schema, this._opts.inlineRefs) + ? schema + : compile.call(this, schema, root, undefined, baseId); + } - alphabet = _alphabet_; - reset(); + return v; } -function characters(_alphabet_) { - setCharacters(_alphabet_); - return alphabet; -} -function setSeed(seed) { - randomFromSeed.seed(seed); - if (previousSeed !== seed) { - reset(); - previousSeed = seed; +/** + * Resolve schema, its root and baseId + * @this Ajv + * @param {Object} root root object with properties schema, refVal, refs + * @param {String} ref reference to resolve + * @return {Object} object with properties schema, root, baseId + */ +function resolveSchema(root, ref) { + /* jshint validthis: true */ + var p = URI.parse(ref) + , refPath = _getFullPath(p) + , baseId = getFullPath(this._getId(root.schema)); + if (Object.keys(root.schema).length === 0 || refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == 'string') { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root: root, baseId: baseId }; + root = refVal; + } else { + return; + } } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); } -function shuffle() { - if (!alphabet) { - setCharacters(ORIGINAL); - } - - var sourceArray = alphabet.split(''); - var targetArray = []; - var r = randomFromSeed.nextValue(); - var characterIndex; - while (sourceArray.length > 0) { - r = randomFromSeed.nextValue(); - characterIndex = Math.floor(r * sourceArray.length); - targetArray.push(sourceArray.splice(characterIndex, 1)[0]); - } - return targetArray.join(''); +/* @this Ajv */ +function resolveRecursive(root, ref, parsedRef) { + /* jshint validthis: true */ + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema, root); + } } -function getShuffled() { - if (shuffled) { - return shuffled; + +var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); +/* @this Ajv */ +function getJsonPointer(parsedRef, baseId, schema, root) { + /* jshint validthis: true */ + parsedRef.fragment = parsedRef.fragment || ''; + if (parsedRef.fragment.slice(0,1) != '/') return; + var parts = parsedRef.fragment.split('/'); + + for (var i = 1; i < parts.length; i++) { + var part = parts[i]; + if (part) { + part = util.unescapeFragment(part); + schema = schema[part]; + if (schema === undefined) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } } - shuffled = shuffle(); - return shuffled; + } + if (schema !== undefined && schema !== root.schema) + return { schema: schema, root: root, baseId: baseId }; } -/** - * lookup shuffled letter - * @param index - * @returns {string} - */ -function lookup(index) { - var alphabetShuffled = getShuffled(); - return alphabetShuffled[index]; -} -function get () { - return alphabet || ORIGINAL; +var SIMPLE_INLINED = util.toHash([ + 'type', 'format', 'pattern', + 'maxLength', 'minLength', + 'maxProperties', 'minProperties', + 'maxItems', 'minItems', + 'maximum', 'minimum', + 'uniqueItems', 'multipleOf', + 'required', 'enum' +]); +function inlineRef(schema, limit) { + if (limit === false) return false; + if (limit === undefined || limit === true) return checkNoRef(schema); + else if (limit) return countKeys(schema) <= limit; } -module.exports = { - get: get, - characters: characters, - seed: setSeed, - lookup: lookup, - shuffled: getShuffled -}; - -/***/ }), -/* 130 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +function checkNoRef(schema) { + var item; + if (Array.isArray(schema)) { + for (var i=0; i= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } - if (resolvedCompleteListener) { - this.onDone(resolvedCompleteListener); - } +function _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; } - return { - unsubscribe: function () { - listener && _this.listeners.delete(listener); - resolvedCompleteListener && _this.doneListeners.delete(resolvedCompleteListener); - } - }; - }; - /** - * Adds an event listener that is notified whenever an event is sent to the running interpreter. - * @param listener The event listener - */ +function IconButton(props) { + var _props$type = props.type, + type = _props$type === void 0 ? "default" : _props$type, + icon = props.icon, + className = props.className, + otherProps = _objectWithoutProperties(props, ["type", "icon", "className"]); + return _react["default"].createElement("button", _extends({ + type: "button", + className: "btn btn-".concat(type, " ").concat(className) + }, otherProps), _react["default"].createElement("i", { + className: "glyphicon glyphicon-".concat(icon) + })); +} - Interpreter.prototype.onEvent = function (listener) { - this.eventListeners.add(listener); - return this; - }; - /** - * Adds an event listener that is notified whenever a `send` event occurs. - * @param listener The event listener - */ +/***/ }), +/* 169 */ +/***/ (function(module, exports, __webpack_require__) { +var baseGet = __webpack_require__(94); - Interpreter.prototype.onSend = function (listener) { - this.sendListeners.add(listener); - return this; - }; - /** - * Adds a context listener that is notified whenever the state context changes. - * @param listener The context listener - */ +/** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ +function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; +} +module.exports = get; - Interpreter.prototype.onChange = function (listener) { - this.contextListeners.add(listener); - return this; - }; - /** - * Adds a listener that is notified when the machine is stopped. - * @param listener The listener - */ +/***/ }), +/* 170 */ +/***/ (function(module, exports, __webpack_require__) { - Interpreter.prototype.onStop = function (listener) { - this.stopListeners.add(listener); - return this; - }; - /** - * Adds a state listener that is notified when the statechart has reached its final state. - * @param listener The state listener - */ +var cloneDeep = __webpack_require__(392) +var compare = __webpack_require__(417) +var computeLcm = __webpack_require__(445) +var defaultsDeep = __webpack_require__(449) +var flatten = __webpack_require__(201) +var flattenDeep = __webpack_require__(455) +var intersection = __webpack_require__(456) +var intersectionWith = __webpack_require__(233) +var isEqual = __webpack_require__(223) +var isPlainObject = __webpack_require__(25) +var pullAll = __webpack_require__(457) +var sortBy = __webpack_require__(225) +var forEach = __webpack_require__(460) +var uniq = __webpack_require__(230) +var uniqWith = __webpack_require__(232) +var without = __webpack_require__(462) +var withoutArr = (arr, ...rest) => without.apply(null, [arr].concat(flatten(rest))) +var isPropertyRelated = (key) => contains(propertyRelated, key) +var isItemsRelated = (key) => contains(itemsRelated, key) +var contains = (arr, val) => arr.indexOf(val) !== -1 +var isEmptySchema = (obj) => (!keys(obj).length) && obj !== false && obj !== true +var isSchema = (val) => isPlainObject(val) || val === true || val === false +var isFalse = (val) => val === false +var isTrue = (val) => val === true +var schemaResolver = (compacted, key, mergeSchemas) => mergeSchemas(compacted) +var stringArray = (values) => sortBy(uniq(flattenDeep(values))) +var notUndefined = (val) => val !== undefined +var allUniqueKeys = (arr) => uniq(flattenDeep(arr.map(keys))) - Interpreter.prototype.onDone = function (listener) { - this.doneListeners.add(listener); - return this; - }; - /** - * Removes a listener. - * @param listener The listener to remove - */ +// resolvers +var first = compacted => compacted[0] +var required = compacted => stringArray(compacted) +var maximumValue = compacted => Math.max.apply(Math, compacted) +var minimumValue = compacted => Math.min.apply(Math, compacted) +var uniqueItems = compacted => compacted.some(isTrue) +var examples = compacted => uniqWith(flatten(compacted), isEqual) +function compareProp(key) { + return function(a, b) { + return compare({ + [key]: a + }, {[key]: b}) + } +} - Interpreter.prototype.off = function (listener) { - this.listeners.delete(listener); - this.eventListeners.delete(listener); - this.sendListeners.delete(listener); - this.stopListeners.delete(listener); - this.doneListeners.delete(listener); - this.contextListeners.delete(listener); - return this; - }; - /** - * Starts the interpreter from the given state, or the initial state. - * @param initialState The state to start the statechart from - */ +function getAllOf(schema) { + if (Array.isArray(schema.allOf)) { + var allOf = schema.allOf + delete schema.allOf + return [schema].concat(allOf.map(function(allSchema) { + return getAllOf(allSchema) + })) + } else { + return [schema] + } +} +function getValues(schemas, key) { + return schemas.map(function(schema) { + return schema && schema[key] + }) +} - Interpreter.prototype.start = function (initialState) { - var _this = this; +function getItemSchemas(subSchemas, key) { + return subSchemas.map(function(sub) { + if (!sub) { + return + } - if (this._status === InterpreterStatus.Running) { - // Do not restart the service if it is already started - return this; + if (Array.isArray(sub.items)) { + var schemaAtPos = sub.items[key] + if (isSchema(schemaAtPos)) { + return schemaAtPos + } else if (sub.hasOwnProperty('additionalItems')) { + return sub.additionalItems + } + } else { + return sub.items } + }) +} - _registry_js__WEBPACK_IMPORTED_MODULE_11__[/* registry */ "a"].register(this.sessionId, this); - this.initialized = true; - this._status = InterpreterStatus.Running; - var resolvedState = initialState === undefined ? this.initialState : Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(this, function () { - return Object(_State_js__WEBPACK_IMPORTED_MODULE_7__[/* isState */ "c"])(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(_State_js__WEBPACK_IMPORTED_MODULE_7__[/* State */ "a"].from(initialState, _this.machine.context)); - }); +function tryMergeSchemaGroups(schemaGroups, mergeSchemas) { + return schemaGroups.map(function(schemas, index) { + try { + return mergeSchemas(schemas, index) + } catch (e) { + return undefined + } + }).filter(notUndefined) +} - if (this.options.devTools) { - this.attachDev(); +function getAdditionalSchemas(subSchemas) { + return subSchemas.map(function(sub) { + if (!sub) { + return } + if (Array.isArray(sub.items)) { + return sub.additionalItems + } + return sub.items + }) +} - this.scheduler.initialize(function () { - _this.update(resolvedState, _actions_js__WEBPACK_IMPORTED_MODULE_6__[/* initEvent */ "k"]); - }); - return this; - }; - /** - * Stops the interpreter and unsubscribe all listeners. - * - * This will also notify the `onStop` listeners. - */ +function keys(obj) { + if (isPlainObject(obj) || Array.isArray(obj)) { + return Object.keys(obj) + } else { + return [] + } +} +function getAnyOfCombinations(arrOfArrays, combinations) { + combinations = combinations || [] + if (!arrOfArrays.length) { + return combinations + } - Interpreter.prototype.stop = function () { - var e_6, _a, e_7, _b, e_8, _c, e_9, _d, e_10, _e; + var values = arrOfArrays.slice(0).shift() + var rest = arrOfArrays.slice(1) + if (combinations.length) { + return getAnyOfCombinations(rest, flatten(combinations.map(combination => values.map(item => ([item].concat(combination)))))) + } + return getAnyOfCombinations(rest, values.map(item => (item))) +} - try { - for (var _f = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.listeners), _g = _f.next(); !_g.done; _g = _f.next()) { - var listener = _g.value; - this.listeners.delete(listener); - } - } catch (e_6_1) { - e_6 = { - error: e_6_1 - }; - } finally { - try { - if (_g && !_g.done && (_a = _f.return)) _a.call(_f); - } finally { - if (e_6) throw e_6.error; - } - } +function mergeWithArray(base, newItems) { + if (Array.isArray(base)) { + base.splice.apply(base, [0, 0].concat(newItems)) + return base + } else { + return newItems + } +} - try { - for (var _h = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.stopListeners), _j = _h.next(); !_j.done; _j = _h.next()) { - var listener = _j.value; // call listener, then remove +function throwIncompatible(values, paths) { + var asJSON + try { + asJSON = values.map(function(val) { + return JSON.stringify(val, null, 2) + }).join('\n') + } catch (variable) { + asJSON = values.join(', ') + } + throw new Error('Could not resolve values for path:"' + paths.join('.') + '". They are probably incompatible. Values: \n' + asJSON) +} - listener(); - this.stopListeners.delete(listener); - } - } catch (e_7_1) { - e_7 = { - error: e_7_1 - }; - } finally { - try { - if (_j && !_j.done && (_b = _h.return)) _b.call(_h); - } finally { - if (e_7) throw e_7.error; - } +function cleanupReturnValue(returnObject) { + // cleanup empty + for (var prop in returnObject) { + if (returnObject.hasOwnProperty(prop) && isEmptySchema(returnObject[prop])) { + delete returnObject[prop] } + } + return returnObject +} - try { - for (var _k = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.contextListeners), _l = _k.next(); !_l.done; _l = _k.next()) { - var listener = _l.value; - this.contextListeners.delete(listener); - } - } catch (e_8_1) { - e_8 = { - error: e_8_1 - }; - } finally { - try { - if (_l && !_l.done && (_c = _k.return)) _c.call(_k); - } finally { - if (e_8) throw e_8.error; - } +function createRequiredSubMerger(mergeSchemas, key, parents) { + return function(schemas, subKey) { + if (subKey === undefined) { + throw new Error('You need to call merger with a key for the property name or index if array.') } + subKey = String(subKey) + return mergeSchemas(schemas, null, parents.concat(key, subKey)) + } +} - try { - for (var _m = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.doneListeners), _o = _m.next(); !_o.done; _o = _m.next()) { - var listener = _o.value; - this.doneListeners.delete(listener); - } - } catch (e_9_1) { - e_9 = { - error: e_9_1 - }; - } finally { - try { - if (_o && !_o.done && (_d = _m.return)) _d.call(_m); - } finally { - if (e_9) throw e_9.error; - } - } // Stop all children +function callGroupResolver(keys, resolverName, schemas, mergeSchemas, options, parents) { + if (keys.length) { + var resolver = options.resolvers[resolverName] + if (!resolver) { + throw new Error('No resolver found for ' + resolverName) + } + var compacted = uniqWith(schemas.map(function(schema) { + return keys.reduce(function(all, key) { + if (schema[key] !== undefined) { + all[key] = schema[key] + } + return all + }, {}) + }).filter(notUndefined), compare) - this.children.forEach(function (child) { - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(child.stop)) { - child.stop(); - } - }); + var related = resolverName === 'properties' + ? propertyRelated + : itemsRelated - try { - // Cancel all delayed events - for (var _p = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(this.delayedEventsMap)), _q = _p.next(); !_q.done; _q = _p.next()) { - var key = _q.value; - this.clock.clearTimeout(this.delayedEventsMap[key]); - } - } catch (e_10_1) { - e_10 = { - error: e_10_1 - }; - } finally { - try { - if (_q && !_q.done && (_e = _p.return)) _e.call(_p); - } finally { - if (e_10) throw e_10.error; + var mergers = related.reduce(function(all, key) { + if (contains(schemaGroupProps, key)) { + all[key] = createRequiredSubMerger(mergeSchemas, key, parents) + } else { + all[key] = function(schemas) { + return mergeSchemas(schemas, null, parents.concat(key)) + } } - } - - this.scheduler.clear(); - this.initialized = false; - this._status = InterpreterStatus.Stopped; - _registry_js__WEBPACK_IMPORTED_MODULE_11__[/* registry */ "a"].free(this.sessionId); - return this; - }; - - Interpreter.prototype.batch = function (events) { - var _this = this; + return all + }, {}) - if (this._status === InterpreterStatus.NotStarted && this.options.deferEvents) { - // tslint:disable-next-line:no-console - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(false, events.length + " event(s) were sent to uninitialized service \"" + this.machine.id + "\" and are deferred. Make sure .start() is called for this service.\nEvent: " + JSON.stringify(event)); + if (resolverName === 'items') { + mergers.itemsArray = createRequiredSubMerger(mergeSchemas, 'items', parents) + mergers.items = function(schemas) { + return mergeSchemas(schemas, null, parents.concat('items')) } - } else if (this._status !== InterpreterStatus.Running) { - throw new Error( // tslint:disable-next-line:max-line-length - events.length + " event(s) were sent to uninitialized service \"" + this.machine.id + "\". Make sure .start() is called for this service, or set { deferEvents: true } in the service options."); } - this.scheduler.schedule(function () { - var e_11, _a; - - var nextState = _this.state; - var batchChanged = false; - var batchedActions = []; - - var _loop_1 = function (event_1) { - var _event = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(event_1); + var result = resolver(compacted, parents.concat(resolverName), mergers, options) - _this.forward(_event); + if (!isPlainObject(result)) { + throwIncompatible(compacted, parents.concat(resolverName)) + } - nextState = Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(_this, function () { - return _this.machine.transition(nextState, _event); - }); - batchedActions.push.apply(batchedActions, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __spread */ "d"])(nextState.actions.map(function (a) { - return Object(_State_js__WEBPACK_IMPORTED_MODULE_7__[/* bindActionToState */ "b"])(a, nextState); - }))); - batchChanged = batchChanged || !!nextState.changed; - }; + return cleanupReturnValue(result) + } +} - try { - for (var events_1 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) { - var event_1 = events_1_1.value; +// Provide source when array +function mergeSchemaGroup(group, mergeSchemas, source) { + var allKeys = allUniqueKeys(source || group) + var extractor = source + ? getItemSchemas + : getValues + return allKeys.reduce(function(all, key) { + var schemas = extractor(group, key) + var compacted = uniqWith(schemas.filter(notUndefined), compare) + all[key] = mergeSchemas(compacted, key) + return all + }, source + ? [] + : {}) +} - _loop_1(event_1); - } - } catch (e_11_1) { - e_11 = { - error: e_11_1 - }; - } finally { - try { - if (events_1_1 && !events_1_1.done && (_a = events_1.return)) _a.call(events_1); - } finally { - if (e_11) throw e_11.error; - } - } +function removeFalseSchemas(target) { + forEach(target, function(schema, prop) { + if (schema === false) { + delete target[prop] + } + }) +} - nextState.changed = batchChanged; - nextState.actions = batchedActions; +function removeFalseSchemasFromArray(target) { + forEach(target, function(schema, index) { + if (schema === false) { + target.splice(index, 1) + } + }) +} - _this.update(nextState, Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(events[events.length - 1])); - }); - }; - /** - * Returns a send function bound to this interpreter instance. - * - * @param event The event to be sent by the sender. - */ +function createRequiredMetaArray(arr) { + return {required: arr} +} +var propertyRelated = ['properties', 'patternProperties', 'additionalProperties'] +var itemsRelated = ['items', 'additionalItems'] +var schemaGroupProps = ['properties', 'patternProperties', 'definitions', 'dependencies'] +var schemaArrays = ['anyOf', 'oneOf'] +var schemaProps = [ + 'additionalProperties', + 'additionalItems', + 'contains', + 'propertyNames', + 'not', + 'items' +] - Interpreter.prototype.sender = function (event) { - return this.send.bind(this, event); - }; - /** - * Returns the next state given the interpreter's current state and the event. - * - * This is a pure method that does _not_ update the interpreter's state. - * - * @param event The event to determine the next state - */ +var defaultResolvers = { + type(compacted) { + if (compacted.some(Array.isArray)) { + var normalized = compacted.map(function(val) { + return Array.isArray(val) + ? val + : [val] + }) + var common = intersection.apply(null, normalized) + if (common.length === 1) { + return common[0] + } else if (common.length > 1) { + return uniq(common) + } + } + }, + properties(values, key, mergers, options) { + // first get rid of all non permitted properties + if (!options.ignoreAdditionalProperties) { + values.forEach(function(subSchema) { + var otherSubSchemas = values.filter(s => s !== subSchema) + var ownKeys = keys(subSchema.properties) + var ownPatternKeys = keys(subSchema.patternProperties) + var ownPatterns = ownPatternKeys.map(k => new RegExp(k)) + otherSubSchemas.forEach(function(other) { + var allOtherKeys = keys(other.properties) + var keysMatchingPattern = allOtherKeys.filter(k => ownPatterns.some(pk => pk.test(k))) + var additionalKeys = withoutArr(allOtherKeys, ownKeys, keysMatchingPattern) + additionalKeys.forEach(function(key) { + other.properties[key] = mergers.properties([ + other.properties[key], subSchema.additionalProperties + ], key) + }) + }) + }) - Interpreter.prototype.nextState = function (event) { - var _this = this; + // remove disallowed patternProperties + values.forEach(function(subSchema) { + var otherSubSchemas = values.filter(s => s !== subSchema) + var ownPatternKeys = keys(subSchema.patternProperties) + if (subSchema.additionalProperties === false) { + otherSubSchemas.forEach(function(other) { + var allOtherPatterns = keys(other.patternProperties) + var additionalPatternKeys = withoutArr(allOtherPatterns, ownPatternKeys) + additionalPatternKeys.forEach(key => delete other.patternProperties[key]) + }) + } + }) + } - var _event = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(event); + var returnObject = { + additionalProperties: mergers.additionalProperties(values.map(s => s.additionalProperties)), + patternProperties: mergeSchemaGroup(values.map(s => s.patternProperties), mergers.patternProperties), + properties: mergeSchemaGroup(values.map(s => s.properties), mergers.properties) + } - if (_event.name.indexOf(_actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* errorPlatform */ "e"]) === 0 && !this.state.nextEvents.some(function (nextEvent) { - return nextEvent.indexOf(_actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* errorPlatform */ "e"]) === 0; - })) { - throw _event.data.data; + if (returnObject.additionalProperties === false) { + removeFalseSchemas(returnObject.properties) } - var nextState = Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(this, function () { - return _this.machine.transition(_this.state, _event); - }); - return nextState; - }; + return returnObject + }, + dependencies(compacted, paths, mergeSchemas) { + var allChildren = allUniqueKeys(compacted) - Interpreter.prototype.forward = function (event) { - var e_12, _a; + return allChildren.reduce(function(all, childKey) { + var childSchemas = getValues(compacted, childKey) + var innerCompacted = uniqWith(childSchemas.filter(notUndefined), isEqual) - try { - for (var _b = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.forwardTo), _c = _b.next(); !_c.done; _c = _b.next()) { - var id = _c.value; - var child = this.children.get(id); + // to support dependencies + var innerArrays = innerCompacted.filter(Array.isArray) - if (!child) { - throw new Error("Unable to forward event '" + event + "' from interpreter '" + this.id + "' to nonexistant child '" + id + "'."); + if (innerArrays.length) { + if (innerArrays.length === innerCompacted.length) { + all[childKey] = stringArray(innerCompacted) + } else { + var innerSchemas = innerCompacted.filter(isSchema) + var arrayMetaScheams = innerArrays.map(createRequiredMetaArray) + all[childKey] = mergeSchemas(innerSchemas.concat(arrayMetaScheams), childKey) } - - child.send(event); - } - } catch (e_12_1) { - e_12 = { - error: e_12_1 - }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_12) throw e_12.error; + return all } - } - }; - Interpreter.prototype.defer = function (sendAction) { - var _this = this; + innerCompacted = uniqWith(innerCompacted, compare) - this.delayedEventsMap[sendAction.id] = this.clock.setTimeout(function () { - if (sendAction.to) { - _this.sendTo(sendAction._event, sendAction.to); - } else { - _this.send(sendAction._event); - } - }, sendAction.delay); - }; + all[childKey] = mergeSchemas(innerCompacted, childKey) + return all + }, {}) + }, + items(values, paths, mergers) { + var items = values.map(s => s.items) + var itemsCompacted = items.filter(notUndefined) + var returnObject = {} - Interpreter.prototype.cancel = function (sendId) { - this.clock.clearTimeout(this.delayedEventsMap[sendId]); - delete this.delayedEventsMap[sendId]; - }; + if (itemsCompacted.every(isSchema)) { + returnObject.items = mergers.items(items) + } else { + returnObject.items = mergeSchemaGroup(values, mergers.itemsArray, items) + } - Interpreter.prototype.exec = function (action, state, actionFunctionMap) { - if (actionFunctionMap === void 0) { - actionFunctionMap = this.machine.options.actions; + var schemasAtLastPos + if (itemsCompacted.every(Array.isArray)) { + schemasAtLastPos = values.map(s => s.additionalItems) + } else if (itemsCompacted.some(Array.isArray)) { + schemasAtLastPos = getAdditionalSchemas(values) } - var context = state.context, - _event = state._event; - var actionOrExec = action.exec || Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* getActionFunction */ "j"])(action.type, actionFunctionMap); - var exec = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec; + if (schemasAtLastPos) { + returnObject.additionalItems = mergers.additionalItems(schemasAtLastPos) + } - if (exec) { - try { - return exec(context, _event.data, { - action: action, - state: this.state, - _event: _event - }); - } catch (err) { - if (this.parent) { - this.parent.send({ - type: 'xstate.error', - data: err - }); - } - - throw err; - } + if (returnObject.additionalItems === false && Array.isArray(returnObject.items)) { + removeFalseSchemasFromArray(returnObject.items) } - switch (action.type) { - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* send */ "l"]: - var sendAction = action; + return returnObject + }, + oneOf(compacted, paths, mergeSchemas) { + var combinations = getAnyOfCombinations(cloneDeep(compacted)) + var result = tryMergeSchemaGroups(combinations, mergeSchemas) + var unique = uniqWith(result, compare) - if (typeof sendAction.delay === 'number') { - this.defer(sendAction); - return; - } else { - if (sendAction.to) { - this.sendTo(sendAction._event, sendAction.to); - } else { - this.send(sendAction._event); - } - } + if (unique.length) { + return unique + } + }, + not(compacted) { + return {anyOf: compacted} + }, + pattern(compacted, paths, mergeSchemas, options, reportUnresolved) { + var key = paths.pop() + reportUnresolved(compacted.map(function(regexp) { + return {[key]: regexp} + })) + }, + multipleOf(compacted) { + var integers = compacted.slice(0) + var factor = 1 + while (integers.some(n => !Number.isInteger(n))) { + integers = integers.map(n => n * 10) + factor = factor * 10 + } + return computeLcm(integers) / factor + }, + enum(compacted) { + var enums = intersectionWith.apply(null, compacted.concat(isEqual)) + if (enums.length) { + return sortBy(enums) + } + } +} - break; +defaultResolvers.$id = first +defaultResolvers.$ref = first +defaultResolvers.$schema = first +defaultResolvers.additionalItems = schemaResolver +defaultResolvers.additionalProperties = schemaResolver +defaultResolvers.anyOf = defaultResolvers.oneOf +defaultResolvers.contains = schemaResolver +defaultResolvers.default = first +defaultResolvers.definitions = defaultResolvers.dependencies +defaultResolvers.description = first +defaultResolvers.examples = examples +defaultResolvers.exclusiveMaximum = minimumValue +defaultResolvers.exclusiveMinimum = maximumValue +defaultResolvers.maximum = minimumValue +defaultResolvers.maxItems = minimumValue +defaultResolvers.maxLength = minimumValue +defaultResolvers.maxProperties = minimumValue +defaultResolvers.minimum = maximumValue +defaultResolvers.minItems = maximumValue +defaultResolvers.minLength = maximumValue +defaultResolvers.minProperties = maximumValue +defaultResolvers.propertyNames = schemaResolver +defaultResolvers.required = required +defaultResolvers.title = first +defaultResolvers.uniqueItems = uniqueItems - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* cancel */ "b"]: - this.cancel(action.sendId); - break; +function merger(rootSchema, options, totalSchemas) { + totalSchemas = totalSchemas || [] + options = defaultsDeep(options, { + ignoreAdditionalProperties: false, + resolvers: defaultResolvers + }) - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* start */ "m"]: - { - var activity = action.activity; // If the activity will be stopped right after it's started - // (such as in transient states) - // don't bother starting the activity. + function mergeSchemas(schemas, base, parents) { + schemas = cloneDeep(schemas.filter(notUndefined)) + parents = parents || [] + var merged = isPlainObject(base) + ? base + : {} - if (!this.state.activities[activity.id || activity.type]) { - break; - } // Invoked services + // return undefined, an empty schema + if (!schemas.length) { + return + } + if (schemas.some(isFalse)) { + return false + } - if (activity.type === _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Invoke) { - var invokeSource = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toInvokeSource */ "z"])(activity.src); - var serviceCreator = this.machine.options.services ? this.machine.options.services[invokeSource.type] : undefined; - var id = activity.id, - data = activity.data; + if (schemas.every(isTrue)) { + return true + } - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(!('forward' in activity), // tslint:disable-next-line:max-line-length - "`forward` property is deprecated (found in invocation of '" + activity.src + "' in in machine '" + this.machine.id + "'). " + "Please use `autoForward` instead."); - } + // there are no false and we don't need the true ones as they accept everything + schemas = schemas.filter(isPlainObject) - var autoForward = 'autoForward' in activity ? activity.autoForward : !!activity.forward; + var allKeys = allUniqueKeys(schemas) - if (!serviceCreator) { - // tslint:disable-next-line:no-console - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(false, "No service found for invocation '" + activity.src + "' in machine '" + this.machine.id + "'."); - } + if (contains(allKeys, 'allOf')) { + return merger({ + allOf: schemas + }, options, totalSchemas) + } - return; - } + var propertyKeys = allKeys.filter(isPropertyRelated) + pullAll(allKeys, propertyKeys) - var resolvedData = data ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* mapContext */ "l"])(data, context, _event) : undefined; - var source = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(serviceCreator) ? serviceCreator(context, _event.data, { - data: resolvedData, - src: invokeSource - }) : serviceCreator; + var itemKeys = allKeys.filter(isItemsRelated) + pullAll(allKeys, itemKeys) - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isPromiseLike */ "i"])(source)) { - this.state.children[id] = this.spawnPromise(Promise.resolve(source), id); - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(source)) { - this.state.children[id] = this.spawnCallback(source, id); - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isObservable */ "h"])(source)) { - this.state.children[id] = this.spawnObservable(source, id); - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(source)) { - // TODO: try/catch here - this.state.children[id] = this.spawnMachine(resolvedData ? source.withContext(resolvedData) : source, { - id: id, - autoForward: autoForward - }); - } - } else { - this.spawnActivity(activity); - } + allKeys.forEach(function(key) { + var values = getValues(schemas, key) + var compacted = uniqWith(values.filter(notUndefined), compareProp(key)) - break; - } + // arrayprops like anyOf and oneOf must be merged first, as they contains schemas + // allOf is treated differently alltogether + if (compacted.length === 1 && contains(schemaArrays, key)) { + merged[key] = compacted[0].map(function(schema) { + return mergeSchemas([schema], schema) + }) + // prop groups must always be resolved + } else if (compacted.length === 1 && !contains(schemaGroupProps, key) && !contains(schemaProps, key)) { + merged[key] = compacted[0] + } else { + var resolver = options.resolvers[key] || options.resolvers.defaultResolver - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* stop */ "n"]: - { - this.stopChild(action.activity.id); - break; + if (!resolver) { + throw new Error('No resolver found for key ' + key + '. You can provide a resolver for this keyword in the options, or provide a default resolver.') } - case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* log */ "h"]: - var label = action.label, - value = action.value; - - if (label) { - this.logger(label, value); + var merger + // get custom merger for groups + if (contains(schemaGroupProps, key) || contains(schemaArrays, key)) { + merger = createRequiredSubMerger(mergeSchemas, key, parents) } else { - this.logger(value); + merger = function(schemas) { + return mergeSchemas(schemas, null, parents.concat(key)) + } } - break; + var calledWithArray = false + merged[key] = resolver(compacted, parents.concat(key), merger, options, function(unresolvedSchemas) { + calledWithArray = Array.isArray(unresolvedSchemas) + return addToAllOf(unresolvedSchemas) + }) - default: - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(false, "No implementation found for action type '" + action.type + "'"); + if (merged[key] === undefined && !calledWithArray) { + throwIncompatible(compacted, parents.concat(key)) + } else if (merged[key] === undefined) { + delete merged[key] } + } + }) - break; + Object.assign(merged, callGroupResolver(propertyKeys, 'properties', schemas, mergeSchemas, options, parents)) + Object.assign(merged, callGroupResolver(itemKeys, 'items', schemas, mergeSchemas, options, parents)) + + function addToAllOf(unresolvedSchemas) { + merged.allOf = mergeWithArray(merged.allOf, unresolvedSchemas) } - return undefined; - }; + return merged + } - Interpreter.prototype.removeChild = function (childId) { - this.children.delete(childId); - this.forwardTo.delete(childId); - delete this.state.children[childId]; - }; + var allSchemas = flattenDeep(getAllOf(rootSchema)) + var merged = mergeSchemas(allSchemas, rootSchema) - Interpreter.prototype.stopChild = function (childId) { - var child = this.children.get(childId); + return merged +} - if (!child) { - return; - } +merger.options = { + resolvers: defaultResolvers +} - this.removeChild(childId); +module.exports = merger - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(child.stop)) { - child.stop(); - } - }; - Interpreter.prototype.spawn = function (entity, name, options) { - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isPromiseLike */ "i"])(entity)) { - return this.spawnPromise(Promise.resolve(entity), name); - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(entity)) { - return this.spawnCallback(entity, name); - } else if (Object(_Actor_js__WEBPACK_IMPORTED_MODULE_9__[/* isActor */ "c"])(entity)) { - return this.spawnActor(entity); - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isObservable */ "h"])(entity)) { - return this.spawnObservable(entity, name); - } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(entity)) { - return this.spawnMachine(entity, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { - id: name - })); - } else { - throw new Error("Unable to spawn entity \"" + name + "\" of type \"" + typeof entity + "\"."); - } - }; +/***/ }), +/* 171 */ +/***/ (function(module, exports, __webpack_require__) { - Interpreter.prototype.spawnMachine = function (machine, options) { - var _this = this; +var baseGetTag = __webpack_require__(39), + isObjectLike = __webpack_require__(31); - if (options === void 0) { - options = {}; - } +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]'; - var childService = new Interpreter(machine, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, this.options), { - parent: this, - id: options.id || machine.id - })); +/** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ +function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); +} - var resolvedOptions = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, DEFAULT_SPAWN_OPTIONS), options); +module.exports = isBoolean; - if (resolvedOptions.sync) { - childService.onTransition(function (state) { - _this.send(_actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* update */ "o"], { - state: state, - id: childService.id - }); - }); - } - var actor = childService; - this.children.set(childService.id, actor); +/***/ }), +/* 172 */ +/***/ (function(module, exports, __webpack_require__) { - if (resolvedOptions.autoForward) { - this.forwardTo.add(childService.id); - } +__webpack_require__(464); +module.exports = __webpack_require__(160).Array.fill; - childService.onDone(function (doneEvent) { - _this.removeChild(childService.id); - _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(doneEvent, { - origin: childService.id - })); - }).start(); - return actor; - }; +/***/ }), +/* 173 */ +/***/ (function(module, exports, __webpack_require__) { - Interpreter.prototype.spawnPromise = function (promise, id) { - var _this = this; +var baseFlatten = __webpack_require__(102), + baseRest = __webpack_require__(46), + baseUniq = __webpack_require__(156), + isArrayLikeObject = __webpack_require__(111); - var canceled = false; - promise.then(function (response) { - if (!canceled) { - _this.removeChild(id); +/** + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] + */ +var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); +}); - _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* doneInvoke */ "f"])(id, response), { - origin: id - })); - } - }, function (errorData) { - if (!canceled) { - _this.removeChild(id); +module.exports = union; - var errorEvent = Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "g"])(id, errorData); - try { - // Send "error.platform.id" to this (parent). - _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(errorEvent, { - origin: id - })); - } catch (error) { - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* reportUnhandledExceptionOnInvocation */ "u"])(errorData, error, id); +/***/ }), +/* 174 */ +/***/ (function(module, exports) { - if (_this.devTools) { - _this.devTools.send(errorEvent, _this.state); - } +var hasExcape = /~/ +var escapeMatcher = /~[01]/g +function escapeReplacer (m) { + switch (m) { + case '~1': return '/' + case '~0': return '~' + } + throw new Error('Invalid tilde escape: ' + m) +} - if (_this.machine.strict) { - // it would be better to always stop the state machine if unhandled - // exception/promise rejection happens but because we don't want to - // break existing code so enforce it on strict mode only especially so - // because documentation says that onError is optional - _this.stop(); - } - } - } - }); - var actor = { - id: id, - send: function () { - return void 0; - }, - subscribe: function (next, handleError, complete) { - var unsubscribed = false; - promise.then(function (response) { - if (unsubscribed) { - return; - } +function untilde (str) { + if (!hasExcape.test(str)) return str + return str.replace(escapeMatcher, escapeReplacer) +} - next && next(response); +function setter (obj, pointer, value) { + var part + var hasNextPart - if (unsubscribed) { - return; - } + if (pointer[1] === 'constructor' && pointer[2] === 'prototype') return obj + if (pointer[1] === '__proto__') return obj - complete && complete(); - }, function (err) { - if (unsubscribed) { - return; - } + for (var p = 1, len = pointer.length; p < len;) { + part = untilde(pointer[p++]) + hasNextPart = len > p - handleError(err); - }); - return { - unsubscribe: function () { - return unsubscribed = true; - } - }; - }, - stop: function () { - canceled = true; - }, - toJSON: function () { - return { - id: id - }; + if (typeof obj[part] === 'undefined') { + // support setting of /- + if (Array.isArray(obj) && part === '-') { + part = obj.length } - }; - this.children.set(id, actor); - return actor; - }; - Interpreter.prototype.spawnCallback = function (callback, id) { - var _this = this; + // support nested objects/array when setting values + if (hasNextPart) { + if ((pointer[p] !== '' && pointer[p] < Infinity) || pointer[p] === '-') obj[part] = [] + else obj[part] = {} + } + } - var canceled = false; - var receivers = new Set(); - var listeners = new Set(); + if (!hasNextPart) break + obj = obj[part] + } - var receive = function (e) { - listeners.forEach(function (listener) { - return listener(e); - }); + var oldValue = obj[part] + if (value === undefined) delete obj[part] + else obj[part] = value + return oldValue +} - if (canceled) { - return; - } +function compilePointer (pointer) { + if (typeof pointer === 'string') { + pointer = pointer.split('/') + if (pointer[0] === '') return pointer + throw new Error('Invalid JSON pointer.') + } else if (Array.isArray(pointer)) { + return pointer + } - _this.send(e); - }; + throw new Error('Invalid JSON pointer.') +} - var callbackStop; +function get (obj, pointer) { + if (typeof obj !== 'object') throw new Error('Invalid input object.') + pointer = compilePointer(pointer) + var len = pointer.length + if (len === 1) return obj - try { - callbackStop = callback(receive, function (newListener) { - receivers.add(newListener); - }); - } catch (err) { - this.send(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "g"])(id, err)); - } + for (var p = 1; p < len;) { + obj = obj[untilde(pointer[p++])] + if (len === p) return obj + if (typeof obj !== 'object') return undefined + } +} - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isPromiseLike */ "i"])(callbackStop)) { - // it turned out to be an async function, can't reliably check this before calling `callback` - // because transpiled async functions are not recognizable - return this.spawnPromise(callbackStop, id); +function set (obj, pointer, value) { + if (typeof obj !== 'object') throw new Error('Invalid input object.') + pointer = compilePointer(pointer) + if (pointer.length === 0) throw new Error('Invalid JSON pointer for set.') + return setter(obj, pointer, value) +} + +function compile (pointer) { + var compiled = compilePointer(pointer) + return { + get: function (object) { + return get(object, compiled) + }, + set: function (object, value) { + return set(object, compiled, value) } + } +} - var actor = { - id: id, - send: function (event) { - return receivers.forEach(function (receiver) { - return receiver(event); - }); - }, - subscribe: function (next) { - listeners.add(next); - return { - unsubscribe: function () { - listeners.delete(next); - } - }; - }, - stop: function () { - canceled = true; +exports.get = get +exports.set = set +exports.compile = compile - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(callbackStop)) { - callbackStop(); - } - }, - toJSON: function () { - return { - id: id - }; - } - }; - this.children.set(id, actor); - return actor; - }; - Interpreter.prototype.spawnObservable = function (source, id) { - var _this = this; +/***/ }), +/* 175 */ +/***/ (function(module, exports, __webpack_require__) { - var subscription = source.subscribe(function (value) { - _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(value, { - origin: id - })); - }, function (err) { - _this.removeChild(id); +__webpack_require__(481); +module.exports = __webpack_require__(160).Array.includes; - _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "g"])(id, err), { - origin: id - })); - }, function () { - _this.removeChild(id); - _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "A"])(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* doneInvoke */ "f"])(id), { - origin: id - })); - }); - var actor = { - id: id, - send: function () { - return void 0; - }, - subscribe: function (next, handleError, complete) { - return source.subscribe(next, handleError, complete); - }, - stop: function () { - return subscription.unsubscribe(); - }, - toJSON: function () { - return { - id: id - }; - } - }; - this.children.set(id, actor); - return actor; - }; +/***/ }), +/* 176 */ +/***/ (function(module, exports, __webpack_require__) { - Interpreter.prototype.spawnActor = function (actor) { - this.children.set(actor.id, actor); - return actor; - }; +"use strict"; - Interpreter.prototype.spawnActivity = function (activity) { - var implementation = this.machine.options && this.machine.options.activities ? this.machine.options.activities[activity.type] : undefined; +module.exports = __webpack_require__(486); - if (!implementation) { - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(false, "No implementation found for activity '" + activity.type + "'"); - } // tslint:disable-next-line:no-console +/***/ }), +/* 177 */ +/***/ (function(module, exports, __webpack_require__) { - return; - } // Start implementation +var arrayMap = __webpack_require__(44), + copyArray = __webpack_require__(106), + isArray = __webpack_require__(21), + isSymbol = __webpack_require__(59), + stringToPath = __webpack_require__(196), + toKey = __webpack_require__(61), + toString = __webpack_require__(140); +/** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ +function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); +} - var dispose = implementation(this.state.context, activity); - this.spawnEffect(activity.id, dispose); - }; +module.exports = toPath; - Interpreter.prototype.spawnEffect = function (id, dispose) { - this.children.set(id, { - id: id, - send: function () { - return void 0; - }, - subscribe: function () { - return { - unsubscribe: function () { - return void 0; - } - }; - }, - stop: dispose || undefined, - toJSON: function () { - return { - id: id - }; - } - }); - }; - Interpreter.prototype.attachDev = function () { - if (this.options.devTools && typeof window !== 'undefined') { - if (window.__REDUX_DEVTOOLS_EXTENSION__) { - var devToolsOptions = typeof this.options.devTools === 'object' ? this.options.devTools : undefined; - this.devTools = window.__REDUX_DEVTOOLS_EXTENSION__.connect(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ - name: this.id, - autoPause: true, - stateSanitizer: function (state) { - return { - value: state.value, - context: state.context, - actions: state.actions - }; - } - }, devToolsOptions), { - features: Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ - jump: false, - skip: false - }, devToolsOptions ? devToolsOptions.features : undefined) - }), this.machine); - this.devTools.init(this.state); - } // add XState-specific dev tooling hook +/***/ }), +/* 178 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; - Object(_devTools_js__WEBPACK_IMPORTED_MODULE_12__[/* registerService */ "a"])(this); - } - }; - Interpreter.prototype.toJSON = function () { - return { - id: this.id - }; - }; +var compileSchema = __webpack_require__(504) + , resolve = __webpack_require__(164) + , Cache = __webpack_require__(508) + , SchemaObject = __webpack_require__(254) + , stableStringify = __webpack_require__(255) + , formats = __webpack_require__(509) + , rules = __webpack_require__(510) + , $dataMetaSchema = __webpack_require__(531) + , util = __webpack_require__(65); - Interpreter.prototype[_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* symbolObservable */ "v"]] = function () { - return this; - }; - /** - * The default interpreter options: - * - * - `clock` uses the global `setTimeout` and `clearTimeout` functions - * - `logger` uses the global `console.log()` method - */ +module.exports = Ajv; +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; - Interpreter.defaultOptions = /*#__PURE__*/function (global) { - return { - execute: true, - deferEvents: true, - clock: { - setTimeout: function (fn, ms) { - return global.setTimeout.call(null, fn, ms); - }, - clearTimeout: function (id) { - return global.clearTimeout.call(null, id); - } - }, - logger: global.console.log.bind(console), - devTools: false - }; - }(typeof self !== 'undefined' ? self : global); +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; - Interpreter.interpret = interpret; - return Interpreter; -}(); +Ajv.prototype.compileAsync = __webpack_require__(532); +var customKeyword = __webpack_require__(533); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; -var resolveSpawnOptions = function (nameOrOptions) { - if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(nameOrOptions)) { - return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, DEFAULT_SPAWN_OPTIONS), { - name: nameOrOptions - }); - } +var errorClasses = __webpack_require__(166); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; - return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, DEFAULT_SPAWN_OPTIONS), { - name: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* uniqueId */ "F"])() - }), nameOrOptions); -}; +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; -function spawn(entity, nameOrOptions) { - var resolvedOptions = resolveSpawnOptions(nameOrOptions); - return Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* consume */ "a"])(function (service) { - if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { - var isLazyEntity = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(entity) || Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(entity); - Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "I"])(!!service || isLazyEntity, "Attempted to spawn an Actor (ID: \"" + (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(entity) ? entity.id : 'undefined') + "\") outside of a service. This will have no effect."); - } +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; - if (service) { - return service.spawn(entity, resolvedOptions.name, resolvedOptions); - } else { - return Object(_Actor_js__WEBPACK_IMPORTED_MODULE_9__[/* createDeferredActor */ "a"])(entity, resolvedOptions.name); - } - }); -} -/** - * Creates a new Interpreter instance for the given machine with the provided options, if any. - * - * @param machine The machine to interpret - * @param options Interpreter options +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); -function interpret(machine, options) { - var interpreter = new Interpreter(machine, options); - return interpreter; + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); } -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(199))) -/***/ }), -/* 131 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Validate data using schema + * 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. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } -module.exports = __webpack_require__(311); + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} -/***/ }), -/* 132 */ -/***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(324); +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} -/***/ }), -/* 133 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @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`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - self.setLevel = function (level, persist) { - if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) { - level = self.levels[level.toUpperCase()]; - } - if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) { - currentLevel = level; - if (persist !== false) { // defaults to true - persistLevelIfPossible(level); - } - replaceLoggingMethods.call(self, level, name); - if (typeof console === undefinedType && level < self.levels.SILENT) { - return "No console available for logging"; - } - } else { - throw "log.setLevel() called with invalid level: " + level; - } - }; + var text = ''; + for (var i=0; i= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +function _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; } + +var REQUIRED_FIELD_SYMBOL = "*"; +var COMPONENT_TYPES = { + array: "ArrayField", + "boolean": "BooleanField", + integer: "NumberField", + number: "NumberField", + object: "ObjectField", + string: "StringField", + "null": "NullField" }; +function getFieldComponent(schema, uiSchema, idSchema, fields) { + var field = uiSchema["ui:field"]; -/***/ }), -/* 146 */ -/***/ (function(module, exports, __webpack_require__) { + if (typeof field === "function") { + return field; + } -var shared = __webpack_require__(143)('keys'); -var uid = __webpack_require__(108); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; + if (typeof field === "string" && field in fields) { + return fields[field]; + } + var componentName = COMPONENT_TYPES[(0, _utils.getSchemaType)(schema)]; // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't + // render a field and let the MultiSchemaField component handle the form display -/***/ }), -/* 147 */ -/***/ (function(module, exports) { + if (!componentName && (schema.anyOf || schema.oneOf)) { + return function () { + return null; + }; + } -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); + return componentName in fields ? fields[componentName] : function () { + var UnsupportedField = fields.UnsupportedField; + return _react["default"].createElement(UnsupportedField, { + schema: schema, + idSchema: idSchema, + reason: "Unknown field type ".concat(schema.type) + }); + }; +} +function Label(props) { + var label = props.label, + required = props.required, + id = props.id; -/***/ }), -/* 148 */ -/***/ (function(module, exports) { + if (!label) { + return null; + } -exports.f = Object.getOwnPropertySymbols; + return _react["default"].createElement("label", { + className: "control-label", + htmlFor: id + }, label, required && _react["default"].createElement("span", { + className: "required" + }, REQUIRED_FIELD_SYMBOL)); +} +function LabelInput(props) { + var id = props.id, + label = props.label, + onChange = props.onChange; + return _react["default"].createElement("input", { + className: "form-control", + type: "text", + id: id, + onBlur: function onBlur(event) { + return onChange(event.target.value); + }, + defaultValue: label + }); +} -/***/ }), -/* 149 */ -/***/ (function(module, exports, __webpack_require__) { +function Help(props) { + var help = props.help; -// 7.2.2 IsArray(argument) -var cof = __webpack_require__(88); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; -}; + if (!help) { + return null; + } + if (typeof help === "string") { + return _react["default"].createElement("p", { + className: "help-block" + }, help); + } -/***/ }), -/* 150 */ -/***/ (function(module, exports, __webpack_require__) { + return _react["default"].createElement("div", { + className: "help-block" + }, help); +} -"use strict"; +function ErrorList(props) { + var _props$errors = props.errors, + errors = _props$errors === void 0 ? [] : _props$errors; -var LIBRARY = __webpack_require__(91); -var $export = __webpack_require__(27); -var redefine = __webpack_require__(202); -var hide = __webpack_require__(59); -var Iterators = __webpack_require__(74); -var $iterCreate = __webpack_require__(317); -var setToStringTag = __webpack_require__(92); -var getPrototypeOf = __webpack_require__(208); -var ITERATOR = __webpack_require__(40)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; + if (errors.length === 0) { + return null; + } -var returnThis = function () { return this; }; + return _react["default"].createElement("div", null, _react["default"].createElement("ul", { + className: "error-detail bs-callout bs-callout-info" + }, errors.filter(function (elem) { + return !!elem; + }).map(function (error, index) { + return _react["default"].createElement("li", { + className: "text-danger", + key: index + }, error); + }))); +} -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); +function DefaultTemplate(props) { + var id = props.id, + label = props.label, + children = props.children, + errors = props.errors, + help = props.help, + description = props.description, + hidden = props.hidden, + required = props.required, + displayLabel = props.displayLabel; + + if (hidden) { + return _react["default"].createElement("div", { + className: "hidden" + }, children); } - return methods; + + return _react["default"].createElement(WrapIfAdditional, props, displayLabel && _react["default"].createElement(Label, { + label: label, + required: required, + id: id + }), displayLabel && description ? description : null, children, errors, help); +} + +if (false) {} + +DefaultTemplate.defaultProps = { + hidden: false, + readonly: false, + required: false, + displayLabel: true }; +function WrapIfAdditional(props) { + var id = props.id, + classNames = props.classNames, + disabled = props.disabled, + label = props.label, + onKeyChange = props.onKeyChange, + onDropPropertyClick = props.onDropPropertyClick, + readonly = props.readonly, + required = props.required, + schema = props.schema; + var keyLabel = "".concat(label, " Key"); // i18n ? + + var additional = schema.hasOwnProperty(_utils.ADDITIONAL_PROPERTY_FLAG); -/***/ }), -/* 151 */ -/***/ (function(module, exports) { + if (!additional) { + return _react["default"].createElement("div", { + className: classNames + }, props.children); + } -module.exports = function () { /* empty */ }; + return _react["default"].createElement("div", { + className: classNames + }, _react["default"].createElement("div", { + className: "row" + }, _react["default"].createElement("div", { + className: "col-xs-5 form-additional" + }, _react["default"].createElement("div", { + className: "form-group" + }, _react["default"].createElement(Label, { + label: keyLabel, + required: required, + id: "".concat(id, "-key") + }), _react["default"].createElement(LabelInput, { + label: label, + required: required, + id: "".concat(id, "-key"), + onChange: onKeyChange + }))), _react["default"].createElement("div", { + className: "form-additional form-group col-xs-5" + }, props.children), _react["default"].createElement("div", { + className: "col-xs-2" + }, _react["default"].createElement(_IconButton["default"], { + type: "danger", + icon: "remove", + className: "array-item-remove btn-block", + tabIndex: "-1", + style: { + border: "0" + }, + disabled: disabled || readonly, + onClick: onDropPropertyClick(label) + })))); +} + +function SchemaFieldRender(props) { + var uiSchema = props.uiSchema, + formData = props.formData, + errorSchema = props.errorSchema, + idPrefix = props.idPrefix, + name = props.name, + onKeyChange = props.onKeyChange, + onDropPropertyClick = props.onDropPropertyClick, + required = props.required, + _props$registry = props.registry, + registry = _props$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _props$registry, + _props$wasPropertyKey = props.wasPropertyKeyModified, + wasPropertyKeyModified = _props$wasPropertyKey === void 0 ? false : _props$wasPropertyKey; + var rootSchema = registry.rootSchema, + fields = registry.fields, + formContext = registry.formContext; + var FieldTemplate = uiSchema["ui:FieldTemplate"] || registry.FieldTemplate || DefaultTemplate; + var idSchema = props.idSchema; + var schema = (0, _utils.retrieveSchema)(props.schema, rootSchema, formData); + idSchema = (0, _utils.mergeObjects)((0, _utils.toIdSchema)(schema, null, rootSchema, formData, idPrefix), idSchema); + var FieldComponent = getFieldComponent(schema, uiSchema, idSchema, fields); + var DescriptionField = fields.DescriptionField; + var disabled = Boolean(props.disabled || uiSchema["ui:disabled"]); + var readonly = Boolean(props.readonly || uiSchema["ui:readonly"] || props.schema.readOnly || schema.readOnly); + var autofocus = Boolean(props.autofocus || uiSchema["ui:autofocus"]); + if (Object.keys(schema).length === 0) { + return null; + } -/***/ }), -/* 152 */ -/***/ (function(module, exports) { + var displayLabel = (0, _utils.getDisplayLabel)(schema, uiSchema, rootSchema); + var __errors = errorSchema.__errors, + fieldErrorSchema = _objectWithoutProperties(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components -/***/ }), -/* 153 */ -/***/ (function(module, exports, __webpack_require__) { + var field = _react["default"].createElement(FieldComponent, _extends({}, props, { + idSchema: idSchema, + schema: schema, + uiSchema: _objectSpread({}, uiSchema, { + classNames: undefined + }), + disabled: disabled, + readonly: readonly, + autofocus: autofocus, + errorSchema: fieldErrorSchema, + formContext: formContext, + rawErrors: __errors + })); -var isArray = __webpack_require__(30), - isSymbol = __webpack_require__(75); + var id = idSchema.$id; // If this schema has a title defined, but the user has set a new key/label, retain their input. -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; + var label; -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; + if (wasPropertyKeyModified) { + label = name; + } else { + label = uiSchema["ui:title"] || props.schema.title || schema.title || name; } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} -module.exports = isKey; + var description = uiSchema["ui:description"] || props.schema.description || schema.description; + var errors = __errors; + var help = uiSchema["ui:help"]; + var hidden = uiSchema["ui:widget"] === "hidden"; + var classNames = ["form-group", "field", "field-".concat(schema.type), errors && errors.length > 0 ? "field-error has-error has-danger" : "", uiSchema.classNames].join(" ").trim(); + var fieldProps = { + description: _react["default"].createElement(DescriptionField, { + id: id + "__description", + description: description, + formContext: formContext + }), + rawDescription: description, + help: _react["default"].createElement(Help, { + help: help + }), + rawHelp: typeof help === "string" ? help : undefined, + errors: _react["default"].createElement(ErrorList, { + errors: errors + }), + rawErrors: errors, + id: id, + label: label, + hidden: hidden, + onKeyChange: onKeyChange, + onDropPropertyClick: onDropPropertyClick, + required: required, + disabled: disabled, + readonly: readonly, + displayLabel: displayLabel, + classNames: classNames, + formContext: formContext, + fields: fields, + schema: schema, + uiSchema: uiSchema, + registry: registry + }; + var _AnyOfField = registry.fields.AnyOfField; + var _OneOfField = registry.fields.OneOfField; + return _react["default"].createElement(FieldTemplate, fieldProps, _react["default"].createElement(_react["default"].Fragment, null, field, schema.anyOf && !(0, _utils.isSelect)(schema) && _react["default"].createElement(_AnyOfField, { + disabled: disabled, + errorSchema: errorSchema, + formData: formData, + idPrefix: idPrefix, + idSchema: idSchema, + onBlur: props.onBlur, + onChange: props.onChange, + onFocus: props.onFocus, + options: schema.anyOf, + baseType: schema.type, + registry: registry, + schema: schema, + uiSchema: uiSchema + }), schema.oneOf && !(0, _utils.isSelect)(schema) && _react["default"].createElement(_OneOfField, { + disabled: disabled, + errorSchema: errorSchema, + formData: formData, + idPrefix: idPrefix, + idSchema: idSchema, + onBlur: props.onBlur, + onChange: props.onChange, + onFocus: props.onFocus, + options: schema.oneOf, + baseType: schema.type, + registry: registry, + schema: schema, + uiSchema: uiSchema + }))); +} +var SchemaField = +/*#__PURE__*/ +function (_React$Component) { + _inherits(SchemaField, _React$Component); -/***/ }), -/* 154 */ -/***/ (function(module, exports, __webpack_require__) { + function SchemaField() { + _classCallCheck(this, SchemaField); -var mapCacheClear = __webpack_require__(335), - mapCacheDelete = __webpack_require__(351), - mapCacheGet = __webpack_require__(353), - mapCacheHas = __webpack_require__(354), - mapCacheSet = __webpack_require__(355); + return _possibleConstructorReturn(this, _getPrototypeOf(SchemaField).apply(this, arguments)); + } -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; + _createClass(SchemaField, [{ + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + return !(0, _utils.deepEquals)(this.props, nextProps); + } + }, { + key: "render", + value: function render() { + return SchemaFieldRender(this.props); + } + }]); - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} + return SchemaField; +}(_react["default"].Component); -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; +SchemaField.defaultProps = { + uiSchema: {}, + errorSchema: {}, + idSchema: {}, + disabled: false, + readonly: false, + autofocus: false +}; -module.exports = MapCache; +if (false) {} +var _default = SchemaField; +exports["default"] = _default; /***/ }), -/* 155 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(68), - root = __webpack_require__(47); +module.exports = __webpack_require__(317); -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); +/***/ }), +/* 181 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = Map; +module.exports = __webpack_require__(386); + +/***/ }), +/* 182 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = __webpack_require__(497); /***/ }), -/* 156 */ +/* 183 */ /***/ (function(module, exports, __webpack_require__) { -var baseToString = __webpack_require__(212); +var arrayEach = __webpack_require__(149), + baseCreate = __webpack_require__(222), + baseForOwn = __webpack_require__(154), + baseIteratee = __webpack_require__(84), + getPrototype = __webpack_require__(107), + isArray = __webpack_require__(21), + isBuffer = __webpack_require__(62), + isFunction = __webpack_require__(16), + isObject = __webpack_require__(29), + isTypedArray = __webpack_require__(81); /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. * @example * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] * - * _.toString([1, 2, 3]); - * // => '1,2,3' + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -module.exports = toString; - - -/***/ }), -/* 157 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseAssignValue = __webpack_require__(117), - eq = __webpack_require__(76); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); -/** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. - */ -function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); + iteratee = baseIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; } -module.exports = assignValue; +module.exports = transform; /***/ }), -/* 158 */ -/***/ (function(module, exports) { - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = isLength; +/* 184 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scheduler; }); +/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4); -/***/ }), -/* 159 */ -/***/ (function(module, exports) { +var defaultOptions = { + deferEvents: false +}; -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; +var Scheduler = +/*#__PURE__*/ - while (++index < length) { - array[offset + index] = values[index]; +/** @class */ +function () { + function Scheduler(options) { + this.processingEvent = false; + this.queue = []; + this.initialized = false; + this.options = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, defaultOptions), options); } - return array; -} - -module.exports = arrayPush; + Scheduler.prototype.initialize = function (callback) { + this.initialized = true; -/***/ }), -/* 160 */ -/***/ (function(module, exports) { + if (callback) { + if (!this.options.deferEvents) { + this.schedule(callback); + return; + } -module.exports = function(module) { - if (!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if (!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; + this.process(callback); + } + this.flushEvents(); + }; -/***/ }), -/* 161 */ -/***/ (function(module, exports, __webpack_require__) { + Scheduler.prototype.schedule = function (task) { + if (!this.initialized || this.processingEvent) { + this.queue.push(task); + return; + } -/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(198); + if (this.queue.length !== 0) { + throw new Error('Event queue should be empty when it is not processing events'); + } -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; + this.process(task); + this.flushEvents(); + }; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + Scheduler.prototype.clear = function () { + this.queue = []; + }; -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; + Scheduler.prototype.flushEvents = function () { + var nextCallback = this.queue.shift(); -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; + while (nextCallback) { + this.process(nextCallback); + nextCallback = this.queue.shift(); + } + }; -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; + Scheduler.prototype.process = function (callback) { + this.processingEvent = true; - if (types) { - return types; + try { + callback(); + } catch (e) { + // there is no use to keep the future events + // as the situation is not anymore the same + this.clear(); + throw e; + } finally { + this.processingEvent = false; } + }; - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} -}()); + return Scheduler; +}(); -module.exports = nodeUtil; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(160)(module))) /***/ }), -/* 162 */ -/***/ (function(module, exports, __webpack_require__) { +/* 185 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var hide = __webpack_require__(59); -module.exports = function (target, src, safe) { - for (var key in src) { - if (safe && target[key]) target[key] = src[key]; - else hide(target, key, src[key]); - } return target; -}; +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createDeferredActor; }); +/* unused harmony export createInvocableActor */ +/* unused harmony export createNullActor */ +/* unused harmony export isActor */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isSpawnedActor; }); +/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var _serviceScope_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(48); -/***/ }), -/* 163 */ -/***/ (function(module, exports) { -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { - throw TypeError(name + ': incorrect invocation!'); - } return it; -}; +function createNullActor(id) { + return { + id: id, + send: function () { + return void 0; + }, + subscribe: function () { + return { + unsubscribe: function () { + return void 0; + } + }; + }, + toJSON: function () { + return { + id: id + }; + } + }; +} +/** + * Creates a deferred actor that is able to be invoked given the provided + * invocation information in its `.meta` value. + * + * @param invokeDefinition The meta information needed to invoke the actor. + */ -/***/ }), -/* 164 */ -/***/ (function(module, exports, __webpack_require__) { +function createInvocableActor(invokeDefinition, machine, context, _event) { + var _a; -var classof = __webpack_require__(121); -var ITERATOR = __webpack_require__(40)('iterator'); -var Iterators = __webpack_require__(74); -module.exports = __webpack_require__(20).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; + var invokeSrc = Object(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* toInvokeSource */ "t"])(invokeDefinition.src); + var serviceCreator = (_a = machine === null || machine === void 0 ? void 0 : machine.options.services) === null || _a === void 0 ? void 0 : _a[invokeSrc.type]; + var resolvedData = invokeDefinition.data ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* mapContext */ "l"])(invokeDefinition.data, context, _event) : undefined; + var tempActor = serviceCreator ? createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); + tempActor.meta = invokeDefinition; + return tempActor; +} +function createDeferredActor(entity, id, data) { + var tempActor = createNullActor(id); + tempActor.deferred = true; -/***/ }), -/* 165 */ -/***/ (function(module, exports) { + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* isMachine */ "g"])(entity)) { + // "mute" the existing service scope so potential spawned actors within the `.initialState` stay deferred here + tempActor.state = Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_1__[/* provide */ "b"])(undefined, function () { + return (data ? entity.withContext(data) : entity).initialState; + }); + } -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; + return tempActor; +} - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } +function isActor(item) { + try { + return typeof item.send === 'function'; + } catch (e) { + return false; } - return array; } -module.exports = arrayEach; - - -/***/ }), -/* 166 */ -/***/ (function(module, exports, __webpack_require__) { +function isSpawnedActor(item) { + return isActor(item) && 'id' in item; +} -var arrayFilter = __webpack_require__(410), - stubArray = __webpack_require__(229); -/** Used for built-in method references. */ -var objectProto = Object.prototype; -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; +/***/ }), +/* 186 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getGlobal; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return registerService; }); +/* harmony import */ var _environment_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23); + // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis -/** - * Creates an array of the own enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { - return []; +function getGlobal() { + if (typeof self !== 'undefined') { + return self; } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); - }); -}; - -module.exports = getSymbols; + if (typeof window !== 'undefined') { + return window; + } -/***/ }), -/* 167 */ -/***/ (function(module, exports, __webpack_require__) { - -var Uint8Array = __webpack_require__(233); + if (typeof global !== 'undefined') { + return global; + } -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; + return undefined; } -module.exports = cloneArrayBuffer; - - -/***/ }), -/* 168 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseIsEqualDeep = __webpack_require__(423), - isObjectLike = __webpack_require__(45); +function getDevTools() { + var global = getGlobal(); -/** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; + if (global && '__xstate__' in global) { + return global.__xstate__; } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); -} - -module.exports = baseIsEqual; + return undefined; +} -/***/ }), -/* 169 */ -/***/ (function(module, exports) { +function registerService(service) { + if (_environment_js__WEBPACK_IMPORTED_MODULE_0__[/* IS_PRODUCTION */ "a"] || !getGlobal()) { + return; + } -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); + var devTools = getDevTools(); - set.forEach(function(value) { - result[++index] = value; - }); - return result; + if (devTools) { + devTools.register(service); + } } -module.exports = setToArray; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(121))) /***/ }), -/* 170 */ +/* 187 */ /***/ (function(module, exports, __webpack_require__) { -var baseFor = __webpack_require__(243), - keys = __webpack_require__(79); - -/** - * The base implementation of `_.forOwn` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); -} +/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ +var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -module.exports = baseForOwn; +module.exports = freeGlobal; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(121))) /***/ }), -/* 171 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { -var eq = __webpack_require__(76), - isArrayLike = __webpack_require__(62), - isIndex = __webpack_require__(118), - isObject = __webpack_require__(44); - -/** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; -} - -module.exports = isIterateeCall; +module.exports = !__webpack_require__(35) && !__webpack_require__(42)(function () { + return Object.defineProperty(__webpack_require__(125)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); /***/ }), -/* 172 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { -var SetCache = __webpack_require__(125), - arrayIncludes = __webpack_require__(173), - arrayIncludesWith = __webpack_require__(174), - cacheHas = __webpack_require__(126), - createSet = __webpack_require__(446), - setToArray = __webpack_require__(169); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; +"use strict"; -/** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - */ -function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; +// ECMAScript 6 symbols shim +var global = __webpack_require__(24); +var has = __webpack_require__(50); +var DESCRIPTORS = __webpack_require__(35); +var $export = __webpack_require__(22); +var redefine = __webpack_require__(190); +var META = __webpack_require__(127).KEY; +var $fails = __webpack_require__(42); +var shared = __webpack_require__(128); +var setToStringTag = __webpack_require__(75); +var uid = __webpack_require__(90); +var wks = __webpack_require__(26); +var wksExt = __webpack_require__(91); +var wksDefine = __webpack_require__(129); +var enumKeys = __webpack_require__(298); +var isArray = __webpack_require__(134); +var anObject = __webpack_require__(37); +var isObject = __webpack_require__(34); +var toObject = __webpack_require__(51); +var toIObject = __webpack_require__(49); +var toPrimitive = __webpack_require__(124); +var createDesc = __webpack_require__(72); +var _create = __webpack_require__(93); +var gOPNExt = __webpack_require__(302); +var $GOPD = __webpack_require__(123); +var $GOPS = __webpack_require__(133); +var $DP = __webpack_require__(36); +var $keys = __webpack_require__(76); +var gOPD = $GOPD.f; +var dP = $DP.f; +var gOPN = gOPNExt.f; +var $Symbol = global.Symbol; +var $JSON = global.JSON; +var _stringify = $JSON && $JSON.stringify; +var PROTOTYPE = 'prototype'; +var HIDDEN = wks('_hidden'); +var TO_PRIMITIVE = wks('toPrimitive'); +var isEnum = {}.propertyIsEnumerable; +var SymbolRegistry = shared('symbol-registry'); +var AllSymbols = shared('symbols'); +var OPSymbols = shared('op-symbols'); +var ObjectProto = Object[PROTOTYPE]; +var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; +var QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function () { + return _create(dP({}, 'a', { + get: function () { return dP(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (it, key, D) { + var protoDesc = gOPD(ObjectProto, key); + if (protoDesc) delete ObjectProto[key]; + dP(it, key, D); + if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function (tag) { + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D) { + if (it === ObjectProto) $defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if (has(AllSymbols, key)) { + if (!D.enumerable) { + if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; + D = _create(D, { enumerable: createDesc(0, false) }); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P) { + anObject(it); + var keys = enumKeys(P = toIObject(P)); + var i = 0; + var l = keys.length; + var key; + while (l > i) $defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P) { + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key) { + var E = isEnum.call(this, key = toPrimitive(key, true)); + if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { + it = toIObject(it); + key = toPrimitive(key, true); + if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; + var D = gOPD(it, key); + if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it) { + var names = gOPN(toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { + var IS_OP = it === ObjectProto; + var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); + var result = []; + var i = 0; + var key; + while (names.length > i) { + if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if (!USE_NATIVE) { + $Symbol = function Symbol() { + if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function (value) { + if (this === ObjectProto) $set.call(OPSymbols, value); + if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString() { + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(193).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(89).f = $propertyIsEnumerable; + $GOPS.f = $getOwnPropertySymbols; + + if (DESCRIPTORS && !__webpack_require__(74)) { + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; + + wksExt.f = function (name) { + return wrap(wks(name)); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); + +for (var es6Symbols = ( + // 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 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); + +for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function (key) { + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); + for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; + }, + useSetter: function () { setter = true; }, + useSimple: function () { setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); + +$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return $GOPS.f(toObject(it)); } - else { - seen = iteratee ? [] : result; +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it) { + var args = [it]; + var i = 1; + var replacer, $replacer; + while (arguments.length > i) args.push(arguments[i++]); + $replacer = replacer = args[1]; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (typeof $replacer == 'function') value = $replacer.call(this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; +}); - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(43)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), +/* 190 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(43); + + +/***/ }), +/* 191 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(50); +var toIObject = __webpack_require__(49); +var arrayIndexOf = __webpack_require__(299)(false); +var IE_PROTO = __webpack_require__(131)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); } return result; -} +}; -module.exports = baseUniq; + +/***/ }), +/* 192 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(24).document; +module.exports = document && document.documentElement; /***/ }), -/* 173 */ +/* 193 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(191); +var hiddenKeys = __webpack_require__(132).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 194 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(50); +var toObject = __webpack_require__(51); +var IE_PROTO = __webpack_require__(131)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + + +/***/ }), +/* 195 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 196 */ /***/ (function(module, exports, __webpack_require__) { -var baseIndexOf = __webpack_require__(127); +var memoizeCapped = __webpack_require__(328); + +/** Used to match property names within property paths. */ +var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + +/** Used to match backslashes in property paths. */ +var reEscapeChar = /\\(\\)?/g; /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. + * Converts `string` to a property path array. * * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; -} +var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; +}); -module.exports = arrayIncludes; +module.exports = stringToPath; /***/ }), -/* 174 */ +/* 197 */ /***/ (function(module, exports) { +/** Used for built-in method references. */ +var funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + /** - * This function is like `arrayIncludes` except that it accepts a comparator. + * Converts `func` to its source code. * * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ -function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (comparator(value, array[index])) { - return true; - } +function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - return false; + return ''; } -module.exports = arrayIncludesWith; +module.exports = toSource; /***/ }), -/* 175 */ +/* 198 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Symbol = __webpack_require__(56), + arrayMap = __webpack_require__(44), + isArray = __webpack_require__(21), + isSymbol = __webpack_require__(59); +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; -/** -* FUNCTION: isArray( value ) -* Validates if a value is an array. -* -* @param {*} value - value to be validated -* @returns {Boolean} boolean indicating whether value is an array -*/ -function isArray( value ) { - return Object.prototype.toString.call( value ) === '[object Array]'; -} // end FUNCTION isArray() +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; -// EXPORTS // +/** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ +function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; +} -module.exports = Array.isArray || isArray; +module.exports = baseToString; /***/ }), -/* 176 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var getNative = __webpack_require__(52); +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); -var URI = __webpack_require__(474) - , equal = __webpack_require__(177) - , util = __webpack_require__(81) - , SchemaObject = __webpack_require__(255) - , traverse = __webpack_require__(476); +module.exports = defineProperty; -module.exports = resolve; -resolve.normalizeId = normalizeId; -resolve.fullPath = getFullPath; -resolve.url = resolveUrl; -resolve.ids = resolveIds; -resolve.inlineRef = inlineRef; -resolve.schema = resolveSchema; +/***/ }), +/* 200 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseHasIn = __webpack_require__(352), + hasPath = __webpack_require__(353); /** - * [resolve and compile the references ($ref)] - * @this Ajv - * @param {Function} compile reference to schema compilation funciton (localCompile) - * @param {Object} root object with information about the root schema for the current schema - * @param {String} ref reference to resolve - * @return {Object|Function} schema object (if the schema can be inlined) or validation function + * Checks if `path` is a direct or inherited property of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @example + * + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); + * // => true + * + * _.hasIn(object, 'a.b'); + * // => true + * + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); + * // => false */ -function resolve(compile, root, ref) { - /* jshint validthis: true */ - var refVal = this._refs[ref]; - if (typeof refVal == 'string') { - if (this._refs[refVal]) refVal = this._refs[refVal]; - else return resolve.call(this, compile, root, refVal); - } +function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); +} - refVal = refVal || this._schemas[ref]; - if (refVal instanceof SchemaObject) { - return inlineRef(refVal.schema, this._opts.inlineRefs) - ? refVal.schema - : refVal.validate || this._compile(refVal); - } +module.exports = hasIn; - var res = resolveSchema.call(this, root, ref); - var schema, v, baseId; - if (res) { - schema = res.schema; - root = res.root; - baseId = res.baseId; - } - if (schema instanceof SchemaObject) { - v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); - } else if (schema !== undefined) { - v = inlineRef(schema, this._opts.inlineRefs) - ? schema - : compile.call(this, schema, root, undefined, baseId); - } - - return v; -} +/***/ }), +/* 201 */ +/***/ (function(module, exports, __webpack_require__) { +var baseFlatten = __webpack_require__(102); /** - * Resolve schema, its root and baseId - * @this Ajv - * @param {Object} root root object with properties schema, refVal, refs - * @param {String} ref reference to resolve - * @return {Object} object with properties schema, root, baseId + * Flattens `array` a single level deep. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] */ -function resolveSchema(root, ref) { - /* jshint validthis: true */ - var p = URI.parse(ref) - , refPath = _getFullPath(p) - , baseId = getFullPath(this._getId(root.schema)); - if (Object.keys(root.schema).length === 0 || refPath !== baseId) { - var id = normalizeId(refPath); - var refVal = this._refs[id]; - if (typeof refVal == 'string') { - return resolveRecursive.call(this, root, refVal, p); - } else if (refVal instanceof SchemaObject) { - if (!refVal.validate) this._compile(refVal); - root = refVal; - } else { - refVal = this._schemas[id]; - if (refVal instanceof SchemaObject) { - if (!refVal.validate) this._compile(refVal); - if (id == normalizeId(ref)) - return { schema: refVal, root: root, baseId: baseId }; - root = refVal; - } else { - return; - } - } - if (!root.schema) return; - baseId = getFullPath(this._getId(root.schema)); - } - return getJsonPointer.call(this, p, baseId, root.schema, root); -} - - -/* @this Ajv */ -function resolveRecursive(root, ref, parsedRef) { - /* jshint validthis: true */ - var res = resolveSchema.call(this, root, ref); - if (res) { - var schema = res.schema; - var baseId = res.baseId; - root = res.root; - var id = this._getId(schema); - if (id) baseId = resolveUrl(baseId, id); - return getJsonPointer.call(this, parsedRef, baseId, schema, root); - } +function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; } +module.exports = flatten; -var PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']); -/* @this Ajv */ -function getJsonPointer(parsedRef, baseId, schema, root) { - /* jshint validthis: true */ - parsedRef.fragment = parsedRef.fragment || ''; - if (parsedRef.fragment.slice(0,1) != '/') return; - var parts = parsedRef.fragment.split('/'); - for (var i = 1; i < parts.length; i++) { - var part = parts[i]; - if (part) { - part = util.unescapeFragment(part); - schema = schema[part]; - if (schema === undefined) break; - var id; - if (!PREVENT_SCOPE_CHANGE[part]) { - id = this._getId(schema); - if (id) baseId = resolveUrl(baseId, id); - if (schema.$ref) { - var $ref = resolveUrl(baseId, schema.$ref); - var res = resolveSchema.call(this, root, $ref); - if (res) { - schema = res.schema; - root = res.root; - baseId = res.baseId; - } - } - } - } - } - if (schema !== undefined && schema !== root.schema) - return { schema: schema, root: root, baseId: baseId }; -} +/***/ }), +/* 202 */ +/***/ (function(module, exports, __webpack_require__) { +var apply = __webpack_require__(203); -var SIMPLE_INLINED = util.toHash([ - 'type', 'format', 'pattern', - 'maxLength', 'minLength', - 'maxProperties', 'minProperties', - 'maxItems', 'minItems', - 'maximum', 'minimum', - 'uniqueItems', 'multipleOf', - 'required', 'enum' -]); -function inlineRef(schema, limit) { - if (limit === false) return false; - if (limit === undefined || limit === true) return checkNoRef(schema); - else if (limit) return countKeys(schema) <= limit; -} +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); -function checkNoRef(schema) { - var item; - if (Array.isArray(schema)) { - for (var i=0; i= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +/** + * Creates a clone of `buffer`. + * + * @private + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. + */ +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); -function _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; } + buffer.copy(result); + return result; +} -function IconButton(props) { - var _props$type = props.type, - type = _props$type === void 0 ? "default" : _props$type, - icon = props.icon, - className = props.className, - otherProps = _objectWithoutProperties(props, ["type", "icon", "className"]); +module.exports = cloneBuffer; - return _react["default"].createElement("button", _extends({ - type: "button", - className: "btn btn-".concat(type, " ").concat(className) - }, otherProps), _react["default"].createElement("i", { - className: "glyphicon glyphicon-".concat(icon) - })); -} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(144)(module))) /***/ }), -/* 182 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseGet = __webpack_require__(111); +/* 215 */ +/***/ (function(module, exports) { /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. + * This method returns a new empty array. * * @static * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 + * var arrays = _.times(2, _.stubArray); * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 + * console.log(arrays); + * // => [[], []] * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' + * console.log(arrays[0] === arrays[1]); + * // => false */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; +function stubArray() { + return []; } -module.exports = get; +module.exports = stubArray; /***/ }), -/* 183 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { -var cloneDeep = __webpack_require__(397) -var compare = __webpack_require__(422) -var computeLcm = __webpack_require__(450) -var defaultsDeep = __webpack_require__(454) -var flatten = __webpack_require__(215) -var flattenDeep = __webpack_require__(460) -var intersection = __webpack_require__(461) -var intersectionWith = __webpack_require__(247) -var isEqual = __webpack_require__(237) -var isPlainObject = __webpack_require__(38) -var pullAll = __webpack_require__(462) -var sortBy = __webpack_require__(239) -var forEach = __webpack_require__(465) -var uniq = __webpack_require__(244) -var uniqWith = __webpack_require__(246) -var without = __webpack_require__(467) - -var withoutArr = (arr, ...rest) => without.apply(null, [arr].concat(flatten(rest))) -var isPropertyRelated = (key) => contains(propertyRelated, key) -var isItemsRelated = (key) => contains(itemsRelated, key) -var contains = (arr, val) => arr.indexOf(val) !== -1 -var isEmptySchema = (obj) => (!keys(obj).length) && obj !== false && obj !== true -var isSchema = (val) => isPlainObject(val) || val === true || val === false -var isFalse = (val) => val === false -var isTrue = (val) => val === true -var schemaResolver = (compacted, key, mergeSchemas) => mergeSchemas(compacted) -var stringArray = (values) => sortBy(uniq(flattenDeep(values))) -var notUndefined = (val) => val !== undefined -var allUniqueKeys = (arr) => uniq(flattenDeep(arr.map(keys))) - -// resolvers -var first = compacted => compacted[0] -var required = compacted => stringArray(compacted) -var maximumValue = compacted => Math.max.apply(Math, compacted) -var minimumValue = compacted => Math.min.apply(Math, compacted) -var uniqueItems = compacted => compacted.some(isTrue) -var examples = compacted => uniqWith(flatten(compacted), isEqual) +var arrayPush = __webpack_require__(143), + getPrototype = __webpack_require__(107), + getSymbols = __webpack_require__(150), + stubArray = __webpack_require__(215); -function compareProp(key) { - return function(a, b) { - return compare({ - [key]: a - }, {[key]: b}) - } -} +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeGetSymbols = Object.getOwnPropertySymbols; -function getAllOf(schema) { - if (Array.isArray(schema.allOf)) { - var allOf = schema.allOf - delete schema.allOf - return [schema].concat(allOf.map(function(allSchema) { - return getAllOf(allSchema) - })) - } else { - return [schema] +/** + * Creates an array of the own and inherited enumerable symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. + */ +var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); } -} + return result; +}; -function getValues(schemas, key) { - return schemas.map(function(schema) { - return schema && schema[key] - }) -} +module.exports = getSymbolsIn; -function getItemSchemas(subSchemas, key) { - return subSchemas.map(function(sub) { - if (!sub) { - return - } - if (Array.isArray(sub.items)) { - var schemaAtPos = sub.items[key] - if (isSchema(schemaAtPos)) { - return schemaAtPos - } else if (sub.hasOwnProperty('additionalItems')) { - return sub.additionalItems - } - } else { - return sub.items - } - }) -} +/***/ }), +/* 217 */ +/***/ (function(module, exports, __webpack_require__) { -function tryMergeSchemaGroups(schemaGroups, mergeSchemas) { - return schemaGroups.map(function(schemas, index) { - try { - return mergeSchemas(schemas, index) - } catch (e) { - return undefined - } - }).filter(notUndefined) -} +var baseGetAllKeys = __webpack_require__(218), + getSymbols = __webpack_require__(150), + keys = __webpack_require__(63); -function getAdditionalSchemas(subSchemas) { - return subSchemas.map(function(sub) { - if (!sub) { - return - } - if (Array.isArray(sub.items)) { - return sub.additionalItems - } - return sub.items - }) +/** + * Creates an array of own enumerable property names and symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); } -function keys(obj) { - if (isPlainObject(obj) || Array.isArray(obj)) { - return Object.keys(obj) - } else { - return [] - } -} +module.exports = getAllKeys; -function getAnyOfCombinations(arrOfArrays, combinations) { - combinations = combinations || [] - if (!arrOfArrays.length) { - return combinations - } - var values = arrOfArrays.slice(0).shift() - var rest = arrOfArrays.slice(1) - if (combinations.length) { - return getAnyOfCombinations(rest, flatten(combinations.map(combination => values.map(item => ([item].concat(combination)))))) - } - return getAnyOfCombinations(rest, values.map(item => (item))) -} +/***/ }), +/* 218 */ +/***/ (function(module, exports, __webpack_require__) { -function mergeWithArray(base, newItems) { - if (Array.isArray(base)) { - base.splice.apply(base, [0, 0].concat(newItems)) - return base - } else { - return newItems - } -} +var arrayPush = __webpack_require__(143), + isArray = __webpack_require__(21); -function throwIncompatible(values, paths) { - var asJSON - try { - asJSON = values.map(function(val) { - return JSON.stringify(val, null, 2) - }).join('\n') - } catch (variable) { - asJSON = values.join(', ') - } - throw new Error('Could not resolve values for path:"' + paths.join('.') + '". They are probably incompatible. Values: \n' + asJSON) +/** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ +function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } -function cleanupReturnValue(returnObject) { - // cleanup empty - for (var prop in returnObject) { - if (returnObject.hasOwnProperty(prop) && isEmptySchema(returnObject[prop])) { - delete returnObject[prop] - } - } - return returnObject -} +module.exports = baseGetAllKeys; -function createRequiredSubMerger(mergeSchemas, key, parents) { - return function(schemas, subKey) { - if (subKey === undefined) { - throw new Error('You need to call merger with a key for the property name or index if array.') - } - subKey = String(subKey) - return mergeSchemas(schemas, null, parents.concat(key, subKey)) - } -} -function callGroupResolver(keys, resolverName, schemas, mergeSchemas, options, parents) { - if (keys.length) { - var resolver = options.resolvers[resolverName] - if (!resolver) { - throw new Error('No resolver found for ' + resolverName) - } +/***/ }), +/* 219 */ +/***/ (function(module, exports, __webpack_require__) { - var compacted = uniqWith(schemas.map(function(schema) { - return keys.reduce(function(all, key) { - if (schema[key] !== undefined) { - all[key] = schema[key] - } - return all - }, {}) - }).filter(notUndefined), compare) +var root = __webpack_require__(33); - var related = resolverName === 'properties' - ? propertyRelated - : itemsRelated +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; - var mergers = related.reduce(function(all, key) { - if (contains(schemaGroupProps, key)) { - all[key] = createRequiredSubMerger(mergeSchemas, key, parents) - } else { - all[key] = function(schemas) { - return mergeSchemas(schemas, null, parents.concat(key)) - } - } - return all - }, {}) +module.exports = Uint8Array; - if (resolverName === 'items') { - mergers.itemsArray = createRequiredSubMerger(mergeSchemas, 'items', parents) - mergers.items = function(schemas) { - return mergeSchemas(schemas, null, parents.concat('items')) - } - } - var result = resolver(compacted, parents.concat(resolverName), mergers, options) +/***/ }), +/* 220 */ +/***/ (function(module, exports, __webpack_require__) { - if (!isPlainObject(result)) { - throwIncompatible(compacted, parents.concat(resolverName)) - } +var cloneArrayBuffer = __webpack_require__(151); - return cleanupReturnValue(result) - } +/** + * Creates a clone of `typedArray`. + * + * @private + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. + */ +function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } -// Provide source when array -function mergeSchemaGroup(group, mergeSchemas, source) { - var allKeys = allUniqueKeys(source || group) - var extractor = source - ? getItemSchemas - : getValues - return allKeys.reduce(function(all, key) { - var schemas = extractor(group, key) - var compacted = uniqWith(schemas.filter(notUndefined), compare) - all[key] = mergeSchemas(compacted, key) - return all - }, source - ? [] - : {}) -} +module.exports = cloneTypedArray; -function removeFalseSchemas(target) { - forEach(target, function(schema, prop) { - if (schema === false) { - delete target[prop] - } - }) -} -function removeFalseSchemasFromArray(target) { - forEach(target, function(schema, index) { - if (schema === false) { - target.splice(index, 1) - } - }) -} +/***/ }), +/* 221 */ +/***/ (function(module, exports, __webpack_require__) { -function createRequiredMetaArray(arr) { - return {required: arr} +var baseCreate = __webpack_require__(222), + getPrototype = __webpack_require__(107), + isPrototype = __webpack_require__(103); + +/** + * Initializes an object clone. + * + * @private + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; } -var propertyRelated = ['properties', 'patternProperties', 'additionalProperties'] -var itemsRelated = ['items', 'additionalItems'] -var schemaGroupProps = ['properties', 'patternProperties', 'definitions', 'dependencies'] -var schemaArrays = ['anyOf', 'oneOf'] -var schemaProps = [ - 'additionalProperties', - 'additionalItems', - 'contains', - 'propertyNames', - 'not', - 'items' -] +module.exports = initCloneObject; -var defaultResolvers = { - type(compacted) { - if (compacted.some(Array.isArray)) { - var normalized = compacted.map(function(val) { - return Array.isArray(val) - ? val - : [val] - }) - var common = intersection.apply(null, normalized) - if (common.length === 1) { - return common[0] - } else if (common.length > 1) { - return uniq(common) - } - } - }, - properties(values, key, mergers, options) { - // first get rid of all non permitted properties - if (!options.ignoreAdditionalProperties) { - values.forEach(function(subSchema) { - var otherSubSchemas = values.filter(s => s !== subSchema) - var ownKeys = keys(subSchema.properties) - var ownPatternKeys = keys(subSchema.patternProperties) - var ownPatterns = ownPatternKeys.map(k => new RegExp(k)) - otherSubSchemas.forEach(function(other) { - var allOtherKeys = keys(other.properties) - var keysMatchingPattern = allOtherKeys.filter(k => ownPatterns.some(pk => pk.test(k))) - var additionalKeys = withoutArr(allOtherKeys, ownKeys, keysMatchingPattern) - additionalKeys.forEach(function(key) { - other.properties[key] = mergers.properties([ - other.properties[key], subSchema.additionalProperties - ], key) - }) - }) - }) +/***/ }), +/* 222 */ +/***/ (function(module, exports, __webpack_require__) { - // remove disallowed patternProperties - values.forEach(function(subSchema) { - var otherSubSchemas = values.filter(s => s !== subSchema) - var ownPatternKeys = keys(subSchema.patternProperties) - if (subSchema.additionalProperties === false) { - otherSubSchemas.forEach(function(other) { - var allOtherPatterns = keys(other.patternProperties) - var additionalPatternKeys = withoutArr(allOtherPatterns, ownPatternKeys) - additionalPatternKeys.forEach(key => delete other.patternProperties[key]) - }) - } - }) - } +var isObject = __webpack_require__(29); - var returnObject = { - additionalProperties: mergers.additionalProperties(values.map(s => s.additionalProperties)), - patternProperties: mergeSchemaGroup(values.map(s => s.patternProperties), mergers.patternProperties), - properties: mergeSchemaGroup(values.map(s => s.properties), mergers.properties) - } +/** Built-in value references. */ +var objectCreate = Object.create; - if (returnObject.additionalProperties === false) { - removeFalseSchemas(returnObject.properties) +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); - return returnObject - }, - dependencies(compacted, paths, mergeSchemas) { - var allChildren = allUniqueKeys(compacted) - - return allChildren.reduce(function(all, childKey) { - var childSchemas = getValues(compacted, childKey) - var innerCompacted = uniqWith(childSchemas.filter(notUndefined), isEqual) - - // to support dependencies - var innerArrays = innerCompacted.filter(Array.isArray) - - if (innerArrays.length) { - if (innerArrays.length === innerCompacted.length) { - all[childKey] = stringArray(innerCompacted) - } else { - var innerSchemas = innerCompacted.filter(isSchema) - var arrayMetaScheams = innerArrays.map(createRequiredMetaArray) - all[childKey] = mergeSchemas(innerSchemas.concat(arrayMetaScheams), childKey) - } - return all - } +module.exports = baseCreate; - innerCompacted = uniqWith(innerCompacted, compare) - all[childKey] = mergeSchemas(innerCompacted, childKey) - return all - }, {}) - }, - items(values, paths, mergers) { - var items = values.map(s => s.items) - var itemsCompacted = items.filter(notUndefined) - var returnObject = {} +/***/ }), +/* 223 */ +/***/ (function(module, exports, __webpack_require__) { - if (itemsCompacted.every(isSchema)) { - returnObject.items = mergers.items(items) - } else { - returnObject.items = mergeSchemaGroup(values, mergers.itemsArray, items) - } +var baseIsEqual = __webpack_require__(152); - var schemasAtLastPos - if (itemsCompacted.every(Array.isArray)) { - schemasAtLastPos = values.map(s => s.additionalItems) - } else if (itemsCompacted.some(Array.isArray)) { - schemasAtLastPos = getAdditionalSchemas(values) - } +/** + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.isEqual(object, other); + * // => true + * + * object === other; + * // => false + */ +function isEqual(value, other) { + return baseIsEqual(value, other); +} - if (schemasAtLastPos) { - returnObject.additionalItems = mergers.additionalItems(schemasAtLastPos) - } +module.exports = isEqual; - if (returnObject.additionalItems === false && Array.isArray(returnObject.items)) { - removeFalseSchemasFromArray(returnObject.items) - } - return returnObject - }, - oneOf(compacted, paths, mergeSchemas) { - var combinations = getAnyOfCombinations(cloneDeep(compacted)) - var result = tryMergeSchemaGroups(combinations, mergeSchemas) - var unique = uniqWith(result, compare) +/***/ }), +/* 224 */ +/***/ (function(module, exports, __webpack_require__) { - if (unique.length) { - return unique +var SetCache = __webpack_require__(108), + arraySome = __webpack_require__(421), + cacheHas = __webpack_require__(109); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ +function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; + + stack.set(array, other); + stack.set(other, array); + + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); } - }, - not(compacted) { - return {anyOf: compacted} - }, - pattern(compacted, paths, mergeSchemas, options, reportUnresolved) { - var key = paths.pop() - reportUnresolved(compacted.map(function(regexp) { - return {[key]: regexp} - })) - }, - multipleOf(compacted) { - var integers = compacted.slice(0) - var factor = 1 - while (integers.some(n => !Number.isInteger(n))) { - integers = integers.map(n => n * 10) - factor = factor * 10 + if (compared !== undefined) { + if (compared) { + continue; + } + result = false; + break; } - return computeLcm(integers) / factor - }, - enum(compacted) { - var enums = intersectionWith.apply(null, compacted.concat(isEqual)) - if (enums.length) { - return sortBy(enums) + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; } } + stack['delete'](array); + stack['delete'](other); + return result; } -defaultResolvers.$id = first -defaultResolvers.$ref = first -defaultResolvers.$schema = first -defaultResolvers.additionalItems = schemaResolver -defaultResolvers.additionalProperties = schemaResolver -defaultResolvers.anyOf = defaultResolvers.oneOf -defaultResolvers.contains = schemaResolver -defaultResolvers.default = first -defaultResolvers.definitions = defaultResolvers.dependencies -defaultResolvers.description = first -defaultResolvers.examples = examples -defaultResolvers.exclusiveMaximum = minimumValue -defaultResolvers.exclusiveMinimum = maximumValue -defaultResolvers.maximum = minimumValue -defaultResolvers.maxItems = minimumValue -defaultResolvers.maxLength = minimumValue -defaultResolvers.maxProperties = minimumValue -defaultResolvers.minimum = maximumValue -defaultResolvers.minItems = maximumValue -defaultResolvers.minLength = maximumValue -defaultResolvers.minProperties = maximumValue -defaultResolvers.propertyNames = schemaResolver -defaultResolvers.required = required -defaultResolvers.title = first -defaultResolvers.uniqueItems = uniqueItems +module.exports = equalArrays; -function merger(rootSchema, options, totalSchemas) { - totalSchemas = totalSchemas || [] - options = defaultsDeep(options, { - ignoreAdditionalProperties: false, - resolvers: defaultResolvers - }) - function mergeSchemas(schemas, base, parents) { - schemas = cloneDeep(schemas.filter(notUndefined)) - parents = parents || [] - var merged = isPlainObject(base) - ? base - : {} +/***/ }), +/* 225 */ +/***/ (function(module, exports, __webpack_require__) { - // return undefined, an empty schema - if (!schemas.length) { - return - } +var baseFlatten = __webpack_require__(102), + baseOrderBy = __webpack_require__(425), + baseRest = __webpack_require__(46), + isIterateeCall = __webpack_require__(155); - if (schemas.some(isFalse)) { - return false - } +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); +}); - if (schemas.every(isTrue)) { - return true - } +module.exports = sortBy; - // there are no false and we don't need the true ones as they accept everything - schemas = schemas.filter(isPlainObject) - var allKeys = allUniqueKeys(schemas) +/***/ }), +/* 226 */ +/***/ (function(module, exports, __webpack_require__) { - if (contains(allKeys, 'allOf')) { - return merger({ - allOf: schemas - }, options, totalSchemas) - } +var isObject = __webpack_require__(29); - var propertyKeys = allKeys.filter(isPropertyRelated) - pullAll(allKeys, propertyKeys) +/** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ +function isStrictComparable(value) { + return value === value && !isObject(value); +} - var itemKeys = allKeys.filter(isItemsRelated) - pullAll(allKeys, itemKeys) +module.exports = isStrictComparable; - allKeys.forEach(function(key) { - var values = getValues(schemas, key) - var compacted = uniqWith(values.filter(notUndefined), compareProp(key)) - // arrayprops like anyOf and oneOf must be merged first, as they contains schemas - // allOf is treated differently alltogether - if (compacted.length === 1 && contains(schemaArrays, key)) { - merged[key] = compacted[0].map(function(schema) { - return mergeSchemas([schema], schema) - }) - // prop groups must always be resolved - } else if (compacted.length === 1 && !contains(schemaGroupProps, key) && !contains(schemaProps, key)) { - merged[key] = compacted[0] - } else { - var resolver = options.resolvers[key] || options.resolvers.defaultResolver +/***/ }), +/* 227 */ +/***/ (function(module, exports) { - if (!resolver) { - throw new Error('No resolver found for key ' + key + '. You can provide a resolver for this keyword in the options, or provide a default resolver.') - } +/** + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. + * + * @private + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ +function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; +} - var merger - // get custom merger for groups - if (contains(schemaGroupProps, key) || contains(schemaArrays, key)) { - merger = createRequiredSubMerger(mergeSchemas, key, parents) - } else { - merger = function(schemas) { - return mergeSchemas(schemas, null, parents.concat(key)) - } - } +module.exports = matchesStrictComparable; - var calledWithArray = false - merged[key] = resolver(compacted, parents.concat(key), merger, options, function(unresolvedSchemas) { - calledWithArray = Array.isArray(unresolvedSchemas) - return addToAllOf(unresolvedSchemas) - }) - if (merged[key] === undefined && !calledWithArray) { - throwIncompatible(compacted, parents.concat(key)) - } else if (merged[key] === undefined) { - delete merged[key] - } - } - }) +/***/ }), +/* 228 */ +/***/ (function(module, exports, __webpack_require__) { - Object.assign(merged, callGroupResolver(propertyKeys, 'properties', schemas, mergeSchemas, options, parents)) - Object.assign(merged, callGroupResolver(itemKeys, 'items', schemas, mergeSchemas, options, parents)) +var baseForOwn = __webpack_require__(154), + createBaseEach = __webpack_require__(435); - function addToAllOf(unresolvedSchemas) { - merged.allOf = mergeWithArray(merged.allOf, unresolvedSchemas) - } +/** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ +var baseEach = createBaseEach(baseForOwn); - return merged - } +module.exports = baseEach; - var allSchemas = flattenDeep(getAllOf(rootSchema)) - var merged = mergeSchemas(allSchemas, rootSchema) - return merged -} +/***/ }), +/* 229 */ +/***/ (function(module, exports, __webpack_require__) { -merger.options = { - resolvers: defaultResolvers -} +var createBaseFor = __webpack_require__(434); -module.exports = merger +/** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ +var baseFor = createBaseFor(); + +module.exports = baseFor; /***/ }), -/* 184 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(55), - isObjectLike = __webpack_require__(45); - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; +var baseUniq = __webpack_require__(156); /** - * Checks if `value` is classified as a boolean primitive or object. + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * * @static * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false + * _.uniq([2, 1, 2]); + * // => [2, 1] */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); +function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; } -module.exports = isBoolean; +module.exports = uniq; /***/ }), -/* 185 */ -/***/ (function(module, exports, __webpack_require__) { +/* 231 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; +} -__webpack_require__(469); -module.exports = __webpack_require__(20).Array.fill; +module.exports = baseFindIndex; /***/ }), -/* 186 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { -var arrayMap = __webpack_require__(61), - copyArray = __webpack_require__(123), - isArray = __webpack_require__(30), - isSymbol = __webpack_require__(75), - stringToPath = __webpack_require__(210), - toKey = __webpack_require__(77), - toString = __webpack_require__(156); +var baseUniq = __webpack_require__(156); /** - * Converts `value` to a property path array. + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * * @static * @memberOf _ * @since 4.0.0 - * @category Util - * @param {*} value The value to convert. - * @returns {Array} Returns the new property path array. + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. * @example * - * _.toPath('a.b.c'); - * // => ['a', 'b', 'c'] + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; * - * _.toPath('a[0].b.c'); - * // => ['a', '0', 'b', 'c'] + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ -function toPath(value) { - if (isArray(value)) { - return arrayMap(value, toKey); - } - return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); +function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } -module.exports = toPath; +module.exports = uniqWith; /***/ }), -/* 187 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var arrayMap = __webpack_require__(44), + baseIntersection = __webpack_require__(234), + baseRest = __webpack_require__(46), + castArrayLikeObject = __webpack_require__(235), + last = __webpack_require__(444); +/** + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] + */ +var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); -var compileSchema = __webpack_require__(473) - , resolve = __webpack_require__(176) - , Cache = __webpack_require__(477) - , SchemaObject = __webpack_require__(255) - , stableStringify = __webpack_require__(256) - , formats = __webpack_require__(478) - , rules = __webpack_require__(479) - , $dataMetaSchema = __webpack_require__(500) - , util = __webpack_require__(81); + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; +}); -module.exports = Ajv; +module.exports = intersectionWith; -Ajv.prototype.validate = validate; -Ajv.prototype.compile = compile; -Ajv.prototype.addSchema = addSchema; -Ajv.prototype.addMetaSchema = addMetaSchema; -Ajv.prototype.validateSchema = validateSchema; -Ajv.prototype.getSchema = getSchema; -Ajv.prototype.removeSchema = removeSchema; -Ajv.prototype.addFormat = addFormat; -Ajv.prototype.errorsText = errorsText; -Ajv.prototype._addSchema = _addSchema; -Ajv.prototype._compile = _compile; +/***/ }), +/* 234 */ +/***/ (function(module, exports, __webpack_require__) { -Ajv.prototype.compileAsync = __webpack_require__(501); -var customKeyword = __webpack_require__(502); -Ajv.prototype.addKeyword = customKeyword.add; -Ajv.prototype.getKeyword = customKeyword.get; -Ajv.prototype.removeKeyword = customKeyword.remove; -Ajv.prototype.validateKeyword = customKeyword.validate; - -var errorClasses = __webpack_require__(178); -Ajv.ValidationError = errorClasses.Validation; -Ajv.MissingRefError = errorClasses.MissingRef; -Ajv.$dataMetaSchema = $dataMetaSchema; +var SetCache = __webpack_require__(108), + arrayIncludes = __webpack_require__(157), + arrayIncludesWith = __webpack_require__(158), + arrayMap = __webpack_require__(44), + baseUnary = __webpack_require__(53), + cacheHas = __webpack_require__(109); -var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; - -var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; -var META_SUPPORT_DATA = ['/properties']; +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; /** - * Creates validator instance. - * Usage: `Ajv(opts)` - * @param {Object} opts optional options - * @return {Object} ajv instance + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. */ -function Ajv(opts) { - if (!(this instanceof Ajv)) return new Ajv(opts); - opts = this._opts = util.copy(opts) || {}; - setLogger(this); - this._schemas = {}; - this._refs = {}; - this._fragments = {}; - this._formats = formats(opts.format); +function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; - this._cache = opts.cache || new Cache; - this._loadingSchemas = {}; - this._compilations = []; - this.RULES = rules(); - this._getId = chooseGetId(opts); + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; + } + array = arrays[0]; - opts.loopRequired = opts.loopRequired || Infinity; - if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; - if (opts.serialize === undefined) opts.serialize = stableStringify; - this._metaOpts = getMetaSchemaOptions(this); + var index = -1, + seen = caches[0]; - if (opts.formats) addInitialFormats(this); - if (opts.keywords) addInitialKeywords(this); - addDefaultMetaSchema(this); - if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); - if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); - addInitialSchemas(this); -} + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; +} +module.exports = baseIntersection; -/** - * Validate data using schema - * 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. - * @this Ajv - * @param {String|Object} schemaKeyRef key, ref or schema object - * @param {Any} data to be validated - * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). - */ -function validate(schemaKeyRef, data) { - var v; - if (typeof schemaKeyRef == 'string') { - v = this.getSchema(schemaKeyRef); - if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); - } else { - var schemaObj = this._addSchema(schemaKeyRef); - v = schemaObj.validate || this._compile(schemaObj); - } - var valid = v(data); - if (v.$async !== true) this.errors = v.errors; - return valid; -} +/***/ }), +/* 235 */ +/***/ (function(module, exports, __webpack_require__) { +var isArrayLikeObject = __webpack_require__(111); /** - * Create validating function for passed schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. - * @return {Function} validating function + * Casts `value` to an empty array if it's not an array like object. + * + * @private + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. */ -function compile(schema, _meta) { - var schemaObj = this._addSchema(schema, undefined, _meta); - return schemaObj.validate || this._compile(schemaObj); +function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; } +module.exports = castArrayLikeObject; -/** - * Adds schema to the instance. - * @this Ajv - * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. - * @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`. - * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. - * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - * @return {Ajv} this for method chaining - */ -function addSchema(schema, key, _skipValidation, _meta) { - if (Array.isArray(schema)){ - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ -function errorsText(errors, options) { - errors = errors || this.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; - - var text = ''; - for (var i=0; i [2, 1] - */ -var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); -}); - -module.exports = union; +var toInteger = __webpack_require__(246); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; /***/ }), -/* 189 */ +/* 246 */ /***/ (function(module, exports) { -var hasExcape = /~/ -var escapeMatcher = /~[01]/g -function escapeReplacer (m) { - switch (m) { - case '~1': return '/' - case '~0': return '~' - } - throw new Error('Invalid tilde escape: ' + m) -} +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; -function untilde (str) { - if (!hasExcape.test(str)) return str - return str.replace(escapeMatcher, escapeReplacer) -} -function setter (obj, pointer, value) { - var part - var hasNextPart +/***/ }), +/* 247 */ +/***/ (function(module, exports, __webpack_require__) { - if (pointer[1] === 'constructor' && pointer[2] === 'prototype') return obj - if (pointer[1] === '__proto__') return obj +// 7.1.15 ToLength +var toInteger = __webpack_require__(246); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; - for (var p = 1, len = pointer.length; p < len;) { - part = untilde(pointer[p++]) - hasNextPart = len > p - if (typeof obj[part] === 'undefined') { - // support setting of /- - if (Array.isArray(obj) && part === '-') { - part = obj.length - } +/***/ }), +/* 248 */ +/***/ (function(module, exports) { - // support nested objects/array when setting values - if (hasNextPart) { - if ((pointer[p] !== '' && pointer[p] < Infinity) || pointer[p] === '-') obj[part] = [] - else obj[part] = {} - } - } +module.exports = function () { /* empty */ }; - if (!hasNextPart) break - obj = obj[part] - } - var oldValue = obj[part] - if (value === undefined) delete obj[part] - else obj[part] = value - return oldValue -} +/***/ }), +/* 249 */ +/***/ (function(module, exports) { -function compilePointer (pointer) { - if (typeof pointer === 'string') { - pointer = pointer.split('/') - if (pointer[0] === '') return pointer - throw new Error('Invalid JSON pointer.') - } else if (Array.isArray(pointer)) { - return pointer - } +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; - throw new Error('Invalid JSON pointer.') -} -function get (obj, pointer) { - if (typeof obj !== 'object') throw new Error('Invalid input object.') - pointer = compilePointer(pointer) - var len = pointer.length - if (len === 1) return obj +/***/ }), +/* 250 */ +/***/ (function(module, exports, __webpack_require__) { - for (var p = 1; p < len;) { - obj = obj[untilde(pointer[p++])] - if (len === p) return obj - if (typeof obj !== 'object') return undefined - } -} +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(37); +var aFunction = __webpack_require__(73); +var SPECIES = __webpack_require__(26)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; -function set (obj, pointer, value) { - if (typeof obj !== 'object') throw new Error('Invalid input object.') - pointer = compilePointer(pointer) - if (pointer.length === 0) throw new Error('Invalid JSON pointer for set.') - return setter(obj, pointer, value) -} -function compile (pointer) { - var compiled = compilePointer(pointer) - return { - get: function (object) { - return get(object, compiled) - }, - set: function (object, value) { - return set(object, compiled, value) - } +/***/ }), +/* 251 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(40); +var invoke = __webpack_require__(499); +var html = __webpack_require__(192); +var cel = __webpack_require__(125); +var global = __webpack_require__(24); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(71)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; } } - -exports.get = get -exports.set = set -exports.compile = compile +module.exports = { + set: setTask, + clear: clearTask +}; /***/ }), -/* 190 */ -/***/ (function(module, exports, __webpack_require__) { +/* 252 */ +/***/ (function(module, exports) { -__webpack_require__(510); -module.exports = __webpack_require__(20).Array.includes; +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; /***/ }), -/* 191 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var anObject = __webpack_require__(37); +var isObject = __webpack_require__(34); +var newPromiseCapability = __webpack_require__(163); -module.exports = __webpack_require__(511); +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; /***/ }), -/* 192 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _IconButton = _interopRequireDefault(__webpack_require__(181)); +var util = __webpack_require__(65); -var _react = _interopRequireDefault(__webpack_require__(0)); +module.exports = SchemaObject; -var _propTypes = _interopRequireDefault(__webpack_require__(4)); +function SchemaObject(obj) { + util.copy(obj, this); +} -var types = _interopRequireWildcard(__webpack_require__(64)); -var _utils = __webpack_require__(41); +/***/ }), +/* 255 */ +/***/ (function(module, exports, __webpack_require__) { -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } +"use strict"; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _typeof(obj) { 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); } +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); -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); } } + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + if (node === null) return 'null'; -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } -function _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); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -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); } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } - -function _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; } - -function _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; } - -function _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; } + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); -var REQUIRED_FIELD_SYMBOL = "*"; -var COMPONENT_TYPES = { - array: "ArrayField", - "boolean": "BooleanField", - integer: "NumberField", - number: "NumberField", - object: "ObjectField", - string: "StringField", - "null": "NullField" + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); }; -function getFieldComponent(schema, uiSchema, idSchema, fields) { - var field = uiSchema["ui:field"]; - - if (typeof field === "function") { - return field; - } - - if (typeof field === "string" && field in fields) { - return fields[field]; - } - - var componentName = COMPONENT_TYPES[(0, _utils.getSchemaType)(schema)]; // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't - // render a field and let the MultiSchemaField component handle the form display - - if (!componentName && (schema.anyOf || schema.oneOf)) { - return function () { - return null; - }; - } - - return componentName in fields ? fields[componentName] : function () { - var UnsupportedField = fields.UnsupportedField; - return _react["default"].createElement(UnsupportedField, { - schema: schema, - idSchema: idSchema, - reason: "Unknown field type ".concat(schema.type) - }); - }; -} - -function Label(props) { - var label = props.label, - required = props.required, - id = props.id; - - if (!label) { - return null; - } - - return _react["default"].createElement("label", { - className: "control-label", - htmlFor: id - }, label, required && _react["default"].createElement("span", { - className: "required" - }, REQUIRED_FIELD_SYMBOL)); -} -function LabelInput(props) { - var id = props.id, - label = props.label, - onChange = props.onChange; - return _react["default"].createElement("input", { - className: "form-control", - type: "text", - id: id, - onBlur: function onBlur(event) { - return onChange(event.target.value); - }, - defaultValue: label - }); -} +/***/ }), +/* 256 */ +/***/ (function(module, exports, __webpack_require__) { -function Help(props) { - var help = props.help; +"use strict"; - if (!help) { - return null; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } } - - if (typeof help === "string") { - return _react["default"].createElement("p", { - className: "help-block" - }, help); + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } } - - return _react["default"].createElement("div", { - className: "help-block" - }, help); -} - -function ErrorList(props) { - var _props$errors = props.errors, - errors = _props$errors === void 0 ? [] : _props$errors; - - if (errors.length === 0) { - return null; + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; } - - return _react["default"].createElement("div", null, _react["default"].createElement("ul", { - className: "error-detail bs-callout bs-callout-info" - }, errors.filter(function (elem) { - return !!elem; - }).map(function (error, index) { - return _react["default"].createElement("li", { - className: "text-danger", - key: index - }, error); - }))); -} - -function DefaultTemplate(props) { - var id = props.id, - label = props.label, - children = props.children, - errors = props.errors, - help = props.help, - description = props.description, - hidden = props.hidden, - required = props.required, - displayLabel = props.displayLabel; - - if (hidden) { - return _react["default"].createElement("div", { - className: "hidden" - }, children); + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; } - - return _react["default"].createElement(WrapIfAdditional, props, displayLabel && _react["default"].createElement(Label, { - label: label, - required: required, - id: id - }), displayLabel && description ? description : null, children, errors, help); -} - -if (false) {} - -DefaultTemplate.defaultProps = { - hidden: false, - readonly: false, - required: false, - displayLabel: true -}; - -function WrapIfAdditional(props) { - var id = props.id, - classNames = props.classNames, - disabled = props.disabled, - label = props.label, - onKeyChange = props.onKeyChange, - onDropPropertyClick = props.onDropPropertyClick, - readonly = props.readonly, - required = props.required, - schema = props.schema; - var keyLabel = "".concat(label, " Key"); // i18n ? - - var additional = schema.hasOwnProperty(_utils.ADDITIONAL_PROPERTY_FLAG); - - if (!additional) { - return _react["default"].createElement("div", { - className: classNames - }, props.children); + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } } - - return _react["default"].createElement("div", { - className: classNames - }, _react["default"].createElement("div", { - className: "row" - }, _react["default"].createElement("div", { - className: "col-xs-5 form-additional" - }, _react["default"].createElement("div", { - className: "form-group" - }, _react["default"].createElement(Label, { - label: keyLabel, - required: required, - id: "".concat(id, "-key") - }), _react["default"].createElement(LabelInput, { - label: label, - required: required, - id: "".concat(id, "-key"), - onChange: onKeyChange - }))), _react["default"].createElement("div", { - className: "form-additional form-group col-xs-5" - }, props.children), _react["default"].createElement("div", { - className: "col-xs-2" - }, _react["default"].createElement(_IconButton["default"], { - type: "danger", - icon: "remove", - className: "array-item-remove btn-block", - tabIndex: "-1", - style: { - border: "0" - }, - disabled: disabled || readonly, - onClick: onDropPropertyClick(label) - })))); -} - -function SchemaFieldRender(props) { - var uiSchema = props.uiSchema, - formData = props.formData, - errorSchema = props.errorSchema, - idPrefix = props.idPrefix, - name = props.name, - onKeyChange = props.onKeyChange, - onDropPropertyClick = props.onDropPropertyClick, - required = props.required, - _props$registry = props.registry, - registry = _props$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _props$registry, - _props$wasPropertyKey = props.wasPropertyKeyModified, - wasPropertyKeyModified = _props$wasPropertyKey === void 0 ? false : _props$wasPropertyKey; - var rootSchema = registry.rootSchema, - fields = registry.fields, - formContext = registry.formContext; - var FieldTemplate = uiSchema["ui:FieldTemplate"] || registry.FieldTemplate || DefaultTemplate; - var idSchema = props.idSchema; - var schema = (0, _utils.retrieveSchema)(props.schema, rootSchema, formData); - idSchema = (0, _utils.mergeObjects)((0, _utils.toIdSchema)(schema, null, rootSchema, formData, idPrefix), idSchema); - var FieldComponent = getFieldComponent(schema, uiSchema, idSchema, fields); - var DescriptionField = fields.DescriptionField; - var disabled = Boolean(props.disabled || uiSchema["ui:disabled"]); - var readonly = Boolean(props.readonly || uiSchema["ui:readonly"] || props.schema.readOnly || schema.readOnly); - var autofocus = Boolean(props.autofocus || uiSchema["ui:autofocus"]); - - if (Object.keys(schema).length === 0) { - return null; + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; } - - var displayLabel = (0, _utils.getDisplayLabel)(schema, uiSchema, rootSchema); - - var __errors = errorSchema.__errors, - fieldErrorSchema = _objectWithoutProperties(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components - - - var field = _react["default"].createElement(FieldComponent, _extends({}, props, { - idSchema: idSchema, - schema: schema, - uiSchema: _objectSpread({}, uiSchema, { - classNames: undefined - }), - disabled: disabled, - readonly: readonly, - autofocus: autofocus, - errorSchema: fieldErrorSchema, - formContext: formContext, - rawErrors: __errors - })); - - var id = idSchema.$id; // If this schema has a title defined, but the user has set a new key/label, retain their input. - - var label; - - if (wasPropertyKeyModified) { - label = name; - } else { - label = uiSchema["ui:title"] || props.schema.title || schema.title || name; + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } } - - var description = uiSchema["ui:description"] || props.schema.description || schema.description; - var errors = __errors; - var help = uiSchema["ui:help"]; - var hidden = uiSchema["ui:widget"] === "hidden"; - var classNames = ["form-group", "field", "field-".concat(schema.type), errors && errors.length > 0 ? "field-error has-error has-danger" : "", uiSchema.classNames].join(" ").trim(); - var fieldProps = { - description: _react["default"].createElement(DescriptionField, { - id: id + "__description", - description: description, - formContext: formContext - }), - rawDescription: description, - help: _react["default"].createElement(Help, { - help: help - }), - rawHelp: typeof help === "string" ? help : undefined, - errors: _react["default"].createElement(ErrorList, { - errors: errors - }), - rawErrors: errors, - id: id, - label: label, - hidden: hidden, - onKeyChange: onKeyChange, - onDropPropertyClick: onDropPropertyClick, - required: required, - disabled: disabled, - readonly: readonly, - displayLabel: displayLabel, - classNames: classNames, - formContext: formContext, - fields: fields, - schema: schema, - uiSchema: uiSchema, - registry: registry - }; - var _AnyOfField = registry.fields.AnyOfField; - var _OneOfField = registry.fields.OneOfField; - return _react["default"].createElement(FieldTemplate, fieldProps, _react["default"].createElement(_react["default"].Fragment, null, field, schema.anyOf && !(0, _utils.isSelect)(schema) && _react["default"].createElement(_AnyOfField, { - disabled: disabled, - errorSchema: errorSchema, - formData: formData, - idPrefix: idPrefix, - idSchema: idSchema, - onBlur: props.onBlur, - onChange: props.onChange, - onFocus: props.onFocus, - options: schema.anyOf, - baseType: schema.type, - registry: registry, - schema: schema, - uiSchema: uiSchema - }), schema.oneOf && !(0, _utils.isSelect)(schema) && _react["default"].createElement(_OneOfField, { - disabled: disabled, - errorSchema: errorSchema, - formData: formData, - idPrefix: idPrefix, - idSchema: idSchema, - onBlur: props.onBlur, - onChange: props.onChange, - onFocus: props.onFocus, - options: schema.oneOf, - baseType: schema.type, - registry: registry, - schema: schema, - uiSchema: uiSchema - }))); -} - -var SchemaField = -/*#__PURE__*/ -function (_React$Component) { - _inherits(SchemaField, _React$Component); - - function SchemaField() { - _classCallCheck(this, SchemaField); - - return _possibleConstructorReturn(this, _getPrototypeOf(SchemaField).apply(this, arguments)); + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); } - - _createClass(SchemaField, [{ - key: "shouldComponentUpdate", - value: function shouldComponentUpdate(nextProps, nextState) { - return !(0, _utils.deepEquals)(this.props, nextProps); - } - }, { - key: "render", - value: function render() { - return SchemaFieldRender(this.props); + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); } - }]); - - return SchemaField; -}(_react["default"].Component); - -SchemaField.defaultProps = { - uiSchema: {}, - errorSchema: {}, - idSchema: {}, - disabled: false, - readonly: false, - autofocus: false -}; - -if (false) {} - -var _default = SchemaField; -exports["default"] = _default; - -/***/ }), -/* 193 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(322); - -/***/ }), -/* 194 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(391); - -/***/ }), -/* 195 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(520); - -/***/ }), -/* 196 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayEach = __webpack_require__(165), - baseCreate = __webpack_require__(236), - baseForOwn = __webpack_require__(170), - baseIteratee = __webpack_require__(102), - getPrototype = __webpack_require__(124), - isArray = __webpack_require__(30), - isBuffer = __webpack_require__(78), - isFunction = __webpack_require__(23), - isObject = __webpack_require__(44), - isTypedArray = __webpack_require__(99); - -/** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. - * @example - * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] - * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } - */ -function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); - - iteratee = baseIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; } } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; -} - -module.exports = transform; - - -/***/ }), -/* 197 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Scheduler; }); -/* harmony import */ var _virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); - -var defaultOptions = { - deferEvents: false -}; - -var Scheduler = -/*#__PURE__*/ - -/** @class */ -function () { - function Scheduler(options) { - this.processingEvent = false; - this.queue = []; - this.initialized = false; - this.options = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, defaultOptions), options); - } - - Scheduler.prototype.initialize = function (callback) { - this.initialized = true; - - if (callback) { - if (!this.options.deferEvents) { - this.schedule(callback); - return; + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); } - - this.process(callback); - } - - this.flushEvents(); - }; - - Scheduler.prototype.schedule = function (task) { - if (!this.initialized || this.processingEvent) { - this.queue.push(task); - return; + out += ') { '; + $closingBraces2 += '}'; } - - if (this.queue.length !== 0) { - throw new Error('Event queue should be empty when it is not processing events'); + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } } - - this.process(task); - this.flushEvents(); - }; - - Scheduler.prototype.clear = function () { - this.queue = []; - }; - - Scheduler.prototype.flushEvents = function () { - var nextCallback = this.queue.shift(); - - while (nextCallback) { - this.process(nextCallback); - nextCallback = this.queue.shift(); + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; } - }; - - Scheduler.prototype.process = function (callback) { - this.processingEvent = true; + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } - try { - callback(); - } catch (e) { - // there is no use to keep the future events - // as the situation is not anymore the same - this.clear(); - throw e; - } finally { - this.processingEvent = false; - } - }; + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } - return Scheduler; -}(); + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} /***/ }), -/* 198 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(199))) - -/***/ }), -/* 199 */ -/***/ (function(module, exports) { - -var g; +"use strict"; -// This works in non-strict mode -g = (function() { - return this; -})(); +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + 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) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; + +/***/ }), +/* 258 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; } -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} -module.exports = g; +/***/ }), +/* 259 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} /***/ }), -/* 200 */ +/* 260 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), +/* 261 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Core schema meta-schema\",\"definitions\":{\"schemaArray\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#\"}},\"nonNegativeInteger\":{\"type\":\"integer\",\"minimum\":0},\"nonNegativeIntegerDefault0\":{\"allOf\":[{\"$ref\":\"#/definitions/nonNegativeInteger\"},{\"default\":0}]},\"simpleTypes\":{\"enum\":[\"array\",\"boolean\",\"integer\",\"null\",\"number\",\"object\",\"string\"]},\"stringArray\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true,\"default\":[]}},\"type\":[\"object\",\"boolean\"],\"properties\":{\"$id\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$schema\":{\"type\":\"string\",\"format\":\"uri\"},\"$ref\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$comment\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"description\":{\"type\":\"string\"},\"default\":true,\"readOnly\":{\"type\":\"boolean\",\"default\":false},\"examples\":{\"type\":\"array\",\"items\":true},\"multipleOf\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"maximum\":{\"type\":\"number\"},\"exclusiveMaximum\":{\"type\":\"number\"},\"minimum\":{\"type\":\"number\"},\"exclusiveMinimum\":{\"type\":\"number\"},\"maxLength\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minLength\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"pattern\":{\"type\":\"string\",\"format\":\"regex\"},\"additionalItems\":{\"$ref\":\"#\"},\"items\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/schemaArray\"}],\"default\":true},\"maxItems\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minItems\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"uniqueItems\":{\"type\":\"boolean\",\"default\":false},\"contains\":{\"$ref\":\"#\"},\"maxProperties\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minProperties\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"required\":{\"$ref\":\"#/definitions/stringArray\"},\"additionalProperties\":{\"$ref\":\"#\"},\"definitions\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"properties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"patternProperties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"propertyNames\":{\"format\":\"regex\"},\"default\":{}},\"dependencies\":{\"type\":\"object\",\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/stringArray\"}]}},\"propertyNames\":{\"$ref\":\"#\"},\"const\":true,\"enum\":{\"type\":\"array\",\"items\":true,\"minItems\":1,\"uniqueItems\":true},\"type\":{\"anyOf\":[{\"$ref\":\"#/definitions/simpleTypes\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/simpleTypes\"},\"minItems\":1,\"uniqueItems\":true}]},\"format\":{\"type\":\"string\"},\"contentMediaType\":{\"type\":\"string\"},\"contentEncoding\":{\"type\":\"string\"},\"if\":{\"$ref\":\"#\"},\"then\":{\"$ref\":\"#\"},\"else\":{\"$ref\":\"#\"},\"allOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"anyOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"oneOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"not\":{\"$ref\":\"#\"}},\"default\":true}"); + +/***/ }), +/* 262 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = !__webpack_require__(49) && !__webpack_require__(58)(function () { - return Object.defineProperty(__webpack_require__(140)('div'), 'a', { get: function () { return 7; } }).a != 7; +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true }); +exports["default"] = AddButton; + +var _react = _interopRequireDefault(__webpack_require__(0)); + +var _IconButton = _interopRequireDefault(__webpack_require__(168)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function AddButton(_ref) { + var className = _ref.className, + onClick = _ref.onClick, + disabled = _ref.disabled; + return _react["default"].createElement("div", { + className: "row" + }, _react["default"].createElement("p", { + className: "col-xs-3 col-xs-offset-9 text-right ".concat(className) + }, _react["default"].createElement(_IconButton["default"], { + type: "info", + icon: "plus", + className: "btn-add col-xs-12", + "aria-label": "Add", + tabIndex: "0", + onClick: onClick, + disabled: disabled + }))); +} /***/ }), -/* 201 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -// ECMAScript 6 symbols shim -var global = __webpack_require__(37); -var has = __webpack_require__(67); -var DESCRIPTORS = __webpack_require__(49); -var $export = __webpack_require__(27); -var redefine = __webpack_require__(202); -var META = __webpack_require__(142).KEY; -var $fails = __webpack_require__(58); -var shared = __webpack_require__(143); -var setToStringTag = __webpack_require__(92); -var uid = __webpack_require__(108); -var wks = __webpack_require__(40); -var wksExt = __webpack_require__(109); -var wksDefine = __webpack_require__(144); -var enumKeys = __webpack_require__(306); -var isArray = __webpack_require__(149); -var anObject = __webpack_require__(53); -var isObject = __webpack_require__(48); -var toObject = __webpack_require__(60); -var toIObject = __webpack_require__(66); -var toPrimitive = __webpack_require__(139); -var createDesc = __webpack_require__(89); -var _create = __webpack_require__(110); -var gOPNExt = __webpack_require__(308); -var $GOPD = __webpack_require__(138); -var $GOPS = __webpack_require__(148); -var $DP = __webpack_require__(50); -var $keys = __webpack_require__(93); -var gOPD = $GOPD.f; -var dP = $DP.f; -var gOPN = gOPNExt.f; -var $Symbol = global.Symbol; -var $JSON = global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE = 'prototype'; -var HIDDEN = wks('_hidden'); -var TO_PRIMITIVE = wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = shared('symbol-registry'); -var AllSymbols = shared('symbols'); -var OPSymbols = shared('op-symbols'); -var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f; -var QObject = global.QObject; -// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 -var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; -// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 -var setSymbolDesc = DESCRIPTORS && $fails(function () { - return _create(dP({}, 'a', { - get: function () { return dP(this, 'a', { value: 7 }).a; } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD(ObjectProto, key); - if (protoDesc) delete ObjectProto[key]; - dP(it, key, D); - if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); -} : dP; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; -var wrap = function (tag) { - var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); - sym._k = tag; - return sym; -}; +var _react = _interopRequireWildcard(__webpack_require__(0)); -var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { - return typeof it == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; +var _propTypes = _interopRequireDefault(__webpack_require__(3)); -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto) $defineProperty(OPSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); - if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _create(D, { enumerable: createDesc(0, false) }); - } return setSymbolDesc(it, key, D); - } return dP(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) $defineProperty(it, key = keys[i++], P[key]); - return it; -}; -var $create = function create(it, P) { - return P === undefined ? _create(it) : $defineProperties(_create(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = toPrimitive(key, true)); - if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIObject(it); - key = toPrimitive(key, true); - if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; - var D = gOPD(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN(toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto; - var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); - } return result; -}; - -// 19.4.1.1 Symbol([description]) -if (!USE_NATIVE) { - $Symbol = function Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function (value) { - if (this === ObjectProto) $set.call(OPSymbols, value); - if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - }; - if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); - return wrap(tag); - }; - redefine($Symbol[PROTOTYPE], 'toString', function toString() { - return this._k; - }); - - $GOPD.f = $getOwnPropertyDescriptor; - $DP.f = $defineProperty; - __webpack_require__(207).f = gOPNExt.f = $getOwnPropertyNames; - __webpack_require__(107).f = $propertyIsEnumerable; - $GOPS.f = $getOwnPropertySymbols; +var _utils = __webpack_require__(27); - if (DESCRIPTORS && !__webpack_require__(91)) { - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - wksExt.f = function (name) { - return wrap(wks(name)); - }; -} +function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); +function _typeof(obj) { 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); } -for (var es6Symbols = ( - // 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 - 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' -).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); +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); } -for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { - // 19.4.2.1 Symbol.for(key) - 'for': function (key) { - return has(SymbolRegistry, key += '') - ? SymbolRegistry[key] - : SymbolRegistry[key] = $Symbol(key); - }, - // 19.4.2.5 Symbol.keyFor(sym) - keyFor: function keyFor(sym) { - if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); - for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; - }, - useSetter: function () { setter = true; }, - useSimple: function () { setter = false; } -}); +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); } } -$export($export.S + $export.F * !USE_NATIVE, 'Object', { - // 19.1.2.2 Object.create(O [, Properties]) - create: $create, - // 19.1.2.4 Object.defineProperty(O, P, Attributes) - defineProperty: $defineProperty, - // 19.1.2.3 Object.defineProperties(O, Properties) - defineProperties: $defineProperties, - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - // 19.1.2.7 Object.getOwnPropertyNames(O) - getOwnPropertyNames: $getOwnPropertyNames, - // 19.1.2.8 Object.getOwnPropertySymbols(O) - getOwnPropertySymbols: $getOwnPropertySymbols -}); +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives -// https://bugs.chromium.org/p/v8/issues/detail?id=3443 -var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); }); +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } -$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', { - getOwnPropertySymbols: function getOwnPropertySymbols(it) { - return $GOPS.f(toObject(it)); - } -}); +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } -// 24.3.2 JSON.stringify(value [, replacer [, space]]) -$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { - var S = $Symbol(); - // MS Edge converts symbol values to JSON as {} - // WebKit converts symbol values to JSON as null - // V8 throws on boxed symbols - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) args.push(arguments[i++]); - $replacer = replacer = args[1]; - if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined - if (!isArray(replacer)) replacer = function (key, value) { - if (typeof $replacer == 'function') value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } -}); +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(59)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); -// 19.4.3.5 Symbol.prototype[@@toStringTag] -setToStringTag($Symbol, 'Symbol'); -// 20.2.1.9 Math[@@toStringTag] -setToStringTag(Math, 'Math', true); -// 24.3.3 JSON[@@toStringTag] -setToStringTag(global.JSON, 'JSON', true); +function _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); } +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -/***/ }), -/* 202 */ -/***/ (function(module, exports, __webpack_require__) { +function _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; } -module.exports = __webpack_require__(59); +function rangeOptions(start, stop) { + var options = []; + for (var i = start; i <= stop; i++) { + options.push({ + value: i, + label: (0, _utils.pad)(i, 2) + }); + } -/***/ }), -/* 203 */ -/***/ (function(module, exports, __webpack_require__) { + return options; +} -var has = __webpack_require__(67); -var toIObject = __webpack_require__(66); -var arrayIndexOf = __webpack_require__(204)(false); -var IE_PROTO = __webpack_require__(146)('IE_PROTO'); +function readyForChange(state) { + return Object.keys(state).every(function (key) { + return state[key] !== -1; + }); +} -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; +function DateElement(props) { + var type = props.type, + range = props.range, + value = props.value, + select = props.select, + rootId = props.rootId, + disabled = props.disabled, + readonly = props.readonly, + autofocus = props.autofocus, + registry = props.registry, + onBlur = props.onBlur; + var id = rootId + "_" + type; + var SelectWidget = registry.widgets.SelectWidget; + return _react["default"].createElement(SelectWidget, { + schema: { + type: "integer" + }, + id: id, + className: "form-control", + options: { + enumOptions: rangeOptions(range[0], range[1]) + }, + placeholder: type, + value: value, + disabled: disabled, + readonly: readonly, + autofocus: autofocus, + onChange: function onChange(value) { + return select(type, value); + }, + onBlur: onBlur + }); +} +var AltDateWidget = +/*#__PURE__*/ +function (_Component) { + _inherits(AltDateWidget, _Component); -/***/ }), -/* 204 */ -/***/ (function(module, exports, __webpack_require__) { + function AltDateWidget(props) { + var _this; -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__(66); -var toLength = __webpack_require__(94); -var toAbsoluteIndex = __webpack_require__(205); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; + _classCallCheck(this, AltDateWidget); + _this = _possibleConstructorReturn(this, _getPrototypeOf(AltDateWidget).call(this, props)); -/***/ }), -/* 205 */ -/***/ (function(module, exports, __webpack_require__) { + _defineProperty(_assertThisInitialized(_this), "onChange", function (property, value) { + _this.setState(_defineProperty({}, property, typeof value === "undefined" ? -1 : value), function () { + // Only propagate to parent state if we have a complete date{time} + if (readyForChange(_this.state)) { + _this.props.onChange((0, _utils.toDateString)(_this.state, _this.props.time)); + } + }); + }); -var toInteger = __webpack_require__(145); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; + _defineProperty(_assertThisInitialized(_this), "setNow", function (event) { + event.preventDefault(); + var _this$props = _this.props, + time = _this$props.time, + disabled = _this$props.disabled, + readonly = _this$props.readonly, + onChange = _this$props.onChange; + if (disabled || readonly) { + return; + } -/***/ }), -/* 206 */ -/***/ (function(module, exports, __webpack_require__) { + var nowDateObj = (0, _utils.parseDateString)(new Date().toJSON(), time); -var document = __webpack_require__(37).document; -module.exports = document && document.documentElement; + _this.setState(nowDateObj, function () { + return onChange((0, _utils.toDateString)(_this.state, time)); + }); + }); + _defineProperty(_assertThisInitialized(_this), "clear", function (event) { + event.preventDefault(); + var _this$props2 = _this.props, + time = _this$props2.time, + disabled = _this$props2.disabled, + readonly = _this$props2.readonly, + onChange = _this$props2.onChange; -/***/ }), -/* 207 */ -/***/ (function(module, exports, __webpack_require__) { + if (disabled || readonly) { + return; + } -// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(203); -var hiddenKeys = __webpack_require__(147).concat('length', 'prototype'); + _this.setState((0, _utils.parseDateString)("", time), function () { + return onChange(undefined); + }); + }); -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; + _this.state = (0, _utils.parseDateString)(props.value, props.time); + return _this; + } + _createClass(AltDateWidget, [{ + key: "UNSAFE_componentWillReceiveProps", + value: function UNSAFE_componentWillReceiveProps(nextProps) { + this.setState((0, _utils.parseDateString)(nextProps.value, nextProps.time)); + } + }, { + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + return (0, _utils.shouldRender)(this, nextProps, nextState); + } + }, { + key: "render", + value: function render() { + var _this2 = this; -/***/ }), -/* 208 */ -/***/ (function(module, exports, __webpack_require__) { + var _this$props3 = this.props, + id = _this$props3.id, + disabled = _this$props3.disabled, + readonly = _this$props3.readonly, + autofocus = _this$props3.autofocus, + registry = _this$props3.registry, + onBlur = _this$props3.onBlur, + options = _this$props3.options; + return _react["default"].createElement("ul", { + className: "list-inline" + }, this.dateElementProps.map(function (elemProps, i) { + return _react["default"].createElement("li", { + key: i + }, _react["default"].createElement(DateElement, _extends({ + rootId: id, + select: _this2.onChange + }, elemProps, { + disabled: disabled, + readonly: readonly, + registry: registry, + onBlur: onBlur, + autofocus: autofocus && i === 0 + }))); + }), (options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && _react["default"].createElement("li", null, _react["default"].createElement("a", { + href: "#", + className: "btn btn-info btn-now", + onClick: this.setNow + }, "Now")), (options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && _react["default"].createElement("li", null, _react["default"].createElement("a", { + href: "#", + className: "btn btn-warning btn-clear", + onClick: this.clear + }, "Clear"))); + } + }, { + key: "dateElementProps", + get: function get() { + var _this$props4 = this.props, + time = _this$props4.time, + options = _this$props4.options; + var _this$state = this.state, + year = _this$state.year, + month = _this$state.month, + day = _this$state.day, + hour = _this$state.hour, + minute = _this$state.minute, + second = _this$state.second; + var data = [{ + type: "year", + range: options.yearsRange, + value: year + }, { + type: "month", + range: [1, 12], + value: month + }, { + type: "day", + range: [1, 31], + value: day + }]; -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(67); -var toObject = __webpack_require__(60); -var IE_PROTO = __webpack_require__(146)('IE_PROTO'); -var ObjectProto = Object.prototype; + if (time) { + data.push({ + type: "hour", + range: [0, 23], + value: hour + }, { + type: "minute", + range: [0, 59], + value: minute + }, { + type: "second", + range: [0, 59], + value: second + }); + } -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; + return data; + } + }]); + return AltDateWidget; +}(_react.Component); -/***/ }), -/* 209 */ -/***/ (function(module, exports) { +_defineProperty(AltDateWidget, "defaultProps", { + time: false, + disabled: false, + readonly: false, + autofocus: false, + options: { + yearsRange: [1900, new Date().getFullYear() + 2] + } +}); -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; +if (false) {} +var _default = AltDateWidget; +exports["default"] = _default; /***/ }), -/* 210 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { -var memoizeCapped = __webpack_require__(333); +var arrayLikeToArray = __webpack_require__(265); -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +function _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); +} -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; +module.exports = _unsupportedIterableToArray; -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); +/***/ }), +/* 265 */ +/***/ (function(module, exports) { + +function _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]; } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); -module.exports = stringToPath; + return arr2; +} +module.exports = _arrayLikeToArray; /***/ }), -/* 211 */ -/***/ (function(module, exports) { - -/** Used for built-in method references. */ -var funcProto = Function.prototype; +/* 266 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; +var toFinite = __webpack_require__(583); /** - * Converts `func` to its source code. + * Converts `value` to an integer. * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 + */ +function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; +} + +module.exports = toInteger; + + +/***/ }), +/* 267 */ +/***/ (function(module, exports) { + +function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); } - return ''; + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); } -module.exports = toSource; +module.exports = _taggedTemplateLiteral; + +/***/ }), +/* 268 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = __webpack_require__(295); /***/ }), -/* 212 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(72), - arrayMap = __webpack_require__(61), - isArray = __webpack_require__(30), - isSymbol = __webpack_require__(75); +module.exports = __webpack_require__(309); -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; +/***/ }), +/* 270 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; +module.exports = __webpack_require__(322); + +/***/ }), +/* 271 */ +/***/ (function(module, exports, __webpack_require__) { + +var basePick = __webpack_require__(326), + flatRest = __webpack_require__(355); /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. + * Creates an object composed of the picked `object` properties. * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} +var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); +}); -module.exports = baseToString; +module.exports = pick; /***/ }), -/* 213 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(68); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); +module.exports = __webpack_require__(366); -module.exports = defineProperty; +/***/ }), +/* 273 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = __webpack_require__(384); /***/ }), -/* 214 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { -var baseHasIn = __webpack_require__(357), - hasPath = __webpack_require__(358); +module.exports = __webpack_require__(388); + +/***/ }), +/* 275 */ +/***/ (function(module, exports) { /** - * Checks if `path` is a direct or inherited property of `object`. + * Checks if `value` is `null`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. * @example * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); - * - * _.hasIn(object, 'a'); + * _.isNull(null); * // => true * - * _.hasIn(object, 'a.b'); - * // => true + * _.isNull(void 0); + * // => false + */ +function isNull(value) { + return value === null; +} + +module.exports = isNull; + + +/***/ }), +/* 276 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is `undefined`. * - * _.hasIn(object, ['a', 'b']); + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); * // => true * - * _.hasIn(object, 'b'); + * _.isUndefined(null); * // => false */ -function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); +function isUndefined(value) { + return value === undefined; } -module.exports = hasIn; +module.exports = isUndefined; /***/ }), -/* 215 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { -var baseFlatten = __webpack_require__(119); +var baseToString = __webpack_require__(198), + castSlice = __webpack_require__(538), + charsEndIndex = __webpack_require__(540), + charsStartIndex = __webpack_require__(541), + stringToArray = __webpack_require__(542), + toString = __webpack_require__(140); + +/** Used to match leading and trailing whitespace. */ +var reTrim = /^\s+|\s+$/g; /** - * Flattens `array` a single level deep. + * Removes leading and trailing whitespace or specified characters from `string`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. * @example * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] + * _.trim(' abc '); + * // => 'abc' + * + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' + * + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] */ -function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; +function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrim, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); } -module.exports = flatten; +module.exports = trim; /***/ }), -/* 216 */ +/* 278 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__278__; + +/***/ }), +/* 279 */ /***/ (function(module, exports, __webpack_require__) { -var apply = __webpack_require__(217); +var getPrototypeOf = __webpack_require__(13); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; +var setPrototypeOf = __webpack_require__(167); -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); +var isNativeFunction = __webpack_require__(580); - while (++index < length) { - array[index] = args[start + index]; +var construct = __webpack_require__(581); + +function _wrapNativeSuper(Class) { + var _cache = typeof Map === "function" ? new Map() : undefined; + + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { + if (Class === null || !isNativeFunction(Class)) return Class; + + if (typeof Class !== "function") { + throw new TypeError("Super expression must either be null or a function"); } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; + + if (typeof _cache !== "undefined") { + if (_cache.has(Class)) return _cache.get(Class); + + _cache.set(Class, Wrapper); } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); + + function Wrapper() { + return construct(Class, arguments, getPrototypeOf(this).constructor); + } + + Wrapper.prototype = Object.create(Class.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }); + return setPrototypeOf(Wrapper, Class); }; -} -module.exports = overRest; + return _wrapNativeSuper(Class); +} +module.exports = _wrapNativeSuper; /***/ }), -/* 217 */ -/***/ (function(module, exports) { +/* 280 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__(100), + baseForOwn = __webpack_require__(154), + baseIteratee = __webpack_require__(84); /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. + * @static + * @memberOf _ + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); +function mapKeys(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; } -module.exports = apply; +module.exports = mapKeys; /***/ }), -/* 218 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { -var baseSetToString = __webpack_require__(362), - shortOut = __webpack_require__(364); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. +/*! + * + * lattice - v0.89.0 + * JavaScript SDK for all OpenLattice REST APIs + * https://github.com/openlattice/lattice-js + * + * Copyright (c) 2017-2021, OpenLattice, Inc. All rights reserved. + * */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; - +!function(t,e){ true?module.exports=e():undefined}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=73)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r=0&&e<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(i=e,!1!==n&&function(t){var e=(r[t]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(s)+"="+e+";"}catch(t){}}}(e),a.call(o,e,t),"undefined"==typeof console&&e-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){var n=r(6),i=r(89),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,r(43)(t))},function(t,e,r){var n=r(90),i=r(91),o=r(92),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!("string"==typeof t||t instanceof String)){var e=n(t);throw null===t?e="null":"object"===e&&(e=t.constructor.name),new TypeError("Expected a string but received a ".concat(e))}},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(3),i=r(17),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,r){var n=r(133),i=r(145),o=r(147),a=r(148),s=r(149);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){u.headers[t]=n.merge(o)})),t.exports=u}).call(this,r(111))},function(t,e,r){"use strict";var n=r(4),i=r(113),o=r(115),a=r(48),s=r(116),u=r(119),c=r(120),p=r(52);t.exports=function(t){return new Promise((function(e,r){var f=t.data,h=t.headers;n.isFormData(f)&&delete h["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+y)}var v=s(t.baseURL,t.url);if(l.open(t.method.toUpperCase(),a(v,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:t,request:l};i(e,r,o),l=null}},l.onabort=function(){l&&(r(p("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){r(p("Network Error",t,null,l)),l=null},l.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(p(e,t,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var m=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in l&&n.forEach(h,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete h[e]:l.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),t.responseType)try{l.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){l&&(l.abort(),r(t),l=null)})),f||(f=null),l.send(f)}))}},function(t,e,r){"use strict";var n=r(114);t.exports=function(t,e,r,i,o){var a=new Error(t);return n(a,e,r,i,o)}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e){e=e||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(t[i],e[i])}n.forEach(i,(function(t){n.isUndefined(e[t])||(r[t]=u(void 0,e[t]))})),n.forEach(o,c),n.forEach(a,(function(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(void 0,e[i])})),n.forEach(s,(function(n){n in e?r[n]=u(t[n],e[n]):n in t&&(r[n]=u(void 0,t[n]))}));var p=i.concat(o).concat(a).concat(s),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===p.indexOf(t)}));return n.forEach(f,c),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var r in e)void 0===t[r]&&(t[r]=e[r]);return t},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(57),i=r(26),o=r(3),a=r(59),s=r(27),u=r(22);t.exports=function(t,e,r){for(var c=-1,p=(e=n(e,t)).length,f=!1;++c-1&&t%1==0&&tp))return!1;var h=u.get(t),l=u.get(e);if(h&&l)return h==e&&l==t;var d=-1,y=!0,v=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((e=(0,a.default)(e,u)).validate_length&&t.length>=2083)return!1;var r,s,f,h,l,d,y,v;if(y=t.split("#"),t=y.shift(),y=t.split("?"),t=y.shift(),(y=t.split("://")).length>1){if(r=y.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(r))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;y[0]=t.substr(2)}}if(""===(t=y.join("://")))return!1;if(y=t.split("/"),""===(t=y.shift())&&!e.require_host)return!0;if((y=t.split("@")).length>1){if(e.disallow_auth)return!1;if(-1===(s=y.shift()).indexOf(":")||s.indexOf(":")>=0&&s.split(":").length>2)return!1}h=y.join("@"),d=null,v=null;var m=h.match(c);m?(f="",v=m[1],d=m[2]||null):(y=h.split(":"),f=y.shift(),y.length&&(d=y.join(":")));if(null!==d){if(l=parseInt(d,10),!/^[0-9]+$/.test(d)||l<=0||l>65535)return!1}else if(e.require_port)return!1;if(!((0,o.default)(f)||(0,i.default)(f,e)||v&&(0,o.default)(v,6)))return!1;if(f=f||v,e.host_whitelist&&!p(f,e.host_whitelist))return!1;if(e.host_blacklist&&p(f,e.host_blacklist))return!1;return!0};var n=s(r(30)),i=s(r(124)),o=s(r(125)),a=s(r(55));function s(t){return t&&t.__esModule?t:{default:t}}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,validate_length:!0},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function p(t,e){for(var r=0;r=i?t:n(t,e,r)}},function(t,e){t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n-1;);return r}},function(t,e){t.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o-1;);return r}},function(t,e,r){var n=r(103),i=r(104),o=r(105);t.exports=function(t){return i(t)?o(t):n(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),p="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+p+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e,r){"use strict";var n=r(4),i=r(47),o=r(107),a=r(53);function s(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var u=s(r(50));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=r(54),u.CancelToken=r(121),u.isCancel=r(49),u.all=function(t){return Promise.all(t)},u.spread=r(122),u.isAxiosError=r(123),t.exports=u,t.exports.default=u},function(t,e,r){"use strict";var n=r(4),i=r(48),o=r(108),a=r(109),s=r(53);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,r,n){return this.request(s(n||{},{method:t,url:e,data:r}))}})),t.exports=u},function(t,e,r){"use strict";var n=r(4);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,r){"use strict";var n=r(4),i=r(110),o=r(49),a=r(50);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],p=!1,f=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=s(h);p=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var n=r(4);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(54);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,n.default)(t),(e=(0,i.default)(e,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));var r=t.split("."),o=r[r.length-1];if(e.require_tld){if(r.length<2)return!1;if(!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(o))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(o))return!1}if(!e.allow_numeric_tld&&/^\d+$/.test(o))return!1;return r.every((function(t){return!(t.length>63)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(t)&&(!/[\uff01-\uff5e]/.test(t)&&(!/^-|-$/.test(t)&&!(!e.allow_underscores&&/_/.test(t)))))}))};var n=o(r(30)),i=o(r(55));function o(t){return t&&t.__esModule?t:{default:t}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1};t.exports=e.default,t.exports.default=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,i.default)(e),!(r=String(r)))return t(e,4)||t(e,6);if("4"===r){if(!o.test(e))return!1;var n=e.split(".").sort((function(t,e){return t-e}));return n[3]<=255}if("6"===r){var s=[e];if(e.includes("%")){if(2!==(s=e.split("%")).length)return!1;if(!s[0].includes(":"))return!1;if(""===s[1])return!1}var u=s[0].split(":"),c=!1,p=t(u[u.length-1],4),f=p?7:8;if(u.length>f)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(u.shift(),u.shift(),c=!0):"::"===e.substr(e.length-2)&&(u.pop(),u.pop(),c=!0);for(var h=0;h0&&h=1:u.length===f}return!1};var n,i=(n=r(30))&&n.__esModule?n:{default:n};var o=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,a=/^[0-9A-F]{1,4}$/i;t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(127);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},function(t,e,r){var n=r(128);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,r){var n=r(15),i=r(17),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},function(t,e,r){var n=r(131),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)})),e}));t.exports=a},function(t,e,r){var n=r(132);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(32);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(134),i=r(19),o=r(25);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(135),i=r(136),o=r(137),a=r(138),s=r(139);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}},function(t,e,r){var n=r(20);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(21);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(21);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(151);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(12),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(153),i=r(33);t.exports=function(t,e){return t&&n(t,e,i)}},function(t,e,r){var n=r(154)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t,e,r){var n=r(156),i=r(26),o=r(3),a=r(28),s=r(59),u=r(29),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),p=!r&&i(t),f=!r&&!p&&a(t),h=!r&&!p&&!f&&u(t),l=r||p||f||h,d=l?n(t.length,String):[],y=d.length;for(var v in t)!e&&!c.call(t,v)||l&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||d.push(v);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?k(t)+e:e}function M(){return!0}function N(t,e,r){return(0===t&&!K(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function q(t,e){return L(t,e,0)}function C(t,e){return L(t,e,e)}function L(t,e,r){return void 0===t?r:K(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function K(t){return t<0||0===t&&1/t==-1/0}function B(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function F(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function V(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function J(t){return F(t)||V(t)}var G=function(t){return B(t)?t:ht(t)},W=function(t){function e(t){return F(t)?t:lt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),H=function(t){function e(t){return V(t)?t:dt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),Q=function(t){function e(t){return B(t)&&!J(t)?t:yt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G);G.Keyed=W,G.Indexed=H,G.Set=Q;function $(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function X(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function Z(t){return B(t)||X(t)}var Y="@@__IMMUTABLE_ORDERED__@@";function tt(t){return Boolean(t&&t[Y])}var et="function"==typeof Symbol&&Symbol.iterator,rt=et||"@@iterator",nt=function(t){this.next=t};function it(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function ot(){return{value:void 0,done:!0}}function at(t){return!!ct(t)}function st(t){return t&&"function"==typeof t.next}function ut(t){var e=ct(t);return e&&e.call(t)}function ct(t){var e=t&&(et&&t[et]||t["@@iterator"]);if("function"==typeof e)return e}nt.prototype.toString=function(){return"[Iterator]"},nt.KEYS=0,nt.VALUES=1,nt.ENTRIES=2,nt.prototype.inspect=nt.prototype.toSource=function(){return this.toString()},nt.prototype[rt]=function(){return this};var pt=Object.prototype.hasOwnProperty;function ft(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var ht=function(t){function e(t){return null==t?bt():Z(t)?t.toSeq():function(t){var e=jt(t);if(e)return e;if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return it(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(G),lt=function(t){function e(t){return null==t?bt().toKeyedSeq():B(t)?F(t)?t.toSeq():t.fromEntrySeq():X(t)?t.toSeq():wt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ht),dt=function(t){function e(t){return null==t?bt():B(t)?F(t)?t.entrySeq():t.toIndexedSeq():X(t)?t.toSeq().entrySeq():It(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(ht),yt=function(t){function e(t){return(B(t)&&!J(t)?t:dt(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(ht);ht.isSeq=$,ht.Keyed=lt,ht.Set=yt,ht.Indexed=dt,ht.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var vt=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[R(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return it(t,o,r[o])}))},e}(dt),mt=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return pt.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[e?i-++o:o++];if(!1===t(r[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new nt((function(){if(o===i)return{value:void 0,done:!0};var a=n[e?i-++o:o++];return it(t,a,r[a])}))},e}(lt);mt.prototype[Y]=!0;var gt,_t=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=ut(this._collection),n=0;if(st(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=ut(this._collection);if(!st(r))return new nt(ot);var n=0;return new nt((function(){var e=r.next();return e.done?e:it(t,n++,e.value)}))},e}(dt);function bt(){return gt||(gt=new vt([]))}function wt(t){var e=Array.isArray(t)?new vt(t):at(t)?new _t(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function It(t){var e=jt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function jt(t){return ft(t)?new vt(t):at(t)?new _t(t):void 0}function Et(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Tt(t){return Et(t)&&tt(t)}function St(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function At(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(St(t)&&St(e)&&t.equals(e))}var Pt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function Ot(t){return t>>>1&1073741824|3221225471&t}function Dt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return Ot(r)}if("string"===e)return t.length>qt?function(t){var e=Kt[t];void 0===e&&(e=Ut(t),Lt===Ct&&(Lt=0,Kt={}),Lt++,Kt[t]=e);return e}(t):Ut(t);if("function"==typeof t.hashCode)return Ot(t.hashCode());if("object"===e||"function"===e)return function(t){var e;if(Rt&&void 0!==(e=kt.get(t)))return e;if(void 0!==(e=t[Nt]))return e;if(!xt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Nt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++Mt,1073741824&Mt&&(Mt=0);if(Rt)kt.set(t,e);else{if(void 0!==zt&&!1===zt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(xt)Object.defineProperty(t,Nt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Nt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Nt]=e}}return e}(t);if("function"==typeof t.toString)return Ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ut(t){for(var e=0,r=0;r=0&&(c.get=function(e,r){return(e=R(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return n||1===e||t.done?t:it(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Xt(t,e,r,n){var i=se(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,c=0;return new nt((function(){var t,o,p;do{if((t=s.next()).done)return n||1===i?t:it(i,c++,0===i?void 0:t.value[1],t);var f=t.value;o=f[0],p=f[1],u&&(u=e.call(r,p,o,a))}while(u);return 2===i?t:it(i,o,p,t)}))},i}function Zt(t,e){var r=F(t),n=[t].concat(e).map((function(t){return B(t)?r&&(t=W(t)):t=r?wt(t):It(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&F(i)||V(t)&&V(i))return i}var o=new vt(n);return r?o=o.toKeyedSeq():V(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}function Yt(t,e,r){var n=se(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,c){u.__iterate((function(o,u){return(!e||c0}function ne(t,e,r,n){var i=se(t),o=new vt(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=G(t),ut(i?t.reverse():t)})),a=0,s=!1;return new nt((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:it(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function ie(t,e){return t===e?t:$(t)?e:t.constructor(e)}function oe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ae(t){return F(t)?W:V(t)?H:Q}function se(t){return Object.create((F(t)?lt:V(t)?dt:yt).prototype)}function ue(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ht.prototype.cacheResult.call(this)}function ce(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return ze(this,e,t)}function ze(t,e,r){for(var n=[],i=0;i0;)e[r]=arguments[r+1];return xe(this,e,t)}function Ne(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return ke(t,e)}))}function qe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return xe(t,e)}))}function Ce(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Le(){return this.__ownerID?this:this.__ensureOwner(new x)}function Ke(){return this.__ensureOwner()}function Be(){return this.__altered}Ft.prototype.cacheResult=Bt.prototype.cacheResult=Vt.prototype.cacheResult=Jt.prototype.cacheResult=ue;var Fe=function(t){function e(e){return null==e?er():Et(e)&&!tt(e)?e:er().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return er().withMutations((function(e){for(var r=0;r=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return rr(this,t,e)},e.prototype.remove=function(t){return rr(this,t,U)},e.prototype.deleteAll=function(t){var e=G(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):er()},e.prototype.sort=function(t){return Sr(te(this,t))},e.prototype.sortBy=function(t,e){return Sr(te(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(r){r.forEach((function(n,i){r.set(i,t.call(e,n,i,r))}))}))},e.prototype.__iterator=function(t,e){return new Xe(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?tr(this.size,this._root,t,this.__hash):0===this.size?er():(this.__ownerID=t,this.__altered=!1,this)},e}(W);Fe.isMap=Et;var Ve=Fe.prototype;Ve["@@__IMMUTABLE_MAP__@@"]=!0,Ve.delete=Ve.remove,Ve.removeAll=Ve.deleteAll,Ve.setIn=Ee,Ve.removeIn=Ve.deleteIn=Se,Ve.update=Pe,Ve.updateIn=Oe,Ve.merge=Ve.concat=De,Ve.mergeWith=Ue,Ve.mergeDeep=Re,Ve.mergeDeepWith=Me,Ve.mergeIn=Ne,Ve.mergeDeepIn=qe,Ve.withMutations=Ce,Ve.wasAltered=Be,Ve.asImmutable=Ke,Ve["@@transducer/init"]=Ve.asMutable=Le,Ve["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Ve["@@transducer/result"]=function(t){return t.asImmutable()};var Je=function(t,e){this.ownerID=t,this.entries=e};Je.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o=ur)return function(t,e,r,n){t||(t=new x);for(var i=new Qe(t,Dt(r),[r,n]),o=0;o>>t)),o=this.bitmap;return 0==(o&i)?n:this.nodes[ar(o&i-1)].get(t+5,e,r,n)},Ge.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=1<=cr)return function(t,e,r,n,i){for(var o=0,a=new Array(32),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[o++]:void 0;return a[n]=i,new We(t,o+1,a)}(t,h,c,s,d);if(p&&!d&&2===h.length&&ir(h[1^f]))return h[1^f];if(p&&d&&1===h.length&&ir(d))return d;var y=t&&t===this.ownerID,v=p?d?c:c^u:c|u,m=p?d?sr(h,f,d,y):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a>>t),o=this.nodes[i];return o?o.get(t+5,e,r,n):n},We.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=i===U,c=this.nodes,p=c[s];if(u&&!p)return this;var f=nr(p,t,e+5,r,n,i,o,a);if(f===p)return this;var h=this.count;if(p){if(!f&&--h>>r),s=31&(0===r?n:n>>>r),u=a===s?[or(t,e,r+5,n,i)]:(o=new Qe(e,n,i),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function sr(t,e,r,n){var i=n?t:pe(t);return i[e]=r,i}var ur=8,cr=16,pr=8;function fr(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var hr=function(t){function e(e){var r=_r();if(null==e)return r;if(fr(e))return e;var n=t(e),i=n.size;return 0===i?r:(he(i),i>0&&i<32?gr(0,i,5,null,new dr(n.toArray())):r.withMutations((function(t){t.setSize(i),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=R(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?jr(t,e).set(0,r):jr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=Er(t._capacity)?n=br(n,t.__ownerID,0,e,r,o):i=br(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return gr(t._origin,t._capacity,t._level,i,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):_r()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){jr(r,0,e+t.length);for(var n=0;n>>e&31;if(n>=this.array.length)return new dr([],t);var i,o=0===n;if(e>0){var a=this.array[n];if((i=a&&a.removeBefore(t,e-5,r))===a&&o)return this}if(o&&!i)return this;var s=wr(this,t);if(!o)for(var u=0;u>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var a=wr(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var yr,vr={};function mr(t,e){var r=t._origin,n=t._capacity,i=Er(n),o=t._tail;return a(t._root,t._level,0);function a(t,s,u){return 0===s?function(t,a){var s=a===i?o&&o.array:t&&t.array,u=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(u===c)return vr;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,i,o){var s,u=t&&t.array,c=o>r?0:r-o>>i,p=1+(n-o>>i);p>32&&(p=32);return function(){for(;;){if(s){var t=s();if(t!==vr)return t;s=null}if(c===p)return vr;var r=e?--p:c++;s=a(u&&u[r],i-5,o+(r<>>r&31,u=t&&s0){var c=t&&t.array[s],p=br(c,e,r-5,n,i,o);return p===c?t:((a=wr(t,e)).array[s]=p,a)}return u&&t.array[s]===i?t:(o&&z(o),a=wr(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function wr(t,e){return e&&t&&e===t.ownerID?t:new dr(t?t.array.slice():[],e)}function Ir(t,e){if(e>=Er(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&31],n-=5;return r}}function jr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new x,i=t._origin,o=t._capacity,a=i+e,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,p=0;a+p<0;)c=new dr(c&&c.array.length?[void 0,c]:[],n),p+=1<<(u+=5);p&&(a+=p,i+=p,s+=p,o+=p);for(var f=Er(o),h=Er(s);h>=1<f?new dr([],n):l;if(l&&h>f&&a5;v-=5){var m=f>>>v&31;y=y.array[m]=wr(y.array[m],n)}y.array[f>>>5&31]=l}if(s=h)a-=h,s-=h,u=5,c=null,d=d&&d.removeBefore(n,0,a);else if(a>i||h>>u&31;if(g!==h>>>u&31)break;g&&(p+=(1<i&&(c=c.removeBefore(n,u,a-p)),c&&h>>5<<5}var Tr,Sr=function(t){function e(t){return null==t?Pr():Tt(t)?t:Pr().withMutations((function(e){var r=W(t);he(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Pr()},e.prototype.set=function(t,e){return Or(this,t,e)},e.prototype.remove=function(t){return Or(this,t,U)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Ar(e,r,t,this.__hash):0===this.size?Pr():(this.__ownerID=t,this._map=e,this._list=r,this)},e}(Fe);function Ar(t,e,r,n){var i=Object.create(Sr.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Pr(){return Tr||(Tr=Ar(er(),_r()))}function Or(t,e,r){var n,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(r===U){if(!u)return t;a.size>=32&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(r===a.get(s)[1])return t;n=o,i=a.set(s,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Ar(n,i)}Sr.isOrderedMap=Tt,Sr.prototype[Y]=!0,Sr.prototype.delete=Sr.prototype.remove;function Dr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var Ur=function(t){function e(t){return null==t?Rr():Dr(t)?t:Rr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=R(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):kr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Dr(e))return e;he(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):kr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Rr()},e.prototype.slice=function(e,r){if(N(e,r,this.size))return this;var n=q(e,this.size);if(C(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):kr(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?kr(this.size,this._head,t,this.__hash):0===this.size?Rr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new vt(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,r);)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new vt(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new nt((function(){if(n){var e=n.value;return n=n.next,it(t,r++,e)}return{value:void 0,done:!0}}))},e}(H);Ur.isStack=Dr;var zr,xr=Ur.prototype;function kr(t,e,r,n){var i=Object.create(xr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Rr(){return zr||(zr=kr(0))}xr["@@__IMMUTABLE_STACK__@@"]=!0,xr.shift=xr.pop,xr.unshift=xr.push,xr.unshiftAll=xr.pushAll,xr.withMutations=Ce,xr.wasAltered=Be,xr.asImmutable=Ke,xr["@@transducer/init"]=xr.asMutable=Le,xr["@@transducer/step"]=function(t,e){return t.unshift(e)},xr["@@transducer/result"]=function(t){return t.asImmutable()};function Mr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function Nr(t){return Mr(t)&&tt(t)}function qr(t,e){if(t===e)return!0;if(!B(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||F(t)!==F(e)||V(t)!==V(e)||tt(t)!==tt(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!J(t);if(tt(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&At(i[1],t)&&(r||At(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,s=e.__iterate((function(e,n){if(r?!t.has(e):i?!At(e,t.get(n,U)):!At(t.get(n,U),e))return a=!1,!1}));return a&&t.size===s}function Cr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Lr(t){if(!t||"object"!=typeof t)return t;if(!B(t)){if(!ye(t))return t;t=ht(t)}if(F(t)){var e={};return t.__iterate((function(t,r){e[r]=Lr(t)})),e}var r=[];return t.__iterate((function(t){r.push(Lr(t))})),r}var Kr=function(t){function e(e){return null==e?Gr():Mr(e)&&!tt(e)?e:Gr().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.intersect=function(t){return(t=G(t).toArray()).length?Fr.intersect.apply(e(t.pop()),t):Gr()},e.union=function(t){return(t=G(t).toArray()).length?Fr.union.apply(e(t.pop()),t):Gr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Vr(this,this._map.set(t,t))},e.prototype.remove=function(t){return Vr(this,this._map.remove(t))},e.prototype.clear=function(){return Vr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this;return Vr(this,this._map.map((function(e){return t(e,e,r)}),e))},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n=0&&e=0&&r>>-15,461845907),e=Pt(e<<13|e>>>-13,5),e=Pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Ot((e=Pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+pn(Dt(t),Dt(e))|0}:function(t,e){n=n+pn(Dt(t),Dt(e))|0}:e?function(t){n=31*n+Dt(t)|0}:function(t){n=n+Dt(t)|0}),n)}(this))}});var Yr=G.prototype;Yr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Yr[rt]=Yr.values,Yr.toJSON=Yr.toArray,Yr.__toStringMapper=ve,Yr.inspect=Yr.toSource=function(){return this.toString()},Yr.chain=Yr.flatMap,Yr.contains=Yr.includes,Cr(W,{flip:function(){return ie(this,Gt(this))},mapEntries:function(t,e){var r=this,n=0;return ie(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return ie(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var tn=W.prototype;tn["@@__IMMUTABLE_KEYED__@@"]=!0,tn[rt]=Yr.entries,tn.toJSON=Zr,tn.__toStringMapper=function(t,e){return ve(e)+": "+ve(t)},Cr(H,{toKeyedSeq:function(){return new Bt(this,!1)},filter:function(t,e){return ie(this,Qt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ie(this,Ht(this,!1))},slice:function(t,e){return ie(this,$t(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=q(t,t<0?this.count():this.size);var n=this.slice(0,t);return ie(this,1===r?n:n.concat(pe(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ie(this,Yt(this,t,!1))},get:function(t,e){return(t=R(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=R(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function pn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}en["@@__IMMUTABLE_INDEXED__@@"]=!0,en[Y]=!0,Cr(Q,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),Q.prototype.has=Yr.includes,Q.prototype.contains=Q.prototype.includes,Cr(lt,W.prototype),Cr(dt,H.prototype),Cr(yt,Q.prototype);var fn=function(t){function e(t){return null==t?yn():Nr(t)?t:yn().withMutations((function(e){var r=Q(t);he(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Kr);fn.isOrderedSet=Nr;var hn,ln=fn.prototype;function dn(t,e){var r=Object.create(ln);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function yn(){return hn||(hn=dn(Pr()))}ln[Y]=!0,ln.zip=en.zip,ln.zipWith=en.zipWith,ln.__empty=yn,ln.__make=dn;var vn=function(t,e){var r,n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c2?[]:void 0,{"":t})}function En(t,e){return F(e)?e.toMap():e.toList()}var Tn=r(7),Sn=r.n(Tn),An=r(67),Pn=r.n(An),On=r(24),Dn=r.n(On),Un={TRACE:"trace",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};function zn(t){return D()(t)&&!Sn()(t)}function xn(t,e){return"[".concat((new Date).toISOString()," ").concat(t.toUpperCase()," ").concat("lattice","] ").concat(e)}Dn.a.setLevel(Dn.a.levels.INFO);var kn=function(){function t(e){I()(this,t),S()(this,"logger",void 0),S()(this,"name",void 0),this.logger=Dn.a.getLogger(e),this.name=e}return E()(t,[{key:"log",value:function(t,e){var r,n=xn(t,this.name);zn(e)?this.logger[t]("".concat(n," - ").concat(e)):(this.logger[t](n),t!==Un.TRACE&&(!Pn()(e)&&Sn()(e)||this.logger[t](e)));for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a0&&(r=this.logger)[t].apply(r,o)}},{key:"trace",value:function(t){this.log(Un.TRACE,t)}},{key:"debug",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n2&&void 0!==arguments[2]&&arguments[2],n="";if(Xn(t))if(Xn(e)){var i="".concat(t,".").concat(e);if(i.length<=63)return i;n="invalid FQN: FQNs must be <= ".concat(63," characters, got ").concat(i.length)}else n="invalid FQN: name must be a non-empty string";else n="invalid FQN: namespace must be a non-empty string";if(!0===r)throw Yn.error(n),new Error(n);return""}var ni=function(){function t(){if(I()(this,t),S()(this,"namespace",void 0),S()(this,"name",void 0),1!==arguments.length&&2!==arguments.length){var e="invalid parameter count: FQN takes only 1 or 2 parameters, got ".concat(arguments.length);throw Yn.error(e),new Error(e)}var r=ei.apply(void 0,arguments),n=r.namespace,i=r.name;ri(n,i,!0),this.namespace=n,this.name=i}return E()(t,[{key:"getNamespace",value:function(){return this.namespace}},{key:"getName",value:function(){return this.name}},{key:"toObject",value:function(){var t=this.namespace,e=this.name;return""===ri(t,e)?{namespace:"",name:""}:{namespace:t,name:e}}},{key:"toString",value:function(){return ri(this.namespace,this.name)}},{key:"valueOf",value:function(){return this.toString()}}]),t}();S()(ni,"of",(function(){for(var t=arguments.length,e=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",ho.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),ho.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=s,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),ho.error(n,e[ao]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))a=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=a;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),ho.error(n,e[uo]),Promise.reject(n);return Xn(r)&&ki[r]?Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("neighbors","?").concat("type","=").concat(r),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n))}function go(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!si(e)&&!ui(e))return n="invalid parameter: entityKeyIds must be a valid UUID or array of UUIDs",ho.error(n,e),Promise.reject(n);if(!ki[r])return n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n);var i=e;return"string"==typeof e&&(i=[e]),Ei("DataApi").delete("/".concat("set","/").concat(t,"?").concat("type","=").concat(r),{data:i}).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function _o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ki.SOFT,r="";return si(t)?ki[e]?Ei("DataApi").delete("/".concat("set","/").concat(t,"/").concat("all","?").concat("type","=").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "deleteType" must be a valid DeleteType',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function bo(t,e){var r="";return si(t)?si(e)?Ei("DataApi").get("/".concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "entityKeyId" must be a valid UUID',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function wo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Io(t){var e="";return si(t)?Ei("DataApi").get("/".concat(t,"/").concat("count")).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",ho.error(e,t),Promise.reject(e))}function jo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("detailed"),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Eo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fi.PARTIAL_REPLACE,n="";if(!si(t))return n='invalid parameter: "entitySetId" must be a valid UUID',ho.error(n,t),Promise.reject(n);if(!$n(e))return n='invalid parameter: "entityData" must be a non-empty object',ho.error(n,t),Promise.reject(n);for(var i=Object.keys(e),o=0;o2&&void 0!==arguments[2])||arguments[2],n="";return si(t)?si(e)?!0===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "columns" must be a boolean',Oo.error(n,r),Promise.reject(n)):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}function Uo(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";return si(t)?!0===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(r='invalid parameter: "columns" must be a boolean',Oo.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Oo.error(r,t),Promise.reject(r))}function zo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n="";return si(t)?si(e)?!Po()(r)||r<=0?(n='invalid parameter: "count" must be a positive integer',Oo.error(n,e),Promise.reject(n)):Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat(r,"/").concat("data")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}function xo(t,e){var r="";return si(t)?si(e)?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("schema")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(r='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Oo.error(r,t),Promise.reject(r))}var ko=r(5),Ro=r.n(ko),Mo=r(23),No=r.n(Mo),qo=new kn("EntityType"),Co=function(){function t(e){I()(this,t),S()(this,"baseType",void 0),S()(this,"category",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"key",void 0),S()(this,"properties",void 0),S()(this,"propertyTags",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),this.key=e.key,this.properties=e.properties,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.baseType)&&(this.baseType=e.baseType),Jn(e.category)&&(this.category=e.category),Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.propertyTags)&&(this.propertyTags=e.propertyTags)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={key:this.key,properties:this.properties,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),Jn(this.baseType)&&(t.baseType=this.baseType),Jn(this.category)&&(t.category=this.category),Jn(this.propertyTags)&&(t.propertyTags=this.propertyTags),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Lo=function(){function t(e){I()(this,t),S()(this,"baseType",void 0),S()(this,"category",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"key",void 0),S()(this,"properties",void 0),S()(this,"propertyTags",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),Z(e)?(this.setBaseType(e.get("baseType")),this.setCategory(e.get("category")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setKey(e.get("key")),this.setPropertyTags(e.get("propertyTags")),this.setPropertyTypes(e.get("properties")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setBaseType(e.baseType),this.setCategory(e.category),this.setDescription(e.description),this.setId(e.id),this.setKey(e.key),this.setPropertyTags(e.propertyTags),this.setPropertyTypes(e.properties),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setBaseType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "baseType" must be a valid UUID');return this.baseType=t,this}},{key:"setCategory",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ki[t])throw new Error('invalid parameter: "category" must be a valid SecurableType');return this.category=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.id=t,this}},{key:"setKey",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "key" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "key" must be a non-empty array of UUIDs');return this.key=e.toJS(),this}},{key:"setPropertyTags",value:function(t){if(!Jn(t))return this;var e=t;if(B(e)&&(e=e.toJS()),Wn(e))return this;if(!ci(e,si))throw new Error('invalid parameter: "propertyTags" must be a valid multimap object');return this.propertyTags=e,this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "propertyTypes" must be a non-empty array of UUIDs');return this.properties=e.toJS(),this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.key||(this.key=[]),this.properties||(this.properties=[]),this.propertyTags||(this.propertyTags={}),this.schemas||(this.schemas=[]),new Co({baseType:this.baseType,category:this.category,description:this.description,id:this.id,key:this.key,properties:this.properties,propertyTags:this.propertyTags,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Ko=new kn("AssociationType"),Bo=function(){function t(e){I()(this,t),S()(this,"bidirectional",void 0),S()(this,"dst",void 0),S()(this,"entityType",void 0),S()(this,"src",void 0),this.bidirectional=e.bidirectional,this.entityType=e.entityType,this.dst=e.dst,this.src=e.src}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{bidirectional:this.bidirectional,dst:this.dst,entityType:this.entityType.toObject(),src:this.src}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Fo=function(){function t(e){I()(this,t),S()(this,"bidirectional",void 0),S()(this,"destinationEntityTypeIds",void 0),S()(this,"entityType",void 0),S()(this,"sourceEntityTypeIds",void 0),Z(e)?(this.setBidirectional(e.get("bidirectional")),this.setDestinationEntityTypeIds(e.get("dst")),this.setEntityType(e.get("entityType")),this.setSourceEntityTypeIds(e.get("src"))):Jn(e)&&(this.setBidirectional(e.bidirectional),this.setDestinationEntityTypeIds(e.dst),this.setEntityType(e.entityType),this.setSourceEntityTypeIds(e.src))}return E()(t,[{key:"setBidirectional",value:function(t){if(!No()(t))throw new Error('invalid parameter: "bidirectional" must be a boolean');return this.bidirectional=t,this}},{key:"setEntityType",value:function(t){return this.entityType=new Lo(t).build(),this}},{key:"setDestinationEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "destinationEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "destinationEntityTypeIds" must be a non-empty array of UUIDs');return this.destinationEntityTypeIds=e.toJS(),this}},{key:"setSourceEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "sourceEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "sourceEntityTypeIds" must be a non-empty array of UUIDs');return this.sourceEntityTypeIds=e.toJS(),this}},{key:"build",value:function(){if(null===this.bidirectional||void 0===this.bidirectional)throw new Error('missing property: "bidirectional" is a required property');if(!this.entityType)throw new Error('missing property: "entityType" is a required property');return this.destinationEntityTypeIds||(this.destinationEntityTypeIds=[]),this.sourceEntityTypeIds||(this.sourceEntityTypeIds=[]),new Bo({bidirectional:this.bidirectional,dst:this.destinationEntityTypeIds,entityType:this.entityType,src:this.sourceEntityTypeIds})}}]),t}(),Vo=new kn("PropertyType"),Jo=function(){function t(e){I()(this,t),S()(this,"analyzer",void 0),S()(this,"datatype",void 0),S()(this,"description",void 0),S()(this,"enumValues",void 0),S()(this,"id",void 0),S()(this,"indexType",void 0),S()(this,"multiValued",void 0),S()(this,"pii",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),this.datatype=e.datatype,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.analyzer)&&(this.analyzer=e.analyzer),Jn(e.description)&&(this.description=e.description),Jn(e.enumValues)&&(this.enumValues=e.enumValues),Jn(e.id)&&(this.id=e.id),Jn(e.indexType)&&(this.indexType=e.indexType),Jn(e.multiValued)&&(this.multiValued=e.multiValued),Jn(e.pii)&&(this.pii=e.pii)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={datatype:this.datatype,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.analyzer)&&(t.analyzer=this.analyzer),Jn(this.description)&&(t.description=this.description),Jn(this.enumValues)&&(t.enumValues=this.enumValues),Jn(this.id)&&(t.id=this.id),Jn(this.indexType)&&(t.indexType=this.indexType),Jn(this.multiValued)&&(t.multiValued=this.multiValued),Jn(this.pii)&&(t.pii=this.pii),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Go=function(){function t(e){I()(this,t),S()(this,"analyzer",void 0),S()(this,"datatype",void 0),S()(this,"description",void 0),S()(this,"enumValues",void 0),S()(this,"id",void 0),S()(this,"indexType",void 0),S()(this,"multiValued",void 0),S()(this,"pii",void 0),S()(this,"schemas",void 0),S()(this,"title",void 0),S()(this,"type",void 0),Z(e)?(this.setAnalyzer(e.get("analyzer")),this.setDataType(e.get("datatype")),this.setDescription(e.get("description")),this.setEnumValues(e.get("enumValues")),this.setId(e.get("id")),this.setIndexType(e.get("indexType")),this.setMultiValued(e.get("multiValued")),this.setPII(e.get("pii")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setAnalyzer(e.analyzer),this.setDataType(e.datatype),this.setDescription(e.description),this.setEnumValues(e.enumValues),this.setId(e.id),this.setIndexType(e.indexType),this.setMultiValued(e.multiValued),this.setPII(e.pii),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setAnalyzer",value:function(t){if(!Jn(t)||Hn(t))return this;if(!xi[t])throw new Error("invalid parameter: analyzer must be a valid AnalyzerType");return this.analyzer=t,this}},{key:"setDataType",value:function(t){if(!Xn(t))throw new Error("invalid parameter: datatype must be a non-empty string");return this.datatype=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error("invalid parameter: description must be a non-empty string");return this.description=t,this}},{key:"setEnumValues",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "values" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "values" must be a non-empty array of non-empty strings');return this.enumValues=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error("invalid parameter: propertyTypeId must be a valid UUID");return this.id=t,this}},{key:"setIndexType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ni[t])throw new Error("invalid parameter: indexType must be a valid IndexType");return this.indexType=t,this}},{key:"setMultiValued",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: multiValued must be a boolean");return this.multiValued=t,this}},{key:"setPII",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: pii must be a boolean");return this.pii=t,this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!Jn(this.datatype))throw new Error('missing property: "datatype" is a required property');if(!Jn(this.title))throw new Error('missing property: "title" is a required property');if(!Jn(this.type))throw new Error('missing property: "type" is a required property');return this.schemas||(this.schemas=[]),new Jo({analyzer:this.analyzer,datatype:this.datatype,description:this.description,enumValues:this.enumValues,id:this.id,indexType:this.indexType,multiValued:this.multiValued,pii:this.pii,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Wo=new kn("Schema"),Ho=function(){function t(e){I()(this,t),S()(this,"entityTypes",void 0),S()(this,"fqn",void 0),S()(this,"propertyTypes",void 0),this.entityTypes=e.entityTypes,this.fqn=e.fqn,this.propertyTypes=e.propertyTypes}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityTypes:this.entityTypes.map((function(t){return t.toObject()})),fqn:this.fqn.toObject(),propertyTypes:this.propertyTypes.map((function(t){return t.toObject()}))}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Qo=function(){function t(e){I()(this,t),S()(this,"entityTypes",void 0),S()(this,"fqn",void 0),S()(this,"propertyTypes",void 0),Z(e)?(this.setEntityTypes(e.get("entityTypes")),this.setFQN(e.get("fqn")),this.setPropertyTypes(e.get("propertyTypes"))):Jn(e)&&(this.setEntityTypes(e.entityTypes),this.setFQN(e.fqn),this.setPropertyTypes(e.propertyTypes))}return E()(t,[{key:"setEntityTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entityTypes" must be an array');try{this.entityTypes=Kr(t).map((function(t){return new Lo(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "entityTypes" must be an array of EntityTypes')}return this}},{key:"setFQN",value:function(t){return this.fqn=ni.of(t),this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');try{this.propertyTypes=Kr(t).map((function(t){return new Go(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "propertyTypes" must be an array of PropertyTypes')}return this}},{key:"build",value:function(){if(!this.fqn)throw new Error('missing property: "fqn" is a required property');return this.entityTypes||(this.entityTypes=[]),this.propertyTypes||(this.propertyTypes=[]),new Ho({entityTypes:this.entityTypes,fqn:this.fqn,propertyTypes:this.propertyTypes})}}]),t}(),$o=function(t){return pi(t,Qo,Wo)},Xo=new kn("EntityDataModelApi");function Zo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function Yo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r='invalid parameter: "propertyTypeId" must be a valid UUID',Xo.error(r,e),Promise.reject(r)):(r='invalid parameter: "entityTypeId" must be a valid UUID',Xo.error(r,t),Promise.reject(r))}function ta(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function ea(t){var e="";return pi(t,Fo,Ko)?Ei(ii).post("/".concat("association/type"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "associationType" must be a valid AssociationType',Xo.error(e,t),Promise.reject(e))}function ra(t){var e="";return pi(t,Lo,qo)?Ei(ii).post("/".concat("entity/type"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "entityType" must be a valid EntityType',Xo.error(e,t),Promise.reject(e))}function na(t){var e="";return pi(t,Go,Vo)?Ei(ii).post("/".concat("property/type"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyType" must be a valid PropertyType',Xo.error(e,t),Promise.reject(e))}function ia(t){var e="";return $o(t)?Ei(ii).post("/".concat("schema"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "schema" must be a valid Schema',Xo.error(e,t),Promise.reject(e))}function oa(t){var e="";return si(t)?Ei(ii).delete("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function aa(t){var e="";return si(t)?Ei(ii).delete("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function sa(t){var e="";return si(t)?Ei(ii).delete("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function ua(){return Ei(ii).get("/".concat("association/type","/").concat("entity/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function ca(){return Ei(ii).get("/".concat("association/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function pa(){return Ei(ii).get("/".concat("entity/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function fa(){return Ei(ii).get("/".concat("property/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function ha(){return Ei(ii).get("/".concat("schema")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function la(t){var e="";return si(t)?Ei(ii).get("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function da(){return Ei(ii).get("/").then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function ya(t){var e="";return ai(t,$n)?Ei(ii).post("/",t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "projection" must be an array of objects',Xo.error(e,t),Promise.reject(e))}function va(t){var e="";return si(t)?Ei(ii).get("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function ma(t){var e="";return si(t)?Ei(ii).get("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function ga(t){var e="";if(!ni.isValid(t))return e='invalid parameter: "schemaFQN" must be a valid FQN',Xo.error(e,t),Promise.reject(e);var r=t.namespace,n=t.name;return Ei(ii).get("/".concat("schema","/").concat(r,"/").concat(n)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function _a(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function ba(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: propertyTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function wa(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function Ia(t,e){var r="";return si(t)?$n(e)?Ro()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",Xo.error(r,e.type),Promise.reject(r)):Ro()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",Xo.error(r,e.name),Promise.reject(r)):Ro()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",Xo.error(r,e.title),Promise.reject(r)):Ro()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",Xo.error(r,e.description),Promise.reject(r)):Ro()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",Xo.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("entity/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function ja(t,e){var r="";return si(t)?$n(e)?Ro()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",Xo.error(r,e.type),Promise.reject(r)):Ro()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",Xo.error(r,e.name),Promise.reject(r)):Ro()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",Xo.error(r,e.title),Promise.reject(r)):Ro()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",Xo.error(r,e.description),Promise.reject(r)):Ro()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",Xo.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("property/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: propertyTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function Ea(t){var e="";if(!$o(t))return e='invalid parameter: "schema" must be a valid Schema',Xo.error(e,t),Promise.reject(e);var r={action:zi.REPLACE,entityTypes:t.entityTypes.map((function(t){return t.id})),propertyTypes:t.propertyTypes.map((function(t){return t.id}))};return Ei(ii).patch("/".concat("schema","/").concat(t.fqn.namespace,"/").concat(t.fqn.name),r).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}var Ta=new kn("EntitySet"),Sa=function(){function t(e){I()(this,t),S()(this,"contacts",void 0),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"flags",void 0),S()(this,"id",void 0),S()(this,"linkedEntitySets",void 0),S()(this,"name",void 0),S()(this,"organizationId",void 0),S()(this,"title",void 0),this.contacts=e.contacts,this.entityTypeId=e.entityTypeId,this.name=e.name,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.flags)&&(this.flags=e.flags),Jn(e.id)&&(this.id=e.id),Jn(e.linkedEntitySets)&&(this.linkedEntitySets=e.linkedEntitySets),Jn(e.organizationId)&&(this.organizationId=e.organizationId)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={contacts:this.contacts,entityTypeId:this.entityTypeId,name:this.name,title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.flags)&&(t.flags=this.flags),Jn(this.id)&&(t.id=this.id),Jn(this.linkedEntitySets)&&(t.linkedEntitySets=this.linkedEntitySets),Jn(this.organizationId)&&(t.organizationId=this.organizationId),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Aa=function(){function t(e){I()(this,t),S()(this,"contacts",void 0),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"flags",void 0),S()(this,"id",void 0),S()(this,"linkedEntitySets",void 0),S()(this,"name",void 0),S()(this,"organizationId",void 0),S()(this,"title",void 0),Z(e)?(this.setContacts(e.get("contacts")),this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setFlags(e.get("flags")),this.setId(e.get("id")),this.setLinkedEntitySets(e.get("linkedEntitySets")),this.setName(e.get("name")),this.setOrganizationId(e.get("organizationId")),this.setTitle(e.get("title"))):Jn(e)&&(this.setContacts(e.contacts),this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setFlags(e.flags),this.setId(e.id),this.setLinkedEntitySets(e.linkedEntitySets),this.setName(e.name),this.setOrganizationId(e.organizationId),this.setTitle(e.title))}return E()(t,[{key:"setContacts",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "contacts" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "contacts" must be a non-empty array of non-empty strings');return this.contacts=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setFlags",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "flags" must be an array');var e=Kr(t);if(!e.every((function(t){return Xn(t)&&Ri[t]})))throw new Error('invalid parameter: "flags" must be an array of EntitySetFlagTypes');return this.flags=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entitySetId" must be a valid UUID');return this.id=t,this}},{key:"setLinkedEntitySets",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entitySetIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "entitySetIds" must be a non-empty array of UUIDs');return this.linkedEntitySets=e.toJS(),this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setOrganizationId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.contacts||(this.contacts=[]),new Sa({contacts:this.contacts,description:this.description,entityTypeId:this.entityTypeId,flags:this.flags,id:this.id,linkedEntitySets:this.linkedEntitySets,name:this.name,organizationId:this.organizationId,title:this.title})}}]),t}(),Pa=function(t){return pi(t,Aa,Ta)},Oa=new kn("EntitySetsApi");function Da(t){var e="";return Qn(t)?t.every(Pa)?Ei("EntitySetsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySets must be a non-empty array of valid EntitySets",Oa.error(e,t),Promise.reject(e)):(e="invalid parameter: entitySets must be a non-empty array",Oa.error(e,t),Promise.reject(e))}function Ua(t){var e="";return si(t)?Ei("EntitySetsApi").delete("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Oa.error(e,t),Promise.reject(e))}function za(){return Ei("EntitySetsApi").get("/").then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)}))}function xa(t){var e="";return si(t)?Ei("EntitySetsApi").get("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Oa.error(e,t),Promise.reject(e))}function ka(t){var e="";return Xn(t)?Ei("EntitySetsApi").get("/".concat("ids","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetName must be a non-empty string",Oa.error(e,t),Promise.reject(e))}function Ra(t){var e="";return Qn(t)?t.every(Xn)?Ei("EntitySetsApi").post("/".concat("ids"),t).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetNames" must be an array of strings',Oa.error(e,t),Promise.reject(e)):(e='invalid parameter: "entitySetNames" must be a non-empty array',Oa.error(e,t),Promise.reject(e))}function Ma(t){var e="";if(!Qn(t))return e='invalid parameter: "idsOrNames" must be a non-empty array',Oa.error(e,t),Promise.reject(e);var r=Kr(t);return r.every(si)?Ei("EntitySetsApi").post("/".concat("by-id"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):r.every(Xn)?Ei("EntitySetsApi").post("/".concat("by-name"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e='invalid parameter: "idsOrNames" must be an array of EntitySet ids or names',Oa.error(e,t),Promise.reject(e))}function Na(t,e){var r="";return si(t)?Jn(e)?Jn(e)&&!si(e)?(r="invalid parameter: propertyTypeId must be a valid UUID",Oa.error(r,e),Promise.reject(r)):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("properties","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("metadata")).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(r="invalid parameter: entitySetId must be a valid UUID",Oa.error(r,t),Promise.reject(r))}function qa(t){var e="";if(!ui(t))return e="invalid parameter: entitySetIds must be a valid UUID array",Oa.error(e,t),Promise.reject(e);var r=Kr(t).toJS();return Ei("EntitySetsApi").post("/".concat("all","/").concat("metadata"),r).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)}))}function Ca(t,e){var r="";return si(t)?$n(e)?Ei("EntitySetsApi").patch("/".concat("all","/").concat(t,"/").concat("metadata"),e).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(r="invalid parameter: update must be a non-empty object",Oa.error(r,e),Promise.reject(r)):(r="invalid parameter: entitySetId must be a valid UUID",Oa.error(r,t),Promise.reject(r))}var La=new kn("Principal"),Ka=function(){function t(e){I()(this,t),S()(this,"id",void 0),S()(this,"type",void 0),this.id=e.id,this.type=e.type}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{id:this.id,type:this.type}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Ba=function(){function t(e){I()(this,t),S()(this,"id",void 0),S()(this,"type",void 0),Z(e)?(this.setId(e.get("id")),this.setType(e.get("type"))):Jn(e)&&(this.setId(e.id),this.setType(e.type))}return E()(t,[{key:"setId",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "id" must be a non-empty string');return this.id=t,this}},{key:"setType",value:function(t){if(!Ci[t])throw new Error('invalid parameter: "type" must be a valid PrincipalType');return this.type=t,this}},{key:"build",value:function(){if(!this.id)throw new Error('missing property: "id" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');return new Ka({id:this.id,type:this.type})}}]),t}(),Fa=(new kn("Ace"),function(){function t(e){I()(this,t),S()(this,"permissions",void 0),S()(this,"principal",void 0),this.principal=e.principal,this.permissions=e.permissions}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{permissions:this.permissions,principal:this.principal.toObject()}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Va=function(){function t(e){I()(this,t),S()(this,"permissions",void 0),S()(this,"principal",void 0),Z(e)?(this.setPermissions(e.get("permissions")),this.setPrincipal(e.get("principal"))):Jn(e)&&(this.setPermissions(e.permissions),this.setPrincipal(e.principal))}return E()(t,[{key:"setPermissions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "permissions" must be an array');var e=fn(t);if(!e.every((function(t){return qi[t]})))throw new Error('invalid parameter: "permissions" must be an array of PermissionTypes');return this.permissions=e.toJS(),this}},{key:"setPrincipal",value:function(t){return this.principal=new Ba(t).build(),this}},{key:"build",value:function(){if(this.permissions||(this.permissions=[]),!this.principal)throw new Error("missing property: principal is a required property");return new Fa({permissions:this.permissions,principal:this.principal})}}]),t}(),Ja=(new kn("Acl"),function(){function t(e){I()(this,t),S()(this,"aces",void 0),S()(this,"aclKey",void 0),this.aces=e.aces,this.aclKey=e.aclKey}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{aces:this.aces.map((function(t){return t.toObject()})),aclKey:this.aclKey}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Ga=function(){function t(e){I()(this,t),S()(this,"aces",void 0),S()(this,"aclKey",void 0),Z(e)?(this.setAces(e.get("aces")),this.setAclKey(e.get("aclKey"))):Jn(e)&&(this.setAces(e.aces),this.setAclKey(e.aclKey))}return E()(t,[{key:"setAces",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aces" must be an array');try{this.aces=hr(t).map((function(t){return new Va(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "aces" must be an array of Aces')}return this}},{key:"setAclKey",value:function(t){if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aclKey" must be an array');var e=fn(t);if(e.isEmpty()||!e.every(si))throw new Error('invalid parameter: "aclKey" must be a non-empty array of UUIDs');return this.aclKey=e.toJS(),this}},{key:"build",value:function(){if(this.aces||(this.aces=[]),!this.aclKey)throw new Error('missing property: "aclKey" is a required property');return new Ja({aces:this.aces,aclKey:this.aclKey})}}]),t}(),Wa=new kn("AclData"),Ha=function(){function t(e){I()(this,t),S()(this,"acl",void 0),S()(this,"action",void 0),this.acl=e.acl,this.action=e.action}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{acl:this.acl.toObject(),action:this.action}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Qa=function(){function t(e){I()(this,t),S()(this,"acl",void 0),S()(this,"action",void 0),Z(e)?(this.setAcl(e.get("acl")),this.setAction(e.get("action"))):Jn(e)&&(this.setAcl(e.acl),this.setAction(e.action))}return E()(t,[{key:"setAcl",value:function(t){return this.acl=new Ga(t).build(),this}},{key:"setAction",value:function(t){if(!zi[t])throw new Error('invalid parameter: "action" must be a valid ActionType');return this.action=t,this}},{key:"build",value:function(){if(!this.acl)throw new Error('missing property: "acl" is a required property');if(!this.action)throw new Error('missing property: "action" is a required property');return new Ha({acl:this.acl,action:this.action})}}]),t}(),$a=function(t){return pi(t,Qa,Wa)},Xa=(new kn("App"),function(){function t(e){I()(this,t),S()(this,"appTypeIds",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"name",void 0),S()(this,"title",void 0),S()(this,"url",void 0),this.appTypeIds=e.appTypeIds,this.name=e.name,this.title=e.title,this.url=e.url,Jn(e.id)&&(this.id=e.id),Jn(e.description)&&(this.description=e.description)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={appTypeIds:this.appTypeIds,name:this.name,title:this.title,url:this.url};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Za=function(){function t(e){I()(this,t),S()(this,"appTypeIds",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"name",void 0),S()(this,"title",void 0),S()(this,"url",void 0),Z(e)?(this.setAppTypeIds(e.get("appTypeIds")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setName(e.get("name")),this.setTitle(e.get("title")),this.setUrl(e.get("url"))):Jn(e)&&(this.setAppTypeIds(e.appTypeIds),this.setDescription(e.description),this.setId(e.id),this.setName(e.name),this.setTitle(e.title),this.setUrl(e.url))}return E()(t,[{key:"setAppTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appTypeIds" must be a non-empty array of UUIDs');return this.appTypeIds=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setUrl",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "url" must be a non-empty string');return this.url=t,this}},{key:"build",value:function(){if(this.appTypeIds||(this.appTypeIds=[]),!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.url)throw new Error('missing property: "url" is a required property');return new Xa({appTypeIds:this.appTypeIds,description:this.description,id:this.id,name:this.name,title:this.title,url:this.url})}}]),t}(),Ya=(new kn("AppType"),function(){function t(e){I()(this,t),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"id",void 0),S()(this,"title",void 0),S()(this,"type",void 0),this.entityTypeId=e.entityTypeId,this.title=e.title,this.type=e.type,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={entityTypeId:this.entityTypeId,title:this.title,type:this.type.toObject()};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),ts=function(){function t(e){I()(this,t),S()(this,"description",void 0),S()(this,"entityTypeId",void 0),S()(this,"id",void 0),S()(this,"title",void 0),S()(this,"type",void 0),Z(e)?(this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setId(e.get("id")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setId(e.id),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "appTypeId" must be a valid UUID');return this.id=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new Ya({description:this.description,entityTypeId:this.entityTypeId,id:this.id,title:this.title,type:this.type})}}]),t}(),es=(new kn("EntityDataKey"),function(){function t(e){I()(this,t),S()(this,"entityKeyId",void 0),S()(this,"entitySetId",void 0),this.entityKeyId=e.entityKeyId,this.entitySetId=e.entitySetId}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityKeyId:this.entityKeyId,entitySetId:this.entitySetId}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),rs=function(){function t(e){I()(this,t),S()(this,"entityKeyId",void 0),S()(this,"entitySetId",void 0),Z(e)?(this.setEntityKeyId(e.get("entityKeyId")),this.setEntitySetId(e.get("entitySetId"))):Jn(e)&&(this.setEntityKeyId(e.entityKeyId),this.setEntitySetId(e.entitySetId))}return E()(t,[{key:"setEntityKeyId",value:function(t){if(!si(t))throw new Error("invalid parameter: entityKeyId must be a valid UUID");return this.entityKeyId=t,this}},{key:"setEntitySetId",value:function(t){if(!si(t))throw new Error("invalid parameter: entitySetId must be a valid UUID");return this.entitySetId=t,this}},{key:"build",value:function(){if(!this.entityKeyId)throw new Error("missing property: entityKeyId is a required property");if(!this.entitySetId)throw new Error("missing property: entitySetId is a required property");return new es({entityKeyId:this.entityKeyId,entitySetId:this.entitySetId})}}]),t}(),ns=new kn("Grant"),is=function(){function t(e){I()(this,t),S()(this,"attribute",void 0),S()(this,"grantType",void 0),S()(this,"mappings",void 0),this.attribute=e.attribute,this.grantType=e.grantType,this.mappings=e.mappings}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{attribute:this.attribute,grantType:this.grantType,mappings:this.mappings}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),os=function(){function t(e){I()(this,t),S()(this,"attribute",void 0),S()(this,"grantType",void 0),S()(this,"mappings",void 0),Z(e)?(this.setAttribute(e.get("attribute")),this.setGrantType(e.get("grantType")),this.setMappings(e.get("mappings"))):Jn(e)&&(this.setAttribute(e.attribute),this.setGrantType(e.grantType),this.setMappings(e.mappings))}return E()(t,[{key:"setAttribute",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "attribute" must be a string');return this.attribute=t,this}},{key:"setGrantType",value:function(t){if(!Object.values(Mi).includes(t))throw new Error('invalid parameter: "grantType" must be a valid GrantType');return this.grantType=t,this}},{key:"setMappings",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "mappings" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "mappings" must be a non-empty array of non-empty strings');return this.mappings=e.toJS(),this}},{key:"build",value:function(){if(this.attribute||(this.attribute=""),!this.grantType)throw new Error("missing property: grantType is a required property");return this.mappings||(this.mappings=[]),new is({attribute:this.attribute,grantType:this.grantType,mappings:this.mappings})}}]),t}(),as=r(14),ss=r.n(as),us=r(34),cs=r.n(us),ps=new kn("Role"),fs=function(){function t(e){I()(this,t),S()(this,"aclKey",void 0),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"organizationId",void 0),S()(this,"principal",void 0),S()(this,"title",void 0),this.organizationId=e.organizationId,this.principal=e.principal,this.title=e.title,this[Zi]="com.openlattice.organization.roles.Role",Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.aclKey=[e.organizationId,e.id],this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={organizationId:this.organizationId,principal:this.principal.toObject(),title:this.title};return t[Zi]="com.openlattice.organization.roles.Role",Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.aclKey=[this.organizationId,this.id],t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),hs=function(){function t(e){I()(this,t),S()(this,"description",void 0),S()(this,"id",void 0),S()(this,"organizationId",void 0),S()(this,"principal",void 0),S()(this,"title",void 0),Z(e)?(this.setDescription(e.get("description")),this.setId(e.get("id")),this.setOrganizationId(e.get("organizationId")),this.setPrincipal(e.get("principal")),this.setTitle(e.get("title"))):Jn(e)&&(this.setDescription(e.description),this.setId(e.id),this.setOrganizationId(e.organizationId),this.setPrincipal(e.principal),this.setTitle(e.title))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setOrganizationId",value:function(t){if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setPrincipal",value:function(t){return this.principal=new Ba(t).build(),this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.organizationId)throw new Error('missing property: "organizationId" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new fs({description:this.description,id:this.id,organizationId:this.organizationId,principal:this.principal,title:this.title})}}]),t}(),ls=new kn("Organization"),ds="00000000-0000-0000-0000-000000000000",ys=function(){function t(e){I()(this,t),S()(this,"apps",void 0),S()(this,"connections",void 0),S()(this,"description",void 0),S()(this,"emailDomains",void 0),S()(this,"grants",void 0),S()(this,"id",void 0),S()(this,"members",void 0),S()(this,"metadataEntitySetIds",void 0),S()(this,"partitions",void 0),S()(this,"principal",void 0),S()(this,"roles",void 0),S()(this,"title",void 0),this.apps=e.apps,this.emailDomains=e.emailDomains,this.connections=e.connections,this.grants=e.grants,this.members=e.members,this.metadataEntitySetIds=e.metadataEntitySetIds,this.principal=e.principal,this.roles=e.roles,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.partitions)&&(this.partitions=e.partitions)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={apps:this.apps,connections:this.connections,emailDomains:this.emailDomains,grants:cs()(this.grants,(function(t){return cs()(t,(function(t){return t.toObject()}))})),members:this.members.map((function(t){return t.toObject()})),metadataEntitySetIds:this.metadataEntitySetIds,principal:this.principal.toObject(),roles:this.roles.map((function(t){return t.toObject()})),title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),Jn(this.partitions)&&(t.partitions=this.partitions),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),vs=function(){function t(e){I()(this,t),S()(this,"apps",void 0),S()(this,"connections",void 0),S()(this,"description",void 0),S()(this,"emailDomains",void 0),S()(this,"grants",void 0),S()(this,"id",void 0),S()(this,"members",void 0),S()(this,"metadataEntitySetIds",void 0),S()(this,"partitions",void 0),S()(this,"principal",void 0),S()(this,"roles",void 0),S()(this,"title",void 0),Z(e)?(this.setApps(e.get("apps")),this.setConnections(e.get("connections")),this.setDescription(e.get("description")),this.setEmailDomains(e.get("emailDomains")),this.setGrants(e.get("grants")),this.setId(e.get("id")),this.setMembers(e.get("members")),this.setMetaDataEntitySetIds(e.get("metadataEntitySetIds")),this.setPartitions(e.get("partitions")),this.setPrincipal(e.get("principal")),this.setRoles(e.get("roles")),this.setTitle(e.get("title"))):Jn(e)&&(this.setApps(e.apps),this.setConnections(e.connections),this.setDescription(e.description),this.setEmailDomains(e.emailDomains),this.setGrants(e.grants),this.setId(e.id),this.setMembers(e.members),this.setMetaDataEntitySetIds(e.metadataEntitySetIds),this.setPartitions(e.partitions),this.setPrincipal(e.principal),this.setRoles(e.roles),this.setTitle(e.title))}return E()(t,[{key:"setApps",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appIds" must be a non-empty array of UUIDs');return this.apps=e.toJS(),this}},{key:"setConnections",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "connections" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "connections" must be a non-empty array of non-empty strings');return this.connections=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEmailDomains",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "emailDomains" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "emailDomains" must be a non-empty array of non-empty strings');return this.emailDomains=e.toJS(),this}},{key:"setGrants",value:function(t){if(!Jn(t))return this;if(!Ln()(t)&&!B(t))throw new Error('invalid parameter: "grants" must be an object');try{this.grants=Fe().withMutations((function(e){jn(t).forEach((function(t,r){if(!si(r))throw new Error('invalid parameter: "grants" must be a map where all keys are valid UUIDs');t.forEach((function(t,n){e.setIn([r,n],new os(t).build())}))}))})).toJS()}catch(t){throw new Error('invalid parameter: "grants" must be a map where all values are a map of GrantType to Grant')}return this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.id=t,this}},{key:"setMembers",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "members" must be an array');try{this.members=Kr(t).map((function(t){return new Ba(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "members" must be an array of Principals')}return this}},{key:"setMetaDataEntitySetIds",value:function(t){if(!Jn(t))return this;if(!si(ge(t,"columns")))throw new Error('invalid parameter: "metadataEntitySetIds.columns" must be a valid UUID');if(!si(ge(t,"datasets")))throw new Error('invalid parameter: "metadataEntitySetIds.datasets" must be a valid UUID');if(!si(ge(t,"organization")))throw new Error('invalid parameter: "metadataEntitySetIds.organization" must be a valid UUID');return this.metadataEntitySetIds={columns:ge(t,"columns"),datasets:ge(t,"datasets"),organization:ge(t,"organization")},this}},{key:"setPartitions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "partitions" must be an array');var e=hr(t);if(!e.every(ss.a))throw new Error('invalid parameter: "partitions" must be a non-empty array of numbers');return this.partitions=e.toJS(),this}},{key:"setPrincipal",value:function(t){if(this.principal=new Ba(t).build(),this.principal.type!==Ci.ORGANIZATION)throw new Error('invalid parameter: "principal" must be PrincipalType.ORGANIZATION');return this}},{key:"setRoles",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "roles" must be an array');try{this.roles=Kr(t).map((function(t){return new hs(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "roles" must be an array of Roles')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');return this.apps||(this.apps=[]),this.connections||(this.connections=[]),this.emailDomains||(this.emailDomains=[]),this.grants||(this.grants={}),this.members||(this.members=[]),this.metadataEntitySetIds||(this.metadataEntitySetIds={columns:ds,datasets:ds,organization:ds}),this.roles||(this.roles=[]),new ys({apps:this.apps,connections:this.connections,description:this.description,emailDomains:this.emailDomains,grants:this.grants,id:this.id,members:this.members,metadataEntitySetIds:this.metadataEntitySetIds,partitions:this.partitions,principal:this.principal,roles:this.roles,title:this.title})}}]),t}(),ms=new kn("PermissionsApi");function gs(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return ms.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',ms.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',ms.error(e,t),Promise.reject(e))}function _s(t){var e="";return Qn(t)?t.every((function(t){return t.every(si)}))?Ei("PermissionsApi").post("/".concat("bulk"),t).then((function(t){return t.data})).catch((function(t){return ms.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKeys" is not valid UUID[][]',ms.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKeys" must be a non-empty array',ms.error(e,t),Promise.reject(e))}function bs(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/".concat("explain"),t).then((function(t){return t.data})).catch((function(t){return ms.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',ms.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',ms.error(e,t),Promise.reject(e))}function ws(t){var e="";return $a(t)?Ei("PermissionsApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return ms.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be a valid AclData object",ms.error(e,t),Promise.reject(e))}function Is(t){var e="";return Qn(t)?t.every($a)?Ei("PermissionsApi").patch("/".concat("update"),t).then((function(t){return t.data})).catch((function(t){return ms.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be an array of valid AclData objects",ms.error(e,t),Promise.reject(e)):(e="invalid parameter: aclData must be a non-empty array",ms.error(e,t),Promise.reject(e))}var js=new kn("OrganizationsApi"),Es={headers:{"Content-Type":"text/plain"}};function Ts(t,e,r){var n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",js.error(n,t),Promise.reject(n);if(!Xn(e))return n="invalid parameter: principalId must be a non-empty string",js.error(n,e),Promise.reject(n);if(!Xn(r)||!zi[r])return n="invalid parameter: action must be a valid ActionType",js.error(n,r),Promise.reject(n);var i=(new Ba).setId(e).setType(Ci.ORGANIZATION).build(),o=(new Va).setPermissions([qi.READ]).setPrincipal(i).build(),a=(new Ga).setAclKey([t]).setAces([o]).build();return ws((new Qa).setAction(r).setAcl(a).build())}function Ss(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "connections" must be an array of strings',js.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("connections"),r).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function As(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',js.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("email-domains"),r).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function Ps(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function Os(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',js.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',js.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n))}function Ds(t){var e="";return pi(t,vs,ls)?Ei("OrganizationsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e='invalid parameter: "organization" must be a valid Organization',js.error(e,t),Promise.reject(e))}function Us(t){var e="";return pi(t,hs,ps)?Ei("OrganizationsApi").post("/".concat("roles"),t).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e='invalid parameter: "role" must be a valid Role',js.error(e,t),Promise.reject(e))}function zs(t){var e="";return si(t)?Ei("OrganizationsApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',js.error(e,t),Promise.reject(e))}function xs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "roleId" must be a valid UUID',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function ks(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat(e,"/").concat("destroy")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "entitySetId" must be a valid UUID',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function Rs(){return Ei("OrganizationsApi").get("/").then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function Ms(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',js.error(e,t),Promise.reject(e))}function Ns(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("datasource")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',js.error(e,t),Promise.reject(e))}function qs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("database")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',js.error(e,t),Promise.reject(e))}function Cs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("entity-sets")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",js.error(e,t),Promise.reject(e))}function Ls(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("integration")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",js.error(e,t),Promise.reject(e))}function Ks(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("members")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",js.error(e,t),Promise.reject(e))}function Bs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",js.error(e,t),Promise.reject(e))}function Fs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",js.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",js.error(r,t),Promise.reject(r))}function Vs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",js.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",js.error(r,t),Promise.reject(r))}function Js(t,e){return Ts(t,e,zi.ADD)}function Gs(t,e){var r="";return si(t)?$n(e)?Ei("OrganizationsApi").post("/".concat(t,"/").concat("datasource"),e).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "dataSource" must be a non-empty object',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function Ws(t,e){var r,n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",js.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n="invalid parameter: connections must be an array of strings",js.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("connections"),{data:r}).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function Hs(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',js.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("email-domains"),{data:r}).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function Qs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").post("/".concat("promote","/").concat(t),e,Es).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "tableName" must be a non-empty string',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function $s(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function Xs(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',js.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',js.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n))}function Zs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").patch("/".concat(t,"/").concat("database"),e,Es).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "databaseName" must be a non-empty string',js.error(r,t),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function Ys(t,e){return Ts(t,e,zi.REMOVE)}function tu(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat(e,"/").concat("transport")).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "entitySetId" must be a valid UUID',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function eu(t,e,r){var n="";return si(t)?si(e)?$n(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("datasource","/").concat(e),r).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(n='invalid parameter: "dataSource" must be a non-empty object',js.error(n,r),Promise.reject(n)):(n='invalid parameter: "dataSourceId" must be a valid UUID',js.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n))}function ru(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n);if(!Jn(e)||Hn(e))r="";else{if(!Xn(e))return n='invalid parameter: "description" must be a non-empty string',js.error(n,e),Promise.reject(n);r=e}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("description"),r,Es).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function nu(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("title"),e,Es).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(r='invalid parameter: "title" must be a non-empty string',js.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',js.error(r,t),Promise.reject(r))}function iu(t,e,r){var n,i="";if(!si(t))return i='invalid parameter: "organizationId" must be a valid UUID',js.error(i,t),Promise.reject(i);if(!si(e))return i='invalid parameter: "roleId" must be a valid UUID',js.error(i,e),Promise.reject(i);if(!Jn(r)||Hn(r))n="";else{if(!Xn(r))return i='invalid parameter: "description" must be a non-empty string',js.error(i,r),Promise.reject(i);n=r}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("description"),n,Es).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)}))}function ou(t,e,r){var n="";return si(t)?si(e)?pi(r,os,ns)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("grant"),r).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(n='invalid parameter: "grant" must be a valid Grant',js.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',js.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n))}function au(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("title"),r,Es).then((function(t){return t.data})).catch((function(t){return js.error(t),Promise.reject(t)})):(n='invalid parameter: "title" must be a non-empty string',js.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',js.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',js.error(n,t),Promise.reject(n))}var su=new kn("PersistentSearchApi");function uu(t){var e="";return $n(t)?Ei("PersistentSearchApi").post("",t).then((function(t){return t.data})).catch((function(t){return su.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearch" must be a non-empty object',su.error(e,t),Promise.reject(e))}function cu(t){var e="";return si(t)?Ei("PersistentSearchApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return su.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearchId" must be a valid UUID',su.error(e,t),Promise.reject(e))}function pu(t){var e="";return No()(t)?Ei("PersistentSearchApi").get("?includeExpired=".concat(t)).then((function(t){return t.data})).catch((function(t){return su.error(t),Promise.reject(t)})):(e='invalid parameter: "includeExpired" must be a boolean',su.error(e,t),Promise.reject(e))}function fu(t,e){var r="";return si(t)?Xn(e)?Ei("PersistentSearchApi").patch("/".concat(t,"/").concat("expiration"),e).then((function(t){return t.data})).catch((function(t){return su.error(t),Promise.reject(t)})):(r='invalid parameter: "expiration" must be a valid string',su.error(r,t),Promise.reject(r)):(r='invalid parameter: "persistentSearchId" must be a valid UUID',su.error(r,t),Promise.reject(r))}var hu=new kn("PrincipalsApi");function lu(){return Ei("PrincipalsApi").get("/".concat("roles")).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function du(){return Ei("PrincipalsApi").get("/".concat("users")).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function yu(){return Ei("PrincipalsApi").get("/".concat("db")).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function vu(){return Ei("PrincipalsApi").get("/".concat("roles","/").concat("current")).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function mu(t){var e="";return pi(t,Ba,La)?Ei("PrincipalsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)})):(e="invalid parameter: principal must be a valid Principal",hu.error(e,t),Promise.reject(e))}function gu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat(t)).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)})):(e="invalid parameter: userId must be a non-empty string",hu.error(e,t),Promise.reject(e))}function _u(t){var e="";return Qn(t)?t.every(Xn)?Ei("PrincipalsApi").post("/".concat("users"),t).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)})):(e='invalid parameter: "userIds" must be an array of strings',hu.error(e,t),Promise.reject(e)):(e='invalid parameter: "userIds" must be a non-empty array',hu.error(e,t),Promise.reject(e))}function bu(){return Ei("PrincipalsApi").post("/".concat("db","/").concat("credential")).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}function wu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat("search","/").concat(t)).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)})):(e="invalid parameter: searchQuery must be a non-empty string",hu.error(e,t),Promise.reject(e))}function Iu(){return Ei("PrincipalsApi").get("/".concat("sync")).then((function(t){return t.data})).catch((function(t){return hu.error(t),Promise.reject(t)}))}var ju=new kn("SearchApi");function Eu(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ju.error(n,t),Promise.reject(n);if("boolean"!=typeof r)return n="invalid parameter: idsOnly must be a boolean",ju.error(n,r),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",ju.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),ju.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s,u=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=u,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),ju.error(n,e[ao]),Promise.reject(n);if(Gn(e[so])||ui(e[so]))a=Kr().withMutations((function(t){return e[so].forEach((function(e){return t.add(e)}))})).toJS(),i.edge=a;else if(Jn(e[so]))return n="invalid parameter: filter.".concat(so," must be a set of valid UUIDs"),ju.error(n,e[so]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))s=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=s;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),ju.error(n,e[uo]),Promise.reject(n);var c="/".concat(t,"/").concat("neighbors","/").concat("advanced"),p=r?"".concat(c,"/").concat("ids"):c;return Ei("SearchApi").post(p,i).then((function(t){return t.data})).catch((function(t){return ju.error(t),Promise.reject(t)}))}function Tu(t){var e="";if(!$n(t))return e='invalid parameter: "searchConstraints" must be a non-empty object',ju.error(e,t),Promise.reject(e);var r=t.entitySetIds,n=t.maxHits,i=t.start;return ui(r)?!ss()(i)||i<0?(e='invalid property: "start" must be a positive number',ju.error(e,i),Promise.reject(e)):!ss()(n)||n<0?(e='invalid property: "maxHits" must be a positive number',ju.error(e,n),Promise.reject(e)):Ei("SearchApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return ju.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetIds" must be a non-empty array of valid UUIDs',ju.error(e,r),Promise.reject(e))}function Su(t){var e="";if(!$n(t))return e='invalid parameter: "searchOptions" must be a non-empty object',ju.error(e,t),Promise.reject(e);var r={},n=t.entityTypeId,i=t.maxHits,o=t.organizationId,a=t.propertyTypeIds,s=t.searchTerm,u=t.start;if(!ss()(u)||u<0)return e='invalid property: "start" must be a positive number',ju.error(e,u),Promise.reject(e);if(!ss()(i)||i<0)return e='invalid property: "maxHits" must be a positive number',ju.error(e,i),Promise.reject(e);if(r.start=u,r.maxHits=i,Jn(s)){if(!Xn(s))return e='invalid property: "searchTerm" must be a non-empty string',ju.error(e,s),Promise.reject(e);r.kw=s}if(Jn(n)){if(!si(n))return e='invalid parameter: "entityTypeId" must be a valid UUID',ju.error(e,n),Promise.reject(e);r.entityTypeId=n}if(Jn(a)){if(!ui(a))return e='invalid parameter: "propertyTypeIds" must be a non-empty array of valid UUIDs',ju.error(e,a),Promise.reject(e);r.pid=Kr().withMutations((function(t){a.forEach((function(e){t.add(e)}))})).toJS()}else r.excludePropertyTypes=!0;return si(o)&&(r.organizationId=o),Ei("SearchApi").post("/",r).then((function(t){return t.data})).catch((function(t){return ju.error(t),Promise.reject(t)}))}var Au="v0.89.0";e.default={AppApi:n,AuthorizationsApi:o,CodexApi:a,DataApi:u,DataIntegrationApi:c,DataSetsApi:p,EntityDataModelApi:f,EntitySetsApi:h,OrganizationsApi:y,PermissionsApi:d,PersistentSearchApi:v,PrincipalsApi:m,SearchApi:g,Constants:s,Models:l,Types:i,configure:yi,version:Au}}])})); /***/ }), -/* 219 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { -var isPrototype = __webpack_require__(120), - nativeKeys = __webpack_require__(365); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; +var baseGetTag = __webpack_require__(39), + isObjectLike = __webpack_require__(31), + isPlainObject = __webpack_require__(25); -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/** `Object#toString` result references. */ +var domExcTag = '[object DOMException]', + errorTag = '[object Error]'; /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } +function isError(value) { + if (!isObjectLike(value)) { + return false; } - return result; + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } -module.exports = baseKeys; +module.exports = isError; /***/ }), -/* 220 */ -/***/ (function(module, exports) { +/* 283 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(33); + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = root.isFinite; /** - * Creates a unary function that invokes `func` with its argument transformed. + * Checks if `value` is a finite primitive number. * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(3); + * // => true + * + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; +function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); } -module.exports = overArg; +module.exports = isFinite; /***/ }), -/* 221 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(68), - root = __webpack_require__(47); - -/* Built-in method references that are verified to be native. */ -var Set = getNative(root, 'Set'); - -module.exports = Set; - +"use strict"; -/***/ }), -/* 222 */ -/***/ (function(module, exports, __webpack_require__) { +Object.defineProperty(exports, '__esModule', { value: true }); +var prefix = 'fas'; +var iconName = 'trash'; +var width = 448; +var height = 512; +var ligatures = []; +var unicode = 'f1f8'; +var svgPathData = 'M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z'; -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(53); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; +exports.definition = { + prefix: prefix, + iconName: iconName, + icon: [ + width, + height, + ligatures, + unicode, + svgPathData + ]}; +exports.faTrash = exports.definition; +exports.prefix = prefix; +exports.iconName = iconName; +exports.width = width; +exports.height = height; +exports.ligatures = ligatures; +exports.unicode = unicode; +exports.svgPathData = svgPathData; /***/ }), -/* 223 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { -// check on default Array iterator -var Iterators = __webpack_require__(74); -var ITERATOR = __webpack_require__(40)('iterator'); -var ArrayProto = Array.prototype; - -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - +!function(e,t){ true?module.exports=t(__webpack_require__(3),__webpack_require__(0),__webpack_require__(588),__webpack_require__(589)):undefined}(this,function(e,t,n,r){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t 3 + */ +var findLast = createFind(findLastIndex); + +module.exports = findLast; /***/ }), -/* 226 */ +/* 288 */ /***/ (function(module, exports, __webpack_require__) { -var ITERATOR = __webpack_require__(40)('iterator'); -var SAFE_CLOSING = false; +"use strict"; -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } +Object.defineProperty(exports, '__esModule', { value: true }); +var prefix = 'fas'; +var iconName = 'chevron-up'; +var width = 448; +var height = 512; +var ligatures = []; +var unicode = 'f077'; +var svgPathData = 'M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z'; -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; +exports.definition = { + prefix: prefix, + iconName: iconName, + icon: [ + width, + height, + ligatures, + unicode, + svgPathData + ]}; +exports.faChevronUp = exports.definition; +exports.prefix = prefix; +exports.iconName = iconName; +exports.width = width; +exports.height = height; +exports.ligatures = ligatures; +exports.unicode = unicode; +exports.svgPathData = svgPathData; /***/ }), -/* 227 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { -var baseTimes = __webpack_require__(405), - isArguments = __webpack_require__(96), - isArray = __webpack_require__(30), - isBuffer = __webpack_require__(78), - isIndex = __webpack_require__(118), - isTypedArray = __webpack_require__(99); +"use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +Object.defineProperty(exports, '__esModule', { value: true }); +var prefix = 'fas'; +var iconName = 'chevron-down'; +var width = 448; +var height = 512; +var ligatures = []; +var unicode = 'f078'; +var svgPathData = 'M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z'; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +exports.definition = { + prefix: prefix, + iconName: iconName, + icon: [ + width, + height, + ligatures, + unicode, + svgPathData + ]}; -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; +exports.faChevronDown = exports.definition; +exports.prefix = prefix; +exports.iconName = iconName; +exports.width = width; +exports.height = height; +exports.ligatures = ligatures; +exports.unicode = unicode; +exports.svgPathData = svgPathData; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); - } +/***/ }), +/* 290 */, +/* 291 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(592); + + +/***/ }), +/* 292 */ +/***/ (function(module, exports) { + +function _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 result; -} -module.exports = arrayLikeKeys; + return target; +} +module.exports = _objectWithoutPropertiesLoose; /***/ }), -/* 228 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { -/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(47); +var Symbol = __webpack_require__(56); -/** Detect free variable `exports`. */ -var freeExports = true && exports && !exports.nodeType && exports; +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; +/** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; /** Built-in value references. */ -var Buffer = moduleExports ? root.Buffer : undefined, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; +var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** - * Creates a clone of `buffer`. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); - } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; - buffer.copy(result); + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } return result; } -module.exports = cloneBuffer; +module.exports = getRawTag; -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(160)(module))) /***/ }), -/* 229 */ +/* 294 */ /***/ (function(module, exports) { +/** Used for built-in method references. */ +var objectProto = Object.prototype; + /** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ +var nativeObjectToString = objectProto.toString; + +/** + * Converts `value` to a string using `Object.prototype.toString`. * - * console.log(arrays[0] === arrays[1]); - * // => false + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ -function stubArray() { - return []; +function objectToString(value) { + return nativeObjectToString.call(value); } -module.exports = stubArray; +module.exports = objectToString; /***/ }), -/* 230 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(159), - getPrototype = __webpack_require__(124), - getSymbols = __webpack_require__(166), - stubArray = __webpack_require__(229); +__webpack_require__(296); +var $Object = __webpack_require__(15).Object; +module.exports = function getOwnPropertyDescriptor(it, key) { + return $Object.getOwnPropertyDescriptor(it, key); +}; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols; -/** - * Creates an array of the own and inherited enumerable symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; -}; +/***/ }), +/* 296 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = getSymbolsIn; +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = __webpack_require__(49); +var $getOwnPropertyDescriptor = __webpack_require__(123).f; + +__webpack_require__(126)('getOwnPropertyDescriptor', function () { + return function getOwnPropertyDescriptor(it, key) { + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); /***/ }), -/* 231 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetAllKeys = __webpack_require__(232), - getSymbols = __webpack_require__(166), - keys = __webpack_require__(79); +__webpack_require__(189); +module.exports = __webpack_require__(15).Object.getOwnPropertySymbols; -/** - * Creates an array of own enumerable property names and symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); -} -module.exports = getAllKeys; +/***/ }), +/* 298 */ +/***/ (function(module, exports, __webpack_require__) { + +// all enumerable object keys, includes symbols +var getKeys = __webpack_require__(76); +var gOPS = __webpack_require__(133); +var pIE = __webpack_require__(89); +module.exports = function (it) { + var result = getKeys(it); + var getSymbols = gOPS.f; + if (getSymbols) { + var symbols = getSymbols(it); + var isEnum = pIE.f; + var i = 0; + var key; + while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); + } return result; +}; /***/ }), -/* 232 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { -var arrayPush = __webpack_require__(159), - isArray = __webpack_require__(30); +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(49); +var toLength = __webpack_require__(92); +var toAbsoluteIndex = __webpack_require__(300); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; -/** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); -} -module.exports = baseGetAllKeys; +/***/ }), +/* 300 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(130); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; /***/ }), -/* 233 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(47); +var dP = __webpack_require__(36); +var anObject = __webpack_require__(37); +var getKeys = __webpack_require__(76); -/** Built-in value references. */ -var Uint8Array = root.Uint8Array; - -module.exports = Uint8Array; +module.exports = __webpack_require__(35) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; /***/ }), -/* 234 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(167); +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(49); +var gOPN = __webpack_require__(193).f; +var toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; -/** - * Creates a clone of `typedArray`. - * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. - */ -function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); -} +var getWindowNames = function (it) { + try { + return gOPN(it); + } catch (e) { + return windowNames.slice(); + } +}; -module.exports = cloneTypedArray; +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; /***/ }), -/* 235 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { -var baseCreate = __webpack_require__(236), - getPrototype = __webpack_require__(124), - isPrototype = __webpack_require__(120); +__webpack_require__(304); +module.exports = __webpack_require__(15).Object.keys; -/** - * Initializes an object clone. - * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; -} -module.exports = initCloneObject; +/***/ }), +/* 304 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 Object.keys(O) +var toObject = __webpack_require__(51); +var $keys = __webpack_require__(76); + +__webpack_require__(126)('keys', function () { + return function keys(it) { + return $keys(toObject(it)); + }; +}); /***/ }), -/* 236 */ +/* 305 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(44); +__webpack_require__(306); +var $Object = __webpack_require__(15).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; -/** Built-in value references. */ -var objectCreate = Object.create; -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); +/***/ }), +/* 306 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = baseCreate; +var $export = __webpack_require__(22); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(35), 'Object', { defineProperty: __webpack_require__(36).f }); /***/ }), -/* 237 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsEqual = __webpack_require__(168); - -/** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true - * - * object === other; - * // => false - */ -function isEqual(value, other) { - return baseIsEqual(value, other); -} - -module.exports = isEqual; +__webpack_require__(308); +module.exports = __webpack_require__(15).Array.isArray; /***/ }), -/* 238 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { -var SetCache = __webpack_require__(125), - arraySome = __webpack_require__(426), - cacheHas = __webpack_require__(126); +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = __webpack_require__(22); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +$export($export.S, 'Array', { isArray: __webpack_require__(134) }); -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; +/***/ }), +/* 309 */ +/***/ (function(module, exports, __webpack_require__) { - stack.set(array, other); - stack.set(other, array); +__webpack_require__(57); +__webpack_require__(77); +module.exports = __webpack_require__(91).f('iterator'); - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; -} +/***/ }), +/* 310 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = equalArrays; +var toInteger = __webpack_require__(130); +var defined = __webpack_require__(88); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; /***/ }), -/* 239 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { -var baseFlatten = __webpack_require__(119), - baseOrderBy = __webpack_require__(430), - baseRest = __webpack_require__(63), - isIterateeCall = __webpack_require__(171); +"use strict"; + +var create = __webpack_require__(93); +var descriptor = __webpack_require__(72); +var setToStringTag = __webpack_require__(75); +var IteratorPrototype = {}; -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); -}); +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(43)(IteratorPrototype, __webpack_require__(26)('iterator'), function () { return this; }); -module.exports = sortBy; +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; /***/ }), -/* 240 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { -var isObject = __webpack_require__(44); +"use strict"; -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} +var addToUnscopables = __webpack_require__(313); +var step = __webpack_require__(195); +var Iterators = __webpack_require__(58); +var toIObject = __webpack_require__(49); -module.exports = isStrictComparable; +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(135)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); /***/ }), -/* 241 */ +/* 313 */ /***/ (function(module, exports) { -/** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. - * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; -} +module.exports = function () { /* empty */ }; -module.exports = matchesStrictComparable; + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(189); +__webpack_require__(136); +__webpack_require__(315); +__webpack_require__(316); +module.exports = __webpack_require__(15).Symbol; /***/ }), -/* 242 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { -var baseForOwn = __webpack_require__(170), - createBaseEach = __webpack_require__(440); +__webpack_require__(129)('asyncIterator'); -/** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); -module.exports = baseEach; +/***/ }), +/* 316 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(129)('observable'); /***/ }), -/* 243 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { -var createBaseFor = __webpack_require__(439); +__webpack_require__(318); +module.exports = __webpack_require__(15).Object.getPrototypeOf; -/** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); -module.exports = baseFor; +/***/ }), +/* 318 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = __webpack_require__(51); +var $getPrototypeOf = __webpack_require__(194); + +__webpack_require__(126)('getPrototypeOf', function () { + return function getPrototypeOf(it) { + return $getPrototypeOf(toObject(it)); + }; +}); /***/ }), -/* 244 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { -var baseUniq = __webpack_require__(172); +__webpack_require__(320); +module.exports = __webpack_require__(15).Object.setPrototypeOf; -/** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. The order of result values is determined by the order they occur - * in the array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ -function uniq(array) { - return (array && array.length) ? baseUniq(array) : []; -} -module.exports = uniq; +/***/ }), +/* 320 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = __webpack_require__(22); +$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(321).set }); /***/ }), -/* 245 */ -/***/ (function(module, exports) { +/* 321 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = __webpack_require__(34); +var anObject = __webpack_require__(37); +var check = function (O, proto) { + anObject(O); + if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function (test, buggy, set) { + try { + set = __webpack_require__(40)(Function.call, __webpack_require__(123).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch (e) { buggy = true; } + return function setPrototypeOf(O, proto) { + check(O, proto); + if (buggy) O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} -module.exports = baseFindIndex; +/***/ }), +/* 322 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(323); +var $Object = __webpack_require__(15).Object; +module.exports = function create(P, D) { + return $Object.create(P, D); +}; /***/ }), -/* 246 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { -var baseUniq = __webpack_require__(172); +var $export = __webpack_require__(22); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', { create: __webpack_require__(93) }); + + +/***/ }), +/* 324 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The order of result values is - * determined by the order they occur in the array.The comparator is invoked - * with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * Copyright (c) 2013-present, Facebook, Inc. * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function uniqWith(array, comparator) { - comparator = typeof comparator == 'function' ? comparator : undefined; - return (array && array.length) ? baseUniq(array, undefined, comparator) : []; -} -module.exports = uniqWith; + + +var ReactPropTypesSecret = __webpack_require__(325); + +function emptyFunction() {} +function emptyFunctionWithReset() {} +emptyFunctionWithReset.resetWarningCache = emptyFunction; + +module.exports = function() { + function shim(props, propName, componentName, location, propFullName, secret) { + if (secret === ReactPropTypesSecret) { + // It is still safe when called from React. + return; + } + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + elementType: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim, + exact: getShim, + + checkPropTypes: emptyFunctionWithReset, + resetWarningCache: emptyFunction + }; + + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; /***/ }), -/* 247 */ +/* 325 */ /***/ (function(module, exports, __webpack_require__) { -var arrayMap = __webpack_require__(61), - baseIntersection = __webpack_require__(248), - baseRest = __webpack_require__(63), - castArrayLikeObject = __webpack_require__(249), - last = __webpack_require__(449); - +"use strict"; /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * Copyright (c) 2013-present, Facebook, Inc. * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; -}); -module.exports = intersectionWith; + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; /***/ }), -/* 248 */ +/* 326 */ /***/ (function(module, exports, __webpack_require__) { -var SetCache = __webpack_require__(125), - arrayIncludes = __webpack_require__(173), - arrayIncludesWith = __webpack_require__(174), - arrayMap = __webpack_require__(61), - baseUnary = __webpack_require__(69), - cacheHas = __webpack_require__(126); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; +var basePickBy = __webpack_require__(327), + hasIn = __webpack_require__(200); /** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. + * The base implementation of `_.pick` without support for individual + * property identifiers. * * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. */ -function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; +function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); +} - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; - } - array = arrays[0]; +module.exports = basePick; + + +/***/ }), +/* 327 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGet = __webpack_require__(94), + baseSet = __webpack_require__(351), + castPath = __webpack_require__(95); +/** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ +function basePickBy(object, paths, predicate) { var index = -1, - seen = caches[0]; + length = paths.length, + result = {}; - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } - } - if (seen) { - seen.push(computed); - } - result.push(value); + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); } } return result; } -module.exports = baseIntersection; +module.exports = basePickBy; /***/ }), -/* 249 */ +/* 328 */ /***/ (function(module, exports, __webpack_require__) { -var isArrayLikeObject = __webpack_require__(128); +var memoize = __webpack_require__(329); + +/** Used as the maximum memoize cache size. */ +var MAX_MEMOIZE_SIZE = 500; /** - * Casts `value` to an empty array if it's not an array like object. + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. */ -function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; +function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; } -module.exports = castArrayLikeObject; +module.exports = memoizeCapped; /***/ }), -/* 250 */ +/* 329 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** -* -* VALIDATE: integer-array -* -* -* DESCRIPTION: -* - Validates if a value is an integer array. -* -* -* NOTES: -* [1] -* -* -* TODO: -* [1] -* -* -* LICENSE: -* MIT -* -* Copyright (c) 2015. Athan Reines. -* -* -* AUTHOR: -* Athan Reines. kgryte@gmail.com. 2015. -* -*/ +var MapCache = __webpack_require__(138); +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; -// MODULES // + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; +} -var isArray = __webpack_require__( 175 ), - isInteger = __webpack_require__( 452 ); +// Expose `MapCache`. +memoize.Cache = MapCache; +module.exports = memoize; -// IS INTEGER ARRAY // -/** -* FUNCTION: isIntegerArray( value ) -* Validates if a value is an integer array. -* -* @param {*} value - value to be validated -* @returns {Boolean} boolean indicating if a value is an integer array -*/ -function isIntegerArray( value ) { - var len; - if ( !isArray( value ) ) { - return false; - } - len = value.length; - if ( !len ) { - return false; - } - for ( var i = 0; i < len; i++ ) { - if ( !isInteger( value[i] ) ) { - return false; - } - } - return true; -} // end FUNCTION isIntegerArray() +/***/ }), +/* 330 */ +/***/ (function(module, exports, __webpack_require__) { +var Hash = __webpack_require__(331), + ListCache = __webpack_require__(97), + Map = __webpack_require__(139); -// EXPORTS // +/** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ +function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; +} -module.exports = isIntegerArray; +module.exports = mapCacheClear; /***/ }), -/* 251 */ +/* 331 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var hashClear = __webpack_require__(332), + hashDelete = __webpack_require__(337), + hashGet = __webpack_require__(338), + hashHas = __webpack_require__(339), + hashSet = __webpack_require__(340); + /** -* -* VALIDATE: function -* -* -* DESCRIPTION: -* - Validates if a value is a function. -* -* -* NOTES: -* [1] -* -* -* TODO: -* [1] -* -* -* LICENSE: -* MIT -* -* Copyright (c) 2014. Athan Reines. -* -* -* AUTHOR: -* Athan Reines. kgryte@gmail.com. 2014. -* -*/ + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ +function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } +} +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; -/** -* FUNCTION: isFunction( value ) -* Validates if a value is a function. -* -* @param {*} value - value to be validated -* @returns {Boolean} boolean indicating whether value is a function -*/ -function isFunction( value ) { - return ( typeof value === 'function' ); -} // end FUNCTION isFunction() +module.exports = Hash; -// EXPORTS // +/***/ }), +/* 332 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = isFunction; +var nativeCreate = __webpack_require__(96); + +/** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ +function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; +} + +module.exports = hashClear; /***/ }), -/* 252 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { -var Stack = __webpack_require__(122), - assignMergeValue = __webpack_require__(253), - baseFor = __webpack_require__(243), - baseMergeDeep = __webpack_require__(456), - isObject = __webpack_require__(44), - keysIn = __webpack_require__(80), - safeGet = __webpack_require__(254); +var isFunction = __webpack_require__(16), + isMasked = __webpack_require__(334), + isObject = __webpack_require__(29), + toSource = __webpack_require__(197); /** - * The base implementation of `_.merge` without support for multiple sources. + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ +var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + +/** Used to detect host constructors (Safari). */ +var reIsHostCtor = /^\[object .+?Constructor\]$/; + +/** Used for built-in method references. */ +var funcProto = Function.prototype, + objectProto = Object.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Used to detect if a method is native. */ +var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' +); + +/** + * The base implementation of `_.isNative` without bad shim checks. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. */ -function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; +function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; - - if (newValue === undefined) { - newValue = srcValue; - } - assignMergeValue(object, key, newValue); - } - }, keysIn); + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } -module.exports = baseMerge; +module.exports = baseIsNative; /***/ }), -/* 253 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(117), - eq = __webpack_require__(76); +var coreJsData = __webpack_require__(335); + +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. + * Checks if `func` has its source masked. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ -function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } +function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } -module.exports = assignMergeValue; +module.exports = isMasked; /***/ }), -/* 254 */ +/* 335 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(33); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; + + +/***/ }), +/* 336 */ /***/ (function(module, exports) { /** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * Gets the value at `key` of `object`. * * @private - * @param {Object} object The object to query. + * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ -function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } +function getValue(object, key) { + return object == null ? undefined : object[key]; +} - if (key == '__proto__') { - return; - } +module.exports = getValue; - return object[key]; + +/***/ }), +/* 337 */ +/***/ (function(module, exports) { + +/** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } -module.exports = safeGet; +module.exports = hashDelete; /***/ }), -/* 255 */ +/* 338 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var nativeCreate = __webpack_require__(96); +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; -var util = __webpack_require__(81); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -module.exports = SchemaObject; +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -function SchemaObject(obj) { - util.copy(obj, this); +/** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; } +module.exports = hashGet; + /***/ }), -/* 256 */ +/* 339 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - +var nativeCreate = __webpack_require__(96); -module.exports = function (data, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; +/** Used for built-in method references. */ +var objectProto = Object.prototype; - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; - var seen = []; - return (function stringify (node) { - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } +/** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); +} - if (node === undefined) return; - if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; - if (typeof node !== 'object') return JSON.stringify(node); +module.exports = hashHas; - var i, out; - if (Array.isArray(node)) { - out = '['; - for (i = 0; i < node.length; i++) { - if (i) out += ','; - out += stringify(node[i]) || 'null'; - } - return out + ']'; - } - if (node === null) return 'null'; +/***/ }), +/* 340 */ +/***/ (function(module, exports, __webpack_require__) { - if (seen.indexOf(node) !== -1) { - if (cycles) return JSON.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } +var nativeCreate = __webpack_require__(96); - var seenIndex = seen.push(node) - 1; - var keys = Object.keys(node).sort(cmp && cmp(node)); - out = ''; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node[key]); +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; - if (!value) continue; - if (out) out += ','; - out += JSON.stringify(key) + ':' + value; - } - seen.splice(seenIndex, 1); - return '{' + out + '}'; - })(data); -}; +/** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ +function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; +} + +module.exports = hashSet; /***/ }), -/* 257 */ +/* 341 */ +/***/ (function(module, exports) { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; + + +/***/ }), +/* 342 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var assocIndexOf = __webpack_require__(98); -module.exports = function generate_validate(it, $keyword, $ruleType) { - var out = ''; - var $async = it.schema.$async === true, - $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), - $id = it.self._getId(it.schema); - if (it.opts.strictKeywords) { - var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); - if ($unknownKwd) { - var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; - if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); - else throw new Error($keywordsMsg); - } - } - if (it.isTop) { - out += ' var validate = '; - if ($async) { - it.async = true; - out += 'async '; - } - out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; - if ($id && (it.opts.sourceCode || it.opts.processCode)) { - out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; - } - } - if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { - var $keyword = 'false schema'; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - if (it.schema === false) { - if (it.isTop) { - $breakOnError = true; - } else { - out += ' var ' + ($valid) + ' = false; '; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'boolean schema is false\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - if (it.isTop) { - if ($async) { - out += ' return data; '; - } else { - out += ' validate.errors = null; return true; '; - } - } else { - out += ' var ' + ($valid) + ' = true; '; - } - } - if (it.isTop) { - out += ' }; return validate; '; - } - return out; +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; + +/** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + return false; } - if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); - it.baseId = it.baseId || it.rootId; - delete it.isTop; - it.dataPathArr = [undefined]; - if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored in the schema root'; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - out += ' var vErrors = null; '; - out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data; '; + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); } else { - var $lvl = it.level, - $dataLvl = it.dataLevel, - $data = 'data' + ($dataLvl || ''); - if ($id) it.baseId = it.resolve.url(it.baseId, $id); - if ($async && !it.async) throw new Error('async schema in sync schema'); - out += ' var errs_' + ($lvl) + ' = errors;'; + splice.call(data, index, 1); } - var $valid = 'valid' + $lvl, - $breakOnError = !it.opts.allErrors, - $closingBraces1 = '', - $closingBraces2 = ''; - var $errorKeyword; - var $typeSchema = it.schema.type, - $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { - if ($typeIsArray) { - if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); - } else if ($typeSchema != 'null') { - $typeSchema = [$typeSchema, 'null']; - $typeIsArray = true; - } + --this.size; + return true; +} + +module.exports = listCacheDelete; + + +/***/ }), +/* 343 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(98); + +/** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; +} + +module.exports = listCacheGet; + + +/***/ }), +/* 344 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(98); + +/** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; +} + +module.exports = listCacheHas; + + +/***/ }), +/* 345 */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(98); + +/** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ +function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; } - if ($typeIsArray && $typeSchema.length == 1) { - $typeSchema = $typeSchema[0]; - $typeIsArray = false; + return this; +} + +module.exports = listCacheSet; + + +/***/ }), +/* 346 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(99); + +/** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; +} + +module.exports = mapCacheDelete; + + +/***/ }), +/* 347 */ +/***/ (function(module, exports) { + +/** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ +function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); +} + +module.exports = isKeyable; + + +/***/ }), +/* 348 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(99); + +/** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function mapCacheGet(key) { + return getMapData(this, key).get(key); +} + +module.exports = mapCacheGet; + + +/***/ }), +/* 349 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(99); + +/** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function mapCacheHas(key) { + return getMapData(this, key).has(key); +} + +module.exports = mapCacheHas; + + +/***/ }), +/* 350 */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(99); + +/** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ +function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; +} + +module.exports = mapCacheSet; + + +/***/ }), +/* 351 */ +/***/ (function(module, exports, __webpack_require__) { + +var assignValue = __webpack_require__(141), + castPath = __webpack_require__(95), + isIndex = __webpack_require__(101), + isObject = __webpack_require__(29), + toKey = __webpack_require__(61); + +/** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ +function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; } - if (it.schema.$ref && $refKeywords) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); - } else if (it.opts.extendRefs !== true) { - $refKeywords = false; - it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + path = castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; } - } - if (it.schema.$comment && it.opts.$comment) { - out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); - } - if ($typeSchema) { - if (it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } } - var $rulesGroup = it.RULES.types[$typeSchema]; - if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - if ($coerceToTypes) { - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; - } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; - } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; - } - if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; - } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; - } - } - } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; - } else { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' } '; - } - } - if (it.schema.$ref && !$refKeywords) { - out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; - if ($breakOnError) { - out += ' } if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } else { - var arr2 = it.RULES; - if (arr2) { - var $rulesGroup, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $rulesGroup = arr2[i2 += 1]; - if ($shouldUseGroup($rulesGroup)) { - if ($rulesGroup.type) { - out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; - } - if (it.opts.useDefaults) { - if ($rulesGroup.type == 'object' && it.schema.properties) { - var $schema = it.schema.properties, - $schemaKeys = Object.keys($schema); - var arr3 = $schemaKeys; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $sch = $schema[$propertyKey]; - if ($sch.default !== undefined) { - var $passData = $data + it.util.getProperty($propertyKey); - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { - var arr4 = it.schema.items; - if (arr4) { - var $sch, $i = -1, - l4 = arr4.length - 1; - while ($i < l4) { - $sch = arr4[$i += 1]; - if ($sch.default !== undefined) { - var $passData = $data + '[' + $i + ']'; - if (it.compositeRule) { - if (it.opts.strictDefaults) { - var $defaultMsg = 'default is ignored for: ' + $passData; - if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); - else throw new Error($defaultMsg); - } - } else { - out += ' if (' + ($passData) + ' === undefined '; - if (it.opts.useDefaults == 'empty') { - out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; - } - out += ' ) ' + ($passData) + ' = '; - if (it.opts.useDefaults == 'shared') { - out += ' ' + (it.useDefault($sch.default)) + ' '; - } else { - out += ' ' + (JSON.stringify($sch.default)) + ' '; - } - out += '; '; - } - } - } - } - } - } - var arr5 = $rulesGroup.rules; - if (arr5) { - var $rule, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $rule = arr5[i5 += 1]; - if ($shouldUseRule($rule)) { - var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); - if ($code) { - out += ' ' + ($code) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces1) + ' '; - $closingBraces1 = ''; - } - if ($rulesGroup.type) { - out += ' } '; - if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - out += ' else { '; - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - } - } - if ($breakOnError) { - out += ' if (errors === '; - if ($top) { - out += '0'; - } else { - out += 'errs_' + ($lvl); - } - out += ') { '; - $closingBraces2 += '}'; - } - } - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces2) + ' '; + assignValue(nested, key, newValue); + nested = nested[key]; } - if ($top) { - if ($async) { - out += ' if (errors === 0) return data; '; - out += ' else throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; '; - out += ' return errors === 0; '; + return object; +} + +module.exports = baseSet; + + +/***/ }), +/* 352 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ +function baseHasIn(object, key) { + return object != null && key in Object(object); +} + +module.exports = baseHasIn; + + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(95), + isArguments = __webpack_require__(78), + isArray = __webpack_require__(21), + isIndex = __webpack_require__(101), + isLength = __webpack_require__(142), + toKey = __webpack_require__(61); + +/** + * Checks if `path` exists on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. + */ +function hasPath(object, path, hasFunc) { + path = castPath(path, object); + + var index = -1, + length = path.length, + result = false; + + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; } - out += ' }; return validate;'; - } else { - out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + object = object[key]; } - out = it.util.cleanUpCode(out); - if ($top) { - out = it.util.finalCleanUpCode(out, $async); + if (result || ++index != length) { + return result; } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); +} - function $shouldUseGroup($rulesGroup) { - var rules = $rulesGroup.rules; - for (var i = 0; i < rules.length; i++) - if ($shouldUseRule(rules[i])) return true; - } +module.exports = hasPath; - function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); - } - function $ruleImplementsSomeKeyword($rule) { - var impl = $rule.implements; - for (var i = 0; i < impl.length; i++) - if (it.schema[impl[i]] !== undefined) return true; - } - return out; +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetTag = __webpack_require__(39), + isObjectLike = __webpack_require__(31); + +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]'; + +/** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } +module.exports = baseIsArguments; + /***/ }), -/* 258 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var flatten = __webpack_require__(201), + overRest = __webpack_require__(202), + setToString = __webpack_require__(204); -module.exports = function generate__limit(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == 'maximum', - $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $notOp = $isMax ? '>' : '<', - $errorKeyword = undefined; - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $exclType = 'exclType' + $lvl, - $exclIsNumber = 'exclIsNumber' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - 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) + '=\'; '; - if ($schema === undefined) { - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaValueExcl; - $isData = $isDataExcl; - } - } else { - var $exclIsNumber = typeof $schemaExcl == 'number', - $opStr = $op; - if ($exclIsNumber && $isData) { - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; - } else { - if ($exclIsNumber && $schema === undefined) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $schemaValue = $schemaExcl; - $notOp += '='; - } else { - if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); - if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { - $exclusive = true; - $errorKeyword = $exclusiveKeyword; - $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; - $notOp += '='; - } else { - $exclusive = false; - $opStr += '='; - } - } - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; - } - } - $errorKeyword = $errorKeyword || $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; - } - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; +/** + * A specialized version of `baseRest` which flattens the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ +function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); } +module.exports = flatRest; + /***/ }), -/* 259 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var Symbol = __webpack_require__(56), + isArguments = __webpack_require__(78), + isArray = __webpack_require__(21); -module.exports = function generate__limitItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxItems' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxItems') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; +/** Built-in value references. */ +var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; + +/** + * Checks if `value` is a flattenable `arguments` object or array. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. + */ +function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } +module.exports = isFlattenable; + /***/ }), -/* 260 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var constant = __webpack_require__(358), + defineProperty = __webpack_require__(199), + identity = __webpack_require__(79); -module.exports = function generate__limitLength(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxLength' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - if (it.opts.unicode === false) { - out += ' ' + ($data) + '.length '; - } else { - out += ' ucs2length(' + ($data) + ') '; - } - out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be '; - if ($keyword == 'maxLength') { - out += 'longer'; - } else { - out += 'shorter'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' characters\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; +/** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; + +module.exports = baseSetToString; + + +/***/ }), +/* 358 */ +/***/ (function(module, exports) { + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; } +module.exports = constant; + /***/ }), -/* 261 */ -/***/ (function(module, exports, __webpack_require__) { +/* 359 */ +/***/ (function(module, exports) { -"use strict"; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; -module.exports = function generate__limitProperties(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $op = $keyword == 'maxProperties' ? '>' : '<'; - out += 'if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have '; - if ($keyword == 'maxProperties') { - out += 'more'; - } else { - out += 'fewer'; - } - out += ' than '; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + ($schema); - } - out += ' properties\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeNow = Date.now; + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + count = 0; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; - } - return out; + return func.apply(undefined, arguments); + }; } +module.exports = shortOut; + /***/ }), -/* 262 */ -/***/ (function(module) { +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Core schema meta-schema\",\"definitions\":{\"schemaArray\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#\"}},\"nonNegativeInteger\":{\"type\":\"integer\",\"minimum\":0},\"nonNegativeIntegerDefault0\":{\"allOf\":[{\"$ref\":\"#/definitions/nonNegativeInteger\"},{\"default\":0}]},\"simpleTypes\":{\"enum\":[\"array\",\"boolean\",\"integer\",\"null\",\"number\",\"object\",\"string\"]},\"stringArray\":{\"type\":\"array\",\"items\":{\"type\":\"string\"},\"uniqueItems\":true,\"default\":[]}},\"type\":[\"object\",\"boolean\"],\"properties\":{\"$id\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$schema\":{\"type\":\"string\",\"format\":\"uri\"},\"$ref\":{\"type\":\"string\",\"format\":\"uri-reference\"},\"$comment\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"},\"description\":{\"type\":\"string\"},\"default\":true,\"readOnly\":{\"type\":\"boolean\",\"default\":false},\"examples\":{\"type\":\"array\",\"items\":true},\"multipleOf\":{\"type\":\"number\",\"exclusiveMinimum\":0},\"maximum\":{\"type\":\"number\"},\"exclusiveMaximum\":{\"type\":\"number\"},\"minimum\":{\"type\":\"number\"},\"exclusiveMinimum\":{\"type\":\"number\"},\"maxLength\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minLength\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"pattern\":{\"type\":\"string\",\"format\":\"regex\"},\"additionalItems\":{\"$ref\":\"#\"},\"items\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/schemaArray\"}],\"default\":true},\"maxItems\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minItems\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"uniqueItems\":{\"type\":\"boolean\",\"default\":false},\"contains\":{\"$ref\":\"#\"},\"maxProperties\":{\"$ref\":\"#/definitions/nonNegativeInteger\"},\"minProperties\":{\"$ref\":\"#/definitions/nonNegativeIntegerDefault0\"},\"required\":{\"$ref\":\"#/definitions/stringArray\"},\"additionalProperties\":{\"$ref\":\"#\"},\"definitions\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"properties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"default\":{}},\"patternProperties\":{\"type\":\"object\",\"additionalProperties\":{\"$ref\":\"#\"},\"propertyNames\":{\"format\":\"regex\"},\"default\":{}},\"dependencies\":{\"type\":\"object\",\"additionalProperties\":{\"anyOf\":[{\"$ref\":\"#\"},{\"$ref\":\"#/definitions/stringArray\"}]}},\"propertyNames\":{\"$ref\":\"#\"},\"const\":true,\"enum\":{\"type\":\"array\",\"items\":true,\"minItems\":1,\"uniqueItems\":true},\"type\":{\"anyOf\":[{\"$ref\":\"#/definitions/simpleTypes\"},{\"type\":\"array\",\"items\":{\"$ref\":\"#/definitions/simpleTypes\"},\"minItems\":1,\"uniqueItems\":true}]},\"format\":{\"type\":\"string\"},\"contentMediaType\":{\"type\":\"string\"},\"contentEncoding\":{\"type\":\"string\"},\"if\":{\"$ref\":\"#\"},\"then\":{\"$ref\":\"#\"},\"else\":{\"$ref\":\"#\"},\"allOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"anyOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"oneOf\":{\"$ref\":\"#/definitions/schemaArray\"},\"not\":{\"$ref\":\"#\"}},\"default\":true}"); +var overArg = __webpack_require__(206); -/***/ }), -/* 263 */ -/***/ (function(module, exports) { +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeKeys = overArg(Object.keys, Object); -module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; +module.exports = nativeKeys; /***/ }), -/* 264 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(53); -var aFunction = __webpack_require__(90); -var SPECIES = __webpack_require__(40)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; +var getNative = __webpack_require__(52), + root = __webpack_require__(33); + +/* Built-in method references that are verified to be native. */ +var DataView = getNative(root, 'DataView'); + +module.exports = DataView; /***/ }), -/* 265 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { -var ctx = __webpack_require__(56); -var invoke = __webpack_require__(522); -var html = __webpack_require__(206); -var cel = __webpack_require__(140); -var global = __webpack_require__(37); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function (event) { - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (__webpack_require__(88)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; +var getNative = __webpack_require__(52), + root = __webpack_require__(33); +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); -/***/ }), -/* 266 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; +module.exports = Promise; /***/ }), -/* 267 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(53); -var isObject = __webpack_require__(48); -var newPromiseCapability = __webpack_require__(179); +var getNative = __webpack_require__(52), + root = __webpack_require__(33); -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; +/* Built-in method references that are verified to be native. */ +var WeakMap = getNative(root, 'WeakMap'); + +module.exports = WeakMap; /***/ }), -/* 268 */ -/***/ (function(module, exports, __webpack_require__) { +/* 364 */ +/***/ (function(module, exports) { -"use strict"; +/** + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] + */ +function stubFalse() { + return false; +} +module.exports = stubFalse; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = AddButton; -var _react = _interopRequireDefault(__webpack_require__(0)); +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { -var _IconButton = _interopRequireDefault(__webpack_require__(181)); +var baseGetTag = __webpack_require__(39), + isLength = __webpack_require__(142), + isObjectLike = __webpack_require__(31); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; -function AddButton(_ref) { - var className = _ref.className, - onClick = _ref.onClick, - disabled = _ref.disabled; - return _react["default"].createElement("div", { - className: "row" - }, _react["default"].createElement("p", { - className: "col-xs-3 col-xs-offset-9 text-right ".concat(className) - }, _react["default"].createElement(_IconButton["default"], { - type: "info", - icon: "plus", - className: "btn-add col-xs-12", - "aria-label": "Add", - tabIndex: "0", - onClick: onClick, - disabled: disabled - }))); +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; + +/** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } +module.exports = baseIsTypedArray; + + /***/ }), -/* 269 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +module.exports = __webpack_require__(91).f('toPrimitive'); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { -var _react = _interopRequireWildcard(__webpack_require__(0)); +__webpack_require__(136); +__webpack_require__(57); +__webpack_require__(77); +__webpack_require__(368); +__webpack_require__(374); +__webpack_require__(377); +__webpack_require__(379); +module.exports = __webpack_require__(15).Set; -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -var _utils = __webpack_require__(41); +/***/ }), +/* 368 */ +/***/ (function(module, exports, __webpack_require__) { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +"use strict"; -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } +var strong = __webpack_require__(369); +var validate = __webpack_require__(211); +var SET = 'Set'; -function _typeof(obj) { 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); } +// 23.2 Set Objects +module.exports = __webpack_require__(370)(SET, function (get) { + return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value) { + return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); + } +}, strong); -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); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { -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); } } +"use strict"; -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +var dP = __webpack_require__(36).f; +var create = __webpack_require__(93); +var redefineAll = __webpack_require__(146); +var ctx = __webpack_require__(40); +var anInstance = __webpack_require__(147); +var forOf = __webpack_require__(82); +var $iterDefine = __webpack_require__(135); +var step = __webpack_require__(195); +var setSpecies = __webpack_require__(210); +var DESCRIPTORS = __webpack_require__(35); +var fastKey = __webpack_require__(127).fastKey; +var validate = __webpack_require__(211); +var SIZE = DESCRIPTORS ? '_s' : 'size'; -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +var getEntry = function (that, key) { + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return that._i[index]; + // frozen object case + for (entry = that._f; entry; entry = entry.n) { + if (entry.k == key) return entry; + } +}; -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +module.exports = { + getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { + var C = wrapper(function (that, iterable) { + anInstance(that, C, NAME, '_i'); + that._t = NAME; // collection type + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear() { + for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { + entry.r = true; + if (entry.p) entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function (key) { + var that = validate(this, NAME); + var entry = getEntry(that, key); + if (entry) { + var next = entry.n; + var prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if (prev) prev.n = next; + if (next) next.p = prev; + if (that._f == entry) that._f = next; + if (that._l == entry) that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /* , that = undefined */) { + validate(this, NAME); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); + var entry; + while (entry = entry ? entry.n : this._f) { + f(entry.v, entry.k, this); + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key) { + return !!getEntry(validate(this, NAME), key); + } + }); + if (DESCRIPTORS) dP(C.prototype, 'size', { + get: function () { + return validate(this, NAME)[SIZE]; + } + }); + return C; + }, + def: function (that, key, value) { + var entry = getEntry(that, key); + var prev, index; + // change existing entry + if (entry) { + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if (!that._f) that._f = entry; + if (prev) prev.n = entry; + that[SIZE]++; + // add to index + if (index !== 'F') that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function (C, NAME, IS_MAP) { + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function (iterated, kind) { + this._t = validate(iterated, NAME); // target + this._k = kind; // kind + this._l = undefined; // previous + }, function () { + var that = this; + var kind = that._k; + var entry = that._l; + // revert to the last existing entry + while (entry && entry.r) entry = entry.p; + // get next entry + if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if (kind == 'keys') return step(0, entry.k); + if (kind == 'values') return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; -function _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); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { -function _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; } +"use strict"; -function rangeOptions(start, stop) { - var options = []; +var global = __webpack_require__(24); +var $export = __webpack_require__(22); +var meta = __webpack_require__(127); +var fails = __webpack_require__(42); +var hide = __webpack_require__(43); +var redefineAll = __webpack_require__(146); +var forOf = __webpack_require__(82); +var anInstance = __webpack_require__(147); +var isObject = __webpack_require__(34); +var setToStringTag = __webpack_require__(75); +var dP = __webpack_require__(36).f; +var each = __webpack_require__(371)(0); +var DESCRIPTORS = __webpack_require__(35); - for (var i = start; i <= stop; i++) { - options.push({ - value: i, - label: (0, _utils.pad)(i, 2) +module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { + var Base = global[NAME]; + var C = Base; + var ADDER = IS_MAP ? 'set' : 'add'; + var proto = C && C.prototype; + var O = {}; + if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { + new C().entries().next(); + }))) { + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function (target, iterable) { + anInstance(target, C, NAME, '_c'); + target._c = new Base(); + if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { + anInstance(this, C, KEY); + if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + IS_WEAK || dP(C.prototype, 'size', { + get: function () { + return this._c.size; + } }); } - return options; -} - -function readyForChange(state) { - return Object.keys(state).every(function (key) { - return state[key] !== -1; - }); -} - -function DateElement(props) { - var type = props.type, - range = props.range, - value = props.value, - select = props.select, - rootId = props.rootId, - disabled = props.disabled, - readonly = props.readonly, - autofocus = props.autofocus, - registry = props.registry, - onBlur = props.onBlur; - var id = rootId + "_" + type; - var SelectWidget = registry.widgets.SelectWidget; - return _react["default"].createElement(SelectWidget, { - schema: { - type: "integer" - }, - id: id, - className: "form-control", - options: { - enumOptions: rangeOptions(range[0], range[1]) - }, - placeholder: type, - value: value, - disabled: disabled, - readonly: readonly, - autofocus: autofocus, - onChange: function onChange(value) { - return select(type, value); - }, - onBlur: onBlur - }); -} - -var AltDateWidget = -/*#__PURE__*/ -function (_Component) { - _inherits(AltDateWidget, _Component); + setToStringTag(C, NAME); - function AltDateWidget(props) { - var _this; + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); - _classCallCheck(this, AltDateWidget); + if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); - _this = _possibleConstructorReturn(this, _getPrototypeOf(AltDateWidget).call(this, props)); + return C; +}; - _defineProperty(_assertThisInitialized(_this), "onChange", function (property, value) { - _this.setState(_defineProperty({}, property, typeof value === "undefined" ? -1 : value), function () { - // Only propagate to parent state if we have a complete date{time} - if (readyForChange(_this.state)) { - _this.props.onChange((0, _utils.toDateString)(_this.state, _this.props.time)); - } - }); - }); - _defineProperty(_assertThisInitialized(_this), "setNow", function (event) { - event.preventDefault(); - var _this$props = _this.props, - time = _this$props.time, - disabled = _this$props.disabled, - readonly = _this$props.readonly, - onChange = _this$props.onChange; +/***/ }), +/* 371 */ +/***/ (function(module, exports, __webpack_require__) { - if (disabled || readonly) { - return; +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = __webpack_require__(40); +var IObject = __webpack_require__(122); +var toObject = __webpack_require__(51); +var toLength = __webpack_require__(92); +var asc = __webpack_require__(372); +module.exports = function (TYPE, $create) { + var IS_MAP = TYPE == 1; + var IS_FILTER = TYPE == 2; + var IS_SOME = TYPE == 3; + var IS_EVERY = TYPE == 4; + var IS_FIND_INDEX = TYPE == 6; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + var create = $create || asc; + return function ($this, callbackfn, that) { + var O = toObject($this); + var self = IObject(O); + var f = ctx(callbackfn, that, 3); + var length = toLength(self.length); + var index = 0; + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; + var val, res; + for (;length > index; index++) if (NO_HOLES || index in self) { + val = self[index]; + res = f(val, index, O); + if (TYPE) { + if (IS_MAP) result[index] = res; // map + else if (res) switch (TYPE) { + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if (IS_EVERY) return false; // every } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; - var nowDateObj = (0, _utils.parseDateString)(new Date().toJSON(), time); - _this.setState(nowDateObj, function () { - return onChange((0, _utils.toDateString)(_this.state, time)); - }); - }); +/***/ }), +/* 372 */ +/***/ (function(module, exports, __webpack_require__) { - _defineProperty(_assertThisInitialized(_this), "clear", function (event) { - event.preventDefault(); - var _this$props2 = _this.props, - time = _this$props2.time, - disabled = _this$props2.disabled, - readonly = _this$props2.readonly, - onChange = _this$props2.onChange; +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(373); - if (disabled || readonly) { - return; - } +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; - _this.setState((0, _utils.parseDateString)("", time), function () { - return onChange(undefined); - }); - }); - _this.state = (0, _utils.parseDateString)(props.value, props.time); - return _this; - } +/***/ }), +/* 373 */ +/***/ (function(module, exports, __webpack_require__) { - _createClass(AltDateWidget, [{ - key: "UNSAFE_componentWillReceiveProps", - value: function UNSAFE_componentWillReceiveProps(nextProps) { - this.setState((0, _utils.parseDateString)(nextProps.value, nextProps.time)); - } - }, { - key: "shouldComponentUpdate", - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _utils.shouldRender)(this, nextProps, nextState); +var isObject = __webpack_require__(34); +var isArray = __webpack_require__(134); +var SPECIES = __webpack_require__(26)('species'); + +module.exports = function (original) { + var C; + if (isArray(original)) { + C = original.constructor; + // cross-realm fallback + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; + if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; } - }, { - key: "render", - value: function render() { - var _this2 = this; + } return C === undefined ? Array : C; +}; - var _this$props3 = this.props, - id = _this$props3.id, - disabled = _this$props3.disabled, - readonly = _this$props3.readonly, - autofocus = _this$props3.autofocus, - registry = _this$props3.registry, - onBlur = _this$props3.onBlur, - options = _this$props3.options; - return _react["default"].createElement("ul", { - className: "list-inline" - }, this.dateElementProps.map(function (elemProps, i) { - return _react["default"].createElement("li", { - key: i - }, _react["default"].createElement(DateElement, _extends({ - rootId: id, - select: _this2.onChange - }, elemProps, { - disabled: disabled, - readonly: readonly, - registry: registry, - onBlur: onBlur, - autofocus: autofocus && i === 0 - }))); - }), (options.hideNowButton !== "undefined" ? !options.hideNowButton : true) && _react["default"].createElement("li", null, _react["default"].createElement("a", { - href: "#", - className: "btn btn-info btn-now", - onClick: this.setNow - }, "Now")), (options.hideClearButton !== "undefined" ? !options.hideClearButton : true) && _react["default"].createElement("li", null, _react["default"].createElement("a", { - href: "#", - className: "btn btn-warning btn-clear", - onClick: this.clear - }, "Clear"))); - } - }, { - key: "dateElementProps", - get: function get() { - var _this$props4 = this.props, - time = _this$props4.time, - options = _this$props4.options; - var _this$state = this.state, - year = _this$state.year, - month = _this$state.month, - day = _this$state.day, - hour = _this$state.hour, - minute = _this$state.minute, - second = _this$state.second; - var data = [{ - type: "year", - range: options.yearsRange, - value: year - }, { - type: "month", - range: [1, 12], - value: month - }, { - type: "day", - range: [1, 31], - value: day - }]; - - if (time) { - data.push({ - type: "hour", - range: [0, 23], - value: hour - }, { - type: "minute", - range: [0, 59], - value: minute - }, { - type: "second", - range: [0, 59], - value: second - }); - } - - return data; - } - }]); - return AltDateWidget; -}(_react.Component); +/***/ }), +/* 374 */ +/***/ (function(module, exports, __webpack_require__) { -_defineProperty(AltDateWidget, "defaultProps", { - time: false, - disabled: false, - readonly: false, - autofocus: false, - options: { - yearsRange: [1900, new Date().getFullYear() + 2] - } -}); +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = __webpack_require__(22); -if (false) {} +$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(375)('Set') }); -var _default = AltDateWidget; -exports["default"] = _default; /***/ }), -/* 270 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { -var arrayLikeToArray = __webpack_require__(271); - -function _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); -} +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = __webpack_require__(104); +var from = __webpack_require__(376); +module.exports = function (NAME) { + return function toJSON() { + if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; -module.exports = _unsupportedIterableToArray; /***/ }), -/* 271 */ -/***/ (function(module, exports) { - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } +var forOf = __webpack_require__(82); - return arr2; -} +module.exports = function (iter, ITERATOR) { + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; -module.exports = _arrayLikeToArray; /***/ }), -/* 272 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { -var toFinite = __webpack_require__(572); - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -module.exports = toInteger; +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of +__webpack_require__(378)('Set'); /***/ }), -/* 273 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -// ESM COMPAT FLAG -__webpack_require__.r(__webpack_exports__); - -// EXPORTS -__webpack_require__.d(__webpack_exports__, "matchesState", function() { return /* reexport */ utils["o" /* matchesState */]; }); -__webpack_require__.d(__webpack_exports__, "mapState", function() { return /* reexport */ mapState; }); -__webpack_require__.d(__webpack_exports__, "ActionTypes", function() { return /* reexport */ types["a" /* ActionTypes */]; }); -__webpack_require__.d(__webpack_exports__, "SpecialTargets", function() { return /* reexport */ types["b" /* SpecialTargets */]; }); -__webpack_require__.d(__webpack_exports__, "assign", function() { return /* reexport */ es_actions["b" /* assign */]; }); -__webpack_require__.d(__webpack_exports__, "doneInvoke", function() { return /* reexport */ es_actions["f" /* doneInvoke */]; }); -__webpack_require__.d(__webpack_exports__, "forwardTo", function() { return /* reexport */ es_actions["i" /* forwardTo */]; }); -__webpack_require__.d(__webpack_exports__, "send", function() { return /* reexport */ es_actions["q" /* send */]; }); -__webpack_require__.d(__webpack_exports__, "sendParent", function() { return /* reexport */ es_actions["r" /* sendParent */]; }); -__webpack_require__.d(__webpack_exports__, "sendUpdate", function() { return /* reexport */ es_actions["s" /* sendUpdate */]; }); -__webpack_require__.d(__webpack_exports__, "State", function() { return /* reexport */ State["a" /* State */]; }); -__webpack_require__.d(__webpack_exports__, "StateNode", function() { return /* reexport */ StateNode_StateNode; }); -__webpack_require__.d(__webpack_exports__, "Machine", function() { return /* reexport */ Machine; }); -__webpack_require__.d(__webpack_exports__, "createMachine", function() { return /* reexport */ createMachine; }); -__webpack_require__.d(__webpack_exports__, "Interpreter", function() { return /* reexport */ interpreter["a" /* Interpreter */]; }); -__webpack_require__.d(__webpack_exports__, "interpret", function() { return /* reexport */ interpreter["b" /* interpret */]; }); -__webpack_require__.d(__webpack_exports__, "spawn", function() { return /* reexport */ interpreter["c" /* spawn */]; }); -__webpack_require__.d(__webpack_exports__, "matchState", function() { return /* reexport */ matchState; }); -__webpack_require__.d(__webpack_exports__, "actions", function() { return /* binding */ xstate_es_actions; }); - -// EXTERNAL MODULE: ./node_modules/xstate/es/utils.js -var utils = __webpack_require__(1); - -// EXTERNAL MODULE: ./node_modules/xstate/es/_virtual/_tslib.js -var _tslib = __webpack_require__(2); - -// CONCATENATED MODULE: ./node_modules/xstate/es/mapState.js - - - -function mapState(stateMap, stateId) { - var e_1, _a; - - var foundStateId; - - try { - for (var _b = Object(_tslib["e" /* __values */])(Object(utils["k" /* keys */])(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) { - var mappedStateId = _c.value; - - if (Object(utils["o" /* matchesState */])(mappedStateId, stateId) && (!foundStateId || stateId.length > foundStateId.length)) { - foundStateId = mappedStateId; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } - } - - return stateMap[foundStateId]; -} - - -// EXTERNAL MODULE: ./node_modules/xstate/es/types.js -var types = __webpack_require__(14); - -// EXTERNAL MODULE: ./node_modules/xstate/es/actions.js -var es_actions = __webpack_require__(7); - -// EXTERNAL MODULE: ./node_modules/xstate/es/State.js -var State = __webpack_require__(36); - -// EXTERNAL MODULE: ./node_modules/xstate/es/constants.js -var constants = __webpack_require__(51); - -// EXTERNAL MODULE: ./node_modules/xstate/es/environment.js -var environment = __webpack_require__(22); - -// EXTERNAL MODULE: ./node_modules/xstate/es/stateUtils.js -var stateUtils = __webpack_require__(29); - -// EXTERNAL MODULE: ./node_modules/xstate/es/actionTypes.js -var actionTypes = __webpack_require__(15); - -// EXTERNAL MODULE: ./node_modules/xstate/es/Actor.js -var Actor = __webpack_require__(87); - -// CONCATENATED MODULE: ./node_modules/xstate/es/invokeUtils.js +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(22); +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { of: function of() { + var length = arguments.length; + var A = new Array(length); + while (length--) A[length] = arguments[length]; + return new this(A); + } }); +}; -function toInvokeSource(src) { - if (typeof src === 'string') { - var simpleSrc = { - type: src - }; +/***/ }), +/* 379 */ +/***/ (function(module, exports, __webpack_require__) { - simpleSrc.toString = function () { - return src; - }; // v4 compat - TODO: remove in v5 +// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from +__webpack_require__(380)('Set'); - return simpleSrc; - } +/***/ }), +/* 380 */ +/***/ (function(module, exports, __webpack_require__) { - return src; -} +"use strict"; -function toInvokeDefinition(invokeConfig) { - return Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({ - type: actionTypes["g" /* invoke */] - }, invokeConfig), { - toJSON: function () { - var onDone = invokeConfig.onDone, - onError = invokeConfig.onError, - invokeDef = Object(_tslib["c" /* __rest */])(invokeConfig, ["onDone", "onError"]); +// https://tc39.github.io/proposal-setmap-offrom/ +var $export = __webpack_require__(22); +var aFunction = __webpack_require__(73); +var ctx = __webpack_require__(40); +var forOf = __webpack_require__(82); - return Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, invokeDef), { - type: actionTypes["g" /* invoke */], - src: toInvokeSource(invokeConfig.src) +module.exports = function (COLLECTION) { + $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) { + var mapFn = arguments[1]; + var mapping, A, n, cb; + aFunction(this); + mapping = mapFn !== undefined; + if (mapping) aFunction(mapFn); + if (source == undefined) return new this(); + A = []; + if (mapping) { + n = 0; + cb = ctx(mapFn, arguments[2], 2); + forOf(source, false, function (nextItem) { + A.push(cb(nextItem, n++)); }); + } else { + forOf(source, false, A.push, A); } - }); -} - - -// CONCATENATED MODULE: ./node_modules/xstate/es/StateNode.js + return new this(A); + } }); +}; +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { +__webpack_require__(57); +__webpack_require__(382); +module.exports = __webpack_require__(15).Array.from; +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +var ctx = __webpack_require__(40); +var $export = __webpack_require__(22); +var toObject = __webpack_require__(51); +var call = __webpack_require__(208); +var isArrayIter = __webpack_require__(209); +var toLength = __webpack_require__(92); +var createProperty = __webpack_require__(383); +var getIterFn = __webpack_require__(148); +$export($export.S + $export.F * !__webpack_require__(212)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { -var NULL_EVENT = ''; -var STATE_IDENTIFIER = '#'; -var WILDCARD = '*'; -var EMPTY_OBJECT = {}; +"use strict"; -var isStateId = function (str) { - return str[0] === STATE_IDENTIFIER; -}; +var $defineProperty = __webpack_require__(36); +var createDesc = __webpack_require__(72); -var createDefaultOptions = function () { - return { - actions: {}, - guards: {}, - services: {}, - activities: {}, - delays: {} - }; +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; }; -var validateArrayifiedTransitions = function (stateNode, event, transitions) { - var hasNonLastUnguardedTarget = transitions.slice(0, -1).some(function (transition) { - return !('cond' in transition) && !('in' in transition) && (Object(utils["j" /* isString */])(transition.target) || Object(utils["g" /* isMachine */])(transition.target)); - }); - var eventText = event === NULL_EVENT ? 'the transient event' : "event '" + event + "'"; - Object(utils["I" /* warn */])(!hasNonLastUnguardedTarget, "One or more transitions for " + eventText + " on state '" + stateNode.id + "' are unreachable. " + "Make sure that the default transition is the last one defined."); -}; -var StateNode_StateNode = -/*#__PURE__*/ +/***/ }), +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { -/** @class */ -function () { - function StateNode( - /** - * The raw config used to create the machine. - */ - config, options, - /** - * The initial extended state - */ - context) { - var _this = this; +__webpack_require__(77); +__webpack_require__(57); +module.exports = __webpack_require__(385); - this.config = config; - this.context = context; - /** - * The order this state node appears. Corresponds to the implicit SCXML document order. - */ - this.order = -1; - this.__xstatenode = true; - this.__cache = { - events: undefined, - relativeValue: new Map(), - initialStateValue: undefined, - initialState: undefined, - on: undefined, - transitions: undefined, - candidates: {}, - delayedTransitions: undefined - }; - this.idMap = {}; - this.options = Object.assign(createDefaultOptions(), options); - this.parent = this.options._parent; - this.key = this.config.key || this.options._key || this.config.id || '(machine)'; - this.machine = this.parent ? this.parent.machine : this; - this.path = this.parent ? this.parent.path.concat(this.key) : []; - this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : constants["c" /* STATE_DELIMITER */]); - this.id = this.config.id || Object(_tslib["d" /* __spread */])([this.machine.key], this.path).join(this.delimiter); - this.version = this.parent ? this.parent.version : this.config.version; - this.type = this.config.type || (this.config.parallel ? 'parallel' : this.config.states && Object(utils["k" /* keys */])(this.config.states).length ? 'compound' : this.config.history ? 'history' : 'atomic'); - - if (!environment["a" /* IS_PRODUCTION */]) { - Object(utils["I" /* warn */])(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. " + (this.config.parallel ? "Replace with `type: 'parallel'`" : "Use `type: '" + this.type + "'`") + " in the config for state node '" + this.id + "' instead."); - } - - this.initial = this.config.initial; - this.states = this.config.states ? Object(utils["n" /* mapValues */])(this.config.states, function (stateConfig, key) { - var _a; - - var stateNode = new StateNode(stateConfig, { - _parent: _this, - _key: key - }); - Object.assign(_this.idMap, Object(_tslib["a" /* __assign */])((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap)); - return stateNode; - }) : EMPTY_OBJECT; // Document order +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { - var order = 0; +var classof = __webpack_require__(104); +var ITERATOR = __webpack_require__(26)('iterator'); +var Iterators = __webpack_require__(58); +module.exports = __webpack_require__(15).isIterable = function (it) { + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + // eslint-disable-next-line no-prototype-builtins + || Iterators.hasOwnProperty(classof(O)); +}; - function dfs(stateNode) { - var e_1, _a; - stateNode.order = order++; +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { - try { - for (var _b = Object(_tslib["e" /* __values */])(Object(stateUtils["b" /* getChildren */])(stateNode)), _c = _b.next(); !_c.done; _c = _b.next()) { - var child = _c.value; - dfs(child); - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } - } - } +__webpack_require__(387); +module.exports = __webpack_require__(15).Number.isNaN; - dfs(this); // History config - this.history = this.config.history === true ? 'shallow' : this.config.history || false; - this._transient = !!this.config.always || (!this.config.on ? false : Array.isArray(this.config.on) ? this.config.on.some(function (_a) { - var event = _a.event; - return event === NULL_EVENT; - }) : NULL_EVENT in this.config.on); - this.strict = !!this.config.strict; // TODO: deprecate (entry) +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { - this.onEntry = Object(utils["w" /* toArray */])(this.config.entry || this.config.onEntry).map(function (action) { - return Object(es_actions["v" /* toActionObject */])(action); - }); // TODO: deprecate (exit) +// 20.1.2.4 Number.isNaN(number) +var $export = __webpack_require__(22); - this.onExit = Object(utils["w" /* toArray */])(this.config.exit || this.config.onExit).map(function (action) { - return Object(es_actions["v" /* toActionObject */])(action); - }); - this.meta = this.config.meta; - this.doneData = this.type === 'final' ? this.config.data : undefined; - this.invoke = Object(utils["w" /* toArray */])(this.config.invoke).map(function (invokeConfig, i) { - var _a, _b; - - if (Object(utils["g" /* isMachine */])(invokeConfig)) { - _this.machine.options.services = Object(_tslib["a" /* __assign */])((_a = {}, _a[invokeConfig.id] = invokeConfig, _a), _this.machine.options.services); - return toInvokeDefinition({ - src: invokeConfig.id, - id: invokeConfig.id - }); - } else if (Object(utils["j" /* isString */])(invokeConfig.src)) { - return toInvokeDefinition(Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, invokeConfig), { - id: invokeConfig.id || invokeConfig.src, - src: invokeConfig.src - })); - } else if (Object(utils["g" /* isMachine */])(invokeConfig.src) || Object(utils["f" /* isFunction */])(invokeConfig.src)) { - var invokeSrc = _this.id + ":invocation[" + i + "]"; // TODO: util function - - _this.machine.options.services = Object(_tslib["a" /* __assign */])((_b = {}, _b[invokeSrc] = invokeConfig.src, _b), _this.machine.options.services); - return toInvokeDefinition(Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({ - id: invokeSrc - }, invokeConfig), { - src: invokeSrc - })); - } else { - var invokeSource = invokeConfig.src; - return toInvokeDefinition(Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({ - id: invokeSource.type - }, invokeConfig), { - src: invokeSource - })); - } - }); - this.activities = Object(utils["w" /* toArray */])(this.config.activities).concat(this.invoke).map(function (activity) { - return Object(es_actions["x" /* toActivityDefinition */])(activity); - }); - this.transition = this.transition.bind(this); // TODO: this is the real fix for initialization once - // state node getters are deprecated - // if (!this.parent) { - // this._init(); - // } +$export($export.S, 'Number', { + isNaN: function isNaN(number) { + // eslint-disable-next-line no-self-compare + return number != number; } +}); - StateNode.prototype._init = function () { - if (this.__cache.transitions) { - return; - } - Object(stateUtils["a" /* getAllStateNodes */])(this).forEach(function (stateNode) { - return stateNode.on; - }); - }; - /** - * Clones this state machine with custom options and context. - * - * @param options Options (actions, guards, activities, services) to recursively merge with the existing options. - * @param context Custom context (will override predefined context) - */ +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { +__webpack_require__(389); +module.exports = __webpack_require__(15).Object.assign; - StateNode.prototype.withConfig = function (options, context) { - if (context === void 0) { - context = this.context; - } - - var _a = this.options, - actions = _a.actions, - activities = _a.activities, - guards = _a.guards, - services = _a.services, - delays = _a.delays; - return new StateNode(this.config, { - actions: Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, actions), options.actions), - activities: Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, activities), options.activities), - guards: Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, guards), options.guards), - services: Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, services), options.services), - delays: Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, delays), options.delays) - }, context); - }; - /** - * Clones this state machine with custom context. - * - * @param context Custom context (will override predefined context, not recursive) - */ +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { - StateNode.prototype.withContext = function (context) { - return new StateNode(this.config, this.options, context); - }; +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(22); - Object.defineProperty(StateNode.prototype, "definition", { - /** - * The well-structured state node definition. - */ - get: function () { - return { - id: this.id, - key: this.key, - version: this.version, - context: this.context, - type: this.type, - initial: this.initial, - history: this.history, - states: Object(utils["n" /* mapValues */])(this.states, function (state) { - return state.definition; - }), - on: this.on, - transitions: this.transitions, - entry: this.onEntry, - exit: this.onExit, - activities: this.activities || [], - meta: this.meta, - order: this.order || -1, - data: this.doneData, - invoke: this.invoke - }; - }, - enumerable: false, - configurable: true - }); +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(390) }); - StateNode.prototype.toJSON = function () { - return this.definition; - }; - Object.defineProperty(StateNode.prototype, "on", { - /** - * The mapping of events to transitions. - */ - get: function () { - if (this.__cache.on) { - return this.__cache.on; - } +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { - var transitions = this.transitions; - return this.__cache.on = transitions.reduce(function (map, transition) { - map[transition.eventType] = map[transition.eventType] || []; - map[transition.eventType].push(transition); - return map; - }, {}); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateNode.prototype, "after", { - get: function () { - return this.__cache.delayedTransitions || (this.__cache.delayedTransitions = this.getDelayedTransitions(), this.__cache.delayedTransitions); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateNode.prototype, "transitions", { - /** - * All the transitions that can be taken from this state node. - */ - get: function () { - return this.__cache.transitions || (this.__cache.transitions = this.formatTransitions(), this.__cache.transitions); - }, - enumerable: false, - configurable: true - }); +"use strict"; - StateNode.prototype.getCandidates = function (eventName) { - if (this.__cache.candidates[eventName]) { - return this.__cache.candidates[eventName]; +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(35); +var getKeys = __webpack_require__(76); +var gOPS = __webpack_require__(133); +var pIE = __webpack_require__(89); +var toObject = __webpack_require__(51); +var IObject = __webpack_require__(122); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(42)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; } + } return T; +} : $assign; - var transient = eventName === NULL_EVENT; - var candidates = this.transitions.filter(function (transition) { - var sameEventType = transition.eventType === eventName; // null events should only match against eventless transitions - return transient ? sameEventType : sameEventType || transition.eventType === WILDCARD; - }); - this.__cache.candidates[eventName] = candidates; - return candidates; - }; - /** - * All delayed transitions from the config. - */ +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ - StateNode.prototype.getDelayedTransitions = function () { - var _this = this; +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? +Symbol.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; +function 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; +exports.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}; +exports.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}; +exports.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; - var afterConfig = this.config.after; - if (!afterConfig) { - return []; - } +/***/ }), +/* 392 */ +/***/ (function(module, exports, __webpack_require__) { - var mutateEntryExit = function (delay, i) { - var delayRef = Object(utils["f" /* isFunction */])(delay) ? _this.id + ":delay[" + i + "]" : delay; - var eventType = Object(es_actions["a" /* after */])(delayRef, _this.id); +var baseClone = __webpack_require__(393); - _this.onEntry.push(Object(es_actions["q" /* send */])(eventType, { - delay: delay - })); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_SYMBOLS_FLAG = 4; - _this.onExit.push(Object(es_actions["c" /* cancel */])(eventType)); +/** + * This method is like `_.clone` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false + */ +function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); +} - return eventType; - }; +module.exports = cloneDeep; - var delayedTransitions = Object(utils["d" /* isArray */])(afterConfig) ? afterConfig.map(function (transition, i) { - var eventType = mutateEntryExit(transition.delay, i); - return Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, transition), { - event: eventType - }); - }) : Object(utils["b" /* flatten */])(Object(utils["k" /* keys */])(afterConfig).map(function (delay, i) { - var configTransition = afterConfig[delay]; - var resolvedTransition = Object(utils["j" /* isString */])(configTransition) ? { - target: configTransition - } : configTransition; - var resolvedDelay = !isNaN(+delay) ? +delay : delay; - var eventType = mutateEntryExit(resolvedDelay, i); - return Object(utils["w" /* toArray */])(resolvedTransition).map(function (transition) { - return Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, transition), { - event: eventType, - delay: resolvedDelay - }); - }); - })); - return delayedTransitions.map(function (delayedTransition) { - var delay = delayedTransition.delay; - return Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, _this.formatTransition(delayedTransition)), { - delay: delay - }); - }); - }; - /** - * Returns the state nodes represented by the current state value. - * - * @param state The state value or State instance - */ +/***/ }), +/* 393 */ +/***/ (function(module, exports, __webpack_require__) { - StateNode.prototype.getStateNodes = function (state) { - var _a; - - var _this = this; - - if (!state) { - return []; - } - - var stateValue = state instanceof State["a" /* State */] ? state.value : Object(utils["D" /* toStateValue */])(state, this.delimiter); - - if (Object(utils["j" /* isString */])(stateValue)) { - var initialStateValue = this.getStateNode(stateValue).initial; - return initialStateValue !== undefined ? this.getStateNodes((_a = {}, _a[stateValue] = initialStateValue, _a)) : [this.states[stateValue]]; - } - - var subStateKeys = Object(utils["k" /* keys */])(stateValue); - var subStateNodes = subStateKeys.map(function (subStateKey) { - return _this.getStateNode(subStateKey); - }); - return subStateNodes.concat(subStateKeys.reduce(function (allSubStateNodes, subStateKey) { - var subStateNode = _this.getStateNode(subStateKey).getStateNodes(stateValue[subStateKey]); - - return allSubStateNodes.concat(subStateNode); - }, [])); - }; - /** - * Returns `true` if this state node explicitly handles the given event. - * - * @param event The event in question - */ +var Stack = __webpack_require__(105), + arrayEach = __webpack_require__(149), + assignValue = __webpack_require__(141), + baseAssign = __webpack_require__(399), + baseAssignIn = __webpack_require__(401), + cloneBuffer = __webpack_require__(214), + copyArray = __webpack_require__(106), + copySymbols = __webpack_require__(404), + copySymbolsIn = __webpack_require__(406), + getAllKeys = __webpack_require__(217), + getAllKeysIn = __webpack_require__(407), + getTag = __webpack_require__(80), + initCloneArray = __webpack_require__(408), + initCloneByTag = __webpack_require__(409), + initCloneObject = __webpack_require__(221), + isArray = __webpack_require__(21), + isBuffer = __webpack_require__(62), + isMap = __webpack_require__(413), + isObject = __webpack_require__(29), + isSet = __webpack_require__(415), + keys = __webpack_require__(63), + keysIn = __webpack_require__(64); +/** Used to compose bitmasks for cloning. */ +var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; - StateNode.prototype.handles = function (event) { - var eventType = Object(utils["c" /* getEventType */])(event); - return this.events.includes(eventType); - }; - /** - * Resolves the given `state` to a new `State` instance relative to this machine. - * - * This ensures that `.events` and `.nextEvents` represent the correct values. - * - * @param state The state to resolve - */ +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + weakMapTag = '[object WeakMap]'; +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; - StateNode.prototype.resolveState = function (state) { - var configuration = Array.from(Object(stateUtils["c" /* getConfiguration */])([], this.getStateNodes(state.value))); - return new State["a" /* State */](Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, state), { - value: this.resolve(state.value), - configuration: configuration - })); - }; +/** Used to identify `toStringTag` values supported by `_.clone`. */ +var cloneableTags = {}; +cloneableTags[argsTag] = cloneableTags[arrayTag] = +cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = +cloneableTags[boolTag] = cloneableTags[dateTag] = +cloneableTags[float32Tag] = cloneableTags[float64Tag] = +cloneableTags[int8Tag] = cloneableTags[int16Tag] = +cloneableTags[int32Tag] = cloneableTags[mapTag] = +cloneableTags[numberTag] = cloneableTags[objectTag] = +cloneableTags[regexpTag] = cloneableTags[setTag] = +cloneableTags[stringTag] = cloneableTags[symbolTag] = +cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = +cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; +cloneableTags[errorTag] = cloneableTags[funcTag] = +cloneableTags[weakMapTag] = false; - StateNode.prototype.transitionLeafNode = function (stateValue, state, _event) { - var stateNode = this.getStateNode(stateValue); - var next = stateNode.next(state, _event); +/** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ +function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; - if (!next || !next.transitions.length) { - return this.next(state, _event); + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; - return next; - }; - - StateNode.prototype.transitionCompoundNode = function (stateValue, state, _event) { - var subStateKeys = Object(utils["k" /* keys */])(stateValue); - var stateNode = this.getStateNode(subStateKeys[0]); - - var next = stateNode._transition(stateValue[subStateKeys[0]], state, _event); - - if (!next || !next.transitions.length) { - return this.next(state, _event); + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); } - - return next; - }; - - StateNode.prototype.transitionParallelNode = function (stateValue, state, _event) { - var e_2, _a; - - var transitionMap = {}; - - try { - for (var _b = Object(_tslib["e" /* __values */])(Object(utils["k" /* keys */])(stateValue)), _c = _b.next(); !_c.done; _c = _b.next()) { - var subStateKey = _c.value; - var subStateValue = stateValue[subStateKey]; - - if (!subStateValue) { - continue; - } - - var subStateNode = this.getStateNode(subStateKey); - - var next = subStateNode._transition(subStateValue, state, _event); - - if (next) { - transitionMap[subStateKey] = next; - } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_2) throw e_2.error; + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; } + result = initCloneByTag(value, tag, isDeep); } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); - var stateTransitions = Object(utils["k" /* keys */])(transitionMap).map(function (key) { - return transitionMap[key]; + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); - var enabledTransitions = Object(utils["b" /* flatten */])(stateTransitions.map(function (st) { - return st.transitions; - })); - var willTransition = stateTransitions.some(function (st) { - return st.transitions.length > 0; + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); + } - if (!willTransition) { - return this.next(state, _event); + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); + + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; +} - var entryNodes = Object(utils["b" /* flatten */])(stateTransitions.map(function (t) { - return t.entrySet; - })); - var configuration = Object(utils["b" /* flatten */])(Object(utils["k" /* keys */])(transitionMap).map(function (key) { - return transitionMap[key].configuration; - })); - return { - transitions: enabledTransitions, - entrySet: entryNodes, - exitSet: Object(utils["b" /* flatten */])(stateTransitions.map(function (t) { - return t.exitSet; - })), - configuration: configuration, - source: state, - actions: Object(utils["b" /* flatten */])(Object(utils["k" /* keys */])(transitionMap).map(function (key) { - return transitionMap[key].actions; - })) - }; - }; +module.exports = baseClone; - StateNode.prototype._transition = function (stateValue, state, _event) { - // leaf node - if (Object(utils["j" /* isString */])(stateValue)) { - return this.transitionLeafNode(stateValue, state, _event); - } // hierarchical node +/***/ }), +/* 394 */ +/***/ (function(module, exports, __webpack_require__) { - if (Object(utils["k" /* keys */])(stateValue).length === 1) { - return this.transitionCompoundNode(stateValue, state, _event); - } // orthogonal node +var ListCache = __webpack_require__(97); +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} - return this.transitionParallelNode(stateValue, state, _event); - }; +module.exports = stackClear; - StateNode.prototype.next = function (state, _event) { - var e_3, _a; - var _this = this; +/***/ }), +/* 395 */ +/***/ (function(module, exports) { - var eventName = _event.name; - var actions = []; - var nextStateNodes = []; - var selectedTransition; +/** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ +function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - try { - for (var _b = Object(_tslib["e" /* __values */])(this.getCandidates(eventName)), _c = _b.next(); !_c.done; _c = _b.next()) { - var candidate = _c.value; - var cond = candidate.cond, - stateIn = candidate.in; - var resolvedContext = state.context; - var isInState = stateIn ? Object(utils["j" /* isString */])(stateIn) && isStateId(stateIn) ? // Check if in state by ID - state.matches(Object(utils["D" /* toStateValue */])(this.getStateNodeById(stateIn).path, this.delimiter)) : // Check if in state by relative grandparent - Object(utils["o" /* matchesState */])(Object(utils["D" /* toStateValue */])(stateIn, this.delimiter), Object(utils["s" /* path */])(this.path.slice(0, -2))(state.value)) : true; - var guardPassed = false; + this.size = data.size; + return result; +} - try { - guardPassed = !cond || Object(utils["a" /* evaluateGuard */])(this.machine, cond, resolvedContext, _event, state); - } catch (err) { - throw new Error("Unable to evaluate guard '" + (cond.name || cond.type) + "' in transition for event '" + eventName + "' in state node '" + this.id + "':\n" + err.message); - } +module.exports = stackDelete; - if (guardPassed && isInState) { - if (candidate.target !== undefined) { - nextStateNodes = candidate.target; - } - actions.push.apply(actions, Object(_tslib["d" /* __spread */])(candidate.actions)); - selectedTransition = candidate; - break; - } - } - } catch (e_3_1) { - e_3 = { - error: e_3_1 - }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_3) throw e_3.error; - } - } +/***/ }), +/* 396 */ +/***/ (function(module, exports) { - if (!selectedTransition) { - return undefined; - } +/** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ +function stackGet(key) { + return this.__data__.get(key); +} - if (!nextStateNodes.length) { - return { - transitions: [selectedTransition], - entrySet: [], - exitSet: [], - configuration: state.value ? [this] : [], - source: state, - actions: actions - }; - } +module.exports = stackGet; - var allNextStateNodes = Object(utils["b" /* flatten */])(nextStateNodes.map(function (stateNode) { - return _this.getRelativeStateNodes(stateNode, state.historyValue); - })); - var isInternal = !!selectedTransition.internal; - var reentryNodes = isInternal ? [] : Object(utils["b" /* flatten */])(allNextStateNodes.map(function (n) { - return _this.nodesFromChild(n); - })); - return { - transitions: [selectedTransition], - entrySet: reentryNodes, - exitSet: isInternal ? [] : [this], - configuration: allNextStateNodes, - source: state, - actions: actions - }; - }; - StateNode.prototype.nodesFromChild = function (childStateNode) { - if (childStateNode.escapes(this)) { - return []; - } +/***/ }), +/* 397 */ +/***/ (function(module, exports) { - var nodes = []; - var marker = childStateNode; +/** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ +function stackHas(key) { + return this.__data__.has(key); +} - while (marker && marker !== this) { - nodes.push(marker); - marker = marker.parent; - } +module.exports = stackHas; - nodes.push(this); // inclusive - return nodes; - }; - /** - * Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of - * this state node, it does not escape. - */ +/***/ }), +/* 398 */ +/***/ (function(module, exports, __webpack_require__) { +var ListCache = __webpack_require__(97), + Map = __webpack_require__(139), + MapCache = __webpack_require__(138); - StateNode.prototype.escapes = function (stateNode) { - if (this === stateNode) { - return false; +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ +function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; +} - var parent = this.parent; +module.exports = stackSet; - while (parent) { - if (parent === stateNode) { - return false; - } - parent = parent.parent; - } +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { - return true; - }; +var copyObject = __webpack_require__(83), + keys = __webpack_require__(63); - StateNode.prototype.getActions = function (transition, currentContext, _event, prevState) { - var e_4, _a, e_5, _b; +/** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); +} - var prevConfig = Object(stateUtils["c" /* getConfiguration */])([], prevState ? this.getStateNodes(prevState.value) : [this]); - var resolvedConfig = transition.configuration.length ? Object(stateUtils["c" /* getConfiguration */])(prevConfig, transition.configuration) : prevConfig; +module.exports = baseAssign; - try { - for (var resolvedConfig_1 = Object(_tslib["e" /* __values */])(resolvedConfig), resolvedConfig_1_1 = resolvedConfig_1.next(); !resolvedConfig_1_1.done; resolvedConfig_1_1 = resolvedConfig_1.next()) { - var sn = resolvedConfig_1_1.value; - if (!Object(stateUtils["e" /* has */])(prevConfig, sn)) { - transition.entrySet.push(sn); - } - } - } catch (e_4_1) { - e_4 = { - error: e_4_1 - }; - } finally { - try { - if (resolvedConfig_1_1 && !resolvedConfig_1_1.done && (_a = resolvedConfig_1.return)) _a.call(resolvedConfig_1); - } finally { - if (e_4) throw e_4.error; - } - } +/***/ }), +/* 400 */ +/***/ (function(module, exports) { - try { - for (var prevConfig_1 = Object(_tslib["e" /* __values */])(prevConfig), prevConfig_1_1 = prevConfig_1.next(); !prevConfig_1_1.done; prevConfig_1_1 = prevConfig_1.next()) { - var sn = prevConfig_1_1.value; +/** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ +function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); - if (!Object(stateUtils["e" /* has */])(resolvedConfig, sn) || Object(stateUtils["e" /* has */])(transition.exitSet, sn.parent)) { - transition.exitSet.push(sn); - } - } - } catch (e_5_1) { - e_5 = { - error: e_5_1 - }; - } finally { - try { - if (prevConfig_1_1 && !prevConfig_1_1.done && (_b = prevConfig_1.return)) _b.call(prevConfig_1); - } finally { - if (e_5) throw e_5.error; - } - } + while (++index < n) { + result[index] = iteratee(index); + } + return result; +} + +module.exports = baseTimes; - if (!transition.source) { - transition.exitSet = []; // Ensure that root StateNode (machine) is entered - transition.entrySet.push(this); - } +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { - var doneEvents = Object(utils["b" /* flatten */])(transition.entrySet.map(function (sn) { - var events = []; +var copyObject = __webpack_require__(83), + keysIn = __webpack_require__(64); - if (sn.type !== 'final') { - return events; - } +/** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); +} - var parent = sn.parent; +module.exports = baseAssignIn; - if (!parent.parent) { - return events; - } - events.push(Object(es_actions["e" /* done */])(sn.id, sn.doneData), // TODO: deprecate - final states should not emit done events for their own state. - Object(es_actions["e" /* done */])(parent.id, sn.doneData ? Object(utils["l" /* mapContext */])(sn.doneData, currentContext, _event) : undefined)); - var grandparent = parent.parent; +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { - if (grandparent.type === 'parallel') { - if (Object(stateUtils["b" /* getChildren */])(grandparent).every(function (parentNode) { - return Object(stateUtils["f" /* isInFinalState */])(transition.configuration, parentNode); - })) { - events.push(Object(es_actions["e" /* done */])(grandparent.id)); - } - } +var isObject = __webpack_require__(29), + isPrototype = __webpack_require__(103), + nativeKeysIn = __webpack_require__(403); - return events; - })); - transition.exitSet.sort(function (a, b) { - return b.order - a.order; - }); - transition.entrySet.sort(function (a, b) { - return a.order - b.order; - }); - var entryStates = new Set(transition.entrySet); - var exitStates = new Set(transition.exitSet); - - var _c = Object(_tslib["b" /* __read */])([Object(utils["b" /* flatten */])(Array.from(entryStates).map(function (stateNode) { - return Object(_tslib["d" /* __spread */])(stateNode.activities.map(function (activity) { - return Object(es_actions["t" /* start */])(activity); - }), stateNode.onEntry); - })).concat(doneEvents.map(es_actions["n" /* raise */])), Object(utils["b" /* flatten */])(Array.from(exitStates).map(function (stateNode) { - return Object(_tslib["d" /* __spread */])(stateNode.onExit, stateNode.activities.map(function (activity) { - return Object(es_actions["u" /* stop */])(activity); - })); - }))], 2), - entryActions = _c[0], - exitActions = _c[1]; +/** Used for built-in method references. */ +var objectProto = Object.prototype; - var actions = Object(es_actions["w" /* toActionObjects */])(exitActions.concat(transition.actions).concat(entryActions), this.machine.options.actions); - return actions; - }; - /** - * Determines the next state given the current `state` and sent `event`. - * - * @param state The current State instance or state value - * @param event The event that was sent at the current state - * @param context The current context (extended state) of the current state - */ +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; - StateNode.prototype.transition = function (state, event, context) { - if (state === void 0) { - state = this.initialState; + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); } + } + return result; +} - var _event = Object(utils["A" /* toSCXMLEvent */])(event); - - var currentState; +module.exports = baseKeysIn; - if (state instanceof State["a" /* State */]) { - currentState = context === undefined ? state : this.resolveState(State["a" /* State */].from(state, context)); - } else { - var resolvedStateValue = Object(utils["j" /* isString */])(state) ? this.resolve(Object(utils["t" /* pathToStateValue */])(this.getResolvedPath(state))) : this.resolve(state); - var resolvedContext = context ? context : this.machine.context; - currentState = this.resolveState(State["a" /* State */].from(resolvedStateValue, resolvedContext)); - } - if (!environment["a" /* IS_PRODUCTION */] && _event.name === WILDCARD) { - throw new Error("An event cannot have the wildcard type ('" + WILDCARD + "')"); - } +/***/ }), +/* 403 */ +/***/ (function(module, exports) { - if (this.strict) { - if (!this.events.includes(_event.name) && !Object(utils["e" /* isBuiltInEvent */])(_event.name)) { - throw new Error("Machine '" + this.id + "' does not accept event '" + _event.name + "'"); - } +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); } + } + return result; +} - var stateTransition = this._transition(currentState.value, currentState, _event) || { - transitions: [], - configuration: [], - entrySet: [], - exitSet: [], - source: currentState, - actions: [] - }; - var prevConfig = Object(stateUtils["c" /* getConfiguration */])([], this.getStateNodes(currentState.value)); - var resolvedConfig = stateTransition.configuration.length ? Object(stateUtils["c" /* getConfiguration */])(prevConfig, stateTransition.configuration) : prevConfig; - stateTransition.configuration = Object(_tslib["d" /* __spread */])(resolvedConfig); - return this.resolveTransition(stateTransition, currentState, _event); - }; +module.exports = nativeKeysIn; - StateNode.prototype.resolveRaisedTransition = function (state, _event, originalEvent) { - var _a; - var currentActions = state.actions; - state = this.transition(state, _event); // Save original event to state - // TODO: this should be the raised event! Delete in V5 (breaking) +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { - state._event = originalEvent; - state.event = originalEvent.data; +var copyObject = __webpack_require__(83), + getSymbols = __webpack_require__(150); - (_a = state.actions).unshift.apply(_a, Object(_tslib["d" /* __spread */])(currentActions)); +/** + * Copies own symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); +} - return state; - }; +module.exports = copySymbols; - StateNode.prototype.resolveTransition = function (stateTransition, currentState, _event, context) { - var e_6, _a; - var _this = this; +/***/ }), +/* 405 */ +/***/ (function(module, exports) { - if (_event === void 0) { - _event = es_actions["k" /* initEvent */]; - } +/** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ +function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; - if (context === void 0) { - context = this.machine.context; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; } + } + return result; +} - var configuration = stateTransition.configuration; // Transition will "apply" if: - // - this is the initial state (there is no current state) - // - OR there are transitions +module.exports = arrayFilter; - var willTransition = !currentState || stateTransition.transitions.length > 0; - var resolvedStateValue = willTransition ? Object(stateUtils["d" /* getValue */])(this.machine, configuration) : undefined; - var historyValue = currentState ? currentState.historyValue ? currentState.historyValue : stateTransition.source ? this.machine.historyValue(currentState.value) : undefined : undefined; - var currentContext = currentState ? currentState.context : context; - var actions = this.getActions(stateTransition, currentContext, _event, currentState); - var activities = currentState ? Object(_tslib["a" /* __assign */])({}, currentState.activities) : {}; - try { - for (var actions_1 = Object(_tslib["e" /* __values */])(actions), actions_1_1 = actions_1.next(); !actions_1_1.done; actions_1_1 = actions_1.next()) { - var action = actions_1_1.value; +/***/ }), +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { - if (action.type === actionTypes["m" /* start */]) { - activities[action.activity.id || action.activity.type] = action; - } else if (action.type === actionTypes["n" /* stop */]) { - activities[action.activity.id || action.activity.type] = false; - } - } - } catch (e_6_1) { - e_6 = { - error: e_6_1 - }; - } finally { - try { - if (actions_1_1 && !actions_1_1.done && (_a = actions_1.return)) _a.call(actions_1); - } finally { - if (e_6) throw e_6.error; - } - } +var copyObject = __webpack_require__(83), + getSymbolsIn = __webpack_require__(216); - var _b = Object(_tslib["b" /* __read */])(Object(es_actions["o" /* resolveActions */])(this, currentState, currentContext, _event, actions), 2), - resolvedActions = _b[0], - updatedContext = _b[1]; +/** + * Copies own and inherited symbols of `source` to `object`. + * + * @private + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. + */ +function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); +} - var _c = Object(_tslib["b" /* __read */])(Object(utils["r" /* partition */])(resolvedActions, function (action) { - return action.type === actionTypes["k" /* raise */] || action.type === actionTypes["l" /* send */] && action.to === types["b" /* SpecialTargets */].Internal; - }), 2), - raisedEvents = _c[0], - nonRaisedActions = _c[1]; +module.exports = copySymbolsIn; - var invokeActions = resolvedActions.filter(function (action) { - return action.type === actionTypes["m" /* start */] && action.activity.type === actionTypes["g" /* invoke */]; - }); - var children = invokeActions.reduce(function (acc, action) { - acc[action.activity.id] = Object(Actor["b" /* createInvocableActor */])(action.activity, _this.machine, updatedContext, _event); - return acc; - }, currentState ? Object(_tslib["a" /* __assign */])({}, currentState.children) : {}); - var resolvedConfiguration = resolvedStateValue ? stateTransition.configuration : currentState ? currentState.configuration : []; - var meta = resolvedConfiguration.reduce(function (acc, stateNode) { - if (stateNode.meta !== undefined) { - acc[stateNode.id] = stateNode.meta; - } - return acc; - }, {}); - var isDone = Object(stateUtils["f" /* isInFinalState */])(resolvedConfiguration, this); - var nextState = new State["a" /* State */]({ - value: resolvedStateValue || currentState.value, - context: updatedContext, - _event: _event, - // Persist _sessionid between states - _sessionid: currentState ? currentState._sessionid : null, - historyValue: resolvedStateValue ? historyValue ? Object(utils["H" /* updateHistoryValue */])(historyValue, resolvedStateValue) : undefined : currentState ? currentState.historyValue : undefined, - history: !resolvedStateValue || stateTransition.source ? currentState : undefined, - actions: resolvedStateValue ? nonRaisedActions : [], - activities: resolvedStateValue ? activities : currentState ? currentState.activities : {}, - meta: resolvedStateValue ? meta : currentState ? currentState.meta : undefined, - events: [], - configuration: resolvedConfiguration, - transitions: stateTransition.transitions, - children: children, - done: isDone - }); - var didUpdateContext = currentContext !== updatedContext; - nextState.changed = _event.name === actionTypes["o" /* update */] || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks +/***/ }), +/* 407 */ +/***/ (function(module, exports, __webpack_require__) { - var history = nextState.history; +var baseGetAllKeys = __webpack_require__(218), + getSymbolsIn = __webpack_require__(216), + keysIn = __webpack_require__(64); - if (history) { - delete history.history; - } +/** + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. + */ +function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); +} - if (!resolvedStateValue) { - return nextState; - } +module.exports = getAllKeysIn; - var maybeNextState = nextState; - if (!isDone) { - var isTransient = this._transient || configuration.some(function (stateNode) { - return stateNode._transient; - }); +/***/ }), +/* 408 */ +/***/ (function(module, exports) { - if (isTransient) { - maybeNextState = this.resolveRaisedTransition(maybeNextState, { - type: actionTypes["i" /* nullEvent */] - }, _event); - } +/** Used for built-in method references. */ +var objectProto = Object.prototype; - while (raisedEvents.length) { - var raisedEvent = raisedEvents.shift(); - maybeNextState = this.resolveRaisedTransition(maybeNextState, raisedEvent._event, _event); - } - } // Detect if state changed +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; +/** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ +function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); - var changed = maybeNextState.changed || (history ? !!maybeNextState.actions.length || didUpdateContext || typeof history.value !== typeof maybeNextState.value || !Object(State["d" /* stateValuesEqual */])(maybeNextState.value, history.value) : undefined); - maybeNextState.changed = changed; // Preserve original history after raised events + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; + } + return result; +} - maybeNextState.historyValue = nextState.historyValue; - maybeNextState.history = history; - return maybeNextState; - }; - /** - * Returns the child state node from its relative `stateKey`, or throws. - */ +module.exports = initCloneArray; - StateNode.prototype.getStateNode = function (stateKey) { - if (isStateId(stateKey)) { - return this.machine.getStateNodeById(stateKey); - } +/***/ }), +/* 409 */ +/***/ (function(module, exports, __webpack_require__) { - if (!this.states) { - throw new Error("Unable to retrieve child state '" + stateKey + "' from '" + this.id + "'; no child states exist."); - } +var cloneArrayBuffer = __webpack_require__(151), + cloneDataView = __webpack_require__(410), + cloneRegExp = __webpack_require__(411), + cloneSymbol = __webpack_require__(412), + cloneTypedArray = __webpack_require__(220); - var result = this.states[stateKey]; +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; - if (!result) { - throw new Error("Child state '" + stateKey + "' does not exist on '" + this.id + "'"); - } +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; - return result; - }; - /** - * Returns the state node with the given `stateId`, or throws. - * - * @param stateId The state ID. The prefix "#" is removed. - */ +/** + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * + * @private + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ +function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); - StateNode.prototype.getStateNodeById = function (stateId) { - var resolvedStateId = isStateId(stateId) ? stateId.slice(STATE_IDENTIFIER.length) : stateId; + case dataViewTag: + return cloneDataView(object, isDeep); - if (resolvedStateId === this.id) { - return this; - } + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); - var stateNode = this.machine.idMap[resolvedStateId]; + case mapTag: + return new Ctor; - if (!stateNode) { - throw new Error("Child state node '#" + resolvedStateId + "' does not exist on machine '" + this.id + "'"); - } + case numberTag: + case stringTag: + return new Ctor(object); - return stateNode; - }; - /** - * Returns the relative state node from the given `statePath`, or throws. - * - * @param statePath The string or string array relative path to the state node. - */ + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor; - StateNode.prototype.getStateNodeByPath = function (statePath) { - if (typeof statePath === 'string' && isStateId(statePath)) { - try { - return this.getStateNodeById(statePath.slice(1)); - } catch (e) {// try individual paths - // throw e; - } - } + case symbolTag: + return cloneSymbol(object); + } +} - var arrayStatePath = Object(utils["B" /* toStatePath */])(statePath, this.delimiter).slice(); - var currentStateNode = this; +module.exports = initCloneByTag; - while (arrayStatePath.length) { - var key = arrayStatePath.shift(); - if (!key.length) { - break; - } +/***/ }), +/* 410 */ +/***/ (function(module, exports, __webpack_require__) { - currentStateNode = currentStateNode.getStateNode(key); - } +var cloneArrayBuffer = __webpack_require__(151); - return currentStateNode; - }; - /** - * Resolves a partial state value with its full representation in this machine. - * - * @param stateValue The partial state value to resolve. - */ +/** + * Creates a clone of `dataView`. + * + * @private + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. + */ +function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +} +module.exports = cloneDataView; - StateNode.prototype.resolve = function (stateValue) { - var _a; - var _this = this; +/***/ }), +/* 411 */ +/***/ (function(module, exports) { - if (!stateValue) { - return this.initialStateValue || EMPTY_OBJECT; // TODO: type-specific properties - } +/** Used to match `RegExp` flags from their coerced string values. */ +var reFlags = /\w*$/; - switch (this.type) { - case 'parallel': - return Object(utils["n" /* mapValues */])(this.initialStateValue, function (subStateValue, subStateKey) { - return subStateValue ? _this.getStateNode(subStateKey).resolve(stateValue[subStateKey] || subStateValue) : EMPTY_OBJECT; - }); +/** + * Creates a clone of `regexp`. + * + * @private + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. + */ +function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; +} - case 'compound': - if (Object(utils["j" /* isString */])(stateValue)) { - var subStateNode = this.getStateNode(stateValue); +module.exports = cloneRegExp; - if (subStateNode.type === 'parallel' || subStateNode.type === 'compound') { - return _a = {}, _a[stateValue] = subStateNode.initialStateValue, _a; - } - return stateValue; - } +/***/ }), +/* 412 */ +/***/ (function(module, exports, __webpack_require__) { - if (!Object(utils["k" /* keys */])(stateValue).length) { - return this.initialStateValue || {}; - } +var Symbol = __webpack_require__(56); - return Object(utils["n" /* mapValues */])(stateValue, function (subStateValue, subStateKey) { - return subStateValue ? _this.getStateNode(subStateKey).resolve(subStateValue) : EMPTY_OBJECT; - }); +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; - default: - return stateValue || EMPTY_OBJECT; - } - }; +/** + * Creates a clone of the `symbol` object. + * + * @private + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. + */ +function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +} - StateNode.prototype.getResolvedPath = function (stateIdentifier) { - if (isStateId(stateIdentifier)) { - var stateNode = this.machine.idMap[stateIdentifier.slice(STATE_IDENTIFIER.length)]; +module.exports = cloneSymbol; - if (!stateNode) { - throw new Error("Unable to find state node '" + stateIdentifier + "'"); - } - return stateNode.path; - } +/***/ }), +/* 413 */ +/***/ (function(module, exports, __webpack_require__) { - return Object(utils["B" /* toStatePath */])(stateIdentifier, this.delimiter); - }; +var baseIsMap = __webpack_require__(414), + baseUnary = __webpack_require__(53), + nodeUtil = __webpack_require__(145); - Object.defineProperty(StateNode.prototype, "initialStateValue", { - get: function () { - var _a; +/* Node.js helper references. */ +var nodeIsMap = nodeUtil && nodeUtil.isMap; - if (this.__cache.initialStateValue) { - return this.__cache.initialStateValue; - } +/** + * Checks if `value` is classified as a `Map` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @example + * + * _.isMap(new Map); + * // => true + * + * _.isMap(new WeakMap); + * // => false + */ +var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - var initialStateValue; +module.exports = isMap; - if (this.type === 'parallel') { - initialStateValue = Object(utils["m" /* mapFilterValues */])(this.states, function (state) { - return state.initialStateValue || EMPTY_OBJECT; - }, function (stateNode) { - return !(stateNode.type === 'history'); - }); - } else if (this.initial !== undefined) { - if (!this.states[this.initial]) { - throw new Error("Initial state '" + this.initial + "' not found on '" + this.key + "'"); - } - initialStateValue = Object(stateUtils["g" /* isLeafNode */])(this.states[this.initial]) ? this.initial : (_a = {}, _a[this.initial] = this.states[this.initial].initialStateValue, _a); - } +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { - this.__cache.initialStateValue = initialStateValue; - return this.__cache.initialStateValue; - }, - enumerable: false, - configurable: true - }); +var getTag = __webpack_require__(80), + isObjectLike = __webpack_require__(31); - StateNode.prototype.getInitialState = function (stateValue, context) { - var configuration = this.getStateNodes(stateValue); - return this.resolveTransition({ - configuration: configuration, - entrySet: configuration, - exitSet: [], - transitions: [], - source: undefined, - actions: [] - }, undefined, undefined, context); - }; +/** `Object#toString` result references. */ +var mapTag = '[object Map]'; - Object.defineProperty(StateNode.prototype, "initialState", { - /** - * The initial State instance, which includes all actions to be executed from - * entering the initial state. - */ - get: function () { - this._init(); // TODO: this should be in the constructor (see note in constructor) +/** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ +function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; +} +module.exports = baseIsMap; - var initialStateValue = this.initialStateValue; - if (!initialStateValue) { - throw new Error("Cannot retrieve initial state from simple state '" + this.id + "'."); - } +/***/ }), +/* 415 */ +/***/ (function(module, exports, __webpack_require__) { - return this.getInitialState(initialStateValue); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateNode.prototype, "target", { - /** - * The target state value of the history state node, if it exists. This represents the - * default state value to transition to if no history value exists yet. - */ - get: function () { - var target; +var baseIsSet = __webpack_require__(416), + baseUnary = __webpack_require__(53), + nodeUtil = __webpack_require__(145); - if (this.type === 'history') { - var historyConfig = this.config; +/* Node.js helper references. */ +var nodeIsSet = nodeUtil && nodeUtil.isSet; - if (Object(utils["j" /* isString */])(historyConfig.target)) { - target = isStateId(historyConfig.target) ? Object(utils["t" /* pathToStateValue */])(this.machine.getStateNodeById(historyConfig.target).path.slice(this.path.length - 1)) : historyConfig.target; - } else { - target = historyConfig.target; - } - } +/** + * Checks if `value` is classified as a `Set` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @example + * + * _.isSet(new Set); + * // => true + * + * _.isSet(new WeakSet); + * // => false + */ +var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - return target; - }, - enumerable: false, - configurable: true - }); - /** - * Returns the leaf nodes from a state path relative to this state node. - * - * @param relativeStateId The relative state path to retrieve the state nodes - * @param history The previous state to retrieve history - * @param resolve Whether state nodes should resolve to initial child state nodes - */ +module.exports = isSet; - StateNode.prototype.getRelativeStateNodes = function (relativeStateId, historyValue, resolve) { - if (resolve === void 0) { - resolve = true; - } - return resolve ? relativeStateId.type === 'history' ? relativeStateId.resolveHistory(historyValue) : relativeStateId.initialStateNodes : [relativeStateId]; - }; +/***/ }), +/* 416 */ +/***/ (function(module, exports, __webpack_require__) { - Object.defineProperty(StateNode.prototype, "initialStateNodes", { - get: function () { - var _this = this; +var getTag = __webpack_require__(80), + isObjectLike = __webpack_require__(31); - if (Object(stateUtils["g" /* isLeafNode */])(this)) { - return [this]; - } // Case when state node is compound but no initial state is defined +/** `Object#toString` result references. */ +var setTag = '[object Set]'; +/** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ +function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; +} - if (this.type === 'compound' && !this.initial) { - if (!environment["a" /* IS_PRODUCTION */]) { - Object(utils["I" /* warn */])(false, "Compound state node '" + this.id + "' has no initial state."); - } +module.exports = baseIsSet; - return [this]; - } - var initialStateNodePaths = Object(utils["C" /* toStatePaths */])(this.initialStateValue); - return Object(utils["b" /* flatten */])(initialStateNodePaths.map(function (initialPath) { - return _this.getFromRelativePath(initialPath); - })); - }, - enumerable: false, - configurable: true - }); - /** - * Retrieves state nodes from a relative path to this state node. - * - * @param relativePath The relative path from this state node - * @param historyValue - */ +/***/ }), +/* 417 */ +/***/ (function(module, exports, __webpack_require__) { - StateNode.prototype.getFromRelativePath = function (relativePath) { - if (!relativePath.length) { - return [this]; - } +var isEqual = __webpack_require__(223) +var sortBy = __webpack_require__(225) +var uniq = __webpack_require__(230) +var uniqWith = __webpack_require__(232) +var defaults = __webpack_require__(443) +var intersectionWith = __webpack_require__(233) +var isPlainObject = __webpack_require__(25) +var isBoolean = __webpack_require__(171) - var _a = Object(_tslib["b" /* __read */])(relativePath), - stateKey = _a[0], - childStatePath = _a.slice(1); +var normalizeArray = val => Array.isArray(val) + ? val : [val] +var undef = val => val === undefined +var keys = obj => isPlainObject(obj) || Array.isArray(obj) ? Object.keys(obj) : [] +var has = (obj, key) => obj.hasOwnProperty(key) +var stringArray = arr => sortBy(uniq(arr)) +var undefEmpty = val => undef(val) || (Array.isArray(val) && val.length === 0) +var keyValEqual = (a, b, key, compare) => b && has(b, key) && a && has(a, key) && compare(a[key], b[key]) +var undefAndZero = (a, b) => (undef(a) && b === 0) || (undef(b) && a === 0) || isEqual(a, b) +var falseUndefined = (a, b) => (undef(a) && b === false) || (undef(b) && a === false) || isEqual(a, b) +var emptySchema = schema => undef(schema) || isEqual(schema, {}) || schema === true +var emptyObjUndef = schema => undef(schema) || isEqual(schema, {}) +var isSchema = val => undef(val) || isPlainObject(val) || val === true || val === false - if (!this.states) { - throw new Error("Cannot retrieve subPath '" + stateKey + "' from node with no states"); - } +function undefArrayEqual(a, b) { + if (undefEmpty(a) && undefEmpty(b)) { + return true + } else { + return isEqual(stringArray(a), stringArray(b)) + } +} - var childStateNode = this.getStateNode(stateKey); +function unsortedNormalizedArray(a, b) { + a = normalizeArray(a) + b = normalizeArray(b) + return isEqual(stringArray(a), stringArray(b)) +} - if (childStateNode.type === 'history') { - return childStateNode.resolveHistory(); - } +function schemaGroup(a, b, key, compare) { + var allProps = uniq(keys(a).concat(keys(b))) + if (emptyObjUndef(a) && emptyObjUndef(b)) { + return true + } else if (emptyObjUndef(a) && keys(b).length) { + return false + } else if (emptyObjUndef(b) && keys(a).length) { + return false + } - if (!this.states[stateKey]) { - throw new Error("Child state '" + stateKey + "' does not exist on '" + this.id + "'"); + return allProps.every(function(key) { + var aVal = a[key] + var bVal = b[key] + if (Array.isArray(aVal) && Array.isArray(bVal)) { + return isEqual(stringArray(a), stringArray(b)) + } else if (Array.isArray(aVal) && !Array.isArray(bVal)) { + return false + } else if (Array.isArray(bVal) && !Array.isArray(aVal)) { + return false } + return keyValEqual(a, b, key, compare) + }) +} - return this.states[stateKey].getFromRelativePath(childStatePath); - }; +function items(a, b, key, compare) { + if (isPlainObject(a) && isPlainObject(b)) { + return compare(a, b) + } else if (Array.isArray(a) && Array.isArray(b)) { + return schemaGroup(a, b, key, compare) + } else { + return isEqual(a, b) + } +} - StateNode.prototype.historyValue = function (relativeStateValue) { - if (!Object(utils["k" /* keys */])(this.states).length) { - return undefined; - } +function unsortedArray(a, b, key, compare) { + var uniqueA = uniqWith(a, compare) + var uniqueB = uniqWith(b, compare) + var inter = intersectionWith(uniqueA, uniqueB, compare) + return inter.length === Math.max(uniqueA.length, uniqueB.length) +} - return { - current: relativeStateValue || this.initialStateValue, - states: Object(utils["m" /* mapFilterValues */])(this.states, function (stateNode, key) { - if (!relativeStateValue) { - return stateNode.historyValue(); - } +var comparers = { + title: isEqual, + uniqueItems: falseUndefined, + minLength: undefAndZero, + minItems: undefAndZero, + minProperties: undefAndZero, + required: undefArrayEqual, + enum: undefArrayEqual, + type: unsortedNormalizedArray, + items: items, + anyOf: unsortedArray, + allOf: unsortedArray, + oneOf: unsortedArray, + properties: schemaGroup, + patternProperties: schemaGroup, + dependencies: schemaGroup +} - var subStateValue = Object(utils["j" /* isString */])(relativeStateValue) ? undefined : relativeStateValue[key]; - return stateNode.historyValue(subStateValue || stateNode.initialStateValue); - }, function (stateNode) { - return !stateNode.history; - }) - }; - }; - /** - * Resolves to the historical value(s) of the parent state node, - * represented by state nodes. - * - * @param historyValue - */ +var acceptsUndefined = [ + 'properties', + 'patternProperties', + 'dependencies', + 'uniqueItems', + 'minLength', + 'minItems', + 'minProperties', + 'required' +] +var schemaProps = ['additionalProperties', 'additionalItems', 'contains', 'propertyNames', 'not'] - StateNode.prototype.resolveHistory = function (historyValue) { - var _this = this; +function compare(a, b, options) { + options = defaults(options, { + ignore: [] + }) - if (this.type !== 'history') { - return [this]; - } + if (emptySchema(a) && emptySchema(b)) { + return true + } - var parent = this.parent; + if (!isSchema(a) || !isSchema(b)) { + throw new Error('Either of the values are not a JSON schema.') + } + if (a === b) { + return true + } - if (!historyValue) { - var historyTarget = this.target; - return historyTarget ? Object(utils["b" /* flatten */])(Object(utils["C" /* toStatePaths */])(historyTarget).map(function (relativeChildPath) { - return parent.getFromRelativePath(relativeChildPath); - })) : parent.initialStateNodes; - } + if (isBoolean(a) && isBoolean(b)) { + return a === b + } - var subHistoryValue = Object(utils["p" /* nestedPath */])(parent.path, 'states')(historyValue).current; + if ((a === undefined && b === false) || (b === undefined && a === false)) { + return false + } - if (Object(utils["j" /* isString */])(subHistoryValue)) { - return [parent.getStateNode(subHistoryValue)]; - } + if ((undef(a) && !undef(b)) || (!undef(a) && undef(b))) { + return false + } - return Object(utils["b" /* flatten */])(Object(utils["C" /* toStatePaths */])(subHistoryValue).map(function (subStatePath) { - return _this.history === 'deep' ? parent.getFromRelativePath(subStatePath) : [parent.states[subStatePath[0]]]; - })); - }; + var allKeys = uniq(Object.keys(a).concat(Object.keys(b))) - Object.defineProperty(StateNode.prototype, "stateIds", { - /** - * All the state node IDs of this state node and its descendant state nodes. - */ - get: function () { - var _this = this; + if (options.ignore.length) { + allKeys = allKeys.filter(k => options.ignore.indexOf(k) === -1) + } - var childStateIds = Object(utils["b" /* flatten */])(Object(utils["k" /* keys */])(this.states).map(function (stateKey) { - return _this.states[stateKey].stateIds; - })); - return [this.id].concat(childStateIds); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateNode.prototype, "events", { - /** - * All the event types accepted by this state node and its descendants. - */ - get: function () { - var e_7, _a, e_8, _b; - - if (this.__cache.events) { - return this.__cache.events; - } - - var states = this.states; - var events = new Set(this.ownEvents); - - if (states) { - try { - for (var _c = Object(_tslib["e" /* __values */])(Object(utils["k" /* keys */])(states)), _d = _c.next(); !_d.done; _d = _c.next()) { - var stateId = _d.value; - var state = states[stateId]; - - if (state.states) { - try { - for (var _e = (e_8 = void 0, Object(_tslib["e" /* __values */])(state.events)), _f = _e.next(); !_f.done; _f = _e.next()) { - var event_1 = _f.value; - events.add("" + event_1); - } - } catch (e_8_1) { - e_8 = { - error: e_8_1 - }; - } finally { - try { - if (_f && !_f.done && (_b = _e.return)) _b.call(_e); - } finally { - if (e_8) throw e_8.error; - } - } - } - } - } catch (e_7_1) { - e_7 = { - error: e_7_1 - }; - } finally { - try { - if (_d && !_d.done && (_a = _c.return)) _a.call(_c); - } finally { - if (e_7) throw e_7.error; - } - } - } + if (!allKeys.length) { + return true + } - return this.__cache.events = Array.from(events); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateNode.prototype, "ownEvents", { - /** - * All the events that have transitions directly from this state node. - * - * Excludes any inert events. - */ - get: function () { - var events = new Set(this.transitions.filter(function (transition) { - return !(!transition.target && !transition.actions.length && transition.internal); - }).map(function (transition) { - return transition.eventType; - })); - return Array.from(events); - }, - enumerable: false, - configurable: true - }); + function innerCompare(a, b) { + return compare(a, b, options) + } - StateNode.prototype.resolveTarget = function (_target) { - var _this = this; + return allKeys.every(function(key) { + var aValue = a[key] + var bValue = b[key] - if (_target === undefined) { - // an undefined target signals that the state node should not transition from that state when receiving that event - return undefined; + if (schemaProps.indexOf(key) !== -1) { + return compare(aValue, bValue, options) } - return _target.map(function (target) { - if (!Object(utils["j" /* isString */])(target)) { - return target; - } - - var isInternalTarget = target[0] === _this.delimiter; // If internal target is defined on machine, - // do not include machine key on target - - if (isInternalTarget && !_this.parent) { - return _this.getStateNodeByPath(target.slice(1)); - } - - var resolvedTarget = isInternalTarget ? _this.key + target : target; - - if (_this.parent) { - try { - var targetStateNode = _this.parent.getStateNodeByPath(resolvedTarget); - - return targetStateNode; - } catch (err) { - throw new Error("Invalid transition definition for state node '" + _this.id + "':\n" + err.message); - } - } else { - return _this.getStateNodeByPath(resolvedTarget); - } - }); - }; - - StateNode.prototype.formatTransition = function (transitionConfig) { - var _this = this; - - var normalizedTarget = Object(utils["q" /* normalizeTarget */])(transitionConfig.target); - var internal = 'internal' in transitionConfig ? transitionConfig.internal : normalizedTarget ? normalizedTarget.some(function (_target) { - return Object(utils["j" /* isString */])(_target) && _target[0] === _this.delimiter; - }) : true; - var guards = this.machine.options.guards; - var target = this.resolveTarget(normalizedTarget); - - var transition = Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, transitionConfig), { - actions: Object(es_actions["w" /* toActionObjects */])(Object(utils["w" /* toArray */])(transitionConfig.actions)), - cond: Object(utils["y" /* toGuard */])(transitionConfig.cond, guards), - target: target, - source: this, - internal: internal, - eventType: transitionConfig.event, - toJSON: function () { - return Object(_tslib["a" /* __assign */])(Object(_tslib["a" /* __assign */])({}, transition), { - target: transition.target ? transition.target.map(function (t) { - return "#" + t.id; - }) : undefined, - source: "#" + _this.id - }); - } - }); - - return transition; - }; - - StateNode.prototype.formatTransitions = function () { - var e_9, _a; - - var _this = this; - - var onConfig; - - if (!this.config.on) { - onConfig = []; - } else if (Array.isArray(this.config.on)) { - onConfig = this.config.on; - } else { - var _b = this.config.on, - _c = WILDCARD, - _d = _b[_c], - wildcardConfigs = _d === void 0 ? [] : _d, - strictTransitionConfigs_1 = Object(_tslib["c" /* __rest */])(_b, [typeof _c === "symbol" ? _c : _c + ""]); - - onConfig = Object(utils["b" /* flatten */])(Object(utils["k" /* keys */])(strictTransitionConfigs_1).map(function (key) { - if (!environment["a" /* IS_PRODUCTION */] && key === NULL_EVENT) { - Object(utils["I" /* warn */])(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " + ("Please check the `on` configuration for \"#" + _this.id + "\".")); - } - - var transitionConfigArray = Object(utils["E" /* toTransitionConfigArray */])(key, strictTransitionConfigs_1[key]); - - if (!environment["a" /* IS_PRODUCTION */]) { - validateArrayifiedTransitions(_this, key, transitionConfigArray); - } - - return transitionConfigArray; - }).concat(Object(utils["E" /* toTransitionConfigArray */])(WILDCARD, wildcardConfigs))); + var comparer = comparers[key] + if (!comparer) { + comparer = isEqual } - var eventlessConfig = this.config.always ? Object(utils["E" /* toTransitionConfigArray */])('', this.config.always) : []; - var doneConfig = this.config.onDone ? Object(utils["E" /* toTransitionConfigArray */])(String(Object(es_actions["e" /* done */])(this.id)), this.config.onDone) : []; - - if (!environment["a" /* IS_PRODUCTION */]) { - Object(utils["I" /* warn */])(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"" + this.id + "\"."); + // do simple lodash check first + if (isEqual(aValue, bValue)) { + return true } - var invokeConfig = Object(utils["b" /* flatten */])(this.invoke.map(function (invokeDef) { - var settleTransitions = []; - - if (invokeDef.onDone) { - settleTransitions.push.apply(settleTransitions, Object(_tslib["d" /* __spread */])(Object(utils["E" /* toTransitionConfigArray */])(String(Object(es_actions["f" /* doneInvoke */])(invokeDef.id)), invokeDef.onDone))); - } - - if (invokeDef.onError) { - settleTransitions.push.apply(settleTransitions, Object(_tslib["d" /* __spread */])(Object(utils["E" /* toTransitionConfigArray */])(String(Object(es_actions["g" /* error */])(invokeDef.id)), invokeDef.onError))); - } - - return settleTransitions; - })); - var delayedTransitions = this.after; - var formattedTransitions = Object(utils["b" /* flatten */])(Object(_tslib["d" /* __spread */])(doneConfig, invokeConfig, onConfig, eventlessConfig).map(function (transitionConfig) { - return Object(utils["w" /* toArray */])(transitionConfig).map(function (transition) { - return _this.formatTransition(transition); - }); - })); - - try { - for (var delayedTransitions_1 = Object(_tslib["e" /* __values */])(delayedTransitions), delayedTransitions_1_1 = delayedTransitions_1.next(); !delayedTransitions_1_1.done; delayedTransitions_1_1 = delayedTransitions_1.next()) { - var delayedTransition = delayedTransitions_1_1.value; - formattedTransitions.push(delayedTransition); - } - } catch (e_9_1) { - e_9 = { - error: e_9_1 - }; - } finally { - try { - if (delayedTransitions_1_1 && !delayedTransitions_1_1.done && (_a = delayedTransitions_1.return)) _a.call(delayedTransitions_1); - } finally { - if (e_9) throw e_9.error; + if (acceptsUndefined.indexOf(key) === -1) { + if ((!has(a, key) && has(b, key)) || (has(a, key) && !has(b, key))) { + return aValue === bValue } } - return formattedTransitions; - }; - - return StateNode; -}(); - + var result = comparer(aValue, bValue, key, innerCompare) + if (!isBoolean(result)) { + throw new Error('Comparer must return true or false') + } + return result + }) +} -// CONCATENATED MODULE: ./node_modules/xstate/es/Machine.js +module.exports = compare -function Machine(config, options, initialContext) { - if (initialContext === void 0) { - initialContext = config.context; - } +/***/ }), +/* 418 */ +/***/ (function(module, exports, __webpack_require__) { - var resolvedInitialContext = typeof initialContext === 'function' ? initialContext() : initialContext; - return new StateNode_StateNode(config, options, resolvedInitialContext); -} +var Stack = __webpack_require__(105), + equalArrays = __webpack_require__(224), + equalByTag = __webpack_require__(422), + equalObjects = __webpack_require__(424), + getTag = __webpack_require__(80), + isArray = __webpack_require__(21), + isBuffer = __webpack_require__(62), + isTypedArray = __webpack_require__(81); -function createMachine(config, options) { - var resolvedInitialContext = typeof config.context === 'function' ? config.context() : config.context; - return new StateNode_StateNode(config, options, resolvedInitialContext); -} +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; +/** `Object#toString` result references. */ +var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + objectTag = '[object Object]'; -// EXTERNAL MODULE: ./node_modules/xstate/es/interpreter.js -var interpreter = __webpack_require__(130); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -// CONCATENATED MODULE: ./node_modules/xstate/es/match.js +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; +/** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ +function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; -function matchState(state, patterns, defaultValue) { - var e_1, _a; + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; - var resolvedState = State["a" /* State */].from(state, state instanceof State["a" /* State */] ? state.context : undefined); + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - try { - for (var patterns_1 = Object(_tslib["e" /* __values */])(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) { - var _b = Object(_tslib["b" /* __read */])(patterns_1_1.value, 2), - stateValue = _b[0], - getValue = _b[1]; + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; - if (resolvedState.matches(stateValue)) { - return getValue(resolvedState); - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (patterns_1_1 && !patterns_1_1.done && (_a = patterns_1.return)) _a.call(patterns_1); - } finally { - if (e_1) throw e_1.error; + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } - - return defaultValue(resolvedState); + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } - -// CONCATENATED MODULE: ./node_modules/xstate/es/index.js - +module.exports = baseIsEqualDeep; +/***/ }), +/* 419 */ +/***/ (function(module, exports) { +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ +function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; +} +module.exports = setCacheAdd; +/***/ }), +/* 420 */ +/***/ (function(module, exports) { +/** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ +function setCacheHas(value) { + return this.__data__.has(value); +} -var xstate_es_actions = { - raise: es_actions["n" /* raise */], - send: es_actions["q" /* send */], - sendParent: es_actions["r" /* sendParent */], - sendUpdate: es_actions["s" /* sendUpdate */], - log: es_actions["l" /* log */], - cancel: es_actions["c" /* cancel */], - start: es_actions["t" /* start */], - stop: es_actions["u" /* stop */], - assign: es_actions["b" /* assign */], - after: es_actions["a" /* after */], - done: es_actions["e" /* done */], - respond: es_actions["p" /* respond */], - forwardTo: es_actions["i" /* forwardTo */], - escalate: es_actions["h" /* escalate */], - choose: es_actions["d" /* choose */], - pure: es_actions["m" /* pure */] -}; +module.exports = setCacheHas; /***/ }), -/* 274 */ +/* 421 */ /***/ (function(module, exports) { -function _taggedTemplateLiteral(strings, raw) { - if (!raw) { - raw = strings.slice(0); - } +/** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ +function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; } - })); + } + return false; } -module.exports = _taggedTemplateLiteral; - -/***/ }), -/* 275 */ -/***/ (function(module, exports, __webpack_require__) { +module.exports = arraySome; -module.exports = __webpack_require__(303); /***/ }), -/* 276 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(315); +var Symbol = __webpack_require__(56), + Uint8Array = __webpack_require__(219), + eq = __webpack_require__(60), + equalArrays = __webpack_require__(224), + mapToArray = __webpack_require__(423), + setToArray = __webpack_require__(153); -/***/ }), -/* 277 */ -/***/ (function(module, exports, __webpack_require__) { +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; -module.exports = __webpack_require__(327); +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; -/***/ }), -/* 278 */ -/***/ (function(module, exports, __webpack_require__) { +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; -var basePick = __webpack_require__(331), - flatRest = __webpack_require__(360); +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** - * Creates an object composed of the picked `object` properties. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); -}); - -module.exports = pick; +function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; -/***/ }), -/* 279 */ -/***/ (function(module, exports, __webpack_require__) { + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); -module.exports = __webpack_require__(371); + case errorTag: + return object.name == other.name && object.message == other.message; -/***/ }), -/* 280 */ -/***/ (function(module, exports, __webpack_require__) { + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); -module.exports = __webpack_require__(389); + case mapTag: + var convert = mapToArray; -/***/ }), -/* 281 */ -/***/ (function(module, exports, __webpack_require__) { + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); -module.exports = __webpack_require__(393); + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; -/***/ }), -/* 282 */ -/***/ (function(module, exports) { + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; -/** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(void 0); - * // => false - */ -function isNull(value) { - return value === null; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; } -module.exports = isNull; +module.exports = equalByTag; /***/ }), -/* 283 */ +/* 423 */ /***/ (function(module, exports) { /** - * Checks if `value` is `undefined`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true + * Converts `map` to its key-value pairs. * - * _.isUndefined(null); - * // => false + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. */ -function isUndefined(value) { - return value === undefined; +function mapToArray(map) { + var index = -1, + result = Array(map.size); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; } -module.exports = isUndefined; +module.exports = mapToArray; /***/ }), -/* 284 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { -var baseToString = __webpack_require__(212), - castSlice = __webpack_require__(527), - charsEndIndex = __webpack_require__(529), - charsStartIndex = __webpack_require__(530), - stringToArray = __webpack_require__(531), - toString = __webpack_require__(156); +var getAllKeys = __webpack_require__(217); -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; /** - * Removes leading and trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trim(' abc '); - * // => 'abc' - * - * _.trim('-_-abc-_-', '_-'); - * // => 'abc' + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. * - * _.map([' foo ', ' bar '], _.trim); - * // => ['foo', 'bar'] + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ -function trim(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.replace(reTrim, ''); - } - if (!string || !(chars = baseToString(chars))) { - return string; +function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; + + if (objLength != othLength && !isPartial) { + return false; } - var strSymbols = stringToArray(string), - chrSymbols = stringToArray(chars), - start = charsStartIndex(strSymbols, chrSymbols), - end = charsEndIndex(strSymbols, chrSymbols) + 1; + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); - return castSlice(strSymbols, start, end).join(''); -} + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; -module.exports = trim; + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } + } + stack['delete'](object); + stack['delete'](other); + return result; +} -/***/ }), -/* 285 */ -/***/ (function(module, exports) { +module.exports = equalObjects; -module.exports = __WEBPACK_EXTERNAL_MODULE__285__; /***/ }), -/* 286 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { -var getPrototypeOf = __webpack_require__(19); - -var setPrototypeOf = __webpack_require__(180); +var arrayMap = __webpack_require__(44), + baseGet = __webpack_require__(94), + baseIteratee = __webpack_require__(84), + baseMap = __webpack_require__(433), + baseSortBy = __webpack_require__(436), + baseUnary = __webpack_require__(53), + compareMultiple = __webpack_require__(437), + identity = __webpack_require__(79), + isArray = __webpack_require__(21); -var isNativeFunction = __webpack_require__(569); +/** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ +function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } -var construct = __webpack_require__(570); + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); -function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); - module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !isNativeFunction(Class)) return Class; + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); +} - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } +module.exports = baseOrderBy; - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - _cache.set(Class, Wrapper); - } +/***/ }), +/* 426 */ +/***/ (function(module, exports, __webpack_require__) { - function Wrapper() { - return construct(Class, arguments, getPrototypeOf(this).constructor); - } +var baseIsMatch = __webpack_require__(427), + getMatchData = __webpack_require__(428), + matchesStrictComparable = __webpack_require__(227); - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return setPrototypeOf(Wrapper, Class); +/** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ +function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); }; - - return _wrapNativeSuper(Class); } -module.exports = _wrapNativeSuper; +module.exports = baseMatches; + /***/ }), -/* 287 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(117), - baseForOwn = __webpack_require__(170), - baseIteratee = __webpack_require__(102); +var Stack = __webpack_require__(105), + baseIsEqual = __webpack_require__(152); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` thru `iteratee`. The iteratee is invoked - * with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @since 3.8.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapValues - * @example + * The base implementation of `_.isMatch` without support for iteratee shorthands. * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ -function mapKeys(object, iteratee) { - var result = {}; - iteratee = baseIteratee(iteratee, 3); +function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, iteratee(value, key, object), value); - }); - return result; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; } -module.exports = mapKeys; +module.exports = baseIsMatch; /***/ }), -/* 288 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { -/*! - * - * lattice - v0.85.1 - * JavaScript SDK for all OpenLattice REST APIs - * https://github.com/openlattice/lattice-js - * - * Copyright (c) 2017-2020, OpenLattice, Inc. All rights reserved. - * +var isStrictComparable = __webpack_require__(226), + keys = __webpack_require__(63); + +/** + * Gets the property names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. */ -!function(t,e){ true?module.exports=e():undefined}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=73)}([function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r=0&&e<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+e;if(i=e,!1!==n&&function(t){var e=(r[t]||"silent").toUpperCase();if("undefined"!=typeof window&&s){try{return void(window.localStorage[s]=e)}catch(t){}try{window.document.cookie=encodeURIComponent(s)+"="+e+";"}catch(t){}}}(e),a.call(o,e,t),"undefined"==typeof console&&e-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){(function(t){var n=r(6),i=r(89),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,r(43)(t))},function(t,e,r){var n=r(90),i=r(91),o=r(92),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!("string"==typeof t||t instanceof String)){var e;throw e=null===t?"null":"object"===(e=n(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a ".concat(e),new TypeError("Expected string but received ".concat(e,"."))}},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(3),i=r(17),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,r){var n=r(132),i=r(144),o=r(146),a=r(147),s=r(148);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),n.forEach(["post","put","patch"],(function(t){u.headers[t]=n.merge(o)})),t.exports=u}).call(this,r(111))},function(t,e,r){"use strict";var n=r(4),i=r(113),o=r(115),a=r(48),s=r(116),u=r(119),c=r(120),p=r(52);t.exports=function(t){return new Promise((function(e,r){var f=t.data,h=t.headers;n.isFormData(f)&&delete h["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var d=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(d+":"+y)}var v=s(t.baseURL,t.url);if(l.open(t.method.toUpperCase(),a(v,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:t,request:l};i(e,r,o),l=null}},l.onabort=function(){l&&(r(p("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){r(p("Network Error",t,null,l)),l=null},l.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(p(e,t,"ECONNABORTED",l)),l=null},n.isStandardBrowserEnv()){var m=(t.withCredentials||c(v))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in l&&n.forEach(h,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete h[e]:l.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),t.responseType)try{l.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){l&&(l.abort(),r(t),l=null)})),f||(f=null),l.send(f)}))}},function(t,e,r){"use strict";var n=r(114);t.exports=function(t,e,r,i,o){var a=new Error(t);return n(a,e,r,i,o)}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e){e=e||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function c(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(t[i],e[i])}n.forEach(i,(function(t){n.isUndefined(e[t])||(r[t]=u(void 0,e[t]))})),n.forEach(o,c),n.forEach(a,(function(i){n.isUndefined(e[i])?n.isUndefined(t[i])||(r[i]=u(void 0,t[i])):r[i]=u(void 0,e[i])})),n.forEach(s,(function(n){n in e?r[n]=u(t[n],e[n]):n in t&&(r[n]=u(void 0,t[n]))}));var p=i.concat(o).concat(a).concat(s),f=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===p.indexOf(t)}));return n.forEach(f,c),r}},function(t,e,r){"use strict";function n(t){this.message=t}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var r in e)void 0===t[r]&&(t[r]=e[r]);return t},t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(57),i=r(26),o=r(3),a=r(59),s=r(27),u=r(22);t.exports=function(t,e,r){for(var c=-1,p=(e=n(e,t)).length,f=!1;++c-1&&t%1==0&&tp))return!1;var h=u.get(t),l=u.get(e);if(h&&l)return h==e&&l==t;var d=-1,y=!0,v=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;if((e=(0,a.default)(e,u)).validate_length&&t.length>=2083)return!1;var r,s,f,h,l,d,y,v;if(y=t.split("#"),t=y.shift(),y=t.split("?"),t=y.shift(),(y=t.split("://")).length>1){if(r=y.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(r))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;y[0]=t.substr(2)}}if(""===(t=y.join("://")))return!1;if(y=t.split("/"),""===(t=y.shift())&&!e.require_host)return!0;if((y=t.split("@")).length>1){if(e.disallow_auth)return!1;if(-1===(s=y.shift()).indexOf(":")||s.indexOf(":")>=0&&s.split(":").length>2)return!1}h=y.join("@"),d=null,v=null;var m=h.match(c);m?(f="",v=m[1],d=m[2]||null):(y=h.split(":"),f=y.shift(),y.length&&(d=y.join(":")));if(null!==d&&(l=parseInt(d,10),!/^[0-9]+$/.test(d)||l<=0||l>65535))return!1;if(!((0,o.default)(f)||(0,i.default)(f,e)||v&&(0,o.default)(v,6)))return!1;if(f=f||v,e.host_whitelist&&!p(f,e.host_whitelist))return!1;if(e.host_blacklist&&p(f,e.host_blacklist))return!1;return!0};var n=s(r(30)),i=s(r(123)),o=s(r(124)),a=s(r(55));function s(t){return t&&t.__esModule?t:{default:t}}var u={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,validate_length:!0},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function p(t,e){for(var r=0;r=i?t:n(t,e,r)}},function(t,e){t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n-1;);return r}},function(t,e){t.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o-1;);return r}},function(t,e,r){var n=r(103),i=r(104),o=r(105);t.exports=function(t){return i(t)?o(t):n(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),p="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+p+c,"g");t.exports=function(t){return t.match(f)||[]}},function(t,e,r){"use strict";var n=r(4),i=r(47),o=r(107),a=r(53);function s(t){var e=new o(t),r=i(o.prototype.request,e);return n.extend(r,o.prototype,e),n.extend(r,e),r}var u=s(r(50));u.Axios=o,u.create=function(t){return s(a(u.defaults,t))},u.Cancel=r(54),u.CancelToken=r(121),u.isCancel=r(49),u.all=function(t){return Promise.all(t)},u.spread=r(122),t.exports=u,t.exports.default=u},function(t,e,r){"use strict";var n=r(4),i=r(48),o=r(108),a=r(109),s=r(53);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[a,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)r=r.then(e.shift(),e.shift());return r},u.prototype.getUri=function(t){return t=s(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,r,n){return this.request(s(n||{},{method:t,url:e,data:r}))}})),t.exports=u},function(t,e,r){"use strict";var n=r(4);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},function(t,e,r){"use strict";var n=r(4),i=r(110),o=r(49),a=r(50);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(s(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},function(t,e,r){"use strict";var n=r(4);t.exports=function(t,e,r){return n.forEach(r,(function(r){t=r(t,e)})),t}},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,c=[],p=!1,f=-1;function h(){p&&u&&(p=!1,u.length?c=u.concat(c):f=-1,c.length&&l())}function l(){if(!p){var t=s(h);p=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var r=1;r=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},function(t,e,r){"use strict";var n=r(4);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=i(window.location.href),function(e){var r=n.isString(e)?i(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},function(t,e,r){"use strict";var n=r(54);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},function(t,e,r){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,n.default)(t),(e=(0,i.default)(e,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));for(var r=t.split("."),o=0;o63)return!1;if(e.require_tld){var s=r.pop();if(!r.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(s))return!1}for(var u,c=0;c1&&void 0!==arguments[1]?arguments[1]:"";if((0,i.default)(e),!(r=String(r)))return t(e,4)||t(e,6);if("4"===r){if(!o.test(e))return!1;var n=e.split(".").sort((function(t,e){return t-e}));return n[3]<=255}if("6"===r){var s=[e];if(e.includes("%")){if(2!==(s=e.split("%")).length)return!1;if(!s[0].includes(":"))return!1;if(""===s[1])return!1}var u=s[0].split(":"),c=!1,p=t(u[u.length-1],4),f=p?7:8;if(u.length>f)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(u.shift(),u.shift(),c=!0):"::"===e.substr(e.length-2)&&(u.pop(),u.pop(),c=!0);for(var h=0;h0&&h=1:u.length===f}return!1};var n,i=(n=r(30))&&n.__esModule?n:{default:n};var o=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/,a=/^[0-9A-F]{1,4}$/i;t.exports=e.default,t.exports.default=e.default},function(t,e,r){var n=r(126);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},function(t,e,r){var n=r(127);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,r){var n=r(15),i=r(17),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},function(t,e,r){var n=r(130),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)})),e}));t.exports=a},function(t,e,r){var n=r(131);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(32);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(133),i=r(19),o=r(25);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(134),i=r(135),o=r(136),a=r(137),s=r(138);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}},function(t,e,r){var n=r(20);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(21);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(21);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(21);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e,r){var n=r(150);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(12),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(152),i=r(33);t.exports=function(t,e){return t&&n(t,e,i)}},function(t,e,r){var n=r(153)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t,e,r){var n=r(155),i=r(26),o=r(3),a=r(28),s=r(59),u=r(29),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),p=!r&&i(t),f=!r&&!p&&a(t),h=!r&&!p&&!f&&u(t),l=r||p||f||h,d=l?n(t.length,String):[],y=d.length;for(var v in t)!e&&!c.call(t,v)||l&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||d.push(v);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?k(t)+e:e}function M(){return!0}function N(t,e,r){return(0===t&&!K(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function q(t,e){return L(t,e,0)}function C(t,e){return L(t,e,e)}function L(t,e,r){return void 0===t?r:K(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function K(t){return t<0||0===t&&1/t==-1/0}function B(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function F(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function V(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function J(t){return F(t)||V(t)}var G=function(t){return B(t)?t:ht(t)},W=function(t){function e(t){return F(t)?t:lt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),H=function(t){function e(t){return V(t)?t:dt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G),Q=function(t){function e(t){return B(t)&&!J(t)?t:yt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(G);G.Keyed=W,G.Indexed=H,G.Set=Q;function $(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function X(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function Z(t){return B(t)||X(t)}var Y="@@__IMMUTABLE_ORDERED__@@";function tt(t){return Boolean(t&&t[Y])}var et="function"==typeof Symbol&&Symbol.iterator,rt=et||"@@iterator",nt=function(t){this.next=t};function it(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function ot(){return{value:void 0,done:!0}}function at(t){return!!ct(t)}function st(t){return t&&"function"==typeof t.next}function ut(t){var e=ct(t);return e&&e.call(t)}function ct(t){var e=t&&(et&&t[et]||t["@@iterator"]);if("function"==typeof e)return e}nt.prototype.toString=function(){return"[Iterator]"},nt.KEYS=0,nt.VALUES=1,nt.ENTRIES=2,nt.prototype.inspect=nt.prototype.toSource=function(){return this.toString()},nt.prototype[rt]=function(){return this};var pt=Object.prototype.hasOwnProperty;function ft(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var ht=function(t){function e(t){return null==t?bt():Z(t)?t.toSeq():function(t){var e=jt(t);if(e)return e;if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var o=r[e?n-++i:i++];if(!1===t(o[1],o[0],this))break}return i}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=r[e?n-++i:i++];return it(t,o[0],o[1])}))}return this.__iteratorUncached(t,e)},e}(G),lt=function(t){function e(t){return null==t?bt().toKeyedSeq():B(t)?F(t)?t.toSeq():t.fromEntrySeq():X(t)?t.toSeq():wt(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ht),dt=function(t){function e(t){return null==t?bt():B(t)?F(t)?t.entrySeq():t.toIndexedSeq():X(t)?t.toSeq().entrySeq():It(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(ht),yt=function(t){function e(t){return(B(t)&&!J(t)?t:dt(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(ht);ht.isSeq=$,ht.Keyed=lt,ht.Set=yt,ht.Indexed=dt,ht.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var vt=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[R(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,i=0;i!==n;){var o=e?n-++i:i++;if(!1===t(r[o],o,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,i=0;return new nt((function(){if(i===n)return{value:void 0,done:!0};var o=e?n-++i:i++;return it(t,o,r[o])}))},e}(dt),mt=function(t){function e(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return pt.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length,o=0;o!==i;){var a=n[e?i-++o:o++];if(!1===t(r[a],a,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length,o=0;return new nt((function(){if(o===i)return{value:void 0,done:!0};var a=n[e?i-++o:o++];return it(t,a,r[a])}))},e}(lt);mt.prototype[Y]=!0;var gt,_t=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=ut(this._collection),n=0;if(st(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=ut(this._collection);if(!st(r))return new nt(ot);var n=0;return new nt((function(){var e=r.next();return e.done?e:it(t,n++,e.value)}))},e}(dt);function bt(){return gt||(gt=new vt([]))}function wt(t){var e=Array.isArray(t)?new vt(t):at(t)?new _t(t):void 0;if(e)return e.fromEntrySeq();if("object"==typeof t)return new mt(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function It(t){var e=jt(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function jt(t){return ft(t)?new vt(t):at(t)?new _t(t):void 0}function Et(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function Tt(t){return Et(t)&&tt(t)}function At(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function St(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(At(t)&&At(e)&&t.equals(e))}var Pt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function Ot(t){return t>>>1&1073741824|3221225471&t}function Dt(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return Ot(r)}if("string"===e)return t.length>qt?function(t){var e=Kt[t];void 0===e&&(e=Ut(t),Lt===Ct&&(Lt=0,Kt={}),Lt++,Kt[t]=e);return e}(t):Ut(t);if("function"==typeof t.hashCode)return Ot(t.hashCode());if("object"===e||"function"===e)return function(t){var e;if(Rt&&void 0!==(e=kt.get(t)))return e;if(void 0!==(e=t[Nt]))return e;if(!xt){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Nt]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}e=++Mt,1073741824&Mt&&(Mt=0);if(Rt)kt.set(t,e);else{if(void 0!==zt&&!1===zt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(xt)Object.defineProperty(t,Nt,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Nt]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Nt]=e}}return e}(t);if("function"==typeof t.toString)return Ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ut(t){for(var e=0,r=0;r=0&&(c.get=function(e,r){return(e=R(this,e))>=0&&es)return{value:void 0,done:!0};var t=i.next();return n||1===e||t.done?t:it(e,u-1,0===e?void 0:t.value[1],t)}))},c}function Xt(t,e,r,n){var i=se(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(2,o),u=!0,c=0;return new nt((function(){var t,o,p;do{if((t=s.next()).done)return n||1===i?t:it(i,c++,0===i?void 0:t.value[1],t);var f=t.value;o=f[0],p=f[1],u&&(u=e.call(r,p,o,a))}while(u);return 2===i?t:it(i,o,p,t)}))},i}function Zt(t,e){var r=F(t),n=[t].concat(e).map((function(t){return B(t)?r&&(t=W(t)):t=r?wt(t):It(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&F(i)||V(t)&&V(i))return i}var o=new vt(n);return r?o=o.toKeyedSeq():V(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}function Yt(t,e,r){var n=se(t);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;return function t(u,c){u.__iterate((function(o,u){return(!e||c0}function ne(t,e,r,n){var i=se(t),o=new vt(r).map((function(t){return t.size}));return i.size=n?o.max():o.min(),i.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map((function(t){return t=G(t),ut(i?t.reverse():t)})),a=0,s=!1;return new nt((function(){var r;return s||(r=o.map((function(t){return t.next()})),s=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),s?{value:void 0,done:!0}:it(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},i}function ie(t,e){return t===e?t:$(t)?e:t.constructor(e)}function oe(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function ae(t){return F(t)?W:V(t)?H:Q}function se(t){return Object.create((F(t)?lt:V(t)?dt:yt).prototype)}function ue(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ht.prototype.cacheResult.call(this)}function ce(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return ze(this,e,t)}function ze(t,e,r){for(var n=[],i=0;i0;)e[r]=arguments[r+1];return xe(this,e,t)}function Ne(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return ke(t,e)}))}function qe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Ie(this,t,er(),(function(t){return xe(t,e)}))}function Ce(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Le(){return this.__ownerID?this:this.__ensureOwner(new x)}function Ke(){return this.__ensureOwner()}function Be(){return this.__altered}Ft.prototype.cacheResult=Bt.prototype.cacheResult=Vt.prototype.cacheResult=Jt.prototype.cacheResult=ue;var Fe=function(t){function e(e){return null==e?er():Et(e)&&!tt(e)?e:er().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return er().withMutations((function(e){for(var r=0;r=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return rr(this,t,e)},e.prototype.remove=function(t){return rr(this,t,U)},e.prototype.deleteAll=function(t){var e=G(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):er()},e.prototype.sort=function(t){return Ar(te(this,t))},e.prototype.sortBy=function(t,e){return Ar(te(this,e,t))},e.prototype.map=function(t,e){return this.withMutations((function(r){r.forEach((function(n,i){r.set(i,t.call(e,n,i,r))}))}))},e.prototype.__iterator=function(t,e){return new Xe(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?tr(this.size,this._root,t,this.__hash):0===this.size?er():(this.__ownerID=t,this.__altered=!1,this)},e}(W);Fe.isMap=Et;var Ve=Fe.prototype;Ve["@@__IMMUTABLE_MAP__@@"]=!0,Ve.delete=Ve.remove,Ve.removeAll=Ve.deleteAll,Ve.setIn=Ee,Ve.removeIn=Ve.deleteIn=Ae,Ve.update=Pe,Ve.updateIn=Oe,Ve.merge=Ve.concat=De,Ve.mergeWith=Ue,Ve.mergeDeep=Re,Ve.mergeDeepWith=Me,Ve.mergeIn=Ne,Ve.mergeDeepIn=qe,Ve.withMutations=Ce,Ve.wasAltered=Be,Ve.asImmutable=Ke,Ve["@@transducer/init"]=Ve.asMutable=Le,Ve["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},Ve["@@transducer/result"]=function(t){return t.asImmutable()};var Je=function(t,e){this.ownerID=t,this.entries=e};Je.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o=ur)return function(t,e,r,n){t||(t=new x);for(var i=new Qe(t,Dt(r),[r,n]),o=0;o>>t)),o=this.bitmap;return 0==(o&i)?n:this.nodes[ar(o&i-1)].get(t+5,e,r,n)},Ge.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=1<=cr)return function(t,e,r,n,i){for(var o=0,a=new Array(32),s=0;0!==r;s++,r>>>=1)a[s]=1&r?e[o++]:void 0;return a[n]=i,new We(t,o+1,a)}(t,h,c,s,d);if(p&&!d&&2===h.length&&ir(h[1^f]))return h[1^f];if(p&&d&&1===h.length&&ir(d))return d;var y=t&&t===this.ownerID,v=p?d?c:c^u:c|u,m=p?d?sr(h,f,d,y):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a>>t),o=this.nodes[i];return o?o.get(t+5,e,r,n):n},We.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=Dt(n));var s=31&(0===e?r:r>>>e),u=i===U,c=this.nodes,p=c[s];if(u&&!p)return this;var f=nr(p,t,e+5,r,n,i,o,a);if(f===p)return this;var h=this.count;if(p){if(!f&&--h>>r),s=31&(0===r?n:n>>>r),u=a===s?[or(t,e,r+5,n,i)]:(o=new Qe(e,n,i),a>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function sr(t,e,r,n){var i=n?t:pe(t);return i[e]=r,i}var ur=8,cr=16,pr=8;function fr(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var hr=function(t){function e(e){var r=_r();if(null==e)return r;if(fr(e))return e;var n=t(e),i=n.size;return 0===i?r:(he(i),i>0&&i<32?gr(0,i,5,null,new dr(n.toArray())):r.withMutations((function(t){t.setSize(i),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=R(this,t))>=0&&t=t.size||e<0)return t.withMutations((function(t){e<0?jr(t,e).set(0,r):jr(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o={value:!1};e>=Er(t._capacity)?n=br(n,t.__ownerID,0,e,r,o):i=br(i,t.__ownerID,t._level,e,r,o);if(!o.value)return t;if(t.__ownerID)return t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return gr(t._origin,t._capacity,t._level,i,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):_r()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){jr(r,0,e+t.length);for(var n=0;n>>e&31;if(n>=this.array.length)return new dr([],t);var i,o=0===n;if(e>0){var a=this.array[n];if((i=a&&a.removeBefore(t,e-5,r))===a&&o)return this}if(o&&!i)return this;var s=wr(this,t);if(!o)for(var u=0;u>>e&31;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-5,r))===o&&i===this.array.length-1)return this}var a=wr(this,t);return a.array.splice(i+1),n&&(a.array[i]=n),a};var yr,vr={};function mr(t,e){var r=t._origin,n=t._capacity,i=Er(n),o=t._tail;return a(t._root,t._level,0);function a(t,s,u){return 0===s?function(t,a){var s=a===i?o&&o.array:t&&t.array,u=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(u===c)return vr;var t=e?--c:u++;return s&&s[t]}}(t,u):function(t,i,o){var s,u=t&&t.array,c=o>r?0:r-o>>i,p=1+(n-o>>i);p>32&&(p=32);return function(){for(;;){if(s){var t=s();if(t!==vr)return t;s=null}if(c===p)return vr;var r=e?--p:c++;s=a(u&&u[r],i-5,o+(r<>>r&31,u=t&&s0){var c=t&&t.array[s],p=br(c,e,r-5,n,i,o);return p===c?t:((a=wr(t,e)).array[s]=p,a)}return u&&t.array[s]===i?t:(o&&z(o),a=wr(t,e),void 0===i&&s===a.array.length-1?a.array.pop():a.array[s]=i,a)}function wr(t,e){return e&&t&&e===t.ownerID?t:new dr(t?t.array.slice():[],e)}function Ir(t,e){if(e>=Er(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&31],n-=5;return r}}function jr(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new x,i=t._origin,o=t._capacity,a=i+e,s=void 0===r?o:r<0?o+r:i+r;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,p=0;a+p<0;)c=new dr(c&&c.array.length?[void 0,c]:[],n),p+=1<<(u+=5);p&&(a+=p,i+=p,s+=p,o+=p);for(var f=Er(o),h=Er(s);h>=1<f?new dr([],n):l;if(l&&h>f&&a5;v-=5){var m=f>>>v&31;y=y.array[m]=wr(y.array[m],n)}y.array[f>>>5&31]=l}if(s=h)a-=h,s-=h,u=5,c=null,d=d&&d.removeBefore(n,0,a);else if(a>i||h>>u&31;if(g!==h>>>u&31)break;g&&(p+=(1<i&&(c=c.removeBefore(n,u,a-p)),c&&h>>5<<5}var Tr,Ar=function(t){function e(t){return null==t?Pr():Tt(t)?t:Pr().withMutations((function(e){var r=W(t);he(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):Pr()},e.prototype.set=function(t,e){return Or(this,t,e)},e.prototype.remove=function(t){return Or(this,t,U)},e.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Sr(e,r,t,this.__hash):0===this.size?Pr():(this.__ownerID=t,this._map=e,this._list=r,this)},e}(Fe);function Sr(t,e,r,n){var i=Object.create(Ar.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function Pr(){return Tr||(Tr=Sr(er(),_r()))}function Or(t,e,r){var n,i,o=t._map,a=t._list,s=o.get(e),u=void 0!==s;if(r===U){if(!u)return t;a.size>=32&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(r===a.get(s)[1])return t;n=o,i=a.set(s,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):Sr(n,i)}Ar.isOrderedMap=Tt,Ar.prototype[Y]=!0,Ar.prototype.delete=Ar.prototype.remove;function Dr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var Ur=function(t){function e(t){return null==t?Rr():Dr(t)?t:Rr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=R(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):kr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&Dr(e))return e;he(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):kr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Rr()},e.prototype.slice=function(e,r){if(N(e,r,this.size))return this;var n=q(e,this.size);if(C(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):kr(i,o)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?kr(this.size,this._head,t,this.__hash):0===this.size?Rr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new vt(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,i=this._head;i&&!1!==t(i.value,n++,r);)i=i.next;return n},e.prototype.__iterator=function(t,e){if(e)return new vt(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new nt((function(){if(n){var e=n.value;return n=n.next,it(t,r++,e)}return{value:void 0,done:!0}}))},e}(H);Ur.isStack=Dr;var zr,xr=Ur.prototype;function kr(t,e,r,n){var i=Object.create(xr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Rr(){return zr||(zr=kr(0))}xr["@@__IMMUTABLE_STACK__@@"]=!0,xr.shift=xr.pop,xr.unshift=xr.push,xr.unshiftAll=xr.pushAll,xr.withMutations=Ce,xr.wasAltered=Be,xr.asImmutable=Ke,xr["@@transducer/init"]=xr.asMutable=Le,xr["@@transducer/step"]=function(t,e){return t.unshift(e)},xr["@@transducer/result"]=function(t){return t.asImmutable()};function Mr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function Nr(t){return Mr(t)&&tt(t)}function qr(t,e){if(t===e)return!0;if(!B(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||F(t)!==F(e)||V(t)!==V(e)||tt(t)!==tt(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!J(t);if(tt(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&St(i[1],t)&&(r||St(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,s=e.__iterate((function(e,n){if(r?!t.has(e):i?!St(e,t.get(n,U)):!St(t.get(n,U),e))return a=!1,!1}));return a&&t.size===s}function Cr(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function Lr(t){if(!t||"object"!=typeof t)return t;if(!B(t)){if(!ye(t))return t;t=ht(t)}if(F(t)){var e={};return t.__iterate((function(t,r){e[r]=Lr(t)})),e}var r=[];return t.__iterate((function(t){r.push(Lr(t))})),r}var Kr=function(t){function e(e){return null==e?Gr():Mr(e)&&!tt(e)?e:Gr().withMutations((function(r){var n=t(e);he(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.intersect=function(t){return(t=G(t).toArray()).length?Fr.intersect.apply(e(t.pop()),t):Gr()},e.union=function(t){return(t=G(t).toArray()).length?Fr.union.apply(e(t.pop()),t):Gr()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Vr(this,this._map.set(t,t))},e.prototype.remove=function(t){return Vr(this,this._map.remove(t))},e.prototype.clear=function(){return Vr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this;return Vr(this,this._map.map((function(e){return t(e,e,r)}),e))},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n=0&&e=0&&r>>-15,461845907),e=Pt(e<<13|e>>>-13,5),e=Pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=Ot((e=Pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+pn(Dt(t),Dt(e))|0}:function(t,e){n=n+pn(Dt(t),Dt(e))|0}:e?function(t){n=31*n+Dt(t)|0}:function(t){n=n+Dt(t)|0}),n)}(this))}});var Yr=G.prototype;Yr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Yr[rt]=Yr.values,Yr.toJSON=Yr.toArray,Yr.__toStringMapper=ve,Yr.inspect=Yr.toSource=function(){return this.toString()},Yr.chain=Yr.flatMap,Yr.contains=Yr.includes,Cr(W,{flip:function(){return ie(this,Gt(this))},mapEntries:function(t,e){var r=this,n=0;return ie(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return ie(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var tn=W.prototype;tn["@@__IMMUTABLE_KEYED__@@"]=!0,tn[rt]=Yr.entries,tn.toJSON=Zr,tn.__toStringMapper=function(t,e){return ve(e)+": "+ve(t)},Cr(H,{toKeyedSeq:function(){return new Bt(this,!1)},filter:function(t,e){return ie(this,Qt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return ie(this,Ht(this,!1))},slice:function(t,e){return ie(this,$t(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=q(t,t<0?this.count():this.size);var n=this.slice(0,t);return ie(this,1===r?n:n.concat(pe(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return ie(this,Yt(this,t,!1))},get:function(t,e){return(t=R(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=R(this,t))>=0&&(void 0!==this.size?this.size===1/0||te?-1:0}function pn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}en["@@__IMMUTABLE_INDEXED__@@"]=!0,en[Y]=!0,Cr(Q,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),Q.prototype.has=Yr.includes,Q.prototype.contains=Q.prototype.includes,Cr(lt,W.prototype),Cr(dt,H.prototype),Cr(yt,Q.prototype);var fn=function(t){function e(t){return null==t?yn():Nr(t)?t:yn().withMutations((function(e){var r=Q(t);he(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(W(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Kr);fn.isOrderedSet=Nr;var hn,ln=fn.prototype;function dn(t,e){var r=Object.create(ln);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function yn(){return hn||(hn=dn(Pr()))}ln[Y]=!0,ln.zip=en.zip,ln.zipWith=en.zipWith,ln.__empty=yn,ln.__make=dn;var vn=function(t,e){var r,n=function(o){var a=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var s=Object.keys(t),u=i._indices={};i._name=e,i._keys=s,i._defaultValues=t;for(var c=0;c2?[]:void 0,{"":t})}function En(t,e){return F(e)?e.toMap():e.toList()}var Tn=r(7),An=r.n(Tn),Sn=r(67),Pn=r.n(Sn),On=r(24),Dn=r.n(On),Un={TRACE:"trace",DEBUG:"debug",INFO:"info",WARN:"warn",ERROR:"error"};function zn(t){return D()(t)&&!An()(t)}function xn(t,e){return"[".concat((new Date).toISOString()," ").concat(t.toUpperCase()," ").concat("lattice","] ").concat(e)}Dn.a.setLevel(Dn.a.levels.INFO);var kn=function(){function t(e){I()(this,t),A()(this,"logger",void 0),A()(this,"name",void 0),this.logger=Dn.a.getLogger(e),this.name=e}return E()(t,[{key:"log",value:function(t,e){var r,n=xn(t,this.name);zn(e)?this.logger[t]("".concat(n," - ").concat(e)):(this.logger[t](n),t!==Un.TRACE&&(!Pn()(e)&&An()(e)||this.logger[t](e)));for(var i=arguments.length,o=new Array(i>2?i-2:0),a=2;a0&&(r=this.logger)[t].apply(r,o)}},{key:"trace",value:function(t){this.log(Un.TRACE,t)}},{key:"debug",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n1?e-1:0),n=1;n2&&void 0!==arguments[2]&&arguments[2],n="";if(Xn(t))if(Xn(e)){var i="".concat(t,".").concat(e);if(i.length<=63)return i;n="invalid FQN: FQNs must be <= ".concat(63," characters, got ").concat(i.length)}else n="invalid FQN: name must be a non-empty string";else n="invalid FQN: namespace must be a non-empty string";if(!0===r)throw Yn.error(n),new Error(n);return""}var ni=function(){function t(){if(I()(this,t),A()(this,"namespace",void 0),A()(this,"name",void 0),1!==arguments.length&&2!==arguments.length){var e="invalid parameter count: FQN takes only 1 or 2 parameters, got ".concat(arguments.length);throw Yn.error(e),new Error(e)}var r=ei.apply(void 0,arguments),n=r.namespace,i=r.name;ri(n,i,!0),this.namespace=n,this.name=i}return E()(t,[{key:"getNamespace",value:function(){return this.namespace}},{key:"getName",value:function(){return this.name}},{key:"toObject",value:function(){var t=this.namespace,e=this.name;return""===ri(t,e)?{namespace:"",name:""}:{namespace:t,name:e}}},{key:"toString",value:function(){return ri(this.namespace,this.name)}},{key:"valueOf",value:function(){return this.toString()}}]),t}();A()(ni,"of",(function(){for(var t=arguments.length,e=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",ho.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),ho.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=s,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),ho.error(n,e[ao]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))a=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=a;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),ho.error(n,e[uo]),Promise.reject(n);return Xn(r)&&ki[r]?Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("neighbors","?").concat("type","=").concat(r),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n))}function go(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ki.SOFT,n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);if(!si(e)&&!ui(e))return n="invalid parameter: entityKeyIds must be a valid UUID or array of UUIDs",ho.error(n,e),Promise.reject(n);if(!ki[r])return n="invalid parameter: deleteType must be a valid DeleteType",ho.error(n,r),Promise.reject(n);var i=e;return"string"==typeof e&&(i=[e]),Ei("DataApi").delete("/".concat("set","/").concat(t,"?").concat("type","=").concat(r),{data:i}).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function _o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ki.SOFT,r="";return si(t)?ki[e]?Ei("DataApi").delete("/".concat("set","/").concat(t,"/").concat("all","?").concat("type","=").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "deleteType" must be a valid DeleteType',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function bo(t,e){var r="";return si(t)?si(e)?Ei("DataApi").get("/".concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(r='invalid parameter: "entityKeyId" must be a valid UUID',ho.error(r,e),Promise.reject(r)):(r='invalid parameter: "entitySetId" must be a valid UUID',ho.error(r,t),Promise.reject(r))}function wo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Io(t){var e="";return si(t)?Ei("DataApi").get("/".concat(t,"/").concat("count")).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",ho.error(e,t),Promise.reject(e))}function jo(t,e,r){var n="";if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",ho.error(n,t),Promise.reject(n);var i={};if(ui(e))i.properties=Kr().withMutations((function(t){e.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(e)&&!Gn(e))return n="invalid parameter: propertyTypeIds must be a non-empty array of valid UUIDs",ho.error(n,e),Promise.reject(n);if(ui(r))i.ids=Kr().withMutations((function(t){r.forEach((function(e){t.add(e)}))})).toJS();else if(!Bn()(r)&&!Gn(r))return n="invalid parameter: entityKeyIds must be a non-empty array of valid UUIDs",ho.error(n,r),Promise.reject(n);return Ei("DataApi").post("/".concat("set","/").concat(t,"/").concat("detailed"),i).then((function(t){return t.data})).catch((function(t){return ho.error(t),Promise.reject(t)}))}function Eo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fi.PARTIAL_REPLACE,n="";if(!si(t))return n='invalid parameter: "entitySetId" must be a valid UUID',ho.error(n,t),Promise.reject(n);if(!$n(e))return n='invalid parameter: "entityData" must be a non-empty object',ho.error(n,t),Promise.reject(n);for(var i=Object.keys(e),o=0;o2&&void 0!==arguments[2])||arguments[2],n="";return si(t)?si(e)?!0===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===r?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "columns" must be a boolean',Oo.error(n,r),Promise.reject(n)):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}function Uo(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="";return si(t)?!0===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table","/").concat("external-database-column")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):!1===e?Ei("DataSetsApi").get("/".concat(t,"/").concat("external-database-table")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(r='invalid parameter: "columns" must be a boolean',Oo.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Oo.error(r,t),Promise.reject(r))}function zo(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n="";return si(t)?si(e)?!Po()(r)||r<=0?(n='invalid parameter: "count" must be a positive integer',Oo.error(n,e),Promise.reject(n)):Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat(r,"/").concat("data")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(n='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Oo.error(n,t),Promise.reject(n))}function xo(t,e){var r="";return si(t)?si(e)?Ei("DataSetsApi").get("/".concat(t,"/").concat(e,"/").concat("schema")).then((function(t){return t.data})).catch((function(t){return Oo.error(t),Promise.reject(t)})):(r='invalid parameter: "dataSetId" must be a valid UUID',Oo.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Oo.error(r,t),Promise.reject(r))}var ko=r(5),Ro=r.n(ko),Mo=r(23),No=r.n(Mo),qo=new kn("EntityType"),Co=function(){function t(e){I()(this,t),A()(this,"baseType",void 0),A()(this,"category",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"key",void 0),A()(this,"properties",void 0),A()(this,"propertyTags",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),this.key=e.key,this.properties=e.properties,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.baseType)&&(this.baseType=e.baseType),Jn(e.category)&&(this.category=e.category),Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.propertyTags)&&(this.propertyTags=e.propertyTags)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={key:this.key,properties:this.properties,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),Jn(this.baseType)&&(t.baseType=this.baseType),Jn(this.category)&&(t.category=this.category),Jn(this.propertyTags)&&(t.propertyTags=this.propertyTags),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Lo=function(){function t(e){I()(this,t),A()(this,"baseType",void 0),A()(this,"category",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"key",void 0),A()(this,"properties",void 0),A()(this,"propertyTags",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),Z(e)?(this.setBaseType(e.get("baseType")),this.setCategory(e.get("category")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setKey(e.get("key")),this.setPropertyTags(e.get("propertyTags")),this.setPropertyTypes(e.get("properties")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setBaseType(e.baseType),this.setCategory(e.category),this.setDescription(e.description),this.setId(e.id),this.setKey(e.key),this.setPropertyTags(e.propertyTags),this.setPropertyTypes(e.properties),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setBaseType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "baseType" must be a valid UUID');return this.baseType=t,this}},{key:"setCategory",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ki[t])throw new Error('invalid parameter: "category" must be a valid SecurableType');return this.category=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.id=t,this}},{key:"setKey",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "key" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "key" must be a non-empty array of UUIDs');return this.key=e.toJS(),this}},{key:"setPropertyTags",value:function(t){if(!Jn(t))return this;var e=t;if(B(e)&&(e=e.toJS()),Wn(e))return this;if(!ci(e,si))throw new Error('invalid parameter: "propertyTags" must be a valid multimap object');return this.propertyTags=e,this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');var e=fn(t);if(!e.every(si))throw new Error('invalid parameter: "propertyTypes" must be a non-empty array of UUIDs');return this.properties=e.toJS(),this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.key||(this.key=[]),this.properties||(this.properties=[]),this.propertyTags||(this.propertyTags={}),this.schemas||(this.schemas=[]),new Co({baseType:this.baseType,category:this.category,description:this.description,id:this.id,key:this.key,properties:this.properties,propertyTags:this.propertyTags,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Ko=new kn("AssociationType"),Bo=function(){function t(e){I()(this,t),A()(this,"bidirectional",void 0),A()(this,"dst",void 0),A()(this,"entityType",void 0),A()(this,"src",void 0),this.bidirectional=e.bidirectional,this.entityType=e.entityType,this.dst=e.dst,this.src=e.src}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{bidirectional:this.bidirectional,dst:this.dst,entityType:this.entityType.toObject(),src:this.src}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Fo=function(){function t(e){I()(this,t),A()(this,"bidirectional",void 0),A()(this,"destinationEntityTypeIds",void 0),A()(this,"entityType",void 0),A()(this,"sourceEntityTypeIds",void 0),Z(e)?(this.setBidirectional(e.get("bidirectional")),this.setDestinationEntityTypeIds(e.get("dst")),this.setEntityType(e.get("entityType")),this.setSourceEntityTypeIds(e.get("src"))):Jn(e)&&(this.setBidirectional(e.bidirectional),this.setDestinationEntityTypeIds(e.dst),this.setEntityType(e.entityType),this.setSourceEntityTypeIds(e.src))}return E()(t,[{key:"setBidirectional",value:function(t){if(!No()(t))throw new Error('invalid parameter: "bidirectional" must be a boolean');return this.bidirectional=t,this}},{key:"setEntityType",value:function(t){return this.entityType=new Lo(t).build(),this}},{key:"setDestinationEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "destinationEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "destinationEntityTypeIds" must be a non-empty array of UUIDs');return this.destinationEntityTypeIds=e.toJS(),this}},{key:"setSourceEntityTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "sourceEntityTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "sourceEntityTypeIds" must be a non-empty array of UUIDs');return this.sourceEntityTypeIds=e.toJS(),this}},{key:"build",value:function(){if(null===this.bidirectional||void 0===this.bidirectional)throw new Error('missing property: "bidirectional" is a required property');if(!this.entityType)throw new Error('missing property: "entityType" is a required property');return this.destinationEntityTypeIds||(this.destinationEntityTypeIds=[]),this.sourceEntityTypeIds||(this.sourceEntityTypeIds=[]),new Bo({bidirectional:this.bidirectional,dst:this.destinationEntityTypeIds,entityType:this.entityType,src:this.sourceEntityTypeIds})}}]),t}(),Vo=new kn("PropertyType"),Jo=function(){function t(e){I()(this,t),A()(this,"analyzer",void 0),A()(this,"datatype",void 0),A()(this,"description",void 0),A()(this,"enumValues",void 0),A()(this,"id",void 0),A()(this,"indexType",void 0),A()(this,"multiValued",void 0),A()(this,"pii",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),this.datatype=e.datatype,this.schemas=e.schemas,this.title=e.title,this.type=e.type,Jn(e.analyzer)&&(this.analyzer=e.analyzer),Jn(e.description)&&(this.description=e.description),Jn(e.enumValues)&&(this.enumValues=e.enumValues),Jn(e.id)&&(this.id=e.id),Jn(e.indexType)&&(this.indexType=e.indexType),Jn(e.multiValued)&&(this.multiValued=e.multiValued),Jn(e.pii)&&(this.pii=e.pii)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={datatype:this.datatype,schemas:this.schemas.map((function(t){return t.toObject()})),title:this.title,type:this.type.toObject()};return Jn(this.analyzer)&&(t.analyzer=this.analyzer),Jn(this.description)&&(t.description=this.description),Jn(this.enumValues)&&(t.enumValues=this.enumValues),Jn(this.id)&&(t.id=this.id),Jn(this.indexType)&&(t.indexType=this.indexType),Jn(this.multiValued)&&(t.multiValued=this.multiValued),Jn(this.pii)&&(t.pii=this.pii),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Go=function(){function t(e){I()(this,t),A()(this,"analyzer",void 0),A()(this,"datatype",void 0),A()(this,"description",void 0),A()(this,"enumValues",void 0),A()(this,"id",void 0),A()(this,"indexType",void 0),A()(this,"multiValued",void 0),A()(this,"pii",void 0),A()(this,"schemas",void 0),A()(this,"title",void 0),A()(this,"type",void 0),Z(e)?(this.setAnalyzer(e.get("analyzer")),this.setDataType(e.get("datatype")),this.setDescription(e.get("description")),this.setEnumValues(e.get("enumValues")),this.setId(e.get("id")),this.setIndexType(e.get("indexType")),this.setMultiValued(e.get("multiValued")),this.setPII(e.get("pii")),this.setSchemas(e.get("schemas")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setAnalyzer(e.analyzer),this.setDataType(e.datatype),this.setDescription(e.description),this.setEnumValues(e.enumValues),this.setId(e.id),this.setIndexType(e.indexType),this.setMultiValued(e.multiValued),this.setPII(e.pii),this.setSchemas(e.schemas),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setAnalyzer",value:function(t){if(!Jn(t)||Hn(t))return this;if(!xi[t])throw new Error("invalid parameter: analyzer must be a valid AnalyzerType");return this.analyzer=t,this}},{key:"setDataType",value:function(t){if(!Xn(t))throw new Error("invalid parameter: datatype must be a non-empty string");return this.datatype=t,this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error("invalid parameter: description must be a non-empty string");return this.description=t,this}},{key:"setEnumValues",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "values" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "values" must be a non-empty array of non-empty strings');return this.enumValues=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error("invalid parameter: propertyTypeId must be a valid UUID");return this.id=t,this}},{key:"setIndexType",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Ni[t])throw new Error("invalid parameter: indexType must be a valid IndexType");return this.indexType=t,this}},{key:"setMultiValued",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: multiValued must be a boolean");return this.multiValued=t,this}},{key:"setPII",value:function(t){if(!Jn(t))return this;if(!0!==t&&!1!==t)throw new Error("invalid parameter: pii must be a boolean");return this.pii=t,this}},{key:"setSchemas",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "schemas" must be an array');try{this.schemas=Kr(t).map((function(t){return ni.of(t)})).toJS()}catch(t){throw new Error('invalid parameter: "schemas" must be a non-empty array of valid FQNs')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!Jn(this.datatype))throw new Error('missing property: "datatype" is a required property');if(!Jn(this.title))throw new Error('missing property: "title" is a required property');if(!Jn(this.type))throw new Error('missing property: "type" is a required property');return this.schemas||(this.schemas=[]),new Jo({analyzer:this.analyzer,datatype:this.datatype,description:this.description,enumValues:this.enumValues,id:this.id,indexType:this.indexType,multiValued:this.multiValued,pii:this.pii,schemas:this.schemas,title:this.title,type:this.type})}}]),t}(),Wo=new kn("Schema"),Ho=function(){function t(e){I()(this,t),A()(this,"entityTypes",void 0),A()(this,"fqn",void 0),A()(this,"propertyTypes",void 0),this.entityTypes=e.entityTypes,this.fqn=e.fqn,this.propertyTypes=e.propertyTypes}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityTypes:this.entityTypes.map((function(t){return t.toObject()})),fqn:this.fqn.toObject(),propertyTypes:this.propertyTypes.map((function(t){return t.toObject()}))}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Qo=function(){function t(e){I()(this,t),A()(this,"entityTypes",void 0),A()(this,"fqn",void 0),A()(this,"propertyTypes",void 0),Z(e)?(this.setEntityTypes(e.get("entityTypes")),this.setFQN(e.get("fqn")),this.setPropertyTypes(e.get("propertyTypes"))):Jn(e)&&(this.setEntityTypes(e.entityTypes),this.setFQN(e.fqn),this.setPropertyTypes(e.propertyTypes))}return E()(t,[{key:"setEntityTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entityTypes" must be an array');try{this.entityTypes=Kr(t).map((function(t){return new Lo(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "entityTypes" must be an array of EntityTypes')}return this}},{key:"setFQN",value:function(t){return this.fqn=ni.of(t),this}},{key:"setPropertyTypes",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "propertyTypes" must be an array');try{this.propertyTypes=Kr(t).map((function(t){return new Go(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "propertyTypes" must be an array of PropertyTypes')}return this}},{key:"build",value:function(){if(!this.fqn)throw new Error('missing property: "fqn" is a required property');return this.entityTypes||(this.entityTypes=[]),this.propertyTypes||(this.propertyTypes=[]),new Ho({entityTypes:this.entityTypes,fqn:this.fqn,propertyTypes:this.propertyTypes})}}]),t}(),$o=function(t){return pi(t,Qo,Wo)},Xo=new kn("EntityDataModelApi");function Zo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function Yo(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r='invalid parameter: "propertyTypeId" must be a valid UUID',Xo.error(r,e),Promise.reject(r)):(r='invalid parameter: "entityTypeId" must be a valid UUID',Xo.error(r,t),Promise.reject(r))}function ta(t,e){var r="";return si(t)?si(e)?Ei(ii).put("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function ea(t){var e="";return pi(t,Fo,Ko)?Ei(ii).post("/".concat("association/type"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "associationType" must be a valid AssociationType',Xo.error(e,t),Promise.reject(e))}function ra(t){var e="";return pi(t,Lo,qo)?Ei(ii).post("/".concat("entity/type"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "entityType" must be a valid EntityType',Xo.error(e,t),Promise.reject(e))}function na(t){var e="";return pi(t,Go,Vo)?Ei(ii).post("/".concat("property/type"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyType" must be a valid PropertyType',Xo.error(e,t),Promise.reject(e))}function ia(t){var e="";return $o(t)?Ei(ii).post("/".concat("schema"),t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "schema" must be a valid Schema',Xo.error(e,t),Promise.reject(e))}function oa(t){var e="";return si(t)?Ei(ii).delete("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function aa(t){var e="";return si(t)?Ei(ii).delete("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function sa(t){var e="";return si(t)?Ei(ii).delete("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function ua(){return Ei(ii).get("/".concat("association/type","/").concat("entity/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function ca(){return Ei(ii).get("/".concat("association/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function pa(){return Ei(ii).get("/".concat("entity/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function fa(){return Ei(ii).get("/".concat("property/type")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function ha(){return Ei(ii).get("/".concat("schema")).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function la(t){var e="";return si(t)?Ei(ii).get("/".concat("association/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "associationTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function da(){return Ei(ii).get("/").then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function ya(t){var e="";return ai(t,$n)?Ei(ii).post("/",t).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "projection" must be an array of objects',Xo.error(e,t),Promise.reject(e))}function va(t){var e="";return si(t)?Ei(ii).get("/".concat("entity/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "entityTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function ma(t){var e="";return si(t)?Ei(ii).get("/".concat("property/type","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(e='invalid parameter: "propertyTypeId" must be a valid UUID',Xo.error(e,t),Promise.reject(e))}function ga(t){var e="";if(!ni.isValid(t))return e='invalid parameter: "schemaFQN" must be a valid FQN',Xo.error(e,t),Promise.reject(e);var r=t.namespace,n=t.name;return Ei(ii).get("/".concat("schema","/").concat(r,"/").concat(n)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}function _a(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("dst","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function ba(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("entity/type","/").concat(t,"/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: propertyTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function wa(t,e){var r="";return si(t)?si(e)?Ei(ii).delete("/".concat("association/type","/").concat(t,"/").concat("src","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: associationTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function Ia(t,e){var r="";return si(t)?$n(e)?Ro()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",Xo.error(r,e.type),Promise.reject(r)):Ro()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",Xo.error(r,e.name),Promise.reject(r)):Ro()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",Xo.error(r,e.title),Promise.reject(r)):Ro()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",Xo.error(r,e.description),Promise.reject(r)):Ro()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",Xo.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("entity/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: entityTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function ja(t,e){var r="";return si(t)?$n(e)?Ro()(e,"type")&&!ni.isValid(e.type)?(r="invalid parameter: type must be a valid FQN",Xo.error(r,e.type),Promise.reject(r)):Ro()(e,"name")&&!Xn(e.name)?(r="invalid parameter: name must be a non-empty string",Xo.error(r,e.name),Promise.reject(r)):Ro()(e,"title")&&!Xn(e.title)?(r="invalid parameter: title must be a non-empty string",Xo.error(r,e.title),Promise.reject(r)):Ro()(e,"description")&&!Xn(e.description)?(r="invalid parameter: description must be a non-empty string",Xo.error(r,e.description),Promise.reject(r)):Ro()(e,"contacts")&&!Zn(e.contacts)?(r="invalid parameter: contacts must be a non-empty string",Xo.error(r,e.contacts),Promise.reject(r)):Ei(ii).patch("/".concat("property/type","/").concat(t),e).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)})):(r="invalid parameter: metadata must be a non-empty object",Xo.error(r,e),Promise.reject(r)):(r="invalid parameter: propertyTypeId must be a valid UUID",Xo.error(r,t),Promise.reject(r))}function Ea(t){var e="";if(!$o(t))return e='invalid parameter: "schema" must be a valid Schema',Xo.error(e,t),Promise.reject(e);var r={action:zi.REPLACE,entityTypes:t.entityTypes.map((function(t){return t.id})),propertyTypes:t.propertyTypes.map((function(t){return t.id}))};return Ei(ii).patch("/".concat("schema","/").concat(t.fqn.namespace,"/").concat(t.fqn.name),r).then((function(t){return t.data})).catch((function(t){return Xo.error(t),Promise.reject(t)}))}var Ta=new kn("EntitySet"),Aa=function(){function t(e){I()(this,t),A()(this,"contacts",void 0),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"flags",void 0),A()(this,"id",void 0),A()(this,"linkedEntitySets",void 0),A()(this,"name",void 0),A()(this,"organizationId",void 0),A()(this,"title",void 0),this.contacts=e.contacts,this.entityTypeId=e.entityTypeId,this.name=e.name,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.flags)&&(this.flags=e.flags),Jn(e.id)&&(this.id=e.id),Jn(e.linkedEntitySets)&&(this.linkedEntitySets=e.linkedEntitySets),Jn(e.organizationId)&&(this.organizationId=e.organizationId)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={contacts:this.contacts,entityTypeId:this.entityTypeId,name:this.name,title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.flags)&&(t.flags=this.flags),Jn(this.id)&&(t.id=this.id),Jn(this.linkedEntitySets)&&(t.linkedEntitySets=this.linkedEntitySets),Jn(this.organizationId)&&(t.organizationId=this.organizationId),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Sa=function(){function t(e){I()(this,t),A()(this,"contacts",void 0),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"flags",void 0),A()(this,"id",void 0),A()(this,"linkedEntitySets",void 0),A()(this,"name",void 0),A()(this,"organizationId",void 0),A()(this,"title",void 0),Z(e)?(this.setContacts(e.get("contacts")),this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setFlags(e.get("flags")),this.setId(e.get("id")),this.setLinkedEntitySets(e.get("linkedEntitySets")),this.setName(e.get("name")),this.setOrganizationId(e.get("organizationId")),this.setTitle(e.get("title"))):Jn(e)&&(this.setContacts(e.contacts),this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setFlags(e.flags),this.setId(e.id),this.setLinkedEntitySets(e.linkedEntitySets),this.setName(e.name),this.setOrganizationId(e.organizationId),this.setTitle(e.title))}return E()(t,[{key:"setContacts",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "contacts" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "contacts" must be a non-empty array of non-empty strings');return this.contacts=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setFlags",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "flags" must be an array');var e=Kr(t);if(!e.every((function(t){return Xn(t)&&Ri[t]})))throw new Error('invalid parameter: "flags" must be an array of EntitySetFlagTypes');return this.flags=e.toJS(),this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "entitySetId" must be a valid UUID');return this.id=t,this}},{key:"setLinkedEntitySets",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "entitySetIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "entitySetIds" must be a non-empty array of UUIDs');return this.linkedEntitySets=e.toJS(),this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setOrganizationId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return this.contacts||(this.contacts=[]),new Aa({contacts:this.contacts,description:this.description,entityTypeId:this.entityTypeId,flags:this.flags,id:this.id,linkedEntitySets:this.linkedEntitySets,name:this.name,organizationId:this.organizationId,title:this.title})}}]),t}(),Pa=function(t){return pi(t,Sa,Ta)},Oa=new kn("EntitySetsApi");function Da(t){var e="";return Qn(t)?t.every(Pa)?Ei("EntitySetsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySets must be a non-empty array of valid EntitySets",Oa.error(e,t),Promise.reject(e)):(e="invalid parameter: entitySets must be a non-empty array",Oa.error(e,t),Promise.reject(e))}function Ua(t){var e="";return si(t)?Ei("EntitySetsApi").delete("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Oa.error(e,t),Promise.reject(e))}function za(){return Ei("EntitySetsApi").get("/").then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)}))}function xa(t){var e="";return si(t)?Ei("EntitySetsApi").get("/".concat("all","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetId must be a valid UUID",Oa.error(e,t),Promise.reject(e))}function ka(t){var e="";return Xn(t)?Ei("EntitySetsApi").get("/".concat("ids","/").concat(t)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e="invalid parameter: entitySetName must be a non-empty string",Oa.error(e,t),Promise.reject(e))}function Ra(t){var e="";return Qn(t)?t.every(Xn)?Ei("EntitySetsApi").post("/".concat("ids"),t).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetNames" must be an array of strings',Oa.error(e,t),Promise.reject(e)):(e='invalid parameter: "entitySetNames" must be a non-empty array',Oa.error(e,t),Promise.reject(e))}function Ma(t){var e="";if(!Qn(t))return e='invalid parameter: "idsOrNames" must be a non-empty array',Oa.error(e,t),Promise.reject(e);var r=Kr(t);return r.every(si)?Ei("EntitySetsApi").post("/".concat("by-id"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):r.every(Xn)?Ei("EntitySetsApi").post("/".concat("by-name"),r.toJS()).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(e='invalid parameter: "idsOrNames" must be an array of EntitySet ids or names',Oa.error(e,t),Promise.reject(e))}function Na(t,e){var r="";return si(t)?Jn(e)?Jn(e)&&!si(e)?(r="invalid parameter: propertyTypeId must be a valid UUID",Oa.error(r,e),Promise.reject(r)):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("properties","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):Ei("EntitySetsApi").get("/".concat("all","/").concat(t,"/").concat("metadata")).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)})):(r="invalid parameter: entitySetId must be a valid UUID",Oa.error(r,t),Promise.reject(r))}function qa(t){var e="";if(!ui(t))return e="invalid parameter: entitySetIds must be a valid UUID array",Oa.error(e,t),Promise.reject(e);var r=Kr(t).toJS();return Ei("EntitySetsApi").post("/".concat("all","/").concat("metadata"),r).then((function(t){return t.data})).catch((function(t){return Oa.error(t),Promise.reject(t)}))}var Ca=new kn("Principal"),La=function(){function t(e){I()(this,t),A()(this,"id",void 0),A()(this,"type",void 0),this.id=e.id,this.type=e.type}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{id:this.id,type:this.type}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Ka=function(){function t(e){I()(this,t),A()(this,"id",void 0),A()(this,"type",void 0),Z(e)?(this.setId(e.get("id")),this.setType(e.get("type"))):Jn(e)&&(this.setId(e.id),this.setType(e.type))}return E()(t,[{key:"setId",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "id" must be a non-empty string');return this.id=t,this}},{key:"setType",value:function(t){if(!Ci[t])throw new Error('invalid parameter: "type" must be a valid PrincipalType');return this.type=t,this}},{key:"build",value:function(){if(!this.id)throw new Error('missing property: "id" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');return new La({id:this.id,type:this.type})}}]),t}(),Ba=(new kn("Ace"),function(){function t(e){I()(this,t),A()(this,"permissions",void 0),A()(this,"principal",void 0),this.principal=e.principal,this.permissions=e.permissions}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{permissions:this.permissions,principal:this.principal.toObject()}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Fa=function(){function t(e){I()(this,t),A()(this,"permissions",void 0),A()(this,"principal",void 0),Z(e)?(this.setPermissions(e.get("permissions")),this.setPrincipal(e.get("principal"))):Jn(e)&&(this.setPermissions(e.permissions),this.setPrincipal(e.principal))}return E()(t,[{key:"setPermissions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "permissions" must be an array');var e=fn(t);if(!e.every((function(t){return qi[t]})))throw new Error('invalid parameter: "permissions" must be an array of PermissionTypes');return this.permissions=e.toJS(),this}},{key:"setPrincipal",value:function(t){return this.principal=new Ka(t).build(),this}},{key:"build",value:function(){if(this.permissions||(this.permissions=[]),!this.principal)throw new Error("missing property: principal is a required property");return new Ba({permissions:this.permissions,principal:this.principal})}}]),t}(),Va=(new kn("Acl"),function(){function t(e){I()(this,t),A()(this,"aces",void 0),A()(this,"aclKey",void 0),this.aces=e.aces,this.aclKey=e.aclKey}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{aces:this.aces.map((function(t){return t.toObject()})),aclKey:this.aclKey}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Ja=function(){function t(e){I()(this,t),A()(this,"aces",void 0),A()(this,"aclKey",void 0),Z(e)?(this.setAces(e.get("aces")),this.setAclKey(e.get("aclKey"))):Jn(e)&&(this.setAces(e.aces),this.setAclKey(e.aclKey))}return E()(t,[{key:"setAces",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aces" must be an array');try{this.aces=hr(t).map((function(t){return new Fa(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "aces" must be an array of Aces')}return this}},{key:"setAclKey",value:function(t){if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "aclKey" must be an array');var e=fn(t);if(e.isEmpty()||!e.every(si))throw new Error('invalid parameter: "aclKey" must be a non-empty array of UUIDs');return this.aclKey=e.toJS(),this}},{key:"build",value:function(){if(this.aces||(this.aces=[]),!this.aclKey)throw new Error('missing property: "aclKey" is a required property');return new Va({aces:this.aces,aclKey:this.aclKey})}}]),t}(),Ga=new kn("AclData"),Wa=function(){function t(e){I()(this,t),A()(this,"acl",void 0),A()(this,"action",void 0),this.acl=e.acl,this.action=e.action}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{acl:this.acl.toObject(),action:this.action}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),Ha=function(){function t(e){I()(this,t),A()(this,"acl",void 0),A()(this,"action",void 0),Z(e)?(this.setAcl(e.get("acl")),this.setAction(e.get("action"))):Jn(e)&&(this.setAcl(e.acl),this.setAction(e.action))}return E()(t,[{key:"setAcl",value:function(t){return this.acl=new Ja(t).build(),this}},{key:"setAction",value:function(t){if(!zi[t])throw new Error('invalid parameter: "action" must be a valid ActionType');return this.action=t,this}},{key:"build",value:function(){if(!this.acl)throw new Error('missing property: "acl" is a required property');if(!this.action)throw new Error('missing property: "action" is a required property');return new Wa({acl:this.acl,action:this.action})}}]),t}(),Qa=function(t){return pi(t,Ha,Ga)},$a=(new kn("App"),function(){function t(e){I()(this,t),A()(this,"appTypeIds",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"name",void 0),A()(this,"title",void 0),A()(this,"url",void 0),this.appTypeIds=e.appTypeIds,this.name=e.name,this.title=e.title,this.url=e.url,Jn(e.id)&&(this.id=e.id),Jn(e.description)&&(this.description=e.description)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={appTypeIds:this.appTypeIds,name:this.name,title:this.title,url:this.url};return Jn(this.id)&&(t.id=this.id),Jn(this.description)&&(t.description=this.description),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Xa=function(){function t(e){I()(this,t),A()(this,"appTypeIds",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"name",void 0),A()(this,"title",void 0),A()(this,"url",void 0),Z(e)?(this.setAppTypeIds(e.get("appTypeIds")),this.setDescription(e.get("description")),this.setId(e.get("id")),this.setName(e.get("name")),this.setTitle(e.get("title")),this.setUrl(e.get("url"))):Jn(e)&&(this.setAppTypeIds(e.appTypeIds),this.setDescription(e.description),this.setId(e.id),this.setName(e.name),this.setTitle(e.title),this.setUrl(e.url))}return E()(t,[{key:"setAppTypeIds",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appTypeIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appTypeIds" must be a non-empty array of UUIDs');return this.appTypeIds=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setName",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "name" must be a non-empty string');return this.name=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setUrl",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "url" must be a non-empty string');return this.url=t,this}},{key:"build",value:function(){if(this.appTypeIds||(this.appTypeIds=[]),!this.name)throw new Error('missing property: "name" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.url)throw new Error('missing property: "url" is a required property');return new $a({appTypeIds:this.appTypeIds,description:this.description,id:this.id,name:this.name,title:this.title,url:this.url})}}]),t}(),Za=(new kn("AppType"),function(){function t(e){I()(this,t),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"id",void 0),A()(this,"title",void 0),A()(this,"type",void 0),this.entityTypeId=e.entityTypeId,this.title=e.title,this.type=e.type,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={entityTypeId:this.entityTypeId,title:this.title,type:this.type.toObject()};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),Ya=function(){function t(e){I()(this,t),A()(this,"description",void 0),A()(this,"entityTypeId",void 0),A()(this,"id",void 0),A()(this,"title",void 0),A()(this,"type",void 0),Z(e)?(this.setDescription(e.get("description")),this.setEntityTypeId(e.get("entityTypeId")),this.setId(e.get("id")),this.setTitle(e.get("title")),this.setType(e.get("type"))):Jn(e)&&(this.setDescription(e.description),this.setEntityTypeId(e.entityTypeId),this.setId(e.id),this.setTitle(e.title),this.setType(e.type))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEntityTypeId",value:function(t){if(!si(t))throw new Error('invalid parameter: "entityTypeId" must be a valid UUID');return this.entityTypeId=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "appTypeId" must be a valid UUID');return this.id=t,this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"setType",value:function(t){return this.type=ni.of(t),this}},{key:"build",value:function(){if(!this.entityTypeId)throw new Error('missing property: "entityTypeId" is a required property');if(!this.type)throw new Error('missing property: "type" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new Za({description:this.description,entityTypeId:this.entityTypeId,id:this.id,title:this.title,type:this.type})}}]),t}(),ts=(new kn("EntityDataKey"),function(){function t(e){I()(this,t),A()(this,"entityKeyId",void 0),A()(this,"entitySetId",void 0),this.entityKeyId=e.entityKeyId,this.entitySetId=e.entitySetId}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{entityKeyId:this.entityKeyId,entitySetId:this.entitySetId}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}()),es=function(){function t(e){I()(this,t),A()(this,"entityKeyId",void 0),A()(this,"entitySetId",void 0),Z(e)?(this.setEntityKeyId(e.get("entityKeyId")),this.setEntitySetId(e.get("entitySetId"))):Jn(e)&&(this.setEntityKeyId(e.entityKeyId),this.setEntitySetId(e.entitySetId))}return E()(t,[{key:"setEntityKeyId",value:function(t){if(!si(t))throw new Error("invalid parameter: entityKeyId must be a valid UUID");return this.entityKeyId=t,this}},{key:"setEntitySetId",value:function(t){if(!si(t))throw new Error("invalid parameter: entitySetId must be a valid UUID");return this.entitySetId=t,this}},{key:"build",value:function(){if(!this.entityKeyId)throw new Error("missing property: entityKeyId is a required property");if(!this.entitySetId)throw new Error("missing property: entitySetId is a required property");return new ts({entityKeyId:this.entityKeyId,entitySetId:this.entitySetId})}}]),t}(),rs=new kn("Grant"),ns=function(){function t(e){I()(this,t),A()(this,"attribute",void 0),A()(this,"grantType",void 0),A()(this,"mappings",void 0),this.attribute=e.attribute,this.grantType=e.grantType,this.mappings=e.mappings}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){return{attribute:this.attribute,grantType:this.grantType,mappings:this.mappings}}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),is=function(){function t(e){I()(this,t),A()(this,"attribute",void 0),A()(this,"grantType",void 0),A()(this,"mappings",void 0),Z(e)?(this.setAttribute(e.get("attribute")),this.setGrantType(e.get("grantType")),this.setMappings(e.get("mappings"))):Jn(e)&&(this.setAttribute(e.attribute),this.setGrantType(e.grantType),this.setMappings(e.mappings))}return E()(t,[{key:"setAttribute",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "attribute" must be a string');return this.attribute=t,this}},{key:"setGrantType",value:function(t){if(!Object.values(Mi).includes(t))throw new Error('invalid parameter: "grantType" must be a valid GrantType');return this.grantType=t,this}},{key:"setMappings",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "mappings" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "mappings" must be a non-empty array of non-empty strings');return this.mappings=e.toJS(),this}},{key:"build",value:function(){if(this.attribute||(this.attribute=""),!this.grantType)throw new Error("missing property: grantType is a required property");return this.mappings||(this.mappings=[]),new ns({attribute:this.attribute,grantType:this.grantType,mappings:this.mappings})}}]),t}(),os=r(14),as=r.n(os),ss=r(34),us=r.n(ss),cs=new kn("Role"),ps=function(){function t(e){I()(this,t),A()(this,"aclKey",void 0),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"organizationId",void 0),A()(this,"principal",void 0),A()(this,"title",void 0),this.organizationId=e.organizationId,this.principal=e.principal,this.title=e.title,this[Zi]="com.openlattice.organization.roles.Role",Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.aclKey=[e.organizationId,e.id],this.id=e.id)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={organizationId:this.organizationId,principal:this.principal.toObject(),title:this.title};return t[Zi]="com.openlattice.organization.roles.Role",Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.aclKey=[this.organizationId,this.id],t.id=this.id),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),fs=function(){function t(e){I()(this,t),A()(this,"description",void 0),A()(this,"id",void 0),A()(this,"organizationId",void 0),A()(this,"principal",void 0),A()(this,"title",void 0),Z(e)?(this.setDescription(e.get("description")),this.setId(e.get("id")),this.setOrganizationId(e.get("organizationId")),this.setPrincipal(e.get("principal")),this.setTitle(e.get("title"))):Jn(e)&&(this.setDescription(e.description),this.setId(e.id),this.setOrganizationId(e.organizationId),this.setPrincipal(e.principal),this.setTitle(e.title))}return E()(t,[{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "id" must be a valid UUID');return this.id=t,this}},{key:"setOrganizationId",value:function(t){if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.organizationId=t,this}},{key:"setPrincipal",value:function(t){return this.principal=new Ka(t).build(),this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.organizationId)throw new Error('missing property: "organizationId" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');if(!this.title)throw new Error('missing property: "title" is a required property');return new ps({description:this.description,id:this.id,organizationId:this.organizationId,principal:this.principal,title:this.title})}}]),t}(),hs=new kn("Organization"),ls="00000000-0000-0000-0000-000000000000",ds=function(){function t(e){I()(this,t),A()(this,"apps",void 0),A()(this,"connections",void 0),A()(this,"description",void 0),A()(this,"emailDomains",void 0),A()(this,"grants",void 0),A()(this,"id",void 0),A()(this,"members",void 0),A()(this,"metadataEntitySetIds",void 0),A()(this,"partitions",void 0),A()(this,"principal",void 0),A()(this,"roles",void 0),A()(this,"title",void 0),this.apps=e.apps,this.emailDomains=e.emailDomains,this.connections=e.connections,this.grants=e.grants,this.members=e.members,this.metadataEntitySetIds=e.metadataEntitySetIds,this.principal=e.principal,this.roles=e.roles,this.title=e.title,Jn(e.description)&&(this.description=e.description),Jn(e.id)&&(this.id=e.id),Jn(e.partitions)&&(this.partitions=e.partitions)}return E()(t,[{key:"toImmutable",value:function(){return jn(this.toObject())}},{key:"toObject",value:function(){var t={apps:this.apps,connections:this.connections,emailDomains:this.emailDomains,grants:us()(this.grants,(function(t){return us()(t,(function(t){return t.toObject()}))})),members:this.members.map((function(t){return t.toObject()})),metadataEntitySetIds:this.metadataEntitySetIds,principal:this.principal.toObject(),roles:this.roles.map((function(t){return t.toObject()})),title:this.title};return Jn(this.description)&&(t.description=this.description),Jn(this.id)&&(t.id=this.id),Jn(this.partitions)&&(t.partitions=this.partitions),t}},{key:"valueOf",value:function(){return this.toImmutable().hashCode()}}]),t}(),ys=function(){function t(e){I()(this,t),A()(this,"apps",void 0),A()(this,"connections",void 0),A()(this,"description",void 0),A()(this,"emailDomains",void 0),A()(this,"grants",void 0),A()(this,"id",void 0),A()(this,"members",void 0),A()(this,"metadataEntitySetIds",void 0),A()(this,"partitions",void 0),A()(this,"principal",void 0),A()(this,"roles",void 0),A()(this,"title",void 0),Z(e)?(this.setApps(e.get("apps")),this.setConnections(e.get("connections")),this.setDescription(e.get("description")),this.setEmailDomains(e.get("emailDomains")),this.setGrants(e.get("grants")),this.setId(e.get("id")),this.setMembers(e.get("members")),this.setMetaDataEntitySetIds(e.get("metadataEntitySetIds")),this.setPartitions(e.get("partitions")),this.setPrincipal(e.get("principal")),this.setRoles(e.get("roles")),this.setTitle(e.get("title"))):Jn(e)&&(this.setApps(e.apps),this.setConnections(e.connections),this.setDescription(e.description),this.setEmailDomains(e.emailDomains),this.setGrants(e.grants),this.setId(e.id),this.setMembers(e.members),this.setMetaDataEntitySetIds(e.metadataEntitySetIds),this.setPartitions(e.partitions),this.setPrincipal(e.principal),this.setRoles(e.roles),this.setTitle(e.title))}return E()(t,[{key:"setApps",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "appIds" must be an array');var e=Kr(t);if(!e.every(si))throw new Error('invalid parameter: "appIds" must be a non-empty array of UUIDs');return this.apps=e.toJS(),this}},{key:"setConnections",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "connections" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "connections" must be a non-empty array of non-empty strings');return this.connections=e.toJS(),this}},{key:"setDescription",value:function(t){if(!Jn(t)||Hn(t))return this;if(!Xn(t))throw new Error('invalid parameter: "description" must be a non-empty string');return this.description=t,this}},{key:"setEmailDomains",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "emailDomains" must be an array');var e=Kr(t);if(!e.every(Xn))throw new Error('invalid parameter: "emailDomains" must be a non-empty array of non-empty strings');return this.emailDomains=e.toJS(),this}},{key:"setGrants",value:function(t){if(!Jn(t))return this;if(!Ln()(t)&&!B(t))throw new Error('invalid parameter: "grants" must be an object');try{this.grants=Fe().withMutations((function(e){jn(t).forEach((function(t,r){if(!si(r))throw new Error('invalid parameter: "grants" must be a map where all keys are valid UUIDs');t.forEach((function(t,n){e.setIn([r,n],new is(t).build())}))}))})).toJS()}catch(t){throw new Error('invalid parameter: "grants" must be a map where all values are a map of GrantType to Grant')}return this}},{key:"setId",value:function(t){if(!Jn(t)||Hn(t))return this;if(!si(t))throw new Error('invalid parameter: "organizationId" must be a valid UUID');return this.id=t,this}},{key:"setMembers",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "members" must be an array');try{this.members=Kr(t).map((function(t){return new Ka(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "members" must be an array of Principals')}return this}},{key:"setMetaDataEntitySetIds",value:function(t){if(!Jn(t))return this;if(!si(ge(t,"columns")))throw new Error('invalid parameter: "metadataEntitySetIds.columns" must be a valid UUID');if(!si(ge(t,"datasets")))throw new Error('invalid parameter: "metadataEntitySetIds.datasets" must be a valid UUID');if(!si(ge(t,"organization")))throw new Error('invalid parameter: "metadataEntitySetIds.organization" must be a valid UUID');return this.metadataEntitySetIds={columns:ge(t,"columns"),datasets:ge(t,"datasets"),organization:ge(t,"organization")},this}},{key:"setPartitions",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "partitions" must be an array');var e=hr(t);if(!e.every(as.a))throw new Error('invalid parameter: "partitions" must be a non-empty array of numbers');return this.partitions=e.toJS(),this}},{key:"setPrincipal",value:function(t){if(this.principal=new Ka(t).build(),this.principal.type!==Ci.ORGANIZATION)throw new Error('invalid parameter: "principal" must be PrincipalType.ORGANIZATION');return this}},{key:"setRoles",value:function(t){if(!Jn(t))return this;if(!Mn()(t)&&!B(t))throw new Error('invalid parameter: "roles" must be an array');try{this.roles=Kr(t).map((function(t){return new fs(t).build()})).toJS()}catch(t){throw new Error('invalid parameter: "roles" must be an array of Roles')}return this}},{key:"setTitle",value:function(t){if(!Xn(t))throw new Error('invalid parameter: "title" must be a non-empty string');return this.title=t,this}},{key:"build",value:function(){if(!this.title)throw new Error('missing property: "title" is a required property');if(!this.principal)throw new Error('missing property: "principal" is a required property');return this.apps||(this.apps=[]),this.connections||(this.connections=[]),this.emailDomains||(this.emailDomains=[]),this.grants||(this.grants={}),this.members||(this.members=[]),this.metadataEntitySetIds||(this.metadataEntitySetIds={columns:ls,datasets:ls,organization:ls}),this.roles||(this.roles=[]),new ds({apps:this.apps,connections:this.connections,description:this.description,emailDomains:this.emailDomains,grants:this.grants,id:this.id,members:this.members,metadataEntitySetIds:this.metadataEntitySetIds,partitions:this.partitions,principal:this.principal,roles:this.roles,title:this.title})}}]),t}(),vs=new kn("PermissionsApi");function ms(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return vs.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',vs.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',vs.error(e,t),Promise.reject(e))}function gs(t){var e="";return Qn(t)?t.every((function(t){return t.every(si)}))?Ei("PermissionsApi").post("/".concat("bulk"),t).then((function(t){return t.data})).catch((function(t){return vs.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKeys" is not valid UUID[][]',vs.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKeys" must be a non-empty array',vs.error(e,t),Promise.reject(e))}function _s(t){var e="";return Qn(t)?t.every(si)?Ei("PermissionsApi").post("/".concat("explain"),t).then((function(t){return t.data})).catch((function(t){return vs.error(t),Promise.reject(t)})):(e='invalid parameter: "aclKey" must be an array of valid UUIDs',vs.error(e,t),Promise.reject(e)):(e='invalid parameter: "aclKey" must be a non-empty array',vs.error(e,t),Promise.reject(e))}function bs(t){var e="";return Qa(t)?Ei("PermissionsApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return vs.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be a valid AclData object",vs.error(e,t),Promise.reject(e))}function ws(t){var e="";return Qn(t)?t.every(Qa)?Ei("PermissionsApi").patch("/".concat("update"),t).then((function(t){return t.data})).catch((function(t){return vs.error(t),Promise.reject(t)})):(e="invalid parameter: aclData must be an array of valid AclData objects",vs.error(e,t),Promise.reject(e)):(e="invalid parameter: aclData must be a non-empty array",vs.error(e,t),Promise.reject(e))}var Is=new kn("OrganizationsApi"),js={headers:{"Content-Type":"text/plain"}};function Es(t,e,r){var n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",Is.error(n,t),Promise.reject(n);if(!Xn(e))return n="invalid parameter: principalId must be a non-empty string",Is.error(n,e),Promise.reject(n);if(!Xn(r)||!zi[r])return n="invalid parameter: action must be a valid ActionType",Is.error(n,r),Promise.reject(n);var i=(new Ka).setId(e).setType(Ci.ORGANIZATION).build(),o=(new Fa).setPermissions([qi.READ]).setPrincipal(i).build(),a=(new Ja).setAclKey([t]).setAces([o]).build();return bs((new Ha).setAction(r).setAcl(a).build())}function Ts(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "connections" must be an array of strings',Is.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("connections"),r).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function As(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',Is.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").post("/".concat(t,"/").concat("email-domains"),r).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function Ss(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function Ps(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',Is.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',Is.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n))}function Os(t){var e="";return pi(t,ys,hs)?Ei("OrganizationsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e='invalid parameter: "organization" must be a valid Organization',Is.error(e,t),Promise.reject(e))}function Ds(t){var e="";return pi(t,fs,cs)?Ei("OrganizationsApi").post("/".concat("roles"),t).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e='invalid parameter: "role" must be a valid Role',Is.error(e,t),Promise.reject(e))}function Us(t){var e="";return si(t)?Ei("OrganizationsApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',Is.error(e,t),Promise.reject(e))}function zs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "roleId" must be a valid UUID',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function xs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat(e,"/").concat("destroy")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "entitySetId" must be a valid UUID',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function ks(){return Ei("OrganizationsApi").get("/").then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function Rs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',Is.error(e,t),Promise.reject(e))}function Ms(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("database")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e='invalid parameter: "organizationId" must be a valid UUID',Is.error(e,t),Promise.reject(e))}function Ns(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("entity-sets")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",Is.error(e,t),Promise.reject(e))}function qs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("integration")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",Is.error(e,t),Promise.reject(e))}function Cs(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("members")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",Is.error(e,t),Promise.reject(e))}function Ls(t){var e="";return si(t)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(e="invalid parameter: organizationId must be a valid UUID",Is.error(e,t),Promise.reject(e))}function Ks(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",Is.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",Is.error(r,t),Promise.reject(r))}function Bs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r="invalid parameter: roleId must be a valid UUID",Is.error(r,e),Promise.reject(r)):(r="invalid parameter: organizationId must be a valid UUID",Is.error(r,t),Promise.reject(r))}function Fs(t,e){return Es(t,e,zi.ADD)}function Vs(t,e){var r,n="";if(!si(t))return n="invalid parameter: organizationId must be a valid UUID",Is.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n="invalid parameter: connections must be an array of strings",Is.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("connections"),{data:r}).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function Js(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n);if(!Jn(e)||Gn(e))r=[];else{if(!Zn(e))return n='invalid parameter: "domains" must be an array of strings',Is.error(n,e),Promise.reject(n);r=Kr(e).toJS()}return Ei("OrganizationsApi").delete("/".concat(t,"/").concat("email-domains"),{data:r}).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function Gs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").post("/".concat("promote","/").concat(t),e,js).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "tableName" must be a non-empty string',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function Ws(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("members","/").concat(e)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "memberId" must be a non-empty string',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function Hs(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").delete("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("members","/").concat(r)).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(n='invalid parameter: "memberId" must be a non-empty string',Is.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',Is.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n))}function Qs(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").patch("/".concat(t,"/").concat("database"),e,js).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "databaseName" must be a non-empty string',Is.error(r,t),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function $s(t,e){return Es(t,e,zi.REMOVE)}function Xs(t,e){var r="";return si(t)?si(e)?Ei("OrganizationsApi").get("/".concat(t,"/").concat(e,"/").concat("transport")).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "entitySetId" must be a valid UUID',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function Zs(t,e){var r,n="";if(!si(t))return n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n);if(!Jn(e)||Hn(e))r="";else{if(!Xn(e))return n='invalid parameter: "description" must be a non-empty string',Is.error(n,e),Promise.reject(n);r=e}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("description"),r,js).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function Ys(t,e){var r="";return si(t)?Xn(e)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("title"),e,js).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(r='invalid parameter: "title" must be a non-empty string',Is.error(r,e),Promise.reject(r)):(r='invalid parameter: "organizationId" must be a valid UUID',Is.error(r,t),Promise.reject(r))}function tu(t,e,r){var n,i="";if(!si(t))return i='invalid parameter: "organizationId" must be a valid UUID',Is.error(i,t),Promise.reject(i);if(!si(e))return i='invalid parameter: "roleId" must be a valid UUID',Is.error(i,e),Promise.reject(i);if(!Jn(r)||Hn(r))n="";else{if(!Xn(r))return i='invalid parameter: "description" must be a non-empty string',Is.error(i,r),Promise.reject(i);n=r}return Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("description"),n,js).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)}))}function eu(t,e,r){var n="";return si(t)?si(e)?pi(r,is,rs)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("grant"),r).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(n='invalid parameter: "grant" must be a valid Grant',Is.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',Is.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n))}function ru(t,e,r){var n="";return si(t)?si(e)?Xn(r)?Ei("OrganizationsApi").put("/".concat(t,"/").concat("principals","/").concat("roles","/").concat(e,"/").concat("title"),r,js).then((function(t){return t.data})).catch((function(t){return Is.error(t),Promise.reject(t)})):(n='invalid parameter: "title" must be a non-empty string',Is.error(n,r),Promise.reject(n)):(n='invalid parameter: "roleId" must be a valid UUID',Is.error(n,e),Promise.reject(n)):(n='invalid parameter: "organizationId" must be a valid UUID',Is.error(n,t),Promise.reject(n))}var nu=new kn("PersistentSearchApi");function iu(t){var e="";return $n(t)?Ei("PersistentSearchApi").post("",t).then((function(t){return t.data})).catch((function(t){return nu.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearch" must be a non-empty object',nu.error(e,t),Promise.reject(e))}function ou(t){var e="";return si(t)?Ei("PersistentSearchApi").delete("/".concat(t)).then((function(t){return t.data})).catch((function(t){return nu.error(t),Promise.reject(t)})):(e='invalid parameter: "persistentSearchId" must be a valid UUID',nu.error(e,t),Promise.reject(e))}function au(t){var e="";return No()(t)?Ei("PersistentSearchApi").get("?includeExpired=".concat(t)).then((function(t){return t.data})).catch((function(t){return nu.error(t),Promise.reject(t)})):(e='invalid parameter: "includeExpired" must be a boolean',nu.error(e,t),Promise.reject(e))}function su(t,e){var r="";return si(t)?Xn(e)?Ei("PersistentSearchApi").patch("/".concat(t,"/").concat("expiration"),e).then((function(t){return t.data})).catch((function(t){return nu.error(t),Promise.reject(t)})):(r='invalid parameter: "expiration" must be a valid string',nu.error(r,t),Promise.reject(r)):(r='invalid parameter: "persistentSearchId" must be a valid UUID',nu.error(r,t),Promise.reject(r))}var uu=new kn("PrincipalsApi");function cu(){return Ei("PrincipalsApi").get("/".concat("roles")).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)}))}function pu(){return Ei("PrincipalsApi").get("/".concat("users")).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)}))}function fu(){return Ei("PrincipalsApi").get("/".concat("db")).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)}))}function hu(){return Ei("PrincipalsApi").get("/".concat("roles","/").concat("current")).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)}))}function lu(t){var e="";return pi(t,Ka,Ca)?Ei("PrincipalsApi").post("/",t).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)})):(e="invalid parameter: principal must be a valid Principal",uu.error(e,t),Promise.reject(e))}function du(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat(t)).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)})):(e="invalid parameter: userId must be a non-empty string",uu.error(e,t),Promise.reject(e))}function yu(t){var e="";return Xn(t)?Ei("PrincipalsApi").get("/".concat("users","/").concat("search","/").concat(t)).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)})):(e="invalid parameter: searchQuery must be a non-empty string",uu.error(e,t),Promise.reject(e))}function vu(){return Ei("PrincipalsApi").get("/".concat("sync")).then((function(t){return t.data})).catch((function(t){return uu.error(t),Promise.reject(t)}))}var mu=new kn("SearchApi");function gu(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n="",i={};if(!si(t))return n="invalid parameter: entitySetId must be a valid UUID",mu.error(n,t),Promise.reject(n);if("boolean"!=typeof r)return n="invalid parameter: idsOnly must be a boolean",mu.error(n,r),Promise.reject(n);if(!$n(e))return n="invalid parameter: filter must be a non-empty object",mu.error(n,t),Promise.reject(n);if(!ui(e.entityKeyIds))return n="invalid parameter: filter.".concat("entityKeyIds"," must be a non-empty set of valid UUIDs"),mu.error(n,e.entityKeyIds),Promise.reject(n);var o,a,s,u=Kr().withMutations((function(t){return e.entityKeyIds.forEach((function(e){return t.add(e)}))})).toJS();if(i.entityKeyIds=u,Gn(e[ao])||ui(e[ao]))o=Kr().withMutations((function(t){return e[ao].forEach((function(e){return t.add(e)}))})).toJS(),i.dst=o;else if(Jn(e[ao]))return n="invalid parameter: filter.".concat(ao," must be a set of valid UUIDs"),mu.error(n,e[ao]),Promise.reject(n);if(Gn(e[so])||ui(e[so]))a=Kr().withMutations((function(t){return e[so].forEach((function(e){return t.add(e)}))})).toJS(),i.edge=a;else if(Jn(e[so]))return n="invalid parameter: filter.".concat(so," must be a set of valid UUIDs"),mu.error(n,e[so]),Promise.reject(n);if(Gn(e[uo])||ui(e[uo]))s=Kr().withMutations((function(t){return e[uo].forEach((function(e){return t.add(e)}))})).toJS(),i.src=s;else if(Jn(e[uo]))return n="invalid parameter: filter.".concat(uo," must be a set of valid UUIDs"),mu.error(n,e[uo]),Promise.reject(n);var c="/".concat(t,"/").concat("neighbors","/").concat("advanced"),p=r?"".concat(c,"/").concat("ids"):c;return Ei("SearchApi").post(p,i).then((function(t){return t.data})).catch((function(t){return mu.error(t),Promise.reject(t)}))}function _u(t){var e="";if(!$n(t))return e='invalid parameter: "searchConstraints" must be a non-empty object',mu.error(e,t),Promise.reject(e);var r=t.entitySetIds,n=t.maxHits,i=t.start;return ui(r)?!as()(i)||i<0?(e='invalid property: "start" must be a positive number',mu.error(e,i),Promise.reject(e)):!as()(n)||n<0?(e='invalid property: "maxHits" must be a positive number',mu.error(e,n),Promise.reject(e)):Ei("SearchApi").patch("/",t).then((function(t){return t.data})).catch((function(t){return mu.error(t),Promise.reject(t)})):(e='invalid parameter: "entitySetIds" must be a non-empty array of valid UUIDs',mu.error(e,r),Promise.reject(e))}function bu(t){var e="";if(!$n(t))return e='invalid parameter: "searchOptions" must be a non-empty object',mu.error(e,t),Promise.reject(e);var r={},n=t.entityTypeId,i=t.maxHits,o=t.organizationId,a=t.propertyTypeIds,s=t.searchTerm,u=t.start;if(!as()(u)||u<0)return e='invalid property: "start" must be a positive number',mu.error(e,u),Promise.reject(e);if(!as()(i)||i<0)return e='invalid property: "maxHits" must be a positive number',mu.error(e,i),Promise.reject(e);if(r.start=u,r.maxHits=i,Jn(s)){if(!Xn(s))return e='invalid property: "searchTerm" must be a non-empty string',mu.error(e,s),Promise.reject(e);r.kw=s}if(Jn(n)){if(!si(n))return e='invalid parameter: "entityTypeId" must be a valid UUID',mu.error(e,n),Promise.reject(e);r.entityTypeId=n}if(Jn(a)){if(!ui(a))return e='invalid parameter: "propertyTypeIds" must be a non-empty array of valid UUIDs',mu.error(e,a),Promise.reject(e);r.pid=Kr().withMutations((function(t){a.forEach((function(e){t.add(e)}))})).toJS()}else r.excludePropertyTypes=!0;return si(o)&&(r.organizationId=o),Ei("SearchApi").post("/",r).then((function(t){return t.data})).catch((function(t){return mu.error(t),Promise.reject(t)}))}var wu="v0.85.1";e.default={AppApi:n,AuthorizationsApi:o,CodexApi:a,DataApi:u,DataIntegrationApi:c,DataSetsApi:p,EntityDataModelApi:f,EntitySetsApi:h,OrganizationsApi:y,PermissionsApi:d,PersistentSearchApi:v,PrincipalsApi:m,SearchApi:g,Constants:s,Models:l,Types:i,configure:yi,version:wu}}])})); +function getMatchData(object) { + var result = keys(object), + length = result.length; + + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; +} + +module.exports = getMatchData; + /***/ }), -/* 289 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(55), - isObjectLike = __webpack_require__(45), - isPlainObject = __webpack_require__(38); +var baseIsEqual = __webpack_require__(152), + get = __webpack_require__(169), + hasIn = __webpack_require__(200), + isKey = __webpack_require__(137), + isStrictComparable = __webpack_require__(226), + matchesStrictComparable = __webpack_require__(227), + toKey = __webpack_require__(61); -/** `Object#toString` result references. */ -var domExcTag = '[object DOMException]', - errorTag = '[object Error]'; +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. - * @example - * - * _.isError(new Error); - * // => true + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * - * _.isError(Error); - * // => false + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. */ -function isError(value) { - if (!isObjectLike(value)) { - return false; +function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; } -module.exports = isError; +module.exports = baseMatchesProperty; /***/ }), -/* 290 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(47); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeIsFinite = root.isFinite; +var baseProperty = __webpack_require__(431), + basePropertyDeep = __webpack_require__(432), + isKey = __webpack_require__(137), + toKey = __webpack_require__(61); /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. * @example * - * _.isFinite(3); - * // => true - * - * _.isFinite(Number.MIN_VALUE); - * // => true + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; * - * _.isFinite(Infinity); - * // => false + * _.map(objects, _.property('a.b')); + * // => [2, 1] * - * _.isFinite('3'); - * // => false + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] */ -function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); +function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } -module.exports = isFinite; +module.exports = property; /***/ }), -/* 291 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/* 431 */ +/***/ (function(module, exports) { -Object.defineProperty(exports, '__esModule', { value: true }); -var prefix = 'fas'; -var iconName = 'trash'; -var width = 448; -var height = 512; -var ligatures = []; -var unicode = 'f1f8'; -var svgPathData = 'M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z'; +/** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ +function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; +} -exports.definition = { - prefix: prefix, - iconName: iconName, - icon: [ - width, - height, - ligatures, - unicode, - svgPathData - ]}; +module.exports = baseProperty; -exports.faTrash = exports.definition; -exports.prefix = prefix; -exports.iconName = iconName; -exports.width = width; -exports.height = height; -exports.ligatures = ligatures; -exports.unicode = unicode; -exports.svgPathData = svgPathData; /***/ }), -/* 292 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { -!function(e,t){ true?module.exports=t(__webpack_require__(4),__webpack_require__(0),__webpack_require__(577),__webpack_require__(578)):undefined}(this,function(e,t,n,r){return function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={exports:{},id:r,loaded:!1};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t 3 + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ -var findLast = createFind(findLastIndex); +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; -module.exports = findLast; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; +} + +module.exports = createBaseFor; /***/ }), -/* 295 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -Object.defineProperty(exports, '__esModule', { value: true }); -var prefix = 'fas'; -var iconName = 'chevron-up'; -var width = 448; -var height = 512; -var ligatures = []; -var unicode = 'f077'; -var svgPathData = 'M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z'; +var isArrayLike = __webpack_require__(45); -exports.definition = { - prefix: prefix, - iconName: iconName, - icon: [ - width, - height, - ligatures, - unicode, - svgPathData - ]}; +/** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ +function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; +} + +module.exports = createBaseEach; -exports.faChevronUp = exports.definition; -exports.prefix = prefix; -exports.iconName = iconName; -exports.width = width; -exports.height = height; -exports.ligatures = ligatures; -exports.unicode = unicode; -exports.svgPathData = svgPathData; /***/ }), -/* 296 */ -/***/ (function(module, exports, __webpack_require__) { +/* 436 */ +/***/ (function(module, exports) { -"use strict"; +/** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; -Object.defineProperty(exports, '__esModule', { value: true }); -var prefix = 'fas'; -var iconName = 'chevron-down'; -var width = 448; -var height = 512; -var ligatures = []; -var unicode = 'f078'; -var svgPathData = 'M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z'; + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} -exports.definition = { - prefix: prefix, - iconName: iconName, - icon: [ - width, - height, - ligatures, - unicode, - svgPathData - ]}; +module.exports = baseSortBy; -exports.faChevronDown = exports.definition; -exports.prefix = prefix; -exports.iconName = iconName; -exports.width = width; -exports.height = height; -exports.ligatures = ligatures; -exports.unicode = unicode; -exports.svgPathData = svgPathData; /***/ }), -/* 297 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var compareAscending = __webpack_require__(438); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var react_1 = __webpack_require__(0); -var xstate_1 = __webpack_require__(273); -var defaultOptions = { - immediate: false -}; -function useMachine(machine, options) { - if (options === void 0) { options = defaultOptions; } - var context = options.context, guards = options.guards, actions = options.actions, activities = options.activities, services = options.services, delays = options.delays, immediate = options.immediate, rehydratedState = options.state, interpreterOptions = __rest(options, ["context", "guards", "actions", "activities", "services", "delays", "immediate", "state"]); - var machineConfig = { - context: context, - guards: guards, - actions: actions, - activities: activities, - services: services, - delays: delays - }; - // Reference the machine - var machineRef = react_1.useRef(null); - // Create the machine only once - // See https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily - if (machineRef.current === null) { - machineRef.current = machine.withConfig(machineConfig, __assign(__assign({}, machine.context), context)); - } - // Reference the service - var serviceRef = react_1.useRef(null); - // Create the service only once - if (serviceRef.current === null) { - serviceRef.current = xstate_1.interpret(machineRef.current, interpreterOptions).onTransition(function (state) { - // Update the current machine state when a transition occurs - if (state.changed) { - setCurrent(state); - } - }); +/** + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ +function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); } - var service = serviceRef.current; - // Make sure actions and services are kept updated when they change. - // This mutation assignment is safe because the service instance is only used - // in one place -- this hook's caller. - react_1.useEffect(function () { - Object.assign(service.machine.options.actions, actions); - }, [actions]); - react_1.useEffect(function () { - Object.assign(service.machine.options.services, services); - }, [services]); - // Keep track of the current machine state - var initialState = rehydratedState - ? xstate_1.State.create(rehydratedState) - : service.initialState; - var _a = __read(react_1.useState(function () { return initialState; }), 2), current = _a[0], setCurrent = _a[1]; - // Start service immediately (before mount) if specified in options - if (immediate) { - service.start(); - } - react_1.useEffect(function () { - // Start the service when the component mounts. - // Note: the service will start only if it hasn't started already. - // - // If a rehydrated state was provided, use the resolved `initialState`. - service.start(rehydratedState ? initialState : undefined); - return function () { - // Stop the service when the component unmounts - service.stop(); - }; - }, []); - return [current, service.send, service]; -} -exports.useMachine = useMachine; -function useService(service) { - var _a = __read(react_1.useState(service.state), 2), current = _a[0], setCurrent = _a[1]; - react_1.useEffect(function () { - // Set to current service state as there is a possibility - // of a transition occurring between the initial useState() - // initialization and useEffect() commit. - setCurrent(service.state); - var listener = function (state) { - if (state.changed) { - setCurrent(state); - } - }; - var sub = service.subscribe(listener); - return function () { - sub.unsubscribe(); - }; - }, [service]); - return [current, service.send, service]; + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; } -exports.useService = useService; -var useActor_1 = __webpack_require__(581); -exports.useActor = useActor_1.useActor; -//# sourceMappingURL=index.js.map - -/***/ }), -/* 298 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return registerService; }); -/* harmony import */ var _environment_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22); +module.exports = compareMultiple; -function getDevTools() { - var w = window; - if (!!w.__xstate__) { - return w.__xstate__; - } +/***/ }), +/* 438 */ +/***/ (function(module, exports, __webpack_require__) { - return undefined; -} +var isSymbol = __webpack_require__(59); -function registerService(service) { - if (_environment_js__WEBPACK_IMPORTED_MODULE_0__[/* IS_PRODUCTION */ "a"] || typeof window === 'undefined') { - return; - } +/** + * Compares values to sort them in ascending order. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ +function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); - var devTools = getDevTools(); + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); - if (devTools) { - devTools.register(service); + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } } + return 0; } +module.exports = compareAscending; /***/ }), -/* 299 */ -/***/ (function(module, exports, __webpack_require__) { +/* 439 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ +function baseIsNaN(value) { + return value !== value; +} -module.exports = __webpack_require__(582); +module.exports = baseIsNaN; /***/ }), -/* 300 */ +/* 440 */ /***/ (function(module, exports) { -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; +/** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; + while (++index < length) { + if (array[index] === value) { + return index; + } } - - return target; + return -1; } -module.exports = _objectWithoutPropertiesLoose; +module.exports = strictIndexOf; + /***/ }), -/* 301 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(72); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; +var Set = __webpack_require__(207), + noop = __webpack_require__(442), + setToArray = __webpack_require__(153); -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * Creates a set object of `values`. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} +var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); +}; -module.exports = getRawTag; +module.exports = createSet; /***/ }), -/* 302 */ +/* 442 */ /***/ (function(module, exports) { -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - /** - * Converts `value` to a string using `Object.prototype.toString`. + * This method returns `undefined`. * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @static + * @memberOf _ + * @since 2.3.0 + * @category Util + * @example + * + * _.times(2, _.noop); + * // => [undefined, undefined] */ -function objectToString(value) { - return nativeObjectToString.call(value); +function noop() { + // No operation performed. } -module.exports = objectToString; +module.exports = noop; /***/ }), -/* 303 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(304); -var $Object = __webpack_require__(20).Object; -module.exports = function getOwnPropertyDescriptor(it, key) { - return $Object.getOwnPropertyDescriptor(it, key); -}; +var baseRest = __webpack_require__(46), + eq = __webpack_require__(60), + isIterateeCall = __webpack_require__(155), + keysIn = __webpack_require__(64); +/** Used for built-in method references. */ +var objectProto = Object.prototype; -/***/ }), -/* 304 */ -/***/ (function(module, exports, __webpack_require__) { +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; -// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) -var toIObject = __webpack_require__(66); -var $getOwnPropertyDescriptor = __webpack_require__(138).f; +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(object, sources) { + object = Object(object); -__webpack_require__(141)('getOwnPropertyDescriptor', function () { - return function getOwnPropertyDescriptor(it, key) { - return $getOwnPropertyDescriptor(toIObject(it), key); - }; -}); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } -/***/ }), -/* 305 */ -/***/ (function(module, exports, __webpack_require__) { + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; -__webpack_require__(201); -module.exports = __webpack_require__(20).Object.getOwnPropertySymbols; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } -/***/ }), -/* 306 */ -/***/ (function(module, exports, __webpack_require__) { + return object; +}); -// all enumerable object keys, includes symbols -var getKeys = __webpack_require__(93); -var gOPS = __webpack_require__(148); -var pIE = __webpack_require__(107); -module.exports = function (it) { - var result = getKeys(it); - var getSymbols = gOPS.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = pIE.f; - var i = 0; - var key; - while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); - } return result; -}; +module.exports = defaults; /***/ }), -/* 307 */ -/***/ (function(module, exports, __webpack_require__) { +/* 444 */ +/***/ (function(module, exports) { -var dP = __webpack_require__(50); -var anObject = __webpack_require__(53); -var getKeys = __webpack_require__(93); +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; +} -module.exports = __webpack_require__(49) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; +module.exports = last; /***/ }), -/* 308 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { -// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = __webpack_require__(66); -var gOPN = __webpack_require__(207).f; -var toString = {}.toString; - -var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) : []; - -var getWindowNames = function (it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); - } -}; +"use strict"; -module.exports.f = function getOwnPropertyNames(it) { - return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); -}; +// MODULES // -/***/ }), -/* 309 */ -/***/ (function(module, exports, __webpack_require__) { +var gcd = __webpack_require__( 446 ), + isArray = __webpack_require__( 159 ), + isIntegerArray = __webpack_require__( 236 ), + isFunction = __webpack_require__( 237 ); -__webpack_require__(310); -module.exports = __webpack_require__(20).Object.keys; +// LEAST COMMON MULTIPLE // -/***/ }), -/* 310 */ -/***/ (function(module, exports, __webpack_require__) { +/** +* FUNCTION: lcm( arr[, clbk] ) +* Computes the least common multiple (lcm). +* +* @param {Number[]|Number} arr - input array of integers +* @param {Function|Number} [accessor] - accessor function for accessing array values +* @returns {Number|Null} least common multiple or null +*/ +function lcm() { + var nargs = arguments.length, + args, + clbk, + arr, + len, + a, b, + i; -// 19.1.2.14 Object.keys(O) -var toObject = __webpack_require__(60); -var $keys = __webpack_require__(93); + // Copy the input arguments to an array... + args = new Array( nargs ); + for ( i = 0; i < nargs; i++ ) { + args[ i ] = arguments[ i ]; + } + // Have we been provided with integer arguments? + if ( isIntegerArray( args ) ) { + if ( nargs === 2 ) { + a = args[ 0 ]; + b = args[ 1 ]; + if ( a < 0 ) { + a = -a; + } + if ( b < 0 ) { + b = -b; + } + if ( a === 0 || b === 0 ) { + return 0; + } + return ( a/gcd(a,b) ) * b; + } + arr = args; + } + // If not integers, ensure that the first argument is an array... + else if ( !isArray( args[ 0 ] ) ) { + throw new TypeError( 'lcm()::invalid input argument. Must provide an array of integers. Value: `' + args[ 0 ] + '`.' ); + } + // Have we been provided with more than one argument? If so, ensure that the accessor argument is a function... + else if ( nargs > 1 ) { + arr = args[ 0 ]; + clbk = args[ 1 ]; + if ( !isFunction( clbk ) ) { + throw new TypeError( 'lcm()::invalid input argument. Accessor must be a function. Value: `' + clbk + '`.' ); + } + } + // We have been provided an array... + else { + arr = args[ 0 ]; + } + len = arr.length; -__webpack_require__(141)('keys', function () { - return function keys(it) { - return $keys(toObject(it)); - }; -}); + // Check if a sufficient number of values have been provided... + if ( len < 2 ) { + return null; + } + // If an accessor is provided, extract the array values... + if ( clbk ) { + a = new Array( len ); + for ( i = 0; i < len; i++ ) { + a[ i ] = clbk( arr[ i ], i ); + } + arr = a; + } + // Given an input array, ensure all array values are integers... + if ( nargs < 3 ) { + if ( !isIntegerArray( arr ) ) { + throw new TypeError( 'lcm()::invalid input argument. Accessed array values must be integers. Value: `' + arr + '`.' ); + } + } + // Convert any negative integers to positive integers... + for ( i = 0; i < len; i++ ) { + a = arr[ i ]; + if ( a < 0 ) { + arr[ i ] = -a; + } + } + // Exploit the fact that the lcm is an associative function... + a = arr[ 0 ]; + for ( i = 1; i < len; i++ ) { + b = arr[ i ]; + if ( a === 0 || b === 0 ) { + return 0; + } + a = ( a/gcd(a,b) ) * b; + } + return a; +} // end FUNCTION lcm() -/***/ }), -/* 311 */ -/***/ (function(module, exports, __webpack_require__) { +// EXPORTS // -__webpack_require__(312); -var $Object = __webpack_require__(20).Object; -module.exports = function defineProperty(it, key, desc) { - return $Object.defineProperty(it, key, desc); -}; +module.exports = lcm; /***/ }), -/* 312 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { -var $export = __webpack_require__(27); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(49), 'Object', { defineProperty: __webpack_require__(50).f }); - +"use strict"; -/***/ }), -/* 313 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(314); -module.exports = __webpack_require__(20).Array.isArray; +// MODULES // +var isArray = __webpack_require__( 159 ), + isIntegerArray = __webpack_require__( 236 ), + isFunction = __webpack_require__( 237 ); -/***/ }), -/* 314 */ -/***/ (function(module, exports, __webpack_require__) { -// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) -var $export = __webpack_require__(27); +// VARIABLES // -$export($export.S, 'Array', { isArray: __webpack_require__(149) }); +var MAXINT = Math.pow( 2, 31 ) - 1; -/***/ }), -/* 315 */ -/***/ (function(module, exports, __webpack_require__) { +// FUNCTIONS // -__webpack_require__(73); -__webpack_require__(95); -module.exports = __webpack_require__(109).f('iterator'); +/** +* FUNCTION: gcd( a, b ) +* Computes the greatest common divisor of two integers `a` and `b`, using the binary GCD algorithm. +* +* @param {Number} a - integer +* @param {Number} b - integer +* @returns {Number} greatest common divisor +*/ +function gcd( a, b ) { + var k = 1, + t; + // Simple cases: + if ( a === 0 ) { + return b; + } + if ( b === 0 ) { + return a; + } + // Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`... + while ( a%2 === 0 && b%2 === 0 ) { + a = a / 2; // right shift + b = b / 2; // right shift + k = k * 2; // left shift + } + // Reduce `a` to an odd number... + while ( a%2 === 0 ) { + a = a / 2; // right shift + } + // Henceforth, `a` is always odd... + while ( b ) { + // Remove all factors of 2 in `b`, as they are not common... + while ( b%2 === 0 ) { + b = b / 2; // right shift + } + // `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)... + if ( a > b ) { + t = b; + b = a; + a = t; + } + b = b - a; // b=0 iff b=a + } + // Restore common factors of 2... + return k * a; +} // end FUNCTION gcd() +/** +* FUNCTION: bitwise( a, b ) +* Computes the greatest common divisor of two integers `a` and `b`, using the binary GCD algorithm and bitwise operations. +* +* @param {Number} a - safe integer +* @param {Number} b - safe integer +* @returns {Number} greatest common divisor +*/ +function bitwise( a, b ) { + var k = 0, + t; + // Simple cases: + if ( a === 0 ) { + return b; + } + if ( b === 0 ) { + return a; + } + // Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`... + while ( (a & 1) === 0 && (b & 1) === 0 ) { + a >>>= 1; // right shift + b >>>= 1; // right shift + k++; + } + // Reduce `a` to an odd number... + while ( (a & 1) === 0 ) { + a >>>= 1; // right shift + } + // Henceforth, `a` is always odd... + while ( b ) { + // Remove all factors of 2 in `b`, as they are not common... + while ( (b & 1) === 0 ) { + b >>>= 1; // right shift + } + // `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)... + if ( a > b ) { + t = b; + b = a; + a = t; + } + b = b - a; // b=0 iff b=a + } + // Restore common factors of 2... + return a << k; +} // end FUNCTION bitwise() -/***/ }), -/* 316 */ -/***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(145); -var defined = __webpack_require__(106); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; +// GREATEST COMMON DIVISOR // +/** +* FUNCTION: compute( arr[, clbk] ) +* Computes the greatest common divisor. +* +* @param {Number[]|Number} arr - input array of integers +* @param {Function|Number} [clbk] - accessor function for accessing array values +* @returns {Number|Null} greatest common divisor or null +*/ +function compute() { + var nargs = arguments.length, + args, + clbk, + arr, + len, + a, b, + i; -/***/ }), -/* 317 */ -/***/ (function(module, exports, __webpack_require__) { + // Copy the input arguments to an array... + args = new Array( nargs ); + for ( i = 0; i < nargs; i++ ) { + args[ i ] = arguments[ i ]; + } + // Have we been provided with integer arguments? + if ( isIntegerArray( args ) ) { + if ( nargs === 2 ) { + a = args[ 0 ]; + b = args[ 1 ]; + if ( a < 0 ) { + a = -a; + } + if ( b < 0 ) { + b = -b; + } + if ( a <= MAXINT && b <= MAXINT ) { + return bitwise( a, b ); + } else { + return gcd( a, b ); + } + } + arr = args; + } + // If not integers, ensure the first argument is an array... + else if ( !isArray( args[ 0 ] ) ) { + throw new TypeError( 'gcd()::invalid input argument. Must provide an array of integers. Value: `' + args[ 0 ] + '`.' ); + } + // Have we been provided with more than one argument? If so, ensure that the accessor argument is a function... + else if ( nargs > 1 ) { + arr = args[ 0 ]; + clbk = args[ 1 ]; + if ( !isFunction( clbk ) ) { + throw new TypeError( 'gcd()::invalid input argument. Accessor must be a function. Value: `' + clbk + '`.' ); + } + } + // We have been provided an array... + else { + arr = args[ 0 ]; + } + len = arr.length; -"use strict"; + // Check if a sufficient number of values have been provided... + if ( len < 2 ) { + return null; + } + // If an accessor is provided, extract the array values... + if ( clbk ) { + a = new Array( len ); + for ( i = 0; i < len; i++ ) { + a[ i ] = clbk( arr[ i ], i ); + } + arr = a; + } + // Given an input array, ensure all array values are integers... + if ( nargs < 3 ) { + if ( !isIntegerArray( arr ) ) { + throw new TypeError( 'gcd()::invalid input argument. Accessed array values must be integers. Value: `' + arr + '`.' ); + } + } + // Convert any negative integers to positive integers... + for ( i = 0; i < len; i++ ) { + a = arr[ i ]; + if ( a < 0 ) { + arr[ i ] = -a; + } + } + // Exploit the fact that the gcd is an associative function... + a = arr[ 0 ]; + for ( i = 1; i < len; i++ ) { + b = arr[ i ]; + if ( b <= MAXINT && a <= MAXINT ) { + a = bitwise( a, b ); + } else { + a = gcd( a, b ); + } + } + return a; +} // end FUNCTION compute() -var create = __webpack_require__(110); -var descriptor = __webpack_require__(89); -var setToStringTag = __webpack_require__(92); -var IteratorPrototype = {}; -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(59)(IteratorPrototype, __webpack_require__(40)('iterator'), function () { return this; }); +// EXPORTS // -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; +module.exports = compute; /***/ }), -/* 318 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/** +* +* VALIDATE: integer +* +* +* DESCRIPTION: +* - Validates if a value is an integer. +* +* +* NOTES: +* [1] +* +* +* TODO: +* [1] +* +* +* LICENSE: +* MIT +* +* Copyright (c) 2014. Athan Reines. +* +* +* AUTHOR: +* Athan Reines. kgryte@gmail.com. 2014. +* +*/ -var addToUnscopables = __webpack_require__(151); -var step = __webpack_require__(209); -var Iterators = __webpack_require__(74); -var toIObject = __webpack_require__(66); -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(150)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; +// MODULES // -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); +var isNumber = __webpack_require__( 448 ); -/***/ }), -/* 319 */ -/***/ (function(module, exports, __webpack_require__) { +// ISINTEGER // -__webpack_require__(201); -__webpack_require__(152); -__webpack_require__(320); -__webpack_require__(321); -module.exports = __webpack_require__(20).Symbol; +/** +* FUNCTION: isInteger( value ) +* Validates if a value is an integer. +* +* @param {Number} value - value to be validated +* @returns {Boolean} boolean indicating whether value is an integer +*/ +function isInteger( value ) { + return isNumber( value ) && value%1 === 0; +} // end FUNCTION isInteger() -/***/ }), -/* 320 */ -/***/ (function(module, exports, __webpack_require__) { +// EXPORTS // -__webpack_require__(144)('asyncIterator'); +module.exports = isInteger; /***/ }), -/* 321 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(144)('observable'); - +"use strict"; +/** +* +* VALIDATE: number +* +* +* DESCRIPTION: +* - Validates if a value is a number. +* +* +* NOTES: +* [1] +* +* +* TODO: +* [1] +* +* +* LICENSE: +* MIT +* +* Copyright (c) 2014. Athan Reines. +* +* +* AUTHOR: +* Athan Reines. kgryte@gmail.com. 2014. +* +*/ -/***/ }), -/* 322 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(323); -module.exports = __webpack_require__(20).Object.getPrototypeOf; +/** +* FUNCTION: isNumber( value ) +* Validates if a value is a number. +* +* @param {*} value - value to be validated +* @returns {Boolean} boolean indicating whether value is a number +*/ +function isNumber( value ) { + return ( typeof value === 'number' || Object.prototype.toString.call( value ) === '[object Number]' ) && value.valueOf() === value.valueOf(); +} // end FUNCTION isNumber() -/***/ }), -/* 323 */ -/***/ (function(module, exports, __webpack_require__) { -// 19.1.2.9 Object.getPrototypeOf(O) -var toObject = __webpack_require__(60); -var $getPrototypeOf = __webpack_require__(208); +// EXPORTS // -__webpack_require__(141)('getPrototypeOf', function () { - return function getPrototypeOf(it) { - return $getPrototypeOf(toObject(it)); - }; -}); +module.exports = isNumber; /***/ }), -/* 324 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(325); -module.exports = __webpack_require__(20).Object.setPrototypeOf; +var apply = __webpack_require__(203), + baseRest = __webpack_require__(46), + customDefaultsMerge = __webpack_require__(450), + mergeWith = __webpack_require__(453); +/** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults + * @example + * + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } + */ +var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); +}); -/***/ }), -/* 325 */ -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.3.19 Object.setPrototypeOf(O, proto) -var $export = __webpack_require__(27); -$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(326).set }); +module.exports = defaultsDeep; /***/ }), -/* 326 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { -// Works with __proto__ only. Old v8 can't work with null proto objects. -/* eslint-disable no-proto */ -var isObject = __webpack_require__(48); -var anObject = __webpack_require__(53); -var check = function (O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function (test, buggy, set) { - try { - set = __webpack_require__(56)(Function.call, __webpack_require__(138).f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { buggy = true; } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; - +var baseMerge = __webpack_require__(238), + isObject = __webpack_require__(29); -/***/ }), -/* 327 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. + */ +function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; +} -__webpack_require__(328); -var $Object = __webpack_require__(20).Object; -module.exports = function create(P, D) { - return $Object.create(P, D); -}; +module.exports = customDefaultsMerge; /***/ }), -/* 328 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { -var $export = __webpack_require__(27); -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -$export($export.S, 'Object', { create: __webpack_require__(110) }); - +var assignMergeValue = __webpack_require__(239), + cloneBuffer = __webpack_require__(214), + cloneTypedArray = __webpack_require__(220), + copyArray = __webpack_require__(106), + initCloneObject = __webpack_require__(221), + isArguments = __webpack_require__(78), + isArray = __webpack_require__(21), + isArrayLikeObject = __webpack_require__(111), + isBuffer = __webpack_require__(62), + isFunction = __webpack_require__(16), + isObject = __webpack_require__(29), + isPlainObject = __webpack_require__(25), + isTypedArray = __webpack_require__(81), + safeGet = __webpack_require__(240), + toPlainObject = __webpack_require__(452); -/***/ }), -/* 329 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; /** - * Copyright (c) 2013-present, Facebook, Inc. + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + var isCommon = newValue === undefined; -var ReactPropTypesSecret = __webpack_require__(330); - -function emptyFunction() {} -function emptyFunctionWithReset() {} -emptyFunctionWithReset.resetWarningCache = emptyFunction; + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); -module.exports = function() { - function shim(props, propName, componentName, location, propFullName, secret) { - if (secret === ReactPropTypesSecret) { - // It is still safe when called from React. - return; + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } } - var err = new Error( - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use PropTypes.checkPropTypes() to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - err.name = 'Invariant Violation'; - throw err; - }; - shim.isRequired = shim; - function getShim() { - return shim; - }; - // Important! - // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. - var ReactPropTypes = { - array: shim, - bool: shim, - func: shim, - number: shim, - object: shim, - string: shim, - symbol: shim, - - any: shim, - arrayOf: getShim, - element: shim, - elementType: shim, - instanceOf: getShim, - node: shim, - objectOf: getShim, - oneOf: getShim, - oneOfType: getShim, - shape: getShim, - exact: getShim, - - checkPropTypes: emptyFunctionWithReset, - resetWarningCache: emptyFunction - }; - - ReactPropTypes.PropTypes = ReactPropTypes; + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); +} - return ReactPropTypes; -}; +module.exports = baseMergeDeep; /***/ }), -/* 330 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var copyObject = __webpack_require__(83), + keysIn = __webpack_require__(64); + /** - * Copyright (c) 2013-present, Facebook, Inc. + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} - - -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; - -module.exports = ReactPropTypesSecret; +module.exports = toPlainObject; /***/ }), -/* 331 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { -var basePickBy = __webpack_require__(332), - hasIn = __webpack_require__(214); +var baseMerge = __webpack_require__(238), + createAssigner = __webpack_require__(454); /** - * The base implementation of `_.pick` without support for individual - * property identifiers. + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } + * + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } */ -function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); -} +var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); +}); -module.exports = basePick; +module.exports = mergeWith; /***/ }), -/* 332 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { -var baseGet = __webpack_require__(111), - baseSet = __webpack_require__(356), - castPath = __webpack_require__(112); +var baseRest = __webpack_require__(46), + isIterateeCall = __webpack_require__(155); /** - * The base implementation of `_.pickBy` without support for iteratee shorthands. + * Creates a function like `_.assign`. * * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ -function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; } - } - return result; + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } -module.exports = basePickBy; +module.exports = createAssigner; /***/ }), -/* 333 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { -var memoize = __webpack_require__(334); +var baseFlatten = __webpack_require__(102); -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; +/** Used as references for various `Number` constants. */ +var INFINITY = 1 / 0; /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * Recursively flattens `array`. * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; +function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; } -module.exports = memoizeCapped; +module.exports = flattenDeep; /***/ }), -/* 334 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { -var MapCache = __webpack_require__(154); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; +var arrayMap = __webpack_require__(44), + baseIntersection = __webpack_require__(234), + baseRest = __webpack_require__(46), + castArrayLikeObject = __webpack_require__(235); /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * * @static * @memberOf _ * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. * @example * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; + * _.intersection([2, 1], [2, 3]); + * // => [2] */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = MapCache; +var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; +}); -module.exports = memoize; +module.exports = intersection; /***/ }), -/* 335 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { -var Hash = __webpack_require__(336), - ListCache = __webpack_require__(114), - Map = __webpack_require__(155); +var basePullAll = __webpack_require__(458); /** - * Removes all key-value entries from the map. + * This method is like `_.pull` except that it accepts an array of values to remove. * - * @private - * @name clear - * @memberOf MapCache + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; +function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; } -module.exports = mapCacheClear; +module.exports = pullAll; /***/ }), -/* 336 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { -var hashClear = __webpack_require__(337), - hashDelete = __webpack_require__(342), - hashGet = __webpack_require__(343), - hashHas = __webpack_require__(344), - hashSet = __webpack_require__(345); +var arrayMap = __webpack_require__(44), + baseIndexOf = __webpack_require__(110), + baseIndexOfWith = __webpack_require__(459), + baseUnary = __webpack_require__(53), + copyArray = __webpack_require__(106); + +/** Used for built-in method references. */ +var arrayProto = Array.prototype; + +/** Built-in value references. */ +var splice = arrayProto.splice; /** - * Creates a hash object. + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; +function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; - this.clear(); + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; + + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } } + return array; } -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -module.exports = Hash; +module.exports = basePullAll; /***/ }), -/* 337 */ -/***/ (function(module, exports, __webpack_require__) { - -var nativeCreate = __webpack_require__(113); +/* 459 */ +/***/ (function(module, exports) { /** - * Removes all key-value entries from the hash. + * This function is like `baseIndexOf` except that it accepts a comparator. * * @private - * @name clear - * @memberOf Hash + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; } -module.exports = hashClear; +module.exports = baseIndexOfWith; /***/ }), -/* 338 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { -var isFunction = __webpack_require__(23), - isMasked = __webpack_require__(339), - isObject = __webpack_require__(44), - toSource = __webpack_require__(211); +var arrayEach = __webpack_require__(149), + baseEach = __webpack_require__(228), + castFunction = __webpack_require__(461), + isArray = __webpack_require__(21); /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight + * @example + * + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. + * + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; +function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); +} -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; +module.exports = forEach; -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +/***/ }), +/* 461 */ +/***/ (function(module, exports, __webpack_require__) { -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); +var identity = __webpack_require__(79); /** - * The base implementation of `_.isNative` without bad shim checks. + * Casts `value` to `identity` if it's not a function. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); +function castFunction(value) { + return typeof value == 'function' ? value : identity; } -module.exports = baseIsNative; +module.exports = castFunction; /***/ }), -/* 339 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { -var coreJsData = __webpack_require__(340); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); +var baseDifference = __webpack_require__(463), + baseRest = __webpack_require__(46), + isArrayLikeObject = __webpack_require__(111); /** - * Checks if `func` has its source masked. + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} +var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; +}); -module.exports = isMasked; +module.exports = without; /***/ }), -/* 340 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { -var root = __webpack_require__(47); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; - +var SetCache = __webpack_require__(108), + arrayIncludes = __webpack_require__(157), + arrayIncludesWith = __webpack_require__(158), + arrayMap = __webpack_require__(44), + baseUnary = __webpack_require__(53), + cacheHas = __webpack_require__(109); -/***/ }), -/* 341 */ -/***/ (function(module, exports) { +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; /** - * Gets the value at `key` of `object`. + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. * * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. */ -function getValue(object, key) { - return object == null ? undefined : object[key]; +function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; + + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); + + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; } -module.exports = getValue; +module.exports = baseDifference; /***/ }), -/* 342 */ -/***/ (function(module, exports) { +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = __webpack_require__(241); -module.exports = hashDelete; +$export($export.P, 'Array', { fill: __webpack_require__(475) }); + +__webpack_require__(248)('fill'); /***/ }), -/* 343 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(113); +// optional / simple context binding +var aFunction = __webpack_require__(466); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +/***/ }), +/* 466 */ +/***/ (function(module, exports) { -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} -module.exports = hashGet; +/***/ }), +/* 467 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(468); +var createDesc = __webpack_require__(473); +module.exports = __webpack_require__(162) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; /***/ }), -/* 344 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(113); +var anObject = __webpack_require__(469); +var IE8_DOM_DEFINE = __webpack_require__(470); +var toPrimitive = __webpack_require__(472); +var dP = Object.defineProperty; -/** Used for built-in method references. */ -var objectProto = Object.prototype; +exports.f = __webpack_require__(162) ? Object.defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return dP(O, P, Attributes); + } catch (e) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); -} +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = hashHas; +var isObject = __webpack_require__(161); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; /***/ }), -/* 345 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { -var nativeCreate = __webpack_require__(113); +module.exports = !__webpack_require__(162) && !__webpack_require__(243)(function () { + return Object.defineProperty(__webpack_require__(471)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = hashSet; +var isObject = __webpack_require__(161); +var document = __webpack_require__(242).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; /***/ }), -/* 346 */ +/* 472 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(161); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 473 */ /***/ (function(module, exports) { -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; -module.exports = listCacheClear; + +/***/ }), +/* 474 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; /***/ }), -/* 347 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(115); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; +"use strict"; +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) -/** Built-in value references. */ -var splice = arrayProto.splice; +var toObject = __webpack_require__(476); +var toAbsoluteIndex = __webpack_require__(245); +var toLength = __webpack_require__(247); +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = toLength(O.length); + var aLen = arguments.length; + var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); + var end = aLen > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = listCacheDelete; +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(244); +module.exports = function (it) { + return Object(defined(it)); +}; /***/ }), -/* 348 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(115); +__webpack_require__(478); +module.exports = __webpack_require__(15).parseInt; -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - return index < 0 ? undefined : data[index][1]; -} +/***/ }), +/* 478 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = listCacheGet; +var $export = __webpack_require__(22); +var $parseInt = __webpack_require__(479); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt }); /***/ }), -/* 349 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(115); - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} +var $parseInt = __webpack_require__(24).parseInt; +var $trim = __webpack_require__(480).trim; +var ws = __webpack_require__(249); +var hex = /^[-+]?0[xX]/; -module.exports = listCacheHas; +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) { + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; /***/ }), -/* 350 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { -var assocIndexOf = __webpack_require__(115); +var $export = __webpack_require__(22); +var defined = __webpack_require__(88); +var fails = __webpack_require__(42); +var spaces = __webpack_require__(249); +var space = '[' + spaces + ']'; +var non = '\u200b\u0085'; +var ltrim = RegExp('^' + space + space + '*'); +var rtrim = RegExp(space + space + '*$'); -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); +var exporter = function (KEY, exec, ALIAS) { + var exp = {}; + var FORCE = fails(function () { + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if (ALIAS) exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function (string, TYPE) { + string = String(defined(string)); + if (TYPE & 1) string = string.replace(ltrim, ''); + if (TYPE & 2) string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; + + +/***/ }), +/* 481 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// https://github.com/tc39/Array.prototype.includes +var $export = __webpack_require__(241); +var $includes = __webpack_require__(482)(true); + +$export($export.P, 'Array', { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } - return this; -} +}); -module.exports = listCacheSet; +__webpack_require__(248)('includes'); /***/ }), -/* 351 */ +/* 482 */ +/***/ (function(module, exports, __webpack_require__) { + +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(483); +var toLength = __webpack_require__(247); +var toAbsoluteIndex = __webpack_require__(245); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + + +/***/ }), +/* 483 */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(116); +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(484); +var defined = __webpack_require__(244); +module.exports = function (it) { + return IObject(defined(it)); +}; -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} -module.exports = mapCacheDelete; +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(485); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; /***/ }), -/* 352 */ +/* 485 */ /***/ (function(module, exports) { -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} +var toString = {}.toString; -module.exports = isKeyable; +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; /***/ }), -/* 353 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(116); +"use strict"; + + +var alphabet = __webpack_require__(112); +var build = __webpack_require__(488); +var isValid = __webpack_require__(492); + +// if you are using cluster or multiple servers use this to make each instance +// has a unique value for worker +// Note: I don't know if this is automatically set when using third +// party cluster solutions such as pm2. +var clusterWorkerId = __webpack_require__(493) || 0; + +/** + * Set the seed. + * Highly recommended if you don't want people to try to figure out your id schema. + * exposed as shortid.seed(int) + * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps. + */ +function seed(seedValue) { + alphabet.seed(seedValue); + return module.exports; +} + +/** + * Set the cluster worker or machine id + * exposed as shortid.worker(int) + * @param workerId worker must be positive integer. Number less than 16 is recommended. + * returns shortid module so it can be chained. + */ +function worker(workerId) { + clusterWorkerId = workerId; + return module.exports; +} /** - * Gets the map value for `key`. * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * sets new characters to use in the alphabet + * returns the shuffled alphabet */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); +function characters(newCharacters) { + if (newCharacters !== undefined) { + alphabet.characters(newCharacters); + } + + return alphabet.shuffled(); } -module.exports = mapCacheGet; +/** + * Generate unique id + * Returns string id + */ +function generate() { + return build(clusterWorkerId); +} + +// Export all other functions as properties of the generate function +module.exports = generate; +module.exports.generate = generate; +module.exports.seed = seed; +module.exports.worker = worker; +module.exports.characters = characters; +module.exports.isValid = isValid; /***/ }), -/* 354 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(116); +"use strict"; + + +// Found this seed-based random generator somewhere +// Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu) + +var seed = 1; /** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * return a random number based on a seed + * @param seed + * @returns {number} */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); +function getNextValue() { + seed = (seed * 9301 + 49297) % 233280; + return seed/(233280.0); } -module.exports = mapCacheHas; +function setSeed(_seed_) { + seed = _seed_; +} + +module.exports = { + nextValue: getNextValue, + seed: setSeed +}; /***/ }), -/* 355 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { -var getMapData = __webpack_require__(116); +"use strict"; + + +var generate = __webpack_require__(489); +var alphabet = __webpack_require__(112); + +// Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness. +// This number should be updated every year or so to keep the generated id short. +// To regenerate `new Date() - 0` and bump the version. Always bump the version! +var REDUCE_TIME = 1567752802062; + +// don't change unless we change the algos or REDUCE_TIME +// must be an integer and less than 16 +var version = 7; + +// Counter is used when shortid is called multiple times in one second. +var counter; + +// Remember the last time shortid was called in case counter is needed. +var previousSeconds; /** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. + * Generate unique id + * Returns string id */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; +function build(clusterWorkerId) { + var str = ''; - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; + var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001); + + if (seconds === previousSeconds) { + counter++; + } else { + counter = 0; + previousSeconds = seconds; + } + + str = str + generate(version); + str = str + generate(clusterWorkerId); + if (counter > 0) { + str = str + generate(counter); + } + str = str + generate(seconds); + return str; } -module.exports = mapCacheSet; +module.exports = build; /***/ }), -/* 356 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { -var assignValue = __webpack_require__(157), - castPath = __webpack_require__(112), - isIndex = __webpack_require__(118), - isObject = __webpack_require__(44), - toKey = __webpack_require__(77); +"use strict"; -/** - * The base implementation of `_.set`. - * - * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. - */ -function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; +var alphabet = __webpack_require__(112); +var random = __webpack_require__(490); +var format = __webpack_require__(491); - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; +function generate(number) { + var loopCounter = 0; + var done; - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } + var str = ''; - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } + while (!done) { + str = str + format(random, alphabet.get(), 1); + done = number < (Math.pow(16, loopCounter + 1 ) ); + loopCounter++; } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; + return str; } -module.exports = baseSet; +module.exports = generate; /***/ }), -/* 357 */ -/***/ (function(module, exports) { +/* 490 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * The base implementation of `_.hasIn` without support for deep paths. - * - * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. - */ -function baseHasIn(object, key) { - return object != null && key in Object(object); +"use strict"; + + +var crypto = typeof window === 'object' && (window.crypto || window.msCrypto); // IE 11 uses window.msCrypto + +var randomByte; + +if (!crypto || !crypto.getRandomValues) { + randomByte = function(size) { + var bytes = []; + for (var i = 0; i < size; i++) { + bytes.push(Math.floor(Math.random() * 256)); + } + return bytes; + }; +} else { + randomByte = function(size) { + return crypto.getRandomValues(new Uint8Array(size)); + }; } -module.exports = baseHasIn; +module.exports = randomByte; /***/ }), -/* 358 */ -/***/ (function(module, exports, __webpack_require__) { +/* 491 */ +/***/ (function(module, exports) { -var castPath = __webpack_require__(112), - isArguments = __webpack_require__(96), - isArray = __webpack_require__(30), - isIndex = __webpack_require__(118), - isLength = __webpack_require__(158), - toKey = __webpack_require__(77); +// This file replaces `format.js` in bundlers like webpack or Rollup, +// according to `browser` config in `package.json`. -/** - * Checks if `path` exists on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. - */ -function hasPath(object, path, hasFunc) { - path = castPath(path, object); +module.exports = function (random, alphabet, size) { + // We can’t use bytes bigger than the alphabet. To make bytes values closer + // to the alphabet, we apply bitmask on them. We look for the closest + // `2 ** x - 1` number, which will be bigger than alphabet size. If we have + // 30 symbols in the alphabet, we will take 31 (00011111). + // We do not use faster Math.clz32, because it is not available in browsers. + var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1 + // Bitmask is not a perfect solution (in our example it will pass 31 bytes, + // which is bigger than the alphabet). As a result, we will need more bytes, + // than ID size, because we will refuse bytes bigger than the alphabet. - var index = -1, - length = path.length, - result = false; + // Every hardware random generator call is costly, + // because we need to wait for entropy collection. This is why often it will + // be faster to ask for few extra bytes in advance, to avoid additional calls. - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; + // Here we calculate how many random bytes should we call in advance. + // It depends on ID length, mask / alphabet size and magic number 1.6 + // (which was selected according benchmarks). + + // -~f => Math.ceil(f) if n is float number + // -~i => i + 1 if n is integer number + var step = -~(1.6 * mask * size / alphabet.length) + var id = '' + + while (true) { + var bytes = random(step) + // Compact alternative for `for (var i = 0; i < step; i++)` + var i = step + while (i--) { + // If random byte is bigger than alphabet even after bitmask, + // we refuse it by `|| ''`. + id += alphabet[bytes[i] & mask] || '' + // More compact than `id.length + 1 === size` + if (id.length === +size) return id } - object = object[key]; - } - if (result || ++index != length) { - return result; } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); } -module.exports = hasPath; - /***/ }), -/* 359 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { -var baseGetTag = __webpack_require__(55), - isObjectLike = __webpack_require__(45); +"use strict"; -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]'; +var alphabet = __webpack_require__(112); -/** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ -function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; +function isShortId(id) { + if (!id || typeof id !== 'string' || id.length < 6 ) { + return false; + } + + var nonAlphabetic = new RegExp('[^' + + alphabet.get().replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') + + ']'); + return !nonAlphabetic.test(id); } -module.exports = baseIsArguments; +module.exports = isShortId; /***/ }), -/* 360 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { -var flatten = __webpack_require__(215), - overRest = __webpack_require__(216), - setToString = __webpack_require__(218); +"use strict"; -/** - * A specialized version of `baseRest` which flattens the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. - */ -function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); -} -module.exports = flatRest; +module.exports = 0; /***/ }), -/* 361 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { -var Symbol = __webpack_require__(72), - isArguments = __webpack_require__(96), - isArray = __webpack_require__(30); +__webpack_require__(77); +__webpack_require__(57); +module.exports = __webpack_require__(495); -/** Built-in value references. */ -var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} +/***/ }), +/* 495 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = isFlattenable; +var anObject = __webpack_require__(37); +var get = __webpack_require__(148); +module.exports = __webpack_require__(15).getIterator = function (it) { + var iterFn = get(it); + if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; /***/ }), -/* 362 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { -var constant = __webpack_require__(363), - defineProperty = __webpack_require__(213), - identity = __webpack_require__(97); +var core = __webpack_require__(15); +var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify }); +module.exports = function stringify(it) { // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; -module.exports = baseSetToString; +/***/ }), +/* 497 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(136); +__webpack_require__(57); +__webpack_require__(77); +__webpack_require__(498); +__webpack_require__(502); +__webpack_require__(503); +module.exports = __webpack_require__(15).Promise; /***/ }), -/* 363 */ -/***/ (function(module, exports) { +/* 498 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; +"use strict"; + +var LIBRARY = __webpack_require__(74); +var global = __webpack_require__(24); +var ctx = __webpack_require__(40); +var classof = __webpack_require__(104); +var $export = __webpack_require__(22); +var isObject = __webpack_require__(34); +var aFunction = __webpack_require__(73); +var anInstance = __webpack_require__(147); +var forOf = __webpack_require__(82); +var speciesConstructor = __webpack_require__(250); +var task = __webpack_require__(251).set; +var microtask = __webpack_require__(500)(); +var newPromiseCapabilityModule = __webpack_require__(163); +var perform = __webpack_require__(252); +var userAgent = __webpack_require__(501); +var promiseResolve = __webpack_require__(253); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8 || ''; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(26)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') + && promise.then(empty) instanceof FakePromise + // v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // we can't detect it synchronously, so just check versions + && v8.indexOf('6.6') !== 0 + && userAgent.indexOf('Chrome/66') === -1; + } catch (e) { /* empty */ } +}(); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // may throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + if (domain && !exited) domain.exit(); + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; + +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(146)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); }; } -module.exports = constant; +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(75)($Promise, PROMISE); +__webpack_require__(210)(PROMISE); +Wrapper = __webpack_require__(15)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(212)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); /***/ }), -/* 364 */ +/* 499 */ /***/ (function(module, exports) { -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; +/***/ }), +/* 500 */ +/***/ (function(module, exports, __webpack_require__) { - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); +var global = __webpack_require__(24); +var macrotask = __webpack_require__(251).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(71)(process) == 'process'; - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; } - } else { - count = 0; - } - return func.apply(undefined, arguments); + } last = undefined; + if (parent) parent.enter(); }; -} -module.exports = shortOut; + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + var promise = Promise.resolve(undefined); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; /***/ }), -/* 365 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { -var overArg = __webpack_require__(220); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object); +var global = __webpack_require__(24); +var navigator = global.navigator; -module.exports = nativeKeys; +module.exports = navigator && navigator.userAgent || ''; /***/ }), -/* 366 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(68), - root = __webpack_require__(47); +"use strict"; +// https://github.com/tc39/proposal-promise-finally -/* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'); +var $export = __webpack_require__(22); +var core = __webpack_require__(15); +var global = __webpack_require__(24); +var speciesConstructor = __webpack_require__(250); +var promiseResolve = __webpack_require__(253); -module.exports = DataView; +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); /***/ }), -/* 367 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(68), - root = __webpack_require__(47); +"use strict"; -/* Built-in method references that are verified to be native. */ -var Promise = getNative(root, 'Promise'); +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(22); +var newPromiseCapability = __webpack_require__(163); +var perform = __webpack_require__(252); -module.exports = Promise; +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); /***/ }), -/* 368 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { -var getNative = __webpack_require__(68), - root = __webpack_require__(47); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); +"use strict"; -module.exports = WeakMap; +var resolve = __webpack_require__(164) + , util = __webpack_require__(65) + , errorClasses = __webpack_require__(166) + , stableStringify = __webpack_require__(255); -/***/ }), -/* 369 */ -/***/ (function(module, exports) { +var validateGenerator = __webpack_require__(256); /** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] + * Functions below are used inside compiled validations function */ -function stubFalse() { - return false; -} - -module.exports = stubFalse; +var ucs2length = util.ucs2length; +var equal = __webpack_require__(165); -/***/ }), -/* 370 */ -/***/ (function(module, exports, __webpack_require__) { +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; -var baseGetTag = __webpack_require__(55), - isLength = __webpack_require__(158), - isObjectLike = __webpack_require__(45); +module.exports = compile; -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function */ -function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; -} - -module.exports = baseIsTypedArray; - - -/***/ }), -/* 371 */ -/***/ (function(module, exports, __webpack_require__) { +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; -module.exports = __webpack_require__(109).f('toPrimitive'); + root = root || { schema: schema, refVal: refVal, refs: refs }; + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); -/***/ }), -/* 372 */ -/***/ (function(module, exports, __webpack_require__) { + var formats = this._formats; + var RULES = this.RULES; -__webpack_require__(152); -__webpack_require__(73); -__webpack_require__(95); -__webpack_require__(373); -__webpack_require__(379); -__webpack_require__(382); -__webpack_require__(384); -module.exports = __webpack_require__(20).Set; + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } -/***/ }), -/* 373 */ -/***/ (function(module, exports, __webpack_require__) { + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); -"use strict"; + var $async = _schema.$async === true; -var strong = __webpack_require__(374); -var validate = __webpack_require__(225); -var SET = 'Set'; + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); -// 23.2 Set Objects -module.exports = __webpack_require__(375)(SET, function (get) { - return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); }; -}, { - // 23.2.3.1 Set.prototype.add(value) - add: function add(value) { - return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value); - } -}, strong); + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); -/***/ }), -/* 374 */ -/***/ (function(module, exports, __webpack_require__) { + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); -"use strict"; + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } -var dP = __webpack_require__(50).f; -var create = __webpack_require__(110); -var redefineAll = __webpack_require__(162); -var ctx = __webpack_require__(56); -var anInstance = __webpack_require__(163); -var forOf = __webpack_require__(100); -var $iterDefine = __webpack_require__(150); -var step = __webpack_require__(209); -var setSpecies = __webpack_require__(224); -var DESCRIPTORS = __webpack_require__(49); -var fastKey = __webpack_require__(142).fastKey; -var validate = __webpack_require__(225); -var SIZE = DESCRIPTORS ? '_s' : 'size'; + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } -var getEntry = function (that, key) { - // fast case - var index = fastKey(key); - var entry; - if (index !== 'F') return that._i[index]; - // frozen object case - for (entry = that._f; entry; entry = entry.n) { - if (entry.k == key) return entry; + return validate; } -}; -module.exports = { - getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; // collection type - that._i = create(null); // index - that._f = undefined; // first entry - that._l = undefined; // last entry - that[SIZE] = 0; // size - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - // 23.1.3.1 Map.prototype.clear() - // 23.2.3.2 Set.prototype.clear() - clear: function clear() { - for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { - entry.r = true; - if (entry.p) entry.p = entry.p.n = undefined; - delete data[entry.i]; - } - that._f = that._l = undefined; - that[SIZE] = 0; - }, - // 23.1.3.3 Map.prototype.delete(key) - // 23.2.3.4 Set.prototype.delete(value) - 'delete': function (key) { - var that = validate(this, NAME); - var entry = getEntry(that, key); - if (entry) { - var next = entry.n; - var prev = entry.p; - delete that._i[entry.i]; - entry.r = true; - if (prev) prev.n = next; - if (next) next.p = prev; - if (that._f == entry) that._f = next; - if (that._l == entry) that._l = prev; - that[SIZE]--; - } return !!entry; - }, - // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) - // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) - forEach: function forEach(callbackfn /* , that = undefined */) { - validate(this, NAME); - var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); - var entry; - while (entry = entry ? entry.n : this._f) { - f(entry.v, entry.k, this); - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - } - }, - // 23.1.3.7 Map.prototype.has(key) - // 23.2.3.7 Set.prototype.has(value) - has: function has(key) { - return !!getEntry(validate(this, NAME), key); - } - }); - if (DESCRIPTORS) dP(C.prototype, 'size', { - get: function () { - return validate(this, NAME)[SIZE]; + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); } - }); - return C; - }, - def: function (that, key, value) { - var entry = getEntry(that, key); - var prev, index; - // change existing entry - if (entry) { - entry.v = value; - // create new entry - } else { - that._l = entry = { - i: index = fastKey(key, true), // <- index - k: key, // <- key - v: value, // <- value - p: prev = that._l, // <- previous entry - n: undefined, // <- next entry - r: false // <- removed - }; - if (!that._f) that._f = entry; - if (prev) prev.n = entry; - that[SIZE]++; - // add to index - if (index !== 'F') that._i[index] = entry; - } return that; - }, - getEntry: getEntry, - setStrong: function (C, NAME, IS_MAP) { - // add .keys, .values, .entries, [@@iterator] - // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 - $iterDefine(C, NAME, function (iterated, kind) { - this._t = validate(iterated, NAME); // target - this._k = kind; // kind - this._l = undefined; // previous - }, function () { - var that = this; - var kind = that._k; - var entry = that._l; - // revert to the last existing entry - while (entry && entry.r) entry = entry.p; - // get next entry - if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { - // or finish the iteration - that._t = undefined; - return step(1); + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); } - // return step by kind - if (kind == 'keys') return step(0, entry.k); - if (kind == 'values') return step(0, entry.v); - return step(0, [entry.k, entry.v]); - }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + } - // add [@@species], 23.1.2.2, 23.2.2.2 - setSpecies(NAME); + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } } -}; - - -/***/ }), -/* 375 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var global = __webpack_require__(37); -var $export = __webpack_require__(27); -var meta = __webpack_require__(142); -var fails = __webpack_require__(58); -var hide = __webpack_require__(59); -var redefineAll = __webpack_require__(162); -var forOf = __webpack_require__(100); -var anInstance = __webpack_require__(163); -var isObject = __webpack_require__(48); -var setToStringTag = __webpack_require__(92); -var dP = __webpack_require__(50).f; -var each = __webpack_require__(376)(0); -var DESCRIPTORS = __webpack_require__(49); -module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { - var Base = global[NAME]; - var C = Base; - var ADDER = IS_MAP ? 'set' : 'add'; - var proto = C && C.prototype; - var O = {}; - if (!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { - new C().entries().next(); - }))) { - // create collection constructor - C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); - redefineAll(C.prototype, methods); - meta.NEED = true; - } else { - C = wrapper(function (target, iterable) { - anInstance(target, C, NAME, '_c'); - target._c = new Base(); - if (iterable != undefined) forOf(iterable, IS_MAP, target[ADDER], target); - }); - each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) { - var IS_ADDER = KEY == 'add' || KEY == 'set'; - if (KEY in proto && !(IS_WEAK && KEY == 'clear')) hide(C.prototype, KEY, function (a, b) { - anInstance(this, C, KEY); - if (!IS_ADDER && IS_WEAK && !isObject(a)) return KEY == 'get' ? undefined : false; - var result = this._c[KEY](a === 0 ? 0 : a, b); - return IS_ADDER ? this : result; - }); - }); - IS_WEAK || dP(C.prototype, 'size', { - get: function () { - return this._c.size; - } - }); + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; } - setToStringTag(C, NAME); + function removeLocalRef(ref) { + delete refs[ref]; + } - O[NAME] = C; - $export($export.G + $export.W + $export.F, O); + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } - if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } - return C; -}; + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } -/***/ }), -/* 376 */ -/***/ (function(module, exports, __webpack_require__) { + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = __webpack_require__(56); -var IObject = __webpack_require__(137); -var toObject = __webpack_require__(60); -var toLength = __webpack_require__(94); -var asc = __webpack_require__(377); -module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (;length > index; index++) if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res; // map - else if (res) switch (TYPE) { - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if (IS_EVERY) return false; // every + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } } } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - -/***/ }), -/* 377 */ -/***/ (function(module, exports, __webpack_require__) { + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; -// 9.4.2.3 ArraySpeciesCreate(originalArray, length) -var speciesConstructor = __webpack_require__(378); + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } -module.exports = function (original, length) { - return new (speciesConstructor(original))(length); -}; + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + var index = customRules.length; + customRules[index] = validate; -/***/ }), -/* 378 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(48); -var isArray = __webpack_require__(149); -var SPECIES = __webpack_require__(40)('species'); - -module.exports = function (original) { - var C; - if (isArray(original)) { - C = original.constructor; - // cross-realm fallback - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } return C === undefined ? Array : C; -}; - - -/***/ }), -/* 379 */ -/***/ (function(module, exports, __webpack_require__) { - -// https://github.com/DavidBruant/Map-Set.prototype.toJSON -var $export = __webpack_require__(27); - -$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(380)('Set') }); - + return { + code: 'customRule' + index, + validate: validate + }; + } +} -/***/ }), -/* 380 */ -/***/ (function(module, exports, __webpack_require__) { -// https://github.com/DavidBruant/Map-Set.prototype.toJSON -var classof = __webpack_require__(121); -var from = __webpack_require__(381); -module.exports = function (NAME) { - return function toJSON() { - if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic"); - return from(this); +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId }; -}; - + return { index: index, compiling: false }; +} -/***/ }), -/* 381 */ -/***/ (function(module, exports, __webpack_require__) { -var forOf = __webpack_require__(100); +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} -module.exports = function (iter, ITERATOR) { - var result = []; - forOf(iter, false, result.push, result, ITERATOR); - return result; -}; +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); } else { - forOf(source, false, A.push, A); + return sets[0]; } - return new this(A); - } }); -}; - - -/***/ }), -/* 386 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(73); -__webpack_require__(387); -module.exports = __webpack_require__(20).Array.from; +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_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 + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); -/***/ }), -/* 387 */ -/***/ (function(module, exports, __webpack_require__) { +var IRI_PROTOCOL = buildExps(true); -"use strict"; +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; -var ctx = __webpack_require__(56); -var $export = __webpack_require__(27); -var toObject = __webpack_require__(60); -var call = __webpack_require__(222); -var isArrayIter = __webpack_require__(223); -var toLength = __webpack_require__(94); -var createProperty = __webpack_require__(388); -var getIterFn = __webpack_require__(164); + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); -$export($export.S + $export.F * !__webpack_require__(226)(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + if (i && _arr.length === i) break; } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; } } - result.length = index; - return result; - } -}); - - -/***/ }), -/* 388 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; + return _arr; + } -var $defineProperty = __webpack_require__(50); -var createDesc = __webpack_require__(89); + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); -module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; -}; -/***/ }), -/* 389 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(95); -__webpack_require__(73); -module.exports = __webpack_require__(390); -/***/ }), -/* 390 */ -/***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(121); -var ITERATOR = __webpack_require__(40)('iterator'); -var Iterators = __webpack_require__(74); -module.exports = __webpack_require__(20).isIterable = function (it) { - var O = Object(it); - return O[ITERATOR] !== undefined - || '@@iterator' in O - // eslint-disable-next-line no-prototype-builtins - || Iterators.hasOwnProperty(classof(O)); -}; -/***/ }), -/* 391 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(392); -module.exports = __webpack_require__(20).Number.isNaN; -/***/ }), -/* 392 */ -/***/ (function(module, exports, __webpack_require__) { -// 20.1.2.4 Number.isNaN(number) -var $export = __webpack_require__(27); +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; -$export($export.S, 'Number', { - isNaN: function isNaN(number) { - // eslint-disable-next-line no-self-compare - return number != number; + return arr2; + } else { + return Array.from(arr); } -}); - +}; -/***/ }), -/* 393 */ -/***/ (function(module, exports, __webpack_require__) { +/** Highest positive signed 32-bit float value */ -__webpack_require__(394); -module.exports = __webpack_require__(20).Object.assign; +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' -/***/ }), -/* 394 */ -/***/ (function(module, exports, __webpack_require__) { +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators -// 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(27); +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(395) }); +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; +/*--------------------------------------------------------------------------*/ -/***/ }), -/* 395 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} -"use strict"; +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} -// 19.1.2.1 Object.assign(target, source, ...) -var DESCRIPTORS = __webpack_require__(49); -var getKeys = __webpack_require__(93); -var gOPS = __webpack_require__(148); -var pIE = __webpack_require__(107); -var toObject = __webpack_require__(60); -var IObject = __webpack_require__(137); -var $assign = Object.assign; +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} -// should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(58)(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - key = keys[j++]; - if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key]; - } - } return T; -} : $assign; - - -/***/ }), -/* 396 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** @license React v16.13.1 - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} -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? -Symbol.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; -function 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; -exports.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}; -exports.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}; -exports.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; - +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; -/***/ }), -/* 397 */ -/***/ (function(module, exports, __webpack_require__) { +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; -var baseClone = __webpack_require__(398); +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_SYMBOLS_FLAG = 4; +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; /** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. */ -function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); -} +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; -module.exports = cloneDeep; + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } -/***/ }), -/* 398 */ -/***/ (function(module, exports, __webpack_require__) { + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } -var Stack = __webpack_require__(122), - arrayEach = __webpack_require__(165), - assignValue = __webpack_require__(157), - baseAssign = __webpack_require__(404), - baseAssignIn = __webpack_require__(406), - cloneBuffer = __webpack_require__(228), - copyArray = __webpack_require__(123), - copySymbols = __webpack_require__(409), - copySymbolsIn = __webpack_require__(411), - getAllKeys = __webpack_require__(231), - getAllKeysIn = __webpack_require__(412), - getTag = __webpack_require__(98), - initCloneArray = __webpack_require__(413), - initCloneByTag = __webpack_require__(414), - initCloneObject = __webpack_require__(235), - isArray = __webpack_require__(30), - isBuffer = __webpack_require__(78), - isMap = __webpack_require__(418), - isObject = __webpack_require__(44), - isSet = __webpack_require__(420), - keys = __webpack_require__(79), - keysIn = __webpack_require__(80); + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. -/** Used to compose bitmasks for cloning. */ -var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - weakMapTag = '[object WeakMap]'; + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + if (index >= inputLength) { + error$1('invalid-input'); + } -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; + var digit = basicToDigit(input.charCodeAt(index++)); -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); + if (digit < t) { + break; + } - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); + w *= baseMinusT; + } - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - return result; -} + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); -module.exports = baseClone; + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + n += floor(i / out); + i %= out; -/***/ }), -/* 399 */ -/***/ (function(module, exports, __webpack_require__) { + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } -var ListCache = __webpack_require__(114); + return String.fromCodePoint.apply(String, output); +}; /** - * Removes all key-value entries from the stack. - * - * @private - * @name clear - * @memberOf Stack + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. */ -function stackClear() { - this.__data__ = new ListCache; - this.size = 0; -} +var encode = function encode(input) { + var output = []; -module.exports = stackClear; + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + // Cache the length. + var inputLength = input.length; -/***/ }), -/* 400 */ -/***/ (function(module, exports) { + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; -/** - * Removes `key` and its value from the stack. - * - * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; - this.size = data.size; - return result; -} + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; -module.exports = stackDelete; + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + var basicLength = output.length; + var handledCPCount = basicLength; -/***/ }), -/* 401 */ -/***/ (function(module, exports) { + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. -/** - * Gets the stack value for `key`. - * - * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function stackGet(key) { - return this.__data__.get(key); -} + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } -module.exports = stackGet; + // Main encoding loop: + while (handledCPCount < inputLength) { + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; -/***/ }), -/* 402 */ -/***/ (function(module, exports) { + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; -/** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function stackHas(key) { - return this.__data__.has(key); -} + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } -module.exports = stackHas; + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } -/***/ }), -/* 403 */ -/***/ (function(module, exports, __webpack_require__) { - -var ListCache = __webpack_require__(114), - Map = __webpack_require__(155), - MapCache = __webpack_require__(154); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; + delta += (m - n) * handledCPCountPlusOne; + n = m; -/** - * Sets the stack `key` to `value`. - * - * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. - */ -function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; -} + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; -module.exports = stackSet; + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } -/***/ }), -/* 404 */ -/***/ (function(module, exports, __webpack_require__) { + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } -var copyObject = __webpack_require__(101), - keys = __webpack_require__(79); + ++delta; + ++n; + } + return output.join(''); +}; /** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -module.exports = baseAssign; - - -/***/ }), -/* 405 */ -/***/ (function(module, exports) { +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -module.exports = baseTimes; - +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; -/***/ }), -/* 406 */ -/***/ (function(module, exports, __webpack_require__) { +/*--------------------------------------------------------------------------*/ -var copyObject = __webpack_require__(101), - keysIn = __webpack_require__(80); +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. + * URI.js * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js */ -function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); -} - -module.exports = baseAssignIn; - - -/***/ }), -/* 407 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(44), - isPrototype = __webpack_require__(120), - nativeKeysIn = __webpack_require__(408); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * Copyright 2011 Gary Court. All rights reserved. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; - - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = baseKeysIn; - - -/***/ }), -/* 408 */ -/***/ (function(module, exports) { - -/** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; -} - -module.exports = nativeKeysIn; - - -/***/ }), -/* 409 */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(101), - getSymbols = __webpack_require__(166); - -/** - * Copies own symbols of `source` to `object`. + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); -} - -module.exports = copySymbols; - - -/***/ }), -/* 410 */ -/***/ (function(module, exports) { - -/** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. */ -function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } } - } - return result; + return newStr; } - -module.exports = arrayFilter; - - -/***/ }), -/* 411 */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(101), - getSymbolsIn = __webpack_require__(230); - -/** - * Copies own and inherited symbols of `source` to `object`. - * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. - */ -function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (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); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; } -module.exports = copySymbolsIn; - - -/***/ }), -/* 412 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseGetAllKeys = __webpack_require__(232), - getSymbolsIn = __webpack_require__(230), - keysIn = __webpack_require__(80); - -/** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. - */ -function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; } +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; -module.exports = getAllKeysIn; - - -/***/ }), -/* 413 */ -/***/ (function(module, exports) { - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); + var _matches = slicedToArray(matches, 2), + address = _matches[1]; - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } } +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; -module.exports = initCloneArray; - - -/***/ }), -/* 414 */ -/***/ (function(module, exports, __webpack_require__) { + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; -var cloneArrayBuffer = __webpack_require__(167), - cloneDataView = __webpack_require__(415), - cloneRegExp = __webpack_require__(416), - cloneSymbol = __webpack_require__(417), - cloneTypedArray = __webpack_require__(234); + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - mapTag = '[object Map]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return new Ctor; - - case symbolTag: - return cloneSymbol(object); - } + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; } -module.exports = initCloneByTag; - - -/***/ }), -/* 415 */ -/***/ (function(module, exports, __webpack_require__) { - -var cloneArrayBuffer = __webpack_require__(167); - -/** - * Creates a clone of `dataView`. - * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number") { + uriTokens.push(":"); + uriTokens.push(components.port.toString(10)); + } + return uriTokens.length ? uriTokens.join("") : undefined; } -module.exports = cloneDataView; - - -/***/ }), -/* 416 */ -/***/ (function(module, exports) { - -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** - * Creates a clone of `regexp`. - * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. - */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); } -module.exports = cloneRegExp; - - -/***/ }), -/* 417 */ -/***/ (function(module, exports, __webpack_require__) { - -var Symbol = __webpack_require__(72); +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 -/** - * Creates a clone of the `symbol` object. - * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. - */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string } -module.exports = cloneSymbol; - - -/***/ }), -/* 418 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseIsMap = __webpack_require__(419), - baseUnary = __webpack_require__(69), - nodeUtil = __webpack_require__(161); - -/* Node.js helper references. */ -var nodeIsMap = nodeUtil && nodeUtil.isMap; - -/** - * Checks if `value` is classified as a `Map` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - * @example - * - * _.isMap(new Map); - * // => true - * - * _.isMap(new WeakMap); - * // => false - */ -var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; - -module.exports = isMap; - - -/***/ }), -/* 419 */ -/***/ (function(module, exports, __webpack_require__) { - -var getTag = __webpack_require__(98), - isObjectLike = __webpack_require__(45); - -/** `Object#toString` result references. */ -var mapTag = '[object Map]'; +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; -/** - * The base implementation of `_.isMap` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. - */ -function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; } -module.exports = baseIsMap; - - -/***/ }), -/* 420 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseIsSet = __webpack_require__(421), - baseUnary = __webpack_require__(69), - nodeUtil = __webpack_require__(161); - -/* Node.js helper references. */ -var nodeIsSet = nodeUtil && nodeUtil.isSet; - -/** - * Checks if `value` is classified as a `Set` object. - * - * @static - * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - * @example - * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false - */ -var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; - -module.exports = isSet; - - -/***/ }), -/* 421 */ -/***/ (function(module, exports, __webpack_require__) { - -var getTag = __webpack_require__(98), - isObjectLike = __webpack_require__(45); - -/** `Object#toString` result references. */ -var setTag = '[object Set]'; - -/** - * The base implementation of `_.isSet` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. - */ -function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } -module.exports = baseIsSet; - - -/***/ }), -/* 422 */ -/***/ (function(module, exports, __webpack_require__) { - -var isEqual = __webpack_require__(237) -var sortBy = __webpack_require__(239) -var uniq = __webpack_require__(244) -var uniqWith = __webpack_require__(246) -var defaults = __webpack_require__(448) -var intersectionWith = __webpack_require__(247) -var isPlainObject = __webpack_require__(38) -var isBoolean = __webpack_require__(184) +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} -var normalizeArray = val => Array.isArray(val) - ? val : [val] -var undef = val => val === undefined -var keys = obj => isPlainObject(obj) || Array.isArray(obj) ? Object.keys(obj) : [] -var has = (obj, key) => obj.hasOwnProperty(key) -var stringArray = arr => sortBy(uniq(arr)) -var undefEmpty = val => undef(val) || (Array.isArray(val) && val.length === 0) -var keyValEqual = (a, b, key, compare) => b && has(b, key) && a && has(a, key) && compare(a[key], b[key]) -var undefAndZero = (a, b) => (undef(a) && b === 0) || (undef(b) && a === 0) || isEqual(a, b) -var falseUndefined = (a, b) => (undef(a) && b === false) || (undef(b) && a === false) || isEqual(a, b) -var emptySchema = schema => undef(schema) || isEqual(schema, {}) || schema === true -var emptyObjUndef = schema => undef(schema) || isEqual(schema, {}) -var isSchema = val => undef(val) || isPlainObject(val) || val === true || val === false +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} -function undefArrayEqual(a, b) { - if (undefEmpty(a) && undefEmpty(b)) { - return true - } else { - return isEqual(stringArray(a), stringArray(b)) - } +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); } -function unsortedNormalizedArray(a, b) { - a = normalizeArray(a) - b = normalizeArray(b) - return isEqual(stringArray(a), stringArray(b)) +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); } -function schemaGroup(a, b, key, compare) { - var allProps = uniq(keys(a).concat(keys(b))) - if (emptyObjUndef(a) && emptyObjUndef(b)) { - return true - } else if (emptyObjUndef(a) && keys(b).length) { - return false - } else if (emptyObjUndef(b) && keys(a).length) { - return false - } - - return allProps.every(function(key) { - var aVal = a[key] - var bVal = b[key] - if (Array.isArray(aVal) && Array.isArray(bVal)) { - return isEqual(stringArray(a), stringArray(b)) - } else if (Array.isArray(aVal) && !Array.isArray(bVal)) { - return false - } else if (Array.isArray(bVal) && !Array.isArray(aVal)) { - return false +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + //normalize the default port + if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; } - return keyValEqual(a, b, key, compare) - }) -} +}; -function items(a, b, key, compare) { - if (isPlainObject(a) && isPlainObject(b)) { - return compare(a, b) - } else if (Array.isArray(a) && Array.isArray(b)) { - return schemaGroup(a, b, key, compare) - } else { - return isEqual(a, b) - } -} +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; -function unsortedArray(a, b, key, compare) { - var uniqueA = uniqWith(a, compare) - var uniqueB = uniqWith(b, compare) - var inter = intersectionWith(uniqueA, uniqueB, compare) - return inter.length === Math.max(uniqueA.length, uniqueB.length) +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; } +var handler$2 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; -var comparers = { - title: isEqual, - uniqueItems: falseUndefined, - minLength: undefAndZero, - minItems: undefAndZero, - minProperties: undefAndZero, - required: undefArrayEqual, - enum: undefArrayEqual, - type: unsortedNormalizedArray, - items: items, - anyOf: unsortedArray, - allOf: unsortedArray, - oneOf: unsortedArray, - properties: schemaGroup, - patternProperties: schemaGroup, - dependencies: schemaGroup -} +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$3 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; -var acceptsUndefined = [ - 'properties', - 'patternProperties', - 'dependencies', - 'uniqueItems', - 'minLength', - 'minItems', - 'minProperties', - 'required' -] +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$4 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; -var schemaProps = ['additionalProperties', 'additionalItems', 'contains', 'propertyNames', 'not'] +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; -function compare(a, b, options) { - options = defaults(options, { - ignore: [] - }) +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; - if (emptySchema(a) && emptySchema(b)) { - return true - } +Object.defineProperty(exports, '__esModule', { value: true }); - if (!isSchema(a) || !isSchema(b)) { - throw new Error('Either of the values are not a JSON schema.') - } - if (a === b) { - return true - } +}))); +//# sourceMappingURL=uri.all.js.map - if (isBoolean(a) && isBoolean(b)) { - return a === b - } - if ((a === undefined && b === false) || (b === undefined && a === false)) { - return false - } +/***/ }), +/* 506 */ +/***/ (function(module, exports, __webpack_require__) { - if ((undef(a) && !undef(b)) || (!undef(a) && undef(b))) { - return false - } +"use strict"; - var allKeys = uniq(Object.keys(a).concat(Object.keys(b))) - if (options.ignore.length) { - allKeys = allKeys.filter(k => options.ignore.indexOf(k) === -1) +// https://mathiasbynens.be/notes/javascript-encoding +// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode +module.exports = function ucs2length(str) { + var length = 0 + , len = str.length + , pos = 0 + , value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } } + return length; +}; - if (!allKeys.length) { - return true - } - function innerCompare(a, b) { - return compare(a, b, options) +/***/ }), +/* 507 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var traverse = module.exports = function (schema, opts, cb) { + // Legacy support for v0.3.1 and earlier. + if (typeof opts == 'function') { + cb = opts; + opts = {}; } - return allKeys.every(function(key) { - var aValue = a[key] - var bValue = b[key] + cb = opts.cb || cb; + var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; + var post = cb.post || function() {}; - if (schemaProps.indexOf(key) !== -1) { - return compare(aValue, bValue, options) - } + _traverse(opts, pre, post, schema, '', schema); +}; - var comparer = comparers[key] - if (!comparer) { - comparer = isEqual - } - // do simple lodash check first - if (isEqual(aValue, bValue)) { - return true - } +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; - if (acceptsUndefined.indexOf(key) === -1) { - if ((!has(a, key) && has(b, key)) || (has(a, key) && !has(b, key))) { - return aValue === bValue - } - } +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; - var result = comparer(aValue, bValue, key, innerCompare) - if (!isBoolean(result)) { - throw new Error('Comparer must return true or false') +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + default: true, + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i%\\^`{|}]|%[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; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// 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; +var 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; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); +module.exports = formats; - case errorTag: - return object.name == other.name && object.message == other.message; +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - case mapTag: - var convert = mapToArray; +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + '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, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + 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, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + 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, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + 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, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + 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, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } -module.exports = equalByTag; - -/***/ }), -/* 428 */ -/***/ (function(module, exports) { +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; -/** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } -module.exports = mapToArray; +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; -/***/ }), -/* 429 */ -/***/ (function(module, exports, __webpack_require__) { + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} -var getAllKeys = __webpack_require__(231); -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1; +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} -/** Used for built-in method references. */ -var objectProto = Object.prototype; -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - if (objLength != othLength && !isPartial) { +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { return false; } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); +} - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; +/***/ }), +/* 510 */ +/***/ (function(module, exports, __webpack_require__) { - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } - } - stack['delete'](object); - stack['delete'](other); - return result; -} +"use strict"; -module.exports = equalObjects; +var ruleModules = __webpack_require__(511) + , toHash = __webpack_require__(65).toHash; -/***/ }), -/* 430 */ -/***/ (function(module, exports, __webpack_require__) { +module.exports = function rules() { + var RULES = [ + { type: 'number', + rules: [ { 'maximum': ['exclusiveMaximum'] }, + { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, + { type: 'string', + rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, + { type: 'array', + rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, + { type: 'object', + rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', + { 'properties': ['additionalProperties', 'patternProperties'] } ] }, + { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } + ]; -var arrayMap = __webpack_require__(61), - baseGet = __webpack_require__(111), - baseIteratee = __webpack_require__(102), - baseMap = __webpack_require__(438), - baseSortBy = __webpack_require__(441), - baseUnary = __webpack_require__(69), - compareMultiple = __webpack_require__(442), - identity = __webpack_require__(97), - isArray = __webpack_require__(30); + var ALL = [ 'type', '$comment' ]; + var KEYWORDS = [ + '$schema', '$id', 'id', '$data', '$async', 'title', + 'description', 'default', 'definitions', + 'examples', 'readOnly', 'writeOnly', + 'contentMediaType', 'contentEncoding', + 'additionalItems', 'then', 'else' + ]; + var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; + RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); -/** - * The base implementation of `_.orderBy` without param guards. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. - */ -function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee) { - if (isArray(iteratee)) { - return function(value) { - return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } + RULES.forEach(function (group) { + group.rules = group.rules.map(function (keyword) { + var implKeywords; + if (typeof keyword == 'object') { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function (k) { + ALL.push(k); + RULES.all[k] = true; + }); } - return iteratee; + ALL.push(keyword); + var rule = RULES.all[keyword] = { + keyword: keyword, + code: ruleModules[keyword], + implements: implKeywords + }; + return rule; }); - } else { - iteratees = [identity]; - } - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + RULES.all.$comment = { + keyword: '$comment', + code: ruleModules.$comment + }; - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; + if (group.type) RULES.types[group.type] = group; }); - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); -} + RULES.keywords = toHash(ALL.concat(KEYWORDS)); + RULES.custom = {}; -module.exports = baseOrderBy; + return RULES; +}; /***/ }), -/* 431 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsMatch = __webpack_require__(432), - getMatchData = __webpack_require__(433), - matchesStrictComparable = __webpack_require__(241); +"use strict"; -/** - * The base implementation of `_.matches` which doesn't clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); - } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; -} -module.exports = baseMatches; +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': __webpack_require__(512), + allOf: __webpack_require__(513), + anyOf: __webpack_require__(514), + '$comment': __webpack_require__(515), + const: __webpack_require__(516), + contains: __webpack_require__(517), + dependencies: __webpack_require__(518), + 'enum': __webpack_require__(519), + format: __webpack_require__(520), + 'if': __webpack_require__(521), + items: __webpack_require__(522), + maximum: __webpack_require__(257), + minimum: __webpack_require__(257), + maxItems: __webpack_require__(258), + minItems: __webpack_require__(258), + maxLength: __webpack_require__(259), + minLength: __webpack_require__(259), + maxProperties: __webpack_require__(260), + minProperties: __webpack_require__(260), + multipleOf: __webpack_require__(523), + not: __webpack_require__(524), + oneOf: __webpack_require__(525), + pattern: __webpack_require__(526), + properties: __webpack_require__(527), + propertyNames: __webpack_require__(528), + required: __webpack_require__(529), + uniqueItems: __webpack_require__(530), + validate: __webpack_require__(256) +}; /***/ }), -/* 432 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { -var Stack = __webpack_require__(122), - baseIsEqual = __webpack_require__(168); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; - -/** - * The base implementation of `_.isMatch` without support for iteratee shorthands. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; +"use strict"; - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; +module.exports = function generate_ref(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $async, $refCode; + if ($schema == '#' || $schema == '#/') { + if (it.isRoot) { + $async = it.async; + $refCode = 'validate'; + } else { + $async = it.root.schema.$async === true; + $refCode = 'root.refVal[0]'; } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; + } else { + var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); + if ($refVal === undefined) { + var $message = it.MissingRefError.message(it.baseId, $schema); + if (it.opts.missingRefs == 'fail') { + it.logger.error($message); + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; + } + if (it.opts.verbose) { + out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + if ($breakOnError) { + out += ' if (false) { '; + } + } else if (it.opts.missingRefs == 'ignore') { + it.logger.warn($message); + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + throw new it.MissingRefError(it.baseId, $schema, $message); + } + } else if ($refVal.inline) { + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $refVal.schema; + $it.schemaPath = ''; + $it.errSchemaPath = $schema; + var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); + out += ' ' + ($code) + ' '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; } } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); + $async = $refVal.$async === true || (it.async && $refVal.$async !== false); + $refCode = $refVal.code; + } + } + if ($refCode) { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + if (it.opts.passContext) { + out += ' ' + ($refCode) + '.call(this, '; + } else { + out += ' ' + ($refCode) + '( '; + } + out += ' ' + ($data) + ', (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; + var __callValidate = out; + out = $$outStack.pop(); + if ($async) { + if (!it.async) throw new Error('async schema referenced by sync schema'); + if ($breakOnError) { + out += ' var ' + ($valid) + '; '; } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; + out += ' try { await ' + (__callValidate) + '; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = true; '; + } + out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; + if ($breakOnError) { + out += ' ' + ($valid) + ' = false; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + } + } else { + out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; + if ($breakOnError) { + out += ' else { '; } } } - return true; + return out; } -module.exports = baseIsMatch; - /***/ }), -/* 433 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { -var isStrictComparable = __webpack_require__(240), - keys = __webpack_require__(79); - -/** - * Gets the property names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; +"use strict"; - result[length] = [key, value, isStrictComparable(value)]; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } } - return result; + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; } -module.exports = getMatchData; - /***/ }), -/* 434 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsEqual = __webpack_require__(168), - get = __webpack_require__(182), - hasIn = __webpack_require__(214), - isKey = __webpack_require__(153), - isStrictComparable = __webpack_require__(240), - matchesStrictComparable = __webpack_require__(241), - toKey = __webpack_require__(77); - -/** Used to compose bitmasks for value comparisons. */ -var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +"use strict"; -/** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ -function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; + return out; } -module.exports = baseMatchesProperty; - /***/ }), -/* 435 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { -var baseProperty = __webpack_require__(436), - basePropertyDeep = __webpack_require__(437), - isKey = __webpack_require__(153), - toKey = __webpack_require__(77); - -/** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); -} - -module.exports = property; - - -/***/ }), -/* 436 */ -/***/ (function(module, exports) { +"use strict"; -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; } -module.exports = baseProperty; - /***/ }), -/* 437 */ +/* 516 */ /***/ (function(module, exports, __webpack_require__) { -var baseGet = __webpack_require__(111); +"use strict"; -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; } -module.exports = basePropertyDeep; - /***/ }), -/* 438 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { -var baseEach = __webpack_require__(242), - isArrayLike = __webpack_require__(62); - -/** - * The base implementation of `_.map` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); - return result; -} - -module.exports = baseMap; - - -/***/ }), -/* 439 */ -/***/ (function(module, exports) { - -/** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = createBaseFor; - +"use strict"; -/***/ }), -/* 440 */ -/***/ (function(module, exports, __webpack_require__) { - -var isArrayLike = __webpack_require__(62); - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } - return collection; - }; -} - -module.exports = createBaseEach; - - -/***/ }), -/* 441 */ -/***/ (function(module, exports) { - -/** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ -function baseSortBy(array, comparer) { - var length = array.length; - - array.sort(comparer); - while (length--) { - array[length] = array[length].value; + out += ' } '; + } else { + out += ' {} '; } - return array; + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; } -module.exports = baseSortBy; - /***/ }), -/* 442 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { -var compareAscending = __webpack_require__(443); - -/** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. - * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. - */ -function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; +"use strict"; - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; +module.exports = function generate_dependencies(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $schemaDeps = {}, + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; + for ($property in $schema) { + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } + out += 'var ' + ($errs) + ' = errors;'; + var $currentErrorPath = it.errorPath; + out += 'var missing' + ($lvl) + ';'; + for (var $property in $propertyDeps) { + $deps = $propertyDeps[$property]; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + 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(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + 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(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); } } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; + for (var $property in $schemaDeps) { + var $sch = $schemaDeps[$property]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; } -module.exports = compareMultiple; - /***/ }), -/* 443 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { -var isSymbol = __webpack_require__(75); - -/** - * Compares values to sort them in ascending order. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. - */ -function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); +"use strict"; - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } + out += ' } '; + } else { + out += ' {} '; } - return 0; -} - -module.exports = compareAscending; - - -/***/ }), -/* 444 */ -/***/ (function(module, exports) { - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -module.exports = baseIsNaN; - - -/***/ }), -/* 445 */ -/***/ (function(module, exports) { - -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - return -1; + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; } -module.exports = strictIndexOf; - /***/ }), -/* 446 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { -var Set = __webpack_require__(221), - noop = __webpack_require__(447), - setToArray = __webpack_require__(169); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Creates a set object of `values`. - * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. - */ -var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); -}; - -module.exports = createSet; - - -/***/ }), -/* 447 */ -/***/ (function(module, exports) { +"use strict"; -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; } -module.exports = noop; - /***/ }), -/* 448 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { -var baseRest = __webpack_require__(63), - eq = __webpack_require__(76), - isIterateeCall = __webpack_require__(171), - keysIn = __webpack_require__(80); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } - - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; - - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; +"use strict"; - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; } } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } } - - return object; -}); - -module.exports = defaults; - - -/***/ }), -/* 449 */ -/***/ (function(module, exports) { - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; + return out; } -module.exports = last; - /***/ }), -/* 450 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -// MODULES // - -var gcd = __webpack_require__( 451 ), - isArray = __webpack_require__( 175 ), - isIntegerArray = __webpack_require__( 250 ), - isFunction = __webpack_require__( 251 ); +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} -// LEAST COMMON MULTIPLE // +/***/ }), +/* 523 */ +/***/ (function(module, exports, __webpack_require__) { -/** -* FUNCTION: lcm( arr[, clbk] ) -* Computes the least common multiple (lcm). -* -* @param {Number[]|Number} arr - input array of integers -* @param {Function|Number} [accessor] - accessor function for accessing array values -* @returns {Number|Null} least common multiple or null -*/ -function lcm() { - var nargs = arguments.length, - args, - clbk, - arr, - len, - a, b, - i; +"use strict"; - // Copy the input arguments to an array... - args = new Array( nargs ); - for ( i = 0; i < nargs; i++ ) { - args[ i ] = arguments[ i ]; - } - // Have we been provided with integer arguments? - if ( isIntegerArray( args ) ) { - if ( nargs === 2 ) { - a = args[ 0 ]; - b = args[ 1 ]; - if ( a < 0 ) { - a = -a; - } - if ( b < 0 ) { - b = -b; - } - if ( a === 0 || b === 0 ) { - return 0; - } - return ( a/gcd(a,b) ) * b; - } - arr = args; - } - // If not integers, ensure that the first argument is an array... - else if ( !isArray( args[ 0 ] ) ) { - throw new TypeError( 'lcm()::invalid input argument. Must provide an array of integers. Value: `' + args[ 0 ] + '`.' ); - } - // Have we been provided with more than one argument? If so, ensure that the accessor argument is a function... - else if ( nargs > 1 ) { - arr = args[ 0 ]; - clbk = args[ 1 ]; - if ( !isFunction( clbk ) ) { - throw new TypeError( 'lcm()::invalid input argument. Accessor must be a function. Value: `' + clbk + '`.' ); - } - } - // We have been provided an array... - else { - arr = args[ 0 ]; - } - len = arr.length; - - // Check if a sufficient number of values have been provided... - if ( len < 2 ) { - return null; - } - // If an accessor is provided, extract the array values... - if ( clbk ) { - a = new Array( len ); - for ( i = 0; i < len; i++ ) { - a[ i ] = clbk( arr[ i ], i ); - } - arr = a; - } - // Given an input array, ensure all array values are integers... - if ( nargs < 3 ) { - if ( !isIntegerArray( arr ) ) { - throw new TypeError( 'lcm()::invalid input argument. Accessed array values must be integers. Value: `' + arr + '`.' ); - } - } - // Convert any negative integers to positive integers... - for ( i = 0; i < len; i++ ) { - a = arr[ i ]; - if ( a < 0 ) { - arr[ i ] = -a; - } - } - // Exploit the fact that the lcm is an associative function... - a = arr[ 0 ]; - for ( i = 1; i < len; i++ ) { - b = arr[ i ]; - if ( a === 0 || b === 0 ) { - return 0; - } - a = ( a/gcd(a,b) ) * b; - } - return a; -} // end FUNCTION lcm() - - -// EXPORTS // - -module.exports = lcm; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} /***/ }), -/* 451 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} -// MODULES // - -var isArray = __webpack_require__( 175 ), - isIntegerArray = __webpack_require__( 250 ), - isFunction = __webpack_require__( 251 ); +/***/ }), +/* 525 */ +/***/ (function(module, exports, __webpack_require__) { -// VARIABLES // +"use strict"; -var MAXINT = Math.pow( 2, 53 ) - 1; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} -// FUNCTIONS // +/***/ }), +/* 526 */ +/***/ (function(module, exports, __webpack_require__) { -/** -* FUNCTION: gcd( a, b ) -* Computes the greatest common divisor of two integers `a` and `b`, using the binary GCD algorithm. -* -* @param {Number} a - integer -* @param {Number} b - integer -* @returns {Number} greatest common divisor -*/ -function gcd( a, b ) { - var k = 1, - t; - // Simple cases: - if ( a === 0 ) { - return b; - } - if ( b === 0 ) { - return a; - } - // Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`... - while ( a%2 === 0 && b%2 === 0 ) { - a = a / 2; // right shift - b = b / 2; // right shift - k = k * 2; // left shift - } - // Reduce `a` to an odd number... - while ( a%2 === 0 ) { - a = a / 2; // right shift - } - // Henceforth, `a` is always odd... - while ( b ) { - // Remove all factors of 2 in `b`, as they are not common... - while ( b%2 === 0 ) { - b = b / 2; // right shift - } - // `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)... - if ( a > b ) { - t = b; - b = a; - a = t; - } - b = b - a; // b=0 iff b=a - } - // Restore common factors of 2... - return k * a; -} // end FUNCTION gcd() +"use strict"; -/** -* FUNCTION: bitwise( a, b ) -* Computes the greatest common divisor of two integers `a` and `b`, using the binary GCD algorithm and bitwise operations. -* -* @param {Number} a - safe integer -* @param {Number} b - safe integer -* @returns {Number} greatest common divisor -*/ -function bitwise( a, b ) { - var k = 0, - t; - // Simple cases: - if ( a === 0 ) { - return b; - } - if ( b === 0 ) { - return a; - } - // Reduce `a` and/or `b` to odd numbers and keep track of the greatest power of 2 dividing both `a` and `b`... - while ( (a & 1) === 0 && (b & 1) === 0 ) { - a >>>= 1; // right shift - b >>>= 1; // right shift - k++; - } - // Reduce `a` to an odd number... - while ( (a & 1) === 0 ) { - a >>>= 1; // right shift - } - // Henceforth, `a` is always odd... - while ( b ) { - // Remove all factors of 2 in `b`, as they are not common... - while ( (b & 1) === 0 ) { - b >>>= 1; // right shift - } - // `a` and `b` are both odd. Swap values such that `b` is the larger of the two values, and then set `b` to the difference (which is even)... - if ( a > b ) { - t = b; - b = a; - a = t; - } - b = b - a; // b=0 iff b=a - } - // Restore common factors of 2... - return a << k; -} // end FUNCTION bitwise() +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} -// GREATEST COMMON DIVISOR // +/***/ }), +/* 527 */ +/***/ (function(module, exports, __webpack_require__) { -/** -* FUNCTION: compute( arr[, clbk] ) -* Computes the greatest common divisor. -* -* @param {Number[]|Number} arr - input array of integers -* @param {Function|Number} [clbk] - accessor function for accessing array values -* @returns {Number|Null} greatest common divisor or null -*/ -function compute() { - var nargs = arguments.length, - args, - clbk, - arr, - len, - a, b, - i; +"use strict"; - // Copy the input arguments to an array... - args = new Array( nargs ); - for ( i = 0; i < nargs; i++ ) { - args[ i ] = arguments[ i ]; - } - // Have we been provided with integer arguments? - if ( isIntegerArray( args ) ) { - if ( nargs === 2 ) { - a = args[ 0 ]; - b = args[ 1 ]; - if ( a < 0 ) { - a = -a; - } - if ( b < 0 ) { - b = -b; - } - if ( a <= MAXINT && b <= MAXINT ) { - return bitwise( a, b ); - } else { - return gcd( a, b ); - } - } - arr = args; - } - // If not integers, ensure the first argument is an array... - else if ( !isArray( args[ 0 ] ) ) { - throw new TypeError( 'gcd()::invalid input argument. Must provide an array of integers. Value: `' + args[ 0 ] + '`.' ); - } - // Have we been provided with more than one argument? If so, ensure that the accessor argument is a function... - else if ( nargs > 1 ) { - arr = args[ 0 ]; - clbk = args[ 1 ]; - if ( !isFunction( clbk ) ) { - throw new TypeError( 'gcd()::invalid input argument. Accessor must be a function. Value: `' + clbk + '`.' ); - } - } - // We have been provided an array... - else { - arr = args[ 0 ]; - } - len = arr.length; - - // Check if a sufficient number of values have been provided... - if ( len < 2 ) { - return null; - } - // If an accessor is provided, extract the array values... - if ( clbk ) { - a = new Array( len ); - for ( i = 0; i < len; i++ ) { - a[ i ] = clbk( arr[ i ], i ); - } - arr = a; - } - // Given an input array, ensure all array values are integers... - if ( nargs < 3 ) { - if ( !isIntegerArray( arr ) ) { - throw new TypeError( 'gcd()::invalid input argument. Accessed array values must be integers. Value: `' + arr + '`.' ); - } - } - // Convert any negative integers to positive integers... - for ( i = 0; i < len; i++ ) { - a = arr[ i ]; - if ( a < 0 ) { - arr[ i ] = -a; - } - } - // Exploit the fact that the gcd is an associative function... - a = arr[ 0 ]; - for ( i = 1; i < len; i++ ) { - b = arr[ i ]; - if ( b <= MAXINT && a <= MAXINT ) { - a = bitwise( a, b ); - } else { - a = gcd( a, b ); - } - } - return a; -} // end FUNCTION compute() - - -// EXPORTS // - -module.exports = compute; - - -/***/ }), -/* 452 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** -* -* VALIDATE: integer -* -* -* DESCRIPTION: -* - Validates if a value is an integer. -* -* -* NOTES: -* [1] -* -* -* TODO: -* [1] -* -* -* LICENSE: -* MIT -* -* Copyright (c) 2014. Athan Reines. -* -* -* AUTHOR: -* Athan Reines. kgryte@gmail.com. 2014. -* -*/ - - - -// MODULES // - -var isNumber = __webpack_require__( 453 ); - - -// ISINTEGER // - -/** -* FUNCTION: isInteger( value ) -* Validates if a value is an integer. -* -* @param {Number} value - value to be validated -* @returns {Boolean} boolean indicating whether value is an integer -*/ -function isInteger( value ) { - return isNumber( value ) && value%1 === 0; -} // end FUNCTION isInteger() - - -// EXPORTS // - -module.exports = isInteger; - - -/***/ }), -/* 453 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** -* -* VALIDATE: number -* -* -* DESCRIPTION: -* - Validates if a value is a number. -* -* -* NOTES: -* [1] -* -* -* TODO: -* [1] -* -* -* LICENSE: -* MIT -* -* Copyright (c) 2014. Athan Reines. -* -* -* AUTHOR: -* Athan Reines. kgryte@gmail.com. 2014. -* -*/ - - - -/** -* FUNCTION: isNumber( value ) -* Validates if a value is a number. -* -* @param {*} value - value to be validated -* @returns {Boolean} boolean indicating whether value is a number -*/ -function isNumber( value ) { - return ( typeof value === 'number' || Object.prototype.toString.call( value ) === '[object Number]' ) && value.valueOf() === value.valueOf(); -} // end FUNCTION isNumber() - - -// EXPORTS // - -module.exports = isNumber; - - -/***/ }), -/* 454 */ -/***/ (function(module, exports, __webpack_require__) { - -var apply = __webpack_require__(217), - baseRest = __webpack_require__(63), - customDefaultsMerge = __webpack_require__(455), - mergeWith = __webpack_require__(458); - -/** - * This method is like `_.defaults` except that it recursively assigns - * default properties. - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults - * @example - * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } - */ -var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); -}); - -module.exports = defaultsDeep; - - -/***/ }), -/* 455 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseMerge = __webpack_require__(252), - isObject = __webpack_require__(44); - -/** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. - * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. - */ -function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); - } - return objValue; -} - -module.exports = customDefaultsMerge; - - -/***/ }), -/* 456 */ -/***/ (function(module, exports, __webpack_require__) { - -var assignMergeValue = __webpack_require__(253), - cloneBuffer = __webpack_require__(228), - cloneTypedArray = __webpack_require__(234), - copyArray = __webpack_require__(123), - initCloneObject = __webpack_require__(235), - isArguments = __webpack_require__(96), - isArray = __webpack_require__(30), - isArrayLikeObject = __webpack_require__(128), - isBuffer = __webpack_require__(78), - isFunction = __webpack_require__(23), - isObject = __webpack_require__(44), - isPlainObject = __webpack_require__(38), - isTypedArray = __webpack_require__(99), - safeGet = __webpack_require__(254), - toPlainObject = __webpack_require__(457); - -/** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ -function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; - - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); - - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; - } - } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); -} - -module.exports = baseMergeDeep; - - -/***/ }), -/* 457 */ -/***/ (function(module, exports, __webpack_require__) { - -var copyObject = __webpack_require__(101), - keysIn = __webpack_require__(80); - -/** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. - * @example - * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } - */ -function toPlainObject(value) { - return copyObject(value, keysIn(value)); -} - -module.exports = toPlainObject; - - -/***/ }), -/* 458 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseMerge = __webpack_require__(252), - createAssigner = __webpack_require__(459); - -/** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example - * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; - * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } - */ -var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); -}); - -module.exports = mergeWith; - - -/***/ }), -/* 459 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseRest = __webpack_require__(63), - isIterateeCall = __webpack_require__(171); - -/** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; - - -/***/ }), -/* 460 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseFlatten = __webpack_require__(119); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Recursively flattens `array`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] - */ -function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; -} - -module.exports = flattenDeep; - - -/***/ }), -/* 461 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayMap = __webpack_require__(61), - baseIntersection = __webpack_require__(248), - baseRest = __webpack_require__(63), - castArrayLikeObject = __webpack_require__(249); - -/** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. - * @example - * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ -var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; -}); - -module.exports = intersection; - - -/***/ }), -/* 462 */ -/***/ (function(module, exports, __webpack_require__) { - -var basePullAll = __webpack_require__(463); - -/** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. - * @example - * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] - */ -function pullAll(array, values) { - return (array && array.length && values && values.length) - ? basePullAll(array, values) - : array; -} - -module.exports = pullAll; - - -/***/ }), -/* 463 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayMap = __webpack_require__(61), - baseIndexOf = __webpack_require__(127), - baseIndexOfWith = __webpack_require__(464), - baseUnary = __webpack_require__(69), - copyArray = __webpack_require__(123); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. - */ -function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; - - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; - - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } - } - return array; -} - -module.exports = basePullAll; - - -/***/ }), -/* 464 */ -/***/ (function(module, exports) { - -/** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } - } - return -1; -} - -module.exports = baseIndexOfWith; - - -/***/ }), -/* 465 */ -/***/ (function(module, exports, __webpack_require__) { - -var arrayEach = __webpack_require__(165), - baseEach = __webpack_require__(242), - castFunction = __webpack_require__(466), - isArray = __webpack_require__(30); - -/** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. - * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). - */ -function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, castFunction(iteratee)); -} - -module.exports = forEach; - - -/***/ }), -/* 466 */ -/***/ (function(module, exports, __webpack_require__) { - -var identity = __webpack_require__(97); - -/** - * Casts `value` to `identity` if it's not a function. - * - * @private - * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. - */ -function castFunction(value) { - return typeof value == 'function' ? value : identity; -} - -module.exports = castFunction; - - -/***/ }), -/* 467 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseDifference = __webpack_require__(468), - baseRest = __webpack_require__(63), - isArrayLikeObject = __webpack_require__(128); - -/** - * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.pull`, this method returns a new array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.xor - * @example - * - * _.without([2, 1, 2, 3], 1, 2); - * // => [3] - */ -var without = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, values) - : []; -}); - -module.exports = without; - - -/***/ }), -/* 468 */ -/***/ (function(module, exports, __webpack_require__) { - -var SetCache = __webpack_require__(125), - arrayIncludes = __webpack_require__(173), - arrayIncludesWith = __webpack_require__(174), - arrayMap = __webpack_require__(61), - baseUnary = __webpack_require__(69), - cacheHas = __webpack_require__(126); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - */ -function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); - } - else if (!includes(values, computed, comparator)) { - result.push(value); - } - } - return result; -} - -module.exports = baseDifference; - - -/***/ }), -/* 469 */ -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) -var $export = __webpack_require__(27); - -$export($export.P, 'Array', { fill: __webpack_require__(470) }); - -__webpack_require__(151)('fill'); - - -/***/ }), -/* 470 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) - -var toObject = __webpack_require__(60); -var toAbsoluteIndex = __webpack_require__(205); -var toLength = __webpack_require__(94); -module.exports = function fill(value /* , start = 0, end = @length */) { - var O = toObject(this); - var length = toLength(O.length); - var aLen = arguments.length; - var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); - var end = aLen > 2 ? arguments[2] : undefined; - var endPos = end === undefined ? length : toAbsoluteIndex(end, length); - while (endPos > index) O[index++] = value; - return O; -}; - - -/***/ }), -/* 471 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(95); -__webpack_require__(73); -module.exports = __webpack_require__(472); - - -/***/ }), -/* 472 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(53); -var get = __webpack_require__(164); -module.exports = __webpack_require__(20).getIterator = function (it) { - var iterFn = get(it); - if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); - return anObject(iterFn.call(it)); -}; - - -/***/ }), -/* 473 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var resolve = __webpack_require__(176) - , util = __webpack_require__(81) - , errorClasses = __webpack_require__(178) - , stableStringify = __webpack_require__(256); - -var validateGenerator = __webpack_require__(257); - -/** - * Functions below are used inside compiled validations function - */ - -var ucs2length = util.ucs2length; -var equal = __webpack_require__(177); - -// this error is thrown by async schemas to return validation errors via exception -var ValidationError = errorClasses.Validation; - -module.exports = compile; - - -/** - * Compiles schema to validation function - * @this Ajv - * @param {Object} schema schema object - * @param {Object} root object with information about the root schema for this schema - * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution - * @param {String} baseId base ID for IDs in the schema - * @return {Function} validation function - */ -function compile(schema, root, localRefs, baseId) { - /* jshint validthis: true, evil: true */ - /* eslint no-shadow: 0 */ - var self = this - , opts = this._opts - , refVal = [ undefined ] - , refs = {} - , patterns = [] - , patternsHash = {} - , defaults = [] - , defaultsHash = {} - , customRules = []; - - root = root || { schema: schema, refVal: refVal, refs: refs }; - - var c = checkCompiling.call(this, schema, root, baseId); - var compilation = this._compilations[c.index]; - if (c.compiling) return (compilation.callValidate = callValidate); - - var formats = this._formats; - var RULES = this.RULES; - - try { - var v = localCompile(schema, root, localRefs, baseId); - compilation.validate = v; - var cv = compilation.callValidate; - if (cv) { - cv.schema = v.schema; - cv.errors = null; - cv.refs = v.refs; - cv.refVal = v.refVal; - cv.root = v.root; - cv.$async = v.$async; - if (opts.sourceCode) cv.source = v.source; - } - return v; - } finally { - endCompiling.call(this, schema, root, baseId); - } - - /* @this {*} - custom context, see passContext option */ - function callValidate() { - /* jshint validthis: true */ - var validate = compilation.validate; - var result = validate.apply(this, arguments); - callValidate.errors = validate.errors; - return result; - } - - function localCompile(_schema, _root, localRefs, baseId) { - var isRoot = !_root || (_root && _root.schema == _schema); - if (_root.schema != root.schema) - return compile.call(self, _schema, _root, localRefs, baseId); - - var $async = _schema.$async === true; - - var sourceCode = validateGenerator({ - isTop: true, - schema: _schema, - isRoot: isRoot, - baseId: baseId, - root: _root, - schemaPath: '', - errSchemaPath: '#', - errorPath: '""', - MissingRefError: errorClasses.MissingRef, - RULES: RULES, - validate: validateGenerator, - util: util, - resolve: resolve, - resolveRef: resolveRef, - usePattern: usePattern, - useDefault: useDefault, - useCustomRule: useCustomRule, - opts: opts, - formats: formats, - logger: self.logger, - self: self - }); - - sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) - + vars(defaults, defaultCode) + vars(customRules, customRuleCode) - + sourceCode; - - if (opts.processCode) sourceCode = opts.processCode(sourceCode); - // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); - var validate; - try { - var makeValidate = new Function( - 'self', - 'RULES', - 'formats', - 'root', - 'refVal', - 'defaults', - 'customRules', - 'equal', - 'ucs2length', - 'ValidationError', - sourceCode - ); - - validate = makeValidate( - self, - RULES, - formats, - root, - refVal, - defaults, - customRules, - equal, - ucs2length, - ValidationError - ); - - refVal[0] = validate; - } catch(e) { - self.logger.error('Error compiling schema, function code:', sourceCode); - throw e; - } - - validate.schema = _schema; - validate.errors = null; - validate.refs = refs; - validate.refVal = refVal; - validate.root = isRoot ? validate : _root; - if ($async) validate.$async = true; - if (opts.sourceCode === true) { - validate.source = { - code: sourceCode, - patterns: patterns, - defaults: defaults - }; - } - - return validate; - } - - function resolveRef(baseId, ref, isRoot) { - ref = resolve.url(baseId, ref); - var refIndex = refs[ref]; - var _refVal, refCode; - if (refIndex !== undefined) { - _refVal = refVal[refIndex]; - refCode = 'refVal[' + refIndex + ']'; - return resolvedRef(_refVal, refCode); - } - if (!isRoot && root.refs) { - var rootRefId = root.refs[ref]; - if (rootRefId !== undefined) { - _refVal = root.refVal[rootRefId]; - refCode = addLocalRef(ref, _refVal); - return resolvedRef(_refVal, refCode); - } - } - - refCode = addLocalRef(ref); - var v = resolve.call(self, localCompile, root, ref); - if (v === undefined) { - var localSchema = localRefs && localRefs[ref]; - if (localSchema) { - v = resolve.inlineRef(localSchema, opts.inlineRefs) - ? localSchema - : compile.call(self, localSchema, root, localRefs, baseId); - } - } - - if (v === undefined) { - removeLocalRef(ref); - } else { - replaceLocalRef(ref, v); - return resolvedRef(v, refCode); - } - } - - function addLocalRef(ref, v) { - var refId = refVal.length; - refVal[refId] = v; - refs[ref] = refId; - return 'refVal' + refId; - } - - function removeLocalRef(ref) { - delete refs[ref]; - } - - function replaceLocalRef(ref, v) { - var refId = refs[ref]; - refVal[refId] = v; - } - - function resolvedRef(refVal, code) { - return typeof refVal == 'object' || typeof refVal == 'boolean' - ? { code: code, schema: refVal, inline: true } - : { code: code, $async: refVal && !!refVal.$async }; - } - - function usePattern(regexStr) { - var index = patternsHash[regexStr]; - if (index === undefined) { - index = patternsHash[regexStr] = patterns.length; - patterns[index] = regexStr; - } - return 'pattern' + index; - } - - function useDefault(value) { - switch (typeof value) { - case 'boolean': - case 'number': - return '' + value; - case 'string': - return util.toQuotedString(value); - case 'object': - if (value === null) return 'null'; - var valueStr = stableStringify(value); - var index = defaultsHash[valueStr]; - if (index === undefined) { - index = defaultsHash[valueStr] = defaults.length; - defaults[index] = value; - } - return 'default' + index; - } - } - - function useCustomRule(rule, schema, parentSchema, it) { - if (self._opts.validateSchema !== false) { - var deps = rule.definition.dependencies; - if (deps && !deps.every(function(keyword) { - return Object.prototype.hasOwnProperty.call(parentSchema, keyword); - })) - throw new Error('parent schema must have all required keywords: ' + deps.join(',')); - - var validateSchema = rule.definition.validateSchema; - if (validateSchema) { - var valid = validateSchema(schema); - if (!valid) { - var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); - if (self._opts.validateSchema == 'log') self.logger.error(message); - else throw new Error(message); - } - } - } - - var compile = rule.definition.compile - , inline = rule.definition.inline - , macro = rule.definition.macro; - - var validate; - if (compile) { - validate = compile.call(self, schema, parentSchema, it); - } else if (macro) { - validate = macro.call(self, schema, parentSchema, it); - if (opts.validateSchema !== false) self.validateSchema(validate, true); - } else if (inline) { - validate = inline.call(self, it, rule.keyword, schema, parentSchema); - } else { - validate = rule.definition.validate; - if (!validate) return; - } - - if (validate === undefined) - throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); - - var index = customRules.length; - customRules[index] = validate; - - return { - code: 'customRule' + index, - validate: validate - }; - } -} - - -/** - * Checks if the schema is currently compiled - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) - */ -function checkCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var index = compIndex.call(this, schema, root, baseId); - if (index >= 0) return { index: index, compiling: true }; - index = this._compilations.length; - this._compilations[index] = { - schema: schema, - root: root, - baseId: baseId - }; - return { index: index, compiling: false }; -} - - -/** - * Removes the schema from the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - */ -function endCompiling(schema, root, baseId) { - /* jshint validthis: true */ - var i = compIndex.call(this, schema, root, baseId); - if (i >= 0) this._compilations.splice(i, 1); -} - - -/** - * Index of schema compilation in the currently compiled list - * @this Ajv - * @param {Object} schema schema to compile - * @param {Object} root root object - * @param {String} baseId base schema ID - * @return {Integer} compilation index - */ -function compIndex(schema, root, baseId) { - /* jshint validthis: true */ - for (var i=0; i 1) { - sets[0] = sets[0].slice(0, -1); - var xl = sets.length - 1; - for (var x = 1; x < xl; ++x) { - sets[x] = sets[x].slice(1, -1); - } - sets[xl] = sets[xl].slice(1); - return sets.join(''); - } else { - return sets[0]; - } -} -function subexp(str) { - return "(?:" + str + ")"; -} -function typeOf(o) { - return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); -} -function toUpperCase(str) { - return str.toUpperCase(); -} -function toArray(obj) { - return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; -} -function assign(target, source) { - var obj = target; - if (source) { - for (var key in source) { - obj[key] = source[key]; - } - } - return obj; -} - -function buildExps(isIRI) { - var ALPHA$$ = "[A-Za-z]", - CR$ = "[\\x0D]", - DIGIT$$ = "[0-9]", - DQUOTE$$ = "[\\x22]", - HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), - //case-insensitive - LF$$ = "[\\x0A]", - SP$$ = "[\\x20]", - PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), - //expanded - GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", - SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", - RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), - UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", - //subset, excludes bidi control characters - IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", - //subset - UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), - SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), - USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), - DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), - DEC_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 - IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), - H16$ = subexp(HEXDIG$$ + "{1,4}"), - LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), - IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), - // 6( h16 ":" ) ls32 - IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), - // "::" 5( h16 ":" ) ls32 - IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), - //[ h16 ] "::" 4( h16 ":" ) ls32 - IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), - //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 - IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), - //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 - IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), - //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 - IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), - //[ *4( h16 ":" ) h16 ] "::" ls32 - IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), - //[ *5( h16 ":" ) h16 ] "::" h16 - IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), - //[ *6( h16 ":" ) h16 ] "::" - IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), - ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), - //RFC 6874 - IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), - //RFC 6874 - IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), - //RFC 6874, with relaxed parsing rules - IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), - IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), - //RFC 6874 - REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), - HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), - PORT$ = subexp(DIGIT$$ + "*"), - AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), - PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), - SEGMENT$ = subexp(PCHAR$ + "*"), - SEGMENT_NZ$ = subexp(PCHAR$ + "+"), - SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), - PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), - PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), - //simplified - PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), - //simplified - PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), - //simplified - PATH_EMPTY$ = "(?!" + PCHAR$ + ")", - PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), - FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), - HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), - URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), - RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), - URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), - ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), - GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", - SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", - AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; - return { - NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), - NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), - NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), - NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), - ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), - UNRESERVED: new RegExp(UNRESERVED$$, "g"), - OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), - PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), - IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), - IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules - }; -} -var URI_PROTOCOL = buildExps(false); - -var IRI_PROTOCOL = buildExps(true); - -var slicedToArray = function () { - function sliceIterator(arr, i) { - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"]) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - return function (arr, i) { - if (Array.isArray(arr)) { - return arr; - } else if (Symbol.iterator in Object(arr)) { - return sliceIterator(arr, i); - } else { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - }; -}(); - - - - - - - - - - - - - -var toConsumableArray = function (arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } else { - return Array.from(arr); - } -}; - -/** Highest positive signed 32-bit float value */ - -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter = '-'; // '\x2D' - -/** Regular expressions */ -var regexPunycode = /^xn--/; -var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error$1(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var result = []; - var length = array.length; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = []; - var counter = 0; - var length = string.length; - while (counter < length) { - var value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // It's a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // Low surrogate. - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // It's an unmatched surrogate; only append this code unit, in case the - // next code unit is the high surrogate of a surrogate pair. - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ -var ucs2encode = function ucs2encode(array) { - return String.fromCodePoint.apply(String, toConsumableArray(array)); -}; - -/** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ -var basicToDigit = function basicToDigit(codePoint) { - if (codePoint - 0x30 < 0x0A) { - return codePoint - 0x16; - } - if (codePoint - 0x41 < 0x1A) { - return codePoint - 0x41; - } - if (codePoint - 0x61 < 0x1A) { - return codePoint - 0x61; - } - return base; -}; - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -var digitToBasic = function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -}; - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -var adapt = function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -}; - -/** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ -var decode = function decode(input) { - // Don't use UCS-2. - var output = []; - var inputLength = input.length; - var i = 0; - var n = initialN; - var bias = initialBias; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - var basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (var j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error$1('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - var oldi = i; - for (var w = 1, k = base;; /* no condition */k += base) { - - if (index >= inputLength) { - error$1('invalid-input'); - } - - var digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error$1('overflow'); - } - - i += digit * w; - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - - if (digit < t) { - break; - } - - var baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error$1('overflow'); - } - - w *= baseMinusT; - } - - var out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error$1('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output. - output.splice(i++, 0, n); - } - - return String.fromCodePoint.apply(String, output); -}; - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -var encode = function encode(input) { - var output = []; - - // Convert the input in UCS-2 to an array of Unicode code points. - input = ucs2decode(input); - - // Cache the length. - var inputLength = input.length; - - // Initialize the state. - var n = initialN; - var delta = 0; - var bias = initialBias; - - // Handle the basic code points. - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _currentValue2 = _step.value; - - if (_currentValue2 < 0x80) { - output.push(stringFromCharCode(_currentValue2)); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var basicLength = output.length; - var handledCPCount = basicLength; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string with a delimiter unless it's empty. - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - var m = maxInt; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var currentValue = _step2.value; - - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow. - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error$1('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var _currentValue = _step3.value; - - if (_currentValue < n && ++delta > maxInt) { - error$1('overflow'); - } - if (_currentValue == n) { - // Represent delta as a generalized variable-length integer. - var q = delta; - for (var k = base;; /* no condition */k += base) { - var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; - if (q < t) { - break; - } - var qMinusT = q - t; - var baseMinusT = base - t; - output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - ++delta; - ++n; - } - return output.join(''); -}; - -/** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ -var toUnicode = function toUnicode(input) { - return mapDomain(input, function (string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); -}; - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -var toASCII = function toASCII(input) { - return mapDomain(input, function (string) { - return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; - }); -}; - -/*--------------------------------------------------------------------------*/ - -/** Define the public API */ -var punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '2.1.0', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode -}; - -/** - * URI.js - * - * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. - * @author Gary Court - * @see http://github.com/garycourt/uri-js - */ -/** - * Copyright 2011 Gary Court. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are - * permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, this list - * of conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those of the - * authors and should not be interpreted as representing official policies, either expressed - * or implied, of Gary Court. - */ -var SCHEMES = {}; -function pctEncChar(chr) { - var c = chr.charCodeAt(0); - var e = void 0; - if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); - return e; -} -function pctDecChars(str) { - var newStr = ""; - var i = 0; - var il = str.length; - while (i < il) { - var c = parseInt(str.substr(i + 1, 2), 16); - if (c < 128) { - newStr += String.fromCharCode(c); - i += 3; - } else if (c >= 194 && c < 224) { - if (il - i >= 6) { - var c2 = parseInt(str.substr(i + 4, 2), 16); - newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); - } else { - newStr += str.substr(i, 6); - } - i += 6; - } else if (c >= 224) { - if (il - i >= 9) { - var _c = parseInt(str.substr(i + 4, 2), 16); - var c3 = parseInt(str.substr(i + 7, 2), 16); - newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); - } else { - newStr += str.substr(i, 9); - } - i += 9; - } else { - newStr += str.substr(i, 3); - i += 3; - } - } - return newStr; -} -function _normalizeComponentEncoding(components, protocol) { - function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(protocol.UNRESERVED) ? str : decStr; - } - if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); - if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (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); - if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); - return components; -} - -function _stripLeadingZeros(str) { - return str.replace(/^0*(.*)/, "$1") || "0"; -} -function _normalizeIPv4(host, protocol) { - var matches = host.match(protocol.IPV4ADDRESS) || []; - - var _matches = slicedToArray(matches, 2), - address = _matches[1]; - - if (address) { - return address.split(".").map(_stripLeadingZeros).join("."); - } else { - return host; - } -} -function _normalizeIPv6(host, protocol) { - var matches = host.match(protocol.IPV6ADDRESS) || []; - - var _matches2 = slicedToArray(matches, 3), - address = _matches2[1], - zone = _matches2[2]; - - if (address) { - var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), - _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), - last = _address$toLowerCase$2[0], - first = _address$toLowerCase$2[1]; - - var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; - var lastFields = last.split(":").map(_stripLeadingZeros); - var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); - var fieldCount = isLastFieldIPv4Address ? 7 : 8; - var lastFieldsStart = lastFields.length - fieldCount; - var fields = Array(fieldCount); - for (var x = 0; x < fieldCount; ++x) { - fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; - } - if (isLastFieldIPv4Address) { - fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); - } - var allZeroFields = fields.reduce(function (acc, field, index) { - if (!field || field === "0") { - var lastLongest = acc[acc.length - 1]; - if (lastLongest && lastLongest.index + lastLongest.length === index) { - lastLongest.length++; - } else { - acc.push({ index: index, length: 1 }); - } - } - return acc; - }, []); - var longestZeroFields = allZeroFields.sort(function (a, b) { - return b.length - a.length; - })[0]; - var newHost = void 0; - if (longestZeroFields && longestZeroFields.length > 1) { - var newFirst = fields.slice(0, longestZeroFields.index); - var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); - newHost = newFirst.join(":") + "::" + newLast.join(":"); - } else { - newHost = fields.join(":"); - } - if (zone) { - newHost += "%" + zone; - } - return newHost; - } else { - return host; - } -} -var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; -var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; -function parse(uriString) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var components = {}; - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; - var matches = uriString.match(URI_PARSE); - if (matches) { - if (NO_MATCH_IS_UNDEFINED) { - //store each component - components.scheme = matches[1]; - components.userinfo = matches[3]; - components.host = matches[4]; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = matches[7]; - components.fragment = matches[8]; - //fix port number - if (isNaN(components.port)) { - components.port = matches[5]; - } - } else { - //IE FIX for improper RegExp matching - //store each component - components.scheme = matches[1] || undefined; - components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; - components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; - components.port = parseInt(matches[5], 10); - components.path = matches[6] || ""; - components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; - components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; - //fix port number - if (isNaN(components.port)) { - components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; - } - } - if (components.host) { - //normalize IP hosts - components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); - } - //determine reference type - if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { - components.reference = "same-document"; - } else if (components.scheme === undefined) { - components.reference = "relative"; - } else if (components.fragment === undefined) { - components.reference = "absolute"; - } else { - components.reference = "uri"; - } - //check for reference errors - if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { - components.error = components.error || "URI is not a " + options.reference + " reference."; - } - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //check if scheme can't handle IRIs - if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { - //if host component is a domain name - if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { - //convert Unicode IDN -> ASCII IDN - try { - components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; - } - } - //convert IRI -> URI - _normalizeComponentEncoding(components, URI_PROTOCOL); - } else { - //normalize encodings - _normalizeComponentEncoding(components, protocol); - } - //perform scheme specific parsing - if (schemeHandler && schemeHandler.parse) { - schemeHandler.parse(components, options); - } - } else { - components.error = components.error || "URI can not be parsed."; - } - return components; -} - -function _recomposeAuthority(components, options) { - var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - if (components.userinfo !== undefined) { - uriTokens.push(components.userinfo); - uriTokens.push("@"); - } - if (components.host !== undefined) { - //normalize IP hosts, add brackets and escape zone separator for IPv6 - uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { - return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; - })); - } - if (typeof components.port === "number") { - uriTokens.push(":"); - uriTokens.push(components.port.toString(10)); - } - return uriTokens.length ? uriTokens.join("") : undefined; -} - -var RDS1 = /^\.\.?\//; -var RDS2 = /^\/\.(\/|$)/; -var RDS3 = /^\/\.\.(\/|$)/; -var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; -function removeDotSegments(input) { - var output = []; - while (input.length) { - if (input.match(RDS1)) { - input = input.replace(RDS1, ""); - } else if (input.match(RDS2)) { - input = input.replace(RDS2, "/"); - } else if (input.match(RDS3)) { - input = input.replace(RDS3, "/"); - output.pop(); - } else if (input === "." || input === "..") { - input = ""; - } else { - var im = input.match(RDS5); - if (im) { - var s = im[0]; - input = input.slice(s.length); - output.push(s); - } else { - throw new Error("Unexpected dot segment condition"); - } - } - } - return output.join(""); -} - -function serialize(components) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; - var uriTokens = []; - //find scheme handler - var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; - //perform scheme specific serialization - if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); - if (components.host) { - //if host component is an IPv6 address - if (protocol.IPV6ADDRESS.test(components.host)) {} - //TODO: normalize IPv6 address as per RFC 5952 - - //if host component is a domain name - else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { - //convert IDN via punycode - try { - components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); - } catch (e) { - components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - } - } - //normalize encoding - _normalizeComponentEncoding(components, protocol); - if (options.reference !== "suffix" && components.scheme) { - uriTokens.push(components.scheme); - uriTokens.push(":"); - } - var authority = _recomposeAuthority(components, options); - if (authority !== undefined) { - if (options.reference !== "suffix") { - uriTokens.push("//"); - } - uriTokens.push(authority); - if (components.path && components.path.charAt(0) !== "/") { - uriTokens.push("/"); - } - } - if (components.path !== undefined) { - var s = components.path; - if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { - s = removeDotSegments(s); - } - if (authority === undefined) { - s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" - } - uriTokens.push(s); - } - if (components.query !== undefined) { - uriTokens.push("?"); - uriTokens.push(components.query); - } - if (components.fragment !== undefined) { - uriTokens.push("#"); - uriTokens.push(components.fragment); - } - return uriTokens.join(""); //merge tokens into a string -} - -function resolveComponents(base, relative) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var skipNormalization = arguments[3]; - - var target = {}; - if (!skipNormalization) { - base = parse(serialize(base, options), options); //normalize base components - relative = parse(serialize(relative, options), options); //normalize relative components - } - options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { - //target.authority = relative.authority; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; - } else { - if (!relative.path) { - target.path = base.path; - if (relative.query !== undefined) { - target.query = relative.query; - } else { - target.query = base.query; - } - } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); - } else { - if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { - target.path = "/" + relative.path; - } else if (!base.path) { - target.path = relative.path; - } else { - target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; - } - target.path = removeDotSegments(target.path); - } - target.query = relative.query; - } - //target.authority = base.authority; - target.userinfo = base.userinfo; - target.host = base.host; - target.port = base.port; - } - target.scheme = base.scheme; - } - target.fragment = relative.fragment; - return target; -} - -function resolve(baseURI, relativeURI, options) { - var schemelessOptions = assign({ scheme: 'null' }, options); - return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); -} - -function normalize(uri, options) { - if (typeof uri === "string") { - uri = serialize(parse(uri, options), options); - } else if (typeOf(uri) === "object") { - uri = parse(serialize(uri, options), options); - } - return uri; -} - -function equal(uriA, uriB, options) { - if (typeof uriA === "string") { - uriA = serialize(parse(uriA, options), options); - } else if (typeOf(uriA) === "object") { - uriA = serialize(uriA, options); - } - if (typeof uriB === "string") { - uriB = serialize(parse(uriB, options), options); - } else if (typeOf(uriB) === "object") { - uriB = serialize(uriB, options); - } - return uriA === uriB; -} - -function escapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); -} - -function unescapeComponent(str, options) { - return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); -} - -var handler = { - scheme: "http", - domainHost: true, - parse: function parse(components, options) { - //report missing host - if (!components.host) { - components.error = components.error || "HTTP URIs must have a host."; - } - return components; - }, - serialize: function serialize(components, options) { - //normalize the default port - if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") { - components.port = undefined; - } - //normalize the empty path - if (!components.path) { - components.path = "/"; - } - //NOTE: We do not parse query strings for HTTP URIs - //as WWW Form Url Encoded query strings are part of the HTML4+ spec, - //and not the HTTP spec. - return components; - } -}; - -var handler$1 = { - scheme: "https", - domainHost: handler.domainHost, - parse: handler.parse, - serialize: handler.serialize -}; - -var O = {}; -var isIRI = true; -//RFC 3986 -var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; -var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive -var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded -//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = -//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) -//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext -//const VCHAR$$ = "[\\x21-\\x7E]"; -//const WSP$$ = "[\\x20\\x09]"; -//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext -//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); -//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); -//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); -var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; -var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; -var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); -var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; -var UNRESERVED = new RegExp(UNRESERVED$$, "g"); -var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); -var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); -var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); -var NOT_HFVALUE = NOT_HFNAME; -function decodeUnreserved(str) { - var decStr = pctDecChars(str); - return !decStr.match(UNRESERVED) ? str : decStr; -} -var handler$2 = { - scheme: "mailto", - parse: function parse$$1(components, options) { - var mailtoComponents = components; - var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; - mailtoComponents.path = undefined; - if (mailtoComponents.query) { - var unknownHeaders = false; - var headers = {}; - var hfields = mailtoComponents.query.split("&"); - for (var x = 0, xl = hfields.length; x < xl; ++x) { - var hfield = hfields[x].split("="); - switch (hfield[0]) { - case "to": - var toAddrs = hfield[1].split(","); - for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { - to.push(toAddrs[_x]); - } - break; - case "subject": - mailtoComponents.subject = unescapeComponent(hfield[1], options); - break; - case "body": - mailtoComponents.body = unescapeComponent(hfield[1], options); - break; - default: - unknownHeaders = true; - headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); - break; - } - } - if (unknownHeaders) mailtoComponents.headers = headers; - } - mailtoComponents.query = undefined; - for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { - var addr = to[_x2].split("@"); - addr[0] = unescapeComponent(addr[0]); - if (!options.unicodeSupport) { - //convert Unicode IDN -> ASCII IDN - try { - addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); - } catch (e) { - mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; - } - } else { - addr[1] = unescapeComponent(addr[1], options).toLowerCase(); - } - to[_x2] = addr.join("@"); - } - return mailtoComponents; - }, - serialize: function serialize$$1(mailtoComponents, options) { - var components = mailtoComponents; - var to = toArray(mailtoComponents.to); - if (to) { - for (var x = 0, xl = to.length; x < xl; ++x) { - var toAddr = String(to[x]); - var atIdx = toAddr.lastIndexOf("@"); - var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); - var domain = toAddr.slice(atIdx + 1); - //convert IDN via punycode - try { - domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); - } catch (e) { - components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; - } - to[x] = localPart + "@" + domain; - } - components.path = to.join(","); - } - var headers = mailtoComponents.headers = mailtoComponents.headers || {}; - if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; - if (mailtoComponents.body) headers["body"] = mailtoComponents.body; - var fields = []; - for (var name in headers) { - if (headers[name] !== O[name]) { - fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); - } - } - if (fields.length) { - components.query = fields.join("&"); - } - return components; - } -}; - -var URN_PARSE = /^([^\:]+)\:(.*)/; -//RFC 2141 -var handler$3 = { - scheme: "urn", - parse: function parse$$1(components, options) { - var matches = components.path && components.path.match(URN_PARSE); - var urnComponents = components; - if (matches) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = matches[1].toLowerCase(); - var nss = matches[2]; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - urnComponents.nid = nid; - urnComponents.nss = nss; - urnComponents.path = undefined; - if (schemeHandler) { - urnComponents = schemeHandler.parse(urnComponents, options); - } - } else { - urnComponents.error = urnComponents.error || "URN can not be parsed."; - } - return urnComponents; - }, - serialize: function serialize$$1(urnComponents, options) { - var scheme = options.scheme || urnComponents.scheme || "urn"; - var nid = urnComponents.nid; - var urnScheme = scheme + ":" + (options.nid || nid); - var schemeHandler = SCHEMES[urnScheme]; - if (schemeHandler) { - urnComponents = schemeHandler.serialize(urnComponents, options); - } - var uriComponents = urnComponents; - var nss = urnComponents.nss; - uriComponents.path = (nid || options.nid) + ":" + nss; - return uriComponents; - } -}; - -var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; -//RFC 4122 -var handler$4 = { - scheme: "urn:uuid", - parse: function parse(urnComponents, options) { - var uuidComponents = urnComponents; - uuidComponents.uuid = uuidComponents.nss; - uuidComponents.nss = undefined; - if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { - uuidComponents.error = uuidComponents.error || "UUID is not valid."; - } - return uuidComponents; - }, - serialize: function serialize(uuidComponents, options) { - var urnComponents = uuidComponents; - //normalize UUID - urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); - return urnComponents; - } -}; - -SCHEMES[handler.scheme] = handler; -SCHEMES[handler$1.scheme] = handler$1; -SCHEMES[handler$2.scheme] = handler$2; -SCHEMES[handler$3.scheme] = handler$3; -SCHEMES[handler$4.scheme] = handler$4; - -exports.SCHEMES = SCHEMES; -exports.pctEncChar = pctEncChar; -exports.pctDecChars = pctDecChars; -exports.parse = parse; -exports.removeDotSegments = removeDotSegments; -exports.serialize = serialize; -exports.resolveComponents = resolveComponents; -exports.resolve = resolve; -exports.normalize = normalize; -exports.equal = equal; -exports.escapeComponent = escapeComponent; -exports.unescapeComponent = unescapeComponent; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); -//# sourceMappingURL=uri.all.js.map - - -/***/ }), -/* 475 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// https://mathiasbynens.be/notes/javascript-encoding -// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode -module.exports = function ucs2length(str) { - var length = 0 - , len = str.length - , pos = 0 - , value; - while (pos < len) { - length++; - value = str.charCodeAt(pos++); - if (value >= 0xD800 && value <= 0xDBFF && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate - } - } - return length; -}; - - -/***/ }), -/* 476 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var traverse = module.exports = function (schema, opts, cb) { - // Legacy support for v0.3.1 and earlier. - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - - cb = opts.cb || cb; - var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; - var post = cb.post || function() {}; - - _traverse(opts, pre, post, schema, '', schema); -}; - - -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true -}; - -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; - -traverse.propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; - -traverse.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; - - -function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i%\\^`{|}]|%[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; -// For the source: https://gist.github.com/dperini/729294 -// For test cases: https://mathiasbynens.be/demo/url-regex -// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. -// 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; -var 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; -var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; -var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; -var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; -var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; - - -module.exports = formats; - -function formats(mode) { - mode = mode == 'full' ? 'full' : 'fast'; - return util.copy(formats[mode]); -} - - -formats.fast = { - // date: http://tools.ietf.org/html/rfc3339#section-5.6 - date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, - // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 - time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, - '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, - // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i, - 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, - 'uri-template': URITEMPLATE, - url: URL, - // email (sources from jsen validator): - // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 - // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - 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, - hostname: HOSTNAME, - // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses - 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, - regex: regex, - // uuid: http://tools.ietf.org/html/rfc4122 - uuid: UUID, - // JSON-pointer: https://tools.ietf.org/html/rfc6901 - // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -formats.full = { - date: date, - time: time, - 'date-time': date_time, - uri: uri, - 'uri-reference': URIREF, - 'uri-template': URITEMPLATE, - url: URL, - 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, - hostname: HOSTNAME, - ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, - 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, - regex: regex, - uuid: UUID, - 'json-pointer': JSON_POINTER, - 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, - 'relative-json-pointer': RELATIVE_JSON_POINTER -}; - - -function isLeapYear(year) { - // https://tools.ietf.org/html/rfc3339#appendix-C - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - - -function date(str) { - // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 - var matches = str.match(DATE); - if (!matches) return false; - - var year = +matches[1]; - var month = +matches[2]; - var day = +matches[3]; - - return month >= 1 && month <= 12 && day >= 1 && - day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); -} - - -function time(str, full) { - var matches = str.match(TIME); - if (!matches) return false; - - var hour = matches[1]; - var minute = matches[2]; - var second = matches[3]; - var timeZone = matches[5]; - return ((hour <= 23 && minute <= 59 && second <= 59) || - (hour == 23 && minute == 59 && second == 60)) && - (!full || timeZone); -} - - -var DATE_TIME_SEPARATOR = /t|\s/i; -function date_time(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); -} - - -var NOT_URI_FRAGMENT = /\/|:/; -function uri(str) { - // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." - return NOT_URI_FRAGMENT.test(str) && URI.test(str); -} - - -var Z_ANCHOR = /[^\\]\\Z/; -function regex(str) { - if (Z_ANCHOR.test(str)) return false; - try { - new RegExp(str); - return true; - } catch(e) { - return false; - } -} - - -/***/ }), -/* 479 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var ruleModules = __webpack_require__(480) - , toHash = __webpack_require__(81).toHash; - -module.exports = function rules() { - var RULES = [ - { type: 'number', - rules: [ { 'maximum': ['exclusiveMaximum'] }, - { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] }, - { type: 'string', - rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] }, - { type: 'array', - rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] }, - { type: 'object', - rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames', - { 'properties': ['additionalProperties', 'patternProperties'] } ] }, - { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] } - ]; - - var ALL = [ 'type', '$comment' ]; - var KEYWORDS = [ - '$schema', '$id', 'id', '$data', '$async', 'title', - 'description', 'default', 'definitions', - 'examples', 'readOnly', 'writeOnly', - 'contentMediaType', 'contentEncoding', - 'additionalItems', 'then', 'else' - ]; - var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ]; - RULES.all = toHash(ALL); - RULES.types = toHash(TYPES); - - RULES.forEach(function (group) { - group.rules = group.rules.map(function (keyword) { - var implKeywords; - if (typeof keyword == 'object') { - var key = Object.keys(keyword)[0]; - implKeywords = keyword[key]; - keyword = key; - implKeywords.forEach(function (k) { - ALL.push(k); - RULES.all[k] = true; - }); - } - ALL.push(keyword); - var rule = RULES.all[keyword] = { - keyword: keyword, - code: ruleModules[keyword], - implements: implKeywords - }; - return rule; - }); - - RULES.all.$comment = { - keyword: '$comment', - code: ruleModules.$comment - }; - - if (group.type) RULES.types[group.type] = group; - }); - - RULES.keywords = toHash(ALL.concat(KEYWORDS)); - RULES.custom = {}; - - return RULES; -}; - - -/***/ }), -/* 480 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -//all requires must be explicit because browserify won't work with dynamic requires -module.exports = { - '$ref': __webpack_require__(481), - allOf: __webpack_require__(482), - anyOf: __webpack_require__(483), - '$comment': __webpack_require__(484), - const: __webpack_require__(485), - contains: __webpack_require__(486), - dependencies: __webpack_require__(487), - 'enum': __webpack_require__(488), - format: __webpack_require__(489), - 'if': __webpack_require__(490), - items: __webpack_require__(491), - maximum: __webpack_require__(258), - minimum: __webpack_require__(258), - maxItems: __webpack_require__(259), - minItems: __webpack_require__(259), - maxLength: __webpack_require__(260), - minLength: __webpack_require__(260), - maxProperties: __webpack_require__(261), - minProperties: __webpack_require__(261), - multipleOf: __webpack_require__(492), - not: __webpack_require__(493), - oneOf: __webpack_require__(494), - pattern: __webpack_require__(495), - properties: __webpack_require__(496), - propertyNames: __webpack_require__(497), - required: __webpack_require__(498), - uniqueItems: __webpack_require__(499), - validate: __webpack_require__(257) -}; - - -/***/ }), -/* 481 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_ref(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $async, $refCode; - if ($schema == '#' || $schema == '#/') { - if (it.isRoot) { - $async = it.async; - $refCode = 'validate'; - } else { - $async = it.root.schema.$async === true; - $refCode = 'root.refVal[0]'; - } - } else { - var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot); - if ($refVal === undefined) { - var $message = it.MissingRefError.message(it.baseId, $schema); - if (it.opts.missingRefs == 'fail') { - it.logger.error($message); - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' '; - } - if (it.opts.verbose) { - out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - if ($breakOnError) { - out += ' if (false) { '; - } - } else if (it.opts.missingRefs == 'ignore') { - it.logger.warn($message); - if ($breakOnError) { - out += ' if (true) { '; - } - } else { - throw new it.MissingRefError(it.baseId, $schema, $message); - } - } else if ($refVal.inline) { - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - $it.schema = $refVal.schema; - $it.schemaPath = ''; - $it.errSchemaPath = $schema; - var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code); - out += ' ' + ($code) + ' '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - } - } else { - $async = $refVal.$async === true || (it.async && $refVal.$async !== false); - $refCode = $refVal.code; - } - } - if ($refCode) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; - if (it.opts.passContext) { - out += ' ' + ($refCode) + '.call(this, '; - } else { - out += ' ' + ($refCode) + '( '; - } - out += ' ' + ($data) + ', (dataPath || \'\')'; - if (it.errorPath != '""') { - out += ' + ' + (it.errorPath); - } - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) '; - var __callValidate = out; - out = $$outStack.pop(); - if ($async) { - if (!it.async) throw new Error('async schema referenced by sync schema'); - if ($breakOnError) { - out += ' var ' + ($valid) + '; '; - } - out += ' try { await ' + (__callValidate) + '; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = true; '; - } - out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; '; - if ($breakOnError) { - out += ' ' + ($valid) + ' = false; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($valid) + ') { '; - } - } else { - out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } '; - if ($breakOnError) { - out += ' else { '; - } - } - } - return out; -} - - -/***/ }), -/* 482 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_allOf(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $allSchemasEmpty = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $allSchemasEmpty = false; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if ($breakOnError) { - if ($allSchemasEmpty) { - out += ' if (true) { '; - } else { - out += ' ' + ($closingBraces.slice(0, -1)) + ' '; - } - } - out = it.util.cleanUpCode(out); - return out; -} - - -/***/ }), -/* 483 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_anyOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $noEmptySchema = $schema.every(function($sch) { - return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all)); - }); - if ($noEmptySchema) { - var $currentBaseId = $it.baseId; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; - $closingBraces += '}'; - } - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should match some schema in anyOf\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; - } - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } - } - return out; -} - - -/***/ }), -/* 484 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_comment(it, $keyword, $ruleType) { - var out = ' '; - var $schema = it.schema[$keyword]; - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $comment = it.util.toQuotedString($schema); - if (it.opts.$comment === true) { - out += ' console.log(' + ($comment) + ');'; - } else if (typeof it.opts.$comment == 'function') { - out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; - } - return out; -} - - -/***/ }), -/* 485 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_const(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (!$isData) { - out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to constant\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 486 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_contains(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId, - $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all)); - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($nonEmptySchema) { - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' if (' + ($nextValid) + ') break; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; - } else { - out += ' if (' + ($data) + '.length == 0) {'; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should contain a valid item\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - if ($nonEmptySchema) { - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - } - if (it.opts.allErrors) { - out += ' } '; - } - out = it.util.cleanUpCode(out); - return out; -} - - -/***/ }), -/* 487 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_dependencies(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $schemaDeps = {}, - $propertyDeps = {}, - $ownProperties = it.opts.ownProperties; - for ($property in $schema) { - var $sch = $schema[$property]; - var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; - $deps[$property] = $sch; - } - out += 'var ' + ($errs) + ' = errors;'; - var $currentErrorPath = it.errorPath; - out += 'var missing' + ($lvl) + ';'; - for (var $property in $propertyDeps) { - $deps = $propertyDeps[$property]; - if ($deps.length) { - out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - if ($breakOnError) { - out += ' && ( '; - var arr1 = $deps; - if (arr1) { - var $propertyKey, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $propertyKey = arr1[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ')) { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - 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(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - out += ' ) { '; - var arr2 = $deps; - if (arr2) { - var $propertyKey, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $propertyKey = arr2[i2 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - 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(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } - } - } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - } - it.errorPath = $currentErrorPath; - var $currentBaseId = $it.baseId; - for (var $property in $schemaDeps) { - var $sch = $schemaDeps[$property]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; - } - out += ') { '; - $it.schema = $sch; - $it.schemaPath = $schemaPath + it.util.getProperty($property); - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; - } - out = it.util.cleanUpCode(out); - return out; -} - - -/***/ }), -/* 488 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_enum(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $i = 'i' + $lvl, - $vSchema = 'schema' + $lvl; - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; - } - out += 'var ' + ($valid) + ';'; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be equal to one of the allowed values\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 489 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_format(it, $keyword, $ruleType) { +module.exports = function generate_properties(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -27845,266 +24684,335 @@ module.exports = function generate_format(it, $keyword, $ruleType) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - if (it.opts.format === false) { - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; } - var $unknownFormats = it.opts.unknownFormats, - $allowUnknown = Array.isArray($unknownFormats); - if ($isData) { - var $format = 'format' + $lvl, - $isObject = 'isObject' + $lvl, - $formatType = 'formatType' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; - if (it.async) { - out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; - } - out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; - } - out += ' ('; - if ($unknownFormats != 'ignore') { - out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; - if ($allowUnknown) { - out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; - } - out += ') || '; - } - out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; - if (it.async) { - out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; } else { - out += ' ' + ($format) + '(' + ($data) + ') '; + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } - out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; - } else { - var $format = it.formats[$schema]; - if (!$format) { - if ($unknownFormats == 'ignore') { - it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($breakOnError) { - out += ' if (true) { '; - } - return out; - } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { - if ($breakOnError) { - out += ' if (true) { '; + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } } - return out; - } else { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } - } - var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; - var $formatType = $isObject && $format.type || 'string'; - if ($isObject) { - var $async = $format.async === true; - $format = $format.validate; - } - if ($formatType != $ruleType) { - if ($breakOnError) { - out += ' if (true) { '; } - return out; - } - if ($async) { - if (!it.async) throw new Error('async format in sync schema'); - var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; - out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; - } else { - out += ' if (! '; - var $formatRef = 'formats' + it.util.getProperty($schema); - if ($isObject) $formatRef += '.validate'; - if (typeof $format == 'function') { - out += ' ' + ($formatRef) + '(' + ($data) + ') '; - } else { - out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } } - out += ') { '; + out += ' ); if (isAdditional' + ($lvl) + ') { '; } - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; - if ($isData) { - out += '' + ($schemaValue); + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match format "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + it.errorPath = $currentErrorPath; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - return out; -} - - -/***/ }), -/* 490 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -module.exports = function generate_if(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - var $thenSch = it.schema['then'], - $elseSch = it.schema['else'], - $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)), - $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)), - $currentBaseId = $it.baseId; - if ($thenPresent || $elsePresent) { - var $ifClause; - $it.createErrors = false; - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - it.compositeRule = $it.compositeRule = $wasComposite; - if ($thenPresent) { - out += ' if (' + ($nextValid) + ') { '; - $it.schema = it.schema['then']; - $it.schemaPath = it.schemaPath + '.then'; - $it.errSchemaPath = it.errSchemaPath + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'then\'; '; - } else { - $ifClause = '\'then\''; - } + if ($someProperties) { out += ' } '; - if ($elsePresent) { - out += ' else { '; - } - } else { - out += ' if (!' + ($nextValid) + ') { '; } - if ($elsePresent) { - $it.schema = it.schema['else']; - $it.schemaPath = it.schemaPath + '.else'; - $it.errSchemaPath = it.errSchemaPath + '/else'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; - if ($thenPresent && $elsePresent) { - $ifClause = 'ifClause' + $lvl; - out += ' var ' + ($ifClause) + ' = \'else\'; '; - } else { - $ifClause = '\'else\''; - } - out += ' } '; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; } - out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } } - out += ' } '; - } else { - out += ' {} '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError(vErrors); '; - } else { - out += ' validate.errors = vErrors; return false; '; + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } } } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - out = it.util.cleanUpCode(out); - } else { - if ($breakOnError) { - out += ' if (true) { '; - } } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); return out; } /***/ }), -/* 491 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_items(it, $keyword, $ruleType) { +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -28113,119 +25021,37 @@ module.exports = function generate_items(it, $keyword, $ruleType) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; var $it = it.util.copy(it); var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; - var $idx = 'i' + $lvl, - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $currentBaseId = it.baseId; - out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if (Array.isArray($schema)) { - var $additionalItems = it.schema.additionalItems; - if ($additionalItems === false) { - out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; - var $currErrSchemaPath = $errSchemaPath; - $errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; - } - if (it.opts.verbose) { - out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - $errSchemaPath = $currErrSchemaPath; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; - var $passData = $data + '[' + $i + ']'; - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); - $it.dataPathArr[$dataNxt] = $i; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } - if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) { - $it.schema = $additionalItems; - $it.schemaPath = it.schemaPath + '.additionalItems'; - $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { $it.schema = $schema; $it.schemaPath = $schemaPath; $it.errSchemaPath = $errSchemaPath; - out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); - var $passData = $data + '[' + $idx + ']'; - $it.dataPathArr[$dataNxt] = $idx; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; var $code = it.validate($it); $it.baseId = $currentBaseId; if (it.util.varOccurences($code, $nextData) < 2) { @@ -28233,10 +25059,33 @@ module.exports = function generate_items(it, $keyword, $ruleType) { } else { out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 1e-' + (it.opts.multipleOfPrecision) + ' '; - } else { - out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; - } - out += ' ) '; - if ($isData) { - out += ' ) '; - } - out += ' ) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be multiple of '; - if ($isData) { - out += '\' + ' + ($schemaValue); - } else { - out += '' + ($schemaValue) + '\''; + var $vSchema = 'schema' + $lvl; + if (!$isData) { + if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { + var $required = []; + var arr1 = $schema; + if (arr1) { + var $property, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $property = arr1[i1 += 1]; + var $propertySch = it.schema.properties[$property]; + if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } } + } else { + var $required = $schema; } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; } else { - out += '' + ($schema); + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '} '; - if ($breakOnError) { - out += ' else { '; + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; } return out; } /***/ }), -/* 493 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_not(it, $keyword, $ruleType) { +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -28345,38 +25387,54 @@ module.exports = function generate_not(it, $keyword, $ruleType) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - $it.level++; - var $nextValid = 'valid' + $it.level; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - var $allErrorsOption; - if ($it.opts.allErrors) { - $allErrorsOption = $it.opts.allErrors; - $it.opts.allErrors = false; + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; } - out += ' ' + (it.validate($it)) + ' '; - $it.createErrors = true; - if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (' + ($nextValid) + ') { '; + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; } if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } out += ' } '; } else { @@ -28394,27 +25452,13 @@ module.exports = function generate_not(it, $keyword, $ruleType) { } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; - if (it.opts.allErrors) { - out += ' } '; + out += ' } '; + if ($breakOnError) { + out += ' else { '; } } else { - out += ' var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT be valid\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if ($breakOnError) { - out += ' if (false) { '; + out += ' if (true) { '; } } return out; @@ -28422,92 +25466,318 @@ module.exports = function generate_not(it, $keyword, $ruleType) { /***/ }), -/* 494 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_oneOf(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $currentBaseId = $it.baseId, - $prevValid = 'prevValid' + $lvl, - $passingSchemas = 'passingSchemas' + $lvl; - out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var arr1 = $schema; - if (arr1) { - var $sch, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $sch = arr1[$i += 1]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = $schemaPath + '[' + $i + ']'; - $it.errSchemaPath = $errSchemaPath + '/' + $i; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } else { - out += ' var ' + ($nextValid) + ' = true; '; - } - if ($i) { - out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; - $closingBraces += '}'; + +var KEYWORDS = [ + 'multipleOf', + 'maximum', + 'exclusiveMaximum', + 'minimum', + 'exclusiveMinimum', + 'maxLength', + 'minLength', + 'pattern', + 'additionalItems', + 'maxItems', + 'minItems', + 'uniqueItems', + 'maxProperties', + 'minProperties', + 'required', + 'additionalProperties', + 'enum', + 'format', + 'const' +]; + +module.exports = function (metaSchema, keywordsJsonPointers) { + for (var i=0; i 8) { - out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; - } else { - var arr1 = $schemaKeys; - if (arr1) { - var $propertyKey, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $propertyKey = arr1[i1 += 1]; - out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; - } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - var $prop = it.util.getProperty($propertyKey), - $passData = $data + $prop, - $hasDefault = $useDefaults && $sch.default !== undefined; - $it.schema = $sch; - $it.schemaPath = $schemaPath + $prop; - $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); - $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); - $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - $code = it.util.varReplace($code, $nextData, $passData); - var $useData = $passData; - } else { - var $useData = $nextData; - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; - } - if ($hasDefault) { - out += ' ' + ($code) + ' '; - } else { - if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = false; '; - var $currentErrorPath = it.errorPath, - $currErrSchemaPath = $errSchemaPath, - $missingProperty = it.util.escapeQuotes($propertyKey); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - $errSchemaPath = it.errSchemaPath + '/required'; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - $errSchemaPath = $currErrSchemaPath; - it.errorPath = $currentErrorPath; - out += ' } else { '; - } else { - if ($breakOnError) { - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { ' + ($nextValid) + ' = true; } else { '; - } else { - out += ' if (' + ($useData) + ' !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ' ) { '; - } - } - out += ' ' + ($code) + ' } '; - } - } - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } + return out; +} + + +/***/ }), +/* 535 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var metaSchema = __webpack_require__(261); + +module.exports = { + $id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js', + definitions: { + simpleTypes: metaSchema.definitions.simpleTypes + }, + type: 'object', + dependencies: { + schema: ['validate'], + $data: ['validate'], + statements: ['inline'], + valid: {not: {required: ['macro']}} + }, + properties: { + type: metaSchema.properties.type, + schema: {type: 'boolean'}, + statements: {type: 'boolean'}, + dependencies: { + type: 'array', + items: {type: 'string'} + }, + metaSchema: {type: 'object'}, + modifying: {type: 'boolean'}, + valid: {type: 'boolean'}, + $data: {type: 'boolean'}, + async: {type: 'boolean'}, + errors: { + anyOf: [ + {type: 'boolean'}, + {const: 'full'} + ] } } - if ($pPropertyKeys.length) { - var arr4 = $pPropertyKeys; - if (arr4) { - var $pProperty, i4 = -1, - l4 = arr4.length - 1; - while (i4 < l4) { - $pProperty = arr4[i4 += 1]; - var $sch = $pProperties[$pProperty]; - if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } - } - } - } +}; + + +/***/ }), +/* 536 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"$id\":\"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#\",\"description\":\"Meta-schema for $data reference (JSON Schema extension proposal)\",\"type\":\"object\",\"required\":[\"$data\"],\"properties\":{\"$data\":{\"type\":\"string\",\"anyOf\":[{\"format\":\"relative-json-pointer\"},{\"format\":\"json-pointer\"}]}},\"additionalProperties\":false}"); + +/***/ }), +/* 537 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v16.14.0 + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var f=__webpack_require__(0),g=60103;exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");exports.Fragment=h("react.fragment")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0}; +function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q; + + +/***/ }), +/* 538 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseSlice = __webpack_require__(539); + +/** + * Casts `array` to a slice if it's needed. + * + * @private + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. + */ +function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); +} + +module.exports = castSlice; + + +/***/ }), +/* 539 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + if (start < 0) { + start = -start > length ? 0 : (length + start); } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + end = end > length ? length : end; + if (end < 0) { + end += length; } - out = it.util.cleanUpCode(out); - return out; + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; } +module.exports = baseSlice; + /***/ }), -/* 497 */ +/* 540 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIndexOf = __webpack_require__(110); + +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsEndIndex; + + +/***/ }), +/* 541 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIndexOf = __webpack_require__(110); + +/** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ +function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; + + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; +} + +module.exports = charsStartIndex; + + +/***/ }), +/* 542 */ +/***/ (function(module, exports, __webpack_require__) { + +var asciiToArray = __webpack_require__(543), + hasUnicode = __webpack_require__(544), + unicodeToArray = __webpack_require__(545); + +/** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); +} + +module.exports = stringToArray; + + +/***/ }), +/* 543 */ +/***/ (function(module, exports) { + +/** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function asciiToArray(string) { + return string.split(''); +} + +module.exports = asciiToArray; + + +/***/ }), +/* 544 */ +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsZWJ = '\\u200d'; + +/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ +var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + +/** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ +function hasUnicode(string) { + return reHasUnicode.test(string); +} + +module.exports = hasUnicode; + + +/***/ }), +/* 545 */ +/***/ (function(module, exports) { + +/** Used to compose unicode character classes. */ +var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsVarRange = '\\ufe0e\\ufe0f'; + +/** Used to compose unicode capture groups. */ +var rsAstral = '[' + rsAstralRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsZWJ = '\\u200d'; + +/** Used to compose unicode regexes. */ +var reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + +/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ +var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + +/** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ +function unicodeToArray(string) { + return string.match(reUnicode) || []; +} + +module.exports = unicodeToArray; + + +/***/ }), +/* 546 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = function generate_propertyNames(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - out += 'var ' + ($errs) + ' = errors;'; - if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) { - $it.schema = $schema; - $it.schemaPath = $schemaPath; - $it.errSchemaPath = $errSchemaPath; - var $key = 'key' + $lvl, - $idx = 'idx' + $lvl, - $i = 'i' + $lvl, - $invalidName = '\' + ' + $key + ' + \'', - $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt, - $dataProperties = 'dataProperties' + $lvl, - $ownProperties = it.opts.ownProperties, - $currentBaseId = it.baseId; - if ($ownProperties) { - out += ' var ' + ($dataProperties) + ' = undefined; '; - } - if ($ownProperties) { - out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; - } else { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - } - out += ' var startErrs' + ($lvl) + ' = errors; '; - var $passData = $key; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } + +function _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; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _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); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _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; } + +function ArrayFieldTitle(_ref) { + var TitleField = _ref.TitleField, + idSchema = _ref.idSchema, + title = _ref.title, + required = _ref.required; + + if (!title) { + return null; } - if ($breakOnError) { - out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + + var id = "".concat(idSchema.$id, "__title"); + return _react["default"].createElement(TitleField, { + id: id, + title: title, + required: required + }); +} + +function ArrayFieldDescription(_ref2) { + var DescriptionField = _ref2.DescriptionField, + idSchema = _ref2.idSchema, + description = _ref2.description; + + if (!description) { + return null; } - out = it.util.cleanUpCode(out); - return out; + + var id = "".concat(idSchema.$id, "__description"); + return _react["default"].createElement(DescriptionField, { + id: id, + description: description + }); +} // Used in the two templates + + +function DefaultArrayItem(props) { + var btnStyle = { + flex: 1, + paddingLeft: 6, + paddingRight: 6, + fontWeight: "bold" + }; + return _react["default"].createElement("div", { + key: props.key, + className: props.className + }, _react["default"].createElement("div", { + className: props.hasToolbar ? "col-xs-9" : "col-xs-12" + }, props.children), props.hasToolbar && _react["default"].createElement("div", { + className: "col-xs-3 array-item-toolbox" + }, _react["default"].createElement("div", { + className: "btn-group", + style: { + display: "flex", + justifyContent: "space-around" + } + }, (props.hasMoveUp || props.hasMoveDown) && _react["default"].createElement(_IconButton["default"], { + icon: "arrow-up", + "aria-label": "Move up", + className: "array-item-move-up", + tabIndex: "-1", + style: btnStyle, + disabled: props.disabled || props.readonly || !props.hasMoveUp, + onClick: props.onReorderClick(props.index, props.index - 1) + }), (props.hasMoveUp || props.hasMoveDown) && _react["default"].createElement(_IconButton["default"], { + icon: "arrow-down", + className: "array-item-move-down", + "aria-label": "Move down", + tabIndex: "-1", + style: btnStyle, + disabled: props.disabled || props.readonly || !props.hasMoveDown, + onClick: props.onReorderClick(props.index, props.index + 1) + }), props.hasRemove && _react["default"].createElement(_IconButton["default"], { + type: "danger", + icon: "remove", + "aria-label": "Remove", + className: "array-item-remove", + tabIndex: "-1", + style: btnStyle, + disabled: props.disabled || props.readonly, + onClick: props.onDropIndexClick(props.index) + })))); +} + +function DefaultFixedArrayFieldTemplate(props) { + return _react["default"].createElement("fieldset", { + className: props.className, + id: props.idSchema.$id + }, _react["default"].createElement(ArrayFieldTitle, { + key: "array-field-title-".concat(props.idSchema.$id), + TitleField: props.TitleField, + idSchema: props.idSchema, + title: props.uiSchema["ui:title"] || props.title, + required: props.required + }), (props.uiSchema["ui:description"] || props.schema.description) && _react["default"].createElement("div", { + className: "field-description", + key: "field-description-".concat(props.idSchema.$id) + }, props.uiSchema["ui:description"] || props.schema.description), _react["default"].createElement("div", { + className: "row array-item-list", + key: "array-item-list-".concat(props.idSchema.$id) + }, props.items && props.items.map(DefaultArrayItem)), props.canAdd && _react["default"].createElement(_AddButton["default"], { + className: "array-item-add", + onClick: props.onAddClick, + disabled: props.disabled || props.readonly + })); +} + +function DefaultNormalArrayFieldTemplate(props) { + return _react["default"].createElement("fieldset", { + className: props.className, + id: props.idSchema.$id + }, _react["default"].createElement(ArrayFieldTitle, { + key: "array-field-title-".concat(props.idSchema.$id), + TitleField: props.TitleField, + idSchema: props.idSchema, + title: props.uiSchema["ui:title"] || props.title, + required: props.required + }), (props.uiSchema["ui:description"] || props.schema.description) && _react["default"].createElement(ArrayFieldDescription, { + key: "array-field-description-".concat(props.idSchema.$id), + DescriptionField: props.DescriptionField, + idSchema: props.idSchema, + description: props.uiSchema["ui:description"] || props.schema.description + }), _react["default"].createElement("div", { + className: "row array-item-list", + key: "array-item-list-".concat(props.idSchema.$id) + }, props.items && props.items.map(function (p) { + return DefaultArrayItem(p); + })), props.canAdd && _react["default"].createElement(_AddButton["default"], { + className: "array-item-add", + onClick: props.onAddClick, + disabled: props.disabled || props.readonly + })); } +function generateRowId() { + return _shortid["default"].generate(); +} -/***/ }), -/* 498 */ -/***/ (function(module, exports, __webpack_require__) { +function generateKeyedFormData(formData) { + return !Array.isArray(formData) ? [] : formData.map(function (item) { + return { + key: generateRowId(), + item: item + }; + }); +} -"use strict"; +function keyedToPlainFormData(keyedFormData) { + return keyedFormData.map(function (keyedItem) { + return keyedItem.item; + }); +} -module.exports = function generate_required(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $vSchema = 'schema' + $lvl; - if (!$isData) { - if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) { - var $required = []; - var arr1 = $schema; - if (arr1) { - var $property, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $property = arr1[i1 += 1]; - var $propertySch = it.schema.properties[$property]; - if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) { - $required[$required.length] = $property; - } - } +var ArrayField = +/*#__PURE__*/ +function (_Component) { + _inherits(ArrayField, _Component); + + function ArrayField(props) { + var _this; + + _classCallCheck(this, ArrayField); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(ArrayField).call(this, props)); + + _defineProperty(_assertThisInitialized(_this), "_getNewFormDataRow", function () { + var _this$props = _this.props, + schema = _this$props.schema, + _this$props$registry = _this$props.registry, + registry = _this$props$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props$registry; + var rootSchema = registry.rootSchema; + var itemSchema = schema.items; + + if ((0, _utils.isFixedItems)(schema) && (0, _utils.allowAdditionalItems)(schema)) { + itemSchema = schema.additionalItems; } - } else { - var $required = $schema; - } - } - if ($isData || $required.length) { - var $currentErrorPath = it.errorPath, - $loopRequired = $isData || $required.length >= it.opts.loopRequired, - $ownProperties = it.opts.ownProperties; - if ($breakOnError) { - out += ' var missing' + ($lvl) + '; '; - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; - } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); - } - out += ' var ' + ($valid) + ' = true; '; - if ($isData) { - out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; - } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; - if ($ownProperties) { - out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; - } - out += '; if (!' + ($valid) + ') break; } '; - if ($isData) { - out += ' } '; - } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; - } else { - out += ' if ( '; - var arr2 = $required; - if (arr2) { - var $propertyKey, $i = -1, - l2 = arr2.length - 1; - while ($i < l2) { - $propertyKey = arr2[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty($propertyKey), - $useData = $data + $prop; - out += ' ( ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; - } - } - out += ') { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; - } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else { '; + + return (0, _utils.getDefaultFormState)(itemSchema, undefined, rootSchema); + }); + + _defineProperty(_assertThisInitialized(_this), "onAddClick", function (event) { + if (event) { + event.preventDefault(); } - } else { - if ($loopRequired) { - if (!$isData) { - out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + + var onChange = _this.props.onChange; + var newKeyedFormDataRow = { + key: generateRowId(), + item: _this._getNewFormDataRow() + }; + var newKeyedFormData = [].concat(_toConsumableArray(_this.state.keyedFormData), [newKeyedFormDataRow]); + + _this.setState({ + keyedFormData: newKeyedFormData, + updatedKeyedFormData: true + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData)); + }); + }); + + _defineProperty(_assertThisInitialized(_this), "onAddIndexClick", function (index) { + return function (event) { + if (event) { + event.preventDefault(); } - var $i = 'i' + $lvl, - $propertyPath = 'schema' + $lvl + '[' + $i + ']', - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + + var onChange = _this.props.onChange; + var newKeyedFormDataRow = { + key: generateRowId(), + item: _this._getNewFormDataRow() + }; + + var newKeyedFormData = _toConsumableArray(_this.state.keyedFormData); + + newKeyedFormData.splice(index, 0, newKeyedFormDataRow); + + _this.setState({ + keyedFormData: newKeyedFormData, + updatedKeyedFormData: true + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData)); + }); + }; + }); + + _defineProperty(_assertThisInitialized(_this), "onDropIndexClick", function (index) { + return function (event) { + if (event) { + event.preventDefault(); } - if ($isData) { - out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + + var onChange = _this.props.onChange; + var keyedFormData = _this.state.keyedFormData; // refs #195: revalidate to ensure properly reindexing errors + + var newErrorSchema; + + if (_this.props.errorSchema) { + newErrorSchema = {}; + var errorSchema = _this.props.errorSchema; + + for (var i in errorSchema) { + i = parseInt(i); + + if (i < index) { + newErrorSchema[i] = errorSchema[i]; + } else if (i > index) { + newErrorSchema[i - 1] = errorSchema[i]; } - out += ' } '; - } else { - out += ' {} '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + + var newKeyedFormData = keyedFormData.filter(function (_, i) { + return i !== index; + }); + + _this.setState({ + keyedFormData: newKeyedFormData, + updatedKeyedFormData: true + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema); + }); + }; + }); + + _defineProperty(_assertThisInitialized(_this), "onReorderClick", function (index, newIndex) { + return function (event) { + if (event) { + event.preventDefault(); + event.target.blur(); } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; + + var onChange = _this.props.onChange; + var newErrorSchema; + + if (_this.props.errorSchema) { + newErrorSchema = {}; + var errorSchema = _this.props.errorSchema; + + for (var i in errorSchema) { + if (i == index) { + newErrorSchema[newIndex] = errorSchema[index]; + } else if (i == newIndex) { + newErrorSchema[index] = errorSchema[newIndex]; } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + newErrorSchema[i] = errorSchema[i]; } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; } - out += ' } '; - } else { - out += ' {} '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; - if ($isData) { - out += ' } '; + + var keyedFormData = _this.state.keyedFormData; + + function reOrderArray() { + // Copy item + var _newKeyedFormData = keyedFormData.slice(); // Moves item from index to newIndex + + + _newKeyedFormData.splice(index, 1); + + _newKeyedFormData.splice(newIndex, 0, keyedFormData[index]); + + return _newKeyedFormData; } - } else { - var arr3 = $required; - if (arr3) { - var $propertyKey, i3 = -1, - l3 = arr3.length - 1; - while (i3 < l3) { - $propertyKey = arr3[i3 += 1]; - var $prop = it.util.getProperty($propertyKey), - $missingProperty = it.util.escapeQuotes($propertyKey), - $useData = $data + $prop; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); - } - out += ' if ( ' + ($useData) + ' === undefined '; - if ($ownProperties) { - out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; - } - out += ') { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \''; - if (it.opts._errorDataPathProperty) { - out += 'is a required property'; - } else { - out += 'should have required property \\\'' + ($missingProperty) + '\\\''; - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - } + + var newKeyedFormData = reOrderArray(); + + _this.setState({ + keyedFormData: newKeyedFormData + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema); + }); + }; + }); + + _defineProperty(_assertThisInitialized(_this), "onChangeForIndex", function (index) { + return function (value, errorSchema) { + var _this$props2 = _this.props, + formData = _this$props2.formData, + onChange = _this$props2.onChange; + var newFormData = formData.map(function (item, i) { + // We need to treat undefined items as nulls to have validation. + // See https://github.com/tdegrunt/jsonschema/issues/206 + var jsonValue = typeof value === "undefined" ? null : value; + return index === i ? jsonValue : item; + }); + onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty({}, index, errorSchema))); + }; + }); + + _defineProperty(_assertThisInitialized(_this), "onSelectChange", function (value) { + _this.props.onChange(value); + }); + + var _formData = props.formData; + + var _keyedFormData = generateKeyedFormData(_formData); + + _this.state = { + keyedFormData: _keyedFormData, + updatedKeyedFormData: false + }; + return _this; + } + + _createClass(ArrayField, [{ + key: "isItemRequired", + value: function isItemRequired(itemSchema) { + if (Array.isArray(itemSchema.type)) { + // While we don't yet support composite/nullable jsonschema types, it's + // future-proof to check for requirement against these. + return !(0, _includes["default"])(itemSchema.type, "null"); + } // All non-null array item types are inherently required by design + + + return itemSchema.type !== "null"; + } + }, { + key: "canAddItem", + value: function canAddItem(formItems) { + var _this$props3 = this.props, + schema = _this$props3.schema, + uiSchema = _this$props3.uiSchema; + + var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), + addable = _getUiOptions.addable; + + if (addable !== false) { + // if ui:options.addable was not explicitly set to false, we can add + // another item if we have not exceeded maxItems yet + if (schema.maxItems !== undefined) { + addable = formItems.length < schema.maxItems; + } else { + addable = true; } } + + return addable; + } + }, { + key: "render", + value: function render() { + var _this$props4 = this.props, + schema = _this$props4.schema, + uiSchema = _this$props4.uiSchema, + idSchema = _this$props4.idSchema, + _this$props4$registry = _this$props4.registry, + registry = _this$props4$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props4$registry; + var rootSchema = registry.rootSchema; + + if (!schema.hasOwnProperty("items")) { + var fields = registry.fields; + var UnsupportedField = fields.UnsupportedField; + return _react["default"].createElement(UnsupportedField, { + schema: schema, + idSchema: idSchema, + reason: "Missing items definition" + }); + } + + if ((0, _utils.isFixedItems)(schema)) { + return this.renderFixedArray(); + } + + if ((0, _utils.isFilesArray)(schema, uiSchema, rootSchema)) { + return this.renderFiles(); + } + + if ((0, _utils.isMultiSelect)(schema, rootSchema)) { + return this.renderMultiSelect(); + } + + return this.renderNormalArray(); + } + }, { + key: "renderNormalArray", + value: function renderNormalArray() { + var _this2 = this; + + var _this$props5 = this.props, + schema = _this$props5.schema, + uiSchema = _this$props5.uiSchema, + errorSchema = _this$props5.errorSchema, + idSchema = _this$props5.idSchema, + name = _this$props5.name, + required = _this$props5.required, + disabled = _this$props5.disabled, + readonly = _this$props5.readonly, + autofocus = _this$props5.autofocus, + _this$props5$registry = _this$props5.registry, + registry = _this$props5$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props5$registry, + onBlur = _this$props5.onBlur, + onFocus = _this$props5.onFocus, + idPrefix = _this$props5.idPrefix, + rawErrors = _this$props5.rawErrors; + var title = schema.title === undefined ? name : schema.title; + var ArrayFieldTemplate = registry.ArrayFieldTemplate, + rootSchema = registry.rootSchema, + fields = registry.fields, + formContext = registry.formContext; + var TitleField = fields.TitleField, + DescriptionField = fields.DescriptionField; + var itemsSchema = (0, _utils.retrieveSchema)(schema.items, rootSchema); + var formData = keyedToPlainFormData(this.state.keyedFormData); + var arrayProps = { + canAdd: this.canAddItem(formData), + items: this.state.keyedFormData.map(function (keyedItem, index) { + var key = keyedItem.key, + item = keyedItem.item; + var itemSchema = (0, _utils.retrieveSchema)(schema.items, rootSchema, item); + var itemErrorSchema = errorSchema ? errorSchema[index] : undefined; + var itemIdPrefix = idSchema.$id + "_" + index; + var itemIdSchema = (0, _utils.toIdSchema)(itemSchema, itemIdPrefix, rootSchema, item, idPrefix); + return _this2.renderArrayFieldItem({ + key: key, + index: index, + canMoveUp: index > 0, + canMoveDown: index < formData.length - 1, + itemSchema: itemSchema, + itemIdSchema: itemIdSchema, + itemErrorSchema: itemErrorSchema, + itemData: item, + itemUiSchema: uiSchema.items, + autofocus: autofocus && index === 0, + onBlur: onBlur, + onFocus: onFocus + }); + }), + className: "field field-array field-array-of-".concat(itemsSchema.type), + DescriptionField: DescriptionField, + disabled: disabled, + idSchema: idSchema, + uiSchema: uiSchema, + onAddClick: this.onAddClick, + readonly: readonly, + required: required, + schema: schema, + title: title, + TitleField: TitleField, + formContext: formContext, + formData: formData, + rawErrors: rawErrors, + registry: registry + }; // Check if a custom render function was passed in + + var Component = uiSchema["ui:ArrayFieldTemplate"] || ArrayFieldTemplate || DefaultNormalArrayFieldTemplate; + return _react["default"].createElement(Component, arrayProps); } - it.errorPath = $currentErrorPath; - } else if ($breakOnError) { - out += ' if (true) {'; - } - return out; -} + }, { + key: "renderMultiSelect", + value: function renderMultiSelect() { + var _this$props6 = this.props, + schema = _this$props6.schema, + idSchema = _this$props6.idSchema, + uiSchema = _this$props6.uiSchema, + formData = _this$props6.formData, + disabled = _this$props6.disabled, + readonly = _this$props6.readonly, + required = _this$props6.required, + label = _this$props6.label, + placeholder = _this$props6.placeholder, + autofocus = _this$props6.autofocus, + onBlur = _this$props6.onBlur, + onFocus = _this$props6.onFocus, + _this$props6$registry = _this$props6.registry, + registry = _this$props6$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props6$registry, + rawErrors = _this$props6.rawErrors; + var items = this.props.formData; + var widgets = registry.widgets, + rootSchema = registry.rootSchema, + formContext = registry.formContext; + var itemsSchema = (0, _utils.retrieveSchema)(schema.items, rootSchema, formData); + var enumOptions = (0, _utils.optionsList)(itemsSchema); + var _getUiOptions$enumOpt = _objectSpread({}, (0, _utils.getUiOptions)(uiSchema), { + enumOptions: enumOptions + }), + _getUiOptions$enumOpt2 = _getUiOptions$enumOpt.widget, + widget = _getUiOptions$enumOpt2 === void 0 ? "select" : _getUiOptions$enumOpt2, + options = _objectWithoutProperties(_getUiOptions$enumOpt, ["widget"]); -/***/ }), -/* 499 */ -/***/ (function(module, exports, __webpack_require__) { + var Widget = (0, _utils.getWidget)(schema, widget, widgets); + return _react["default"].createElement(Widget, { + id: idSchema && idSchema.$id, + multiple: true, + onChange: this.onSelectChange, + onBlur: onBlur, + onFocus: onFocus, + options: options, + schema: schema, + registry: registry, + value: items, + disabled: disabled, + readonly: readonly, + required: required, + label: label, + placeholder: placeholder, + formContext: formContext, + autofocus: autofocus, + rawErrors: rawErrors + }); + } + }, { + key: "renderFiles", + value: function renderFiles() { + var _this$props7 = this.props, + schema = _this$props7.schema, + uiSchema = _this$props7.uiSchema, + idSchema = _this$props7.idSchema, + name = _this$props7.name, + disabled = _this$props7.disabled, + readonly = _this$props7.readonly, + autofocus = _this$props7.autofocus, + onBlur = _this$props7.onBlur, + onFocus = _this$props7.onFocus, + _this$props7$registry = _this$props7.registry, + registry = _this$props7$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props7$registry, + rawErrors = _this$props7.rawErrors; + var title = schema.title || name; + var items = this.props.formData; + var widgets = registry.widgets, + formContext = registry.formContext; -"use strict"; + var _getUiOptions2 = (0, _utils.getUiOptions)(uiSchema), + _getUiOptions2$widget = _getUiOptions2.widget, + widget = _getUiOptions2$widget === void 0 ? "files" : _getUiOptions2$widget, + options = _objectWithoutProperties(_getUiOptions2, ["widget"]); -module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.$data && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - if (($schema || $isData) && it.opts.uniqueItems !== false) { - if ($isData) { - out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + var Widget = (0, _utils.getWidget)(schema, widget, widgets); + return _react["default"].createElement(Widget, { + options: options, + id: idSchema && idSchema.$id, + multiple: true, + onChange: this.onSelectChange, + onBlur: onBlur, + onFocus: onFocus, + schema: schema, + title: title, + value: items, + disabled: disabled, + readonly: readonly, + formContext: formContext, + autofocus: autofocus, + rawErrors: rawErrors + }); } - out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; - var $itemType = it.schema.items && it.schema.items.type, - $typeIsArray = Array.isArray($itemType); - if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { - out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; - } else { - out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; - var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); - out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; '; - if ($typeIsArray) { - out += ' if (typeof item == \'string\') item = \'"\' + item; '; - } - out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + }, { + key: "renderFixedArray", + value: function renderFixedArray() { + var _this3 = this; + + var _this$props8 = this.props, + schema = _this$props8.schema, + uiSchema = _this$props8.uiSchema, + formData = _this$props8.formData, + errorSchema = _this$props8.errorSchema, + idPrefix = _this$props8.idPrefix, + idSchema = _this$props8.idSchema, + name = _this$props8.name, + required = _this$props8.required, + disabled = _this$props8.disabled, + readonly = _this$props8.readonly, + autofocus = _this$props8.autofocus, + _this$props8$registry = _this$props8.registry, + registry = _this$props8$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props8$registry, + onBlur = _this$props8.onBlur, + onFocus = _this$props8.onFocus, + rawErrors = _this$props8.rawErrors; + var title = schema.title || name; + var items = this.props.formData; + var ArrayFieldTemplate = registry.ArrayFieldTemplate, + rootSchema = registry.rootSchema, + fields = registry.fields, + formContext = registry.formContext; + var TitleField = fields.TitleField; + var itemSchemas = schema.items.map(function (item, index) { + return (0, _utils.retrieveSchema)(item, rootSchema, formData[index]); + }); + var additionalSchema = (0, _utils.allowAdditionalItems)(schema) ? (0, _utils.retrieveSchema)(schema.additionalItems, rootSchema, formData) : null; + + if (!items || items.length < itemSchemas.length) { + // to make sure at least all fixed items are generated + items = items || []; + items = items.concat(new Array(itemSchemas.length - items.length)); + } // These are the props passed into the render function + + + var arrayProps = { + canAdd: this.canAddItem(items) && additionalSchema, + className: "field field-array field-array-fixed-items", + disabled: disabled, + idSchema: idSchema, + formData: formData, + items: this.state.keyedFormData.map(function (keyedItem, index) { + var key = keyedItem.key, + item = keyedItem.item; + var additional = index >= itemSchemas.length; + var itemSchema = additional ? (0, _utils.retrieveSchema)(schema.additionalItems, rootSchema, item) : itemSchemas[index]; + var itemIdPrefix = idSchema.$id + "_" + index; + var itemIdSchema = (0, _utils.toIdSchema)(itemSchema, itemIdPrefix, rootSchema, item, idPrefix); + var itemUiSchema = additional ? uiSchema.additionalItems || {} : Array.isArray(uiSchema.items) ? uiSchema.items[index] : uiSchema.items || {}; + var itemErrorSchema = errorSchema ? errorSchema[index] : undefined; + return _this3.renderArrayFieldItem({ + key: key, + index: index, + canRemove: additional, + canMoveUp: index >= itemSchemas.length + 1, + canMoveDown: additional && index < items.length - 1, + itemSchema: itemSchema, + itemData: item, + itemUiSchema: itemUiSchema, + itemIdSchema: itemIdSchema, + itemErrorSchema: itemErrorSchema, + autofocus: autofocus && index === 0, + onBlur: onBlur, + onFocus: onFocus + }); + }), + onAddClick: this.onAddClick, + readonly: readonly, + required: required, + schema: schema, + uiSchema: uiSchema, + title: title, + TitleField: TitleField, + formContext: formContext, + rawErrors: rawErrors + }; // Check if a custom template template was passed in + + var Template = uiSchema["ui:ArrayFieldTemplate"] || ArrayFieldTemplate || DefaultFixedArrayFieldTemplate; + return _react["default"].createElement(Template, arrayProps); } - out += ' } '; - if ($isData) { - out += ' } '; + }, { + key: "renderArrayFieldItem", + value: function renderArrayFieldItem(props) { + var key = props.key, + index = props.index, + _props$canRemove = props.canRemove, + canRemove = _props$canRemove === void 0 ? true : _props$canRemove, + _props$canMoveUp = props.canMoveUp, + canMoveUp = _props$canMoveUp === void 0 ? true : _props$canMoveUp, + _props$canMoveDown = props.canMoveDown, + canMoveDown = _props$canMoveDown === void 0 ? true : _props$canMoveDown, + itemSchema = props.itemSchema, + itemData = props.itemData, + itemUiSchema = props.itemUiSchema, + itemIdSchema = props.itemIdSchema, + itemErrorSchema = props.itemErrorSchema, + autofocus = props.autofocus, + onBlur = props.onBlur, + onFocus = props.onFocus, + rawErrors = props.rawErrors; + var _this$props9 = this.props, + disabled = _this$props9.disabled, + readonly = _this$props9.readonly, + uiSchema = _this$props9.uiSchema, + _this$props9$registry = _this$props9.registry, + registry = _this$props9$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props9$registry; + var SchemaField = registry.fields.SchemaField; + + var _orderable$removable$ = _objectSpread({ + orderable: true, + removable: true + }, uiSchema["ui:options"]), + orderable = _orderable$removable$.orderable, + removable = _orderable$removable$.removable; + + var has = { + moveUp: orderable && canMoveUp, + moveDown: orderable && canMoveDown, + remove: removable && canRemove + }; + has.toolbar = Object.keys(has).some(function (key) { + return has[key]; + }); + return { + children: _react["default"].createElement(SchemaField, { + index: index, + schema: itemSchema, + uiSchema: itemUiSchema, + formData: itemData, + errorSchema: itemErrorSchema, + idSchema: itemIdSchema, + required: this.isItemRequired(itemSchema), + onChange: this.onChangeForIndex(index), + onBlur: onBlur, + onFocus: onFocus, + registry: this.props.registry, + disabled: this.props.disabled, + readonly: this.props.readonly, + autofocus: autofocus, + rawErrors: rawErrors + }), + className: "array-item", + disabled: disabled, + hasToolbar: has.toolbar, + hasMoveUp: has.moveUp, + hasMoveDown: has.moveDown, + hasRemove: has.remove, + index: index, + key: key, + onAddIndexClick: this.onAddIndexClick, + onDropIndexClick: this.onDropIndexClick, + onReorderClick: this.onReorderClick, + readonly: readonly + }; } - out += ' if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; - if (it.opts.messages !== false) { - out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; - if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + ($schema); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; + }, { + key: "itemTitle", + get: function get() { + var schema = this.props.schema; + return schema.items.title || schema.items.description || "Item"; } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { - /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + }], [{ + key: "getDerivedStateFromProps", + value: function getDerivedStateFromProps(nextProps, prevState) { + // Don't call getDerivedStateFromProps if keyed formdata was just updated. + if (prevState.updatedKeyedFormData) { + return { + updatedKeyedFormData: false + }; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else { '; - } - } else { - if ($breakOnError) { - out += ' if (true) { '; + + var nextFormData = nextProps.formData || []; + var previousKeyedFormData = prevState.keyedFormData || []; + var newKeyedFormData = nextFormData.length === previousKeyedFormData.length ? previousKeyedFormData.map(function (previousKeyedFormDatum, index) { + return { + key: previousKeyedFormDatum.key, + item: nextFormData[index] + }; + }) : generateKeyedFormData(nextFormData); + return { + keyedFormData: newKeyedFormData + }; } - } - return out; -} + }]); + + return ArrayField; +}(_react.Component); + +_defineProperty(ArrayField, "defaultProps", { + uiSchema: {}, + formData: [], + idSchema: {}, + required: false, + disabled: false, + readonly: false, + autofocus: false +}); + +if (false) {} +var _default = ArrayField; +exports["default"] = _default; /***/ }), -/* 500 */ +/* 548 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var KEYWORDS = [ - 'multipleOf', - 'maximum', - 'exclusiveMaximum', - 'minimum', - 'exclusiveMinimum', - 'maxLength', - 'minLength', - 'pattern', - 'additionalItems', - 'maxItems', - 'minItems', - 'uniqueItems', - 'maxProperties', - 'minProperties', - 'required', - 'additionalProperties', - 'enum', - 'format', - 'const' -]; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; -module.exports = function (metaSchema, keywordsJsonPointers) { - for (var i=0; i= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } -var MissingRefError = __webpack_require__(178).MissingRef; +function _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; } -module.exports = compileAsync; +function BooleanField(props) { + var schema = props.schema, + name = props.name, + uiSchema = props.uiSchema, + idSchema = props.idSchema, + formData = props.formData, + _props$registry = props.registry, + registry = _props$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _props$registry, + required = props.required, + disabled = props.disabled, + readonly = props.readonly, + autofocus = props.autofocus, + onChange = props.onChange, + onFocus = props.onFocus, + onBlur = props.onBlur, + rawErrors = props.rawErrors; + var title = schema.title; + var widgets = registry.widgets, + formContext = registry.formContext, + fields = registry.fields; + var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), + _getUiOptions$widget = _getUiOptions.widget, + widget = _getUiOptions$widget === void 0 ? "checkbox" : _getUiOptions$widget, + options = _objectWithoutProperties(_getUiOptions, ["widget"]); -/** - * Creates validating function for passed schema with asynchronous loading of missing schemas. - * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema. - * @this Ajv - * @param {Object} schema schema object - * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped - * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function. - * @return {Promise} promise that resolves with a validating function. - */ -function compileAsync(schema, meta, callback) { - /* eslint no-shadow: 0 */ - /* global Promise */ - /* jshint validthis: true */ - var self = this; - if (typeof this._opts.loadSchema != 'function') - throw new Error('options.loadSchema should be a function'); + var Widget = (0, _utils.getWidget)(schema, widget, widgets); + var enumOptions; - if (typeof meta == 'function') { - callback = meta; - meta = undefined; + if (Array.isArray(schema.oneOf)) { + enumOptions = (0, _utils.optionsList)({ + oneOf: schema.oneOf.map(function (option) { + return _objectSpread({}, option, { + title: option.title || (option["const"] === true ? "Yes" : "No") + }); + }) + }); + } else { + enumOptions = (0, _utils.optionsList)({ + "enum": schema["enum"] || [true, false], + enumNames: schema.enumNames || (schema["enum"] && schema["enum"][0] === false ? ["No", "Yes"] : ["Yes", "No"]) + }); } - var p = loadMetaSchemaOf(schema).then(function () { - var schemaObj = self._addSchema(schema, undefined, meta); - return schemaObj.validate || _compileAsync(schemaObj); + return _react["default"].createElement(Widget, { + options: _objectSpread({}, options, { + enumOptions: enumOptions + }), + schema: schema, + id: idSchema && idSchema.$id, + onChange: onChange, + onFocus: onFocus, + onBlur: onBlur, + label: title === undefined ? name : title, + value: formData, + required: required, + disabled: disabled, + readonly: readonly, + registry: registry, + formContext: formContext, + autofocus: autofocus, + rawErrors: rawErrors, + DescriptionField: fields.DescriptionField }); +} - if (callback) { - p.then( - function(v) { callback(null, v); }, - callback - ); - } +if (false) {} - return p; +BooleanField.defaultProps = { + uiSchema: {}, + disabled: false, + readonly: false, + autofocus: false +}; +var _default = BooleanField; +exports["default"] = _default; +/***/ }), +/* 549 */ +/***/ (function(module, exports, __webpack_require__) { - function loadMetaSchemaOf(sch) { - var $schema = sch.$schema; - return $schema && !self.getSchema($schema) - ? compileAsync.call(self, { $ref: $schema }, true) - : Promise.resolve(); - } +"use strict"; - function _compileAsync(schemaObj) { - try { return self._compile(schemaObj); } - catch(e) { - if (e instanceof MissingRefError) return loadMissingSchema(e); - throw e; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; +var _react = _interopRequireDefault(__webpack_require__(0)); - function loadMissingSchema(e) { - var ref = e.missingSchema; - if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved'); +var _propTypes = _interopRequireDefault(__webpack_require__(3)); - var schemaPromise = self._loadingSchemas[ref]; - if (!schemaPromise) { - schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref); - schemaPromise.then(removePromise, removePromise); - } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - return schemaPromise.then(function (sch) { - if (!added(ref)) { - return loadMetaSchemaOf(sch).then(function () { - if (!added(ref)) self.addSchema(sch, ref, undefined, meta); - }); - } - }).then(function() { - return _compileAsync(schemaObj); - }); +function DescriptionField(props) { + var id = props.id, + description = props.description; - function removePromise() { - delete self._loadingSchemas[ref]; - } + if (!description) { + return null; + } - function added(ref) { - return self._refs[ref] || self._schemas[ref]; - } - } + if (typeof description === "string") { + return _react["default"].createElement("p", { + id: id, + className: "field-description" + }, description); + } else { + return _react["default"].createElement("div", { + id: id, + className: "field-description" + }, description); } } +if (false) {} + +var _default = DescriptionField; +exports["default"] = _default; /***/ }), -/* 502 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; -var customRuleCode = __webpack_require__(503); -var definitionSchema = __webpack_require__(504); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; -module.exports = { - add: addKeyword, - get: getKeyword, - remove: removeKeyword, - validate: validateKeyword -}; +var _react = _interopRequireWildcard(__webpack_require__(0)); +var _propTypes = _interopRequireDefault(__webpack_require__(3)); -/** - * Define custom keyword - * @this Ajv - * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). - * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. - * @return {Ajv} this for method chaining - */ -function addKeyword(keyword, definition) { - /* jshint validthis: true */ - /* eslint no-shadow: 0 */ - var RULES = this.RULES; - if (RULES.keywords[keyword]) - throw new Error('Keyword ' + keyword + ' is already defined'); +var types = _interopRequireWildcard(__webpack_require__(47)); - if (!IDENTIFIER.test(keyword)) - throw new Error('Keyword ' + keyword + ' is not a valid identifier'); +var _utils = __webpack_require__(27); - if (definition) { - this.validateKeyword(definition, true); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - var dataType = definition.type; - if (Array.isArray(dataType)) { - for (var i=0; i= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } +function _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; } - function _addRule(keyword, dataType, definition) { - var ruleGroup; - for (var i=0; i>> 0) || (hex.test(string) ? 16 : 10)); -} : $parseInt; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; -/***/ }), -/* 509 */ -/***/ (function(module, exports, __webpack_require__) { +var _react = _interopRequireDefault(__webpack_require__(0)); -var $export = __webpack_require__(27); -var defined = __webpack_require__(106); -var fails = __webpack_require__(58); -var spaces = __webpack_require__(263); -var space = '[' + spaces + ']'; -var non = '\u200b\u0085'; -var ltrim = RegExp('^' + space + space + '*'); -var rtrim = RegExp(space + space + '*$'); +var types = _interopRequireWildcard(__webpack_require__(47)); -var exporter = function (KEY, exec, ALIAS) { - var exp = {}; - var FORCE = fails(function () { - return !!spaces[KEY]() || non[KEY]() != non; - }); - var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; - if (ALIAS) exp[ALIAS] = fn; - $export($export.P + $export.F * FORCE, 'String', exp); -}; +var _utils = __webpack_require__(27); -// 1 -> String#trimLeft -// 2 -> String#trimRight -// 3 -> String#trim -var trim = exporter.trim = function (string, TYPE) { - string = String(defined(string)); - if (TYPE & 1) string = string.replace(ltrim, ''); - if (TYPE & 2) string = string.replace(rtrim, ''); - return string; -}; +function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } -module.exports = exporter; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function _typeof(obj) { 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); } -/***/ }), -/* 510 */ -/***/ (function(module, exports, __webpack_require__) { +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); } -"use strict"; +function _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; } -// https://github.com/tc39/Array.prototype.includes -var $export = __webpack_require__(27); -var $includes = __webpack_require__(204)(true); +function _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; } -$export($export.P, 'Array', { - includes: function includes(el /* , fromIndex = 0 */) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); - } -}); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -__webpack_require__(151)('includes'); +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); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -/***/ }), -/* 511 */ -/***/ (function(module, exports, __webpack_require__) { +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } -"use strict"; +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -var alphabet = __webpack_require__(129); -var build = __webpack_require__(513); -var isValid = __webpack_require__(517); +function _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); } -// if you are using cluster or multiple servers use this to make each instance -// has a unique value for worker -// Note: I don't know if this is automatically set when using third -// party cluster solutions such as pm2. -var clusterWorkerId = __webpack_require__(518) || 0; +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } -/** - * Set the seed. - * Highly recommended if you don't want people to try to figure out your id schema. - * exposed as shortid.seed(int) - * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps. - */ -function seed(seedValue) { - alphabet.seed(seedValue); - return module.exports; -} +function _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; } -/** - * Set the cluster worker or machine id - * exposed as shortid.worker(int) - * @param workerId worker must be positive integer. Number less than 16 is recommended. - * returns shortid module so it can be chained. - */ -function worker(workerId) { - clusterWorkerId = workerId; - return module.exports; -} +// Matches a string that ends in a . character, optionally followed by a sequence of +// digits followed by any number of 0 characters up until the end of the line. +// Ensuring that there is at least one prefixed character is important so that +// you don't incorrectly match against "0". +var trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/; // This is used for trimming the trailing 0 and . characters without affecting +// the rest of the string. Its possible to use one RegEx with groups for this +// functionality, but it is fairly complex compared to simply defining two +// different matchers. +var trailingCharMatcher = /[0.]0*$/; /** + * The NumberField class has some special handling for dealing with trailing + * decimal points and/or zeroes. This logic is designed to allow trailing values + * to be visible in the input element, but not be represented in the + * corresponding form data. * - * sets new characters to use in the alphabet - * returns the shuffled alphabet + * The algorithm is as follows: + * + * 1. When the input value changes the value is cached in the component state + * + * 2. The value is then normalized, removing trailing decimal points and zeros, + * then passed to the "onChange" callback + * + * 3. When the component is rendered, the formData value is checked against the + * value cached in the state. If it matches the cached value, the cached + * value is passed to the input instead of the formData value */ -function characters(newCharacters) { - if (newCharacters !== undefined) { - alphabet.characters(newCharacters); - } - return alphabet.shuffled(); -} +var NumberField = +/*#__PURE__*/ +function (_React$Component) { + _inherits(NumberField, _React$Component); -/** - * Generate unique id - * Returns string id - */ -function generate() { - return build(clusterWorkerId); -} + function NumberField(props) { + var _this; -// Export all other functions as properties of the generate function -module.exports = generate; -module.exports.generate = generate; -module.exports.seed = seed; -module.exports.worker = worker; -module.exports.characters = characters; -module.exports.isValid = isValid; + _classCallCheck(this, NumberField); + _this = _possibleConstructorReturn(this, _getPrototypeOf(NumberField).call(this, props)); -/***/ }), -/* 512 */ -/***/ (function(module, exports, __webpack_require__) { + _defineProperty(_assertThisInitialized(_this), "handleChange", function (value) { + // Cache the original value in component state + _this.setState({ + lastValue: value + }); // Normalize decimals that don't start with a zero character in advance so + // that the rest of the normalization logic is simpler -"use strict"; + if ("".concat(value).charAt(0) === ".") { + value = "0".concat(value); + } // Check that the value is a string (this can happen if the widget used is a + // , due to an enum declaration etc) then, if the value ends in a - // trailing decimal point or multiple zeroes, strip the trailing values +/** Used to detect bad signed hexadecimal string values. */ +var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; +/** Used to detect binary string values. */ +var reIsBinary = /^0b[01]+$/i; - var processed = typeof value === "string" && value.match(trailingCharMatcherWithPrefix) ? (0, _utils.asNumber)(value.replace(trailingCharMatcher, "")) : (0, _utils.asNumber)(value); +/** Used to detect octal string values. */ +var reIsOctal = /^0o[0-7]+$/i; - _this.props.onChange(processed); - }); +/** Built-in method references without a dependency on `root`. */ +var freeParseInt = parseInt; - _this.state = { - lastValue: props.value - }; - return _this; +/** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ +function toNumber(value) { + if (typeof value == 'number') { + return value; } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ''); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); +} - _createClass(NumberField, [{ - key: "render", - value: function render() { - var StringField = this.props.registry.fields.StringField; - - var _this$props = this.props, - formData = _this$props.formData, - props = _objectWithoutProperties(_this$props, ["formData"]); - - var lastValue = this.state.lastValue; - var value = formData; - - if (typeof lastValue === "string" && typeof value === "number") { - // Construct a regular expression that checks for a string that consists - // of the formData value suffixed with zero or one '.' characters and zero - // or more '0' characters - var re = new RegExp("".concat(value).replace(".", "\\.") + "\\.?0*$"); // If the cached "lastValue" is a match, use that instead of the formData - // value to prevent the input value from changing in the UI +module.exports = toNumber; - if (lastValue.match(re)) { - value = lastValue; - } - } - return _react["default"].createElement(StringField, _extends({}, props, { - formData: value, - onChange: this.handleChange - })); - } - }]); +/***/ }), +/* 585 */ +/***/ (function(module, exports, __webpack_require__) { - return NumberField; -}(_react["default"].Component); +var arrayLikeToArray = __webpack_require__(265); -if (false) {} +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} -NumberField.defaultProps = { - uiSchema: {} -}; -var _default = NumberField; -exports["default"] = _default; +module.exports = _arrayWithoutHoles; /***/ }), -/* 542 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; +/* 586 */ +/***/ (function(module, exports) { +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +} -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +module.exports = _iterableToArray; -var _AddButton = _interopRequireDefault(__webpack_require__(268)); +/***/ }), +/* 587 */ +/***/ (function(module, exports) { -var _react = _interopRequireWildcard(__webpack_require__(0)); +function _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."); +} -var types = _interopRequireWildcard(__webpack_require__(64)); +module.exports = _nonIterableSpread; -var _utils = __webpack_require__(41); +/***/ }), +/* 588 */ +/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/*! + * Signature Pad v2.3.2 + * https://github.com/szimek/signature_pad + * + * Copyright 2017 Szymon Nowak + * Released under the MIT license + * + * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from: + * http://corner.squareup.com/2012/07/smoother-signatures.html + * + * Implementation of interpolation using cubic Bézier curves is taken from: + * http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript + * + * Algorithm for approximated length of a Bézier curve is taken from: + * http://www.lemoda.net/maths/bezier-length/index.html + * + */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function Point(x, y, time) { + this.x = x; + this.y = y; + this.time = time || new Date().getTime(); +} -function _typeof(obj) { 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); } +Point.prototype.velocityFrom = function (start) { + return this.time !== start.time ? this.distanceTo(start) / (this.time - start.time) : 1; +}; -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } +Point.prototype.distanceTo = function (start) { + return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2)); +}; -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } +Point.prototype.equals = function (other) { + return this.x === other.x && this.y === other.y && this.time === other.time; +}; -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } +function Bezier(startPoint, control1, control2, endPoint) { + this.startPoint = startPoint; + this.control1 = control1; + this.control2 = control2; + this.endPoint = endPoint; +} -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } +// Returns approximated length. +Bezier.prototype.length = function () { + var steps = 10; + var length = 0; + var px = void 0; + var py = void 0; -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); } + for (var i = 0; i <= steps; i += 1) { + var t = i / steps; + var cx = this._point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x); + var cy = this._point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y); + if (i > 0) { + var xdiff = cx - px; + var ydiff = cy - py; + length += Math.sqrt(xdiff * xdiff + ydiff * ydiff); + } + px = cx; + py = cy; + } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + return length; +}; -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +/* eslint-disable no-multi-spaces, space-in-parens */ +Bezier.prototype._point = function (t, start, c1, c2, end) { + return start * (1.0 - t) * (1.0 - t) * (1.0 - t) + 3.0 * c1 * (1.0 - t) * (1.0 - t) * t + 3.0 * c2 * (1.0 - t) * t * t + end * t * t * t; +}; -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); } } +/* eslint-disable */ -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } +// http://stackoverflow.com/a/27078401/815507 +function throttle(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + if (!options) options = {}; + var later = function later() { + previous = options.leading === false ? 0 : Date.now(); + timeout = null; + result = func.apply(context, args); + if (!timeout) context = args = null; + }; + return function () { + var now = Date.now(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0 || remaining > wait) { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + previous = now; + result = func.apply(context, args); + if (!timeout) context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; +} -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } +function SignaturePad(canvas, options) { + var self = this; + var opts = options || {}; -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + this.velocityFilterWeight = opts.velocityFilterWeight || 0.7; + this.minWidth = opts.minWidth || 0.5; + this.maxWidth = opts.maxWidth || 2.5; + this.throttle = 'throttle' in opts ? opts.throttle : 16; // in miliseconds + this.minDistance = 'minDistance' in opts ? opts.minDistance : 5; -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + if (this.throttle) { + this._strokeMoveUpdate = throttle(SignaturePad.prototype._strokeUpdate, this.throttle); + } else { + this._strokeMoveUpdate = SignaturePad.prototype._strokeUpdate; + } -function _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); } + this.dotSize = opts.dotSize || function () { + return (this.minWidth + this.maxWidth) / 2; + }; + this.penColor = opts.penColor || 'black'; + this.backgroundColor = opts.backgroundColor || 'rgba(0,0,0,0)'; + this.onBegin = opts.onBegin; + this.onEnd = opts.onEnd; -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + this._canvas = canvas; + this._ctx = canvas.getContext('2d'); + this.clear(); -function _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; } + // We need add these inline so they are available to unbind while still having + // access to 'self' we could use _.bind but it's not worth adding a dependency. + this._handleMouseDown = function (event) { + if (event.which === 1) { + self._mouseButtonDown = true; + self._strokeBegin(event); + } + }; -function DefaultObjectFieldTemplate(props) { - var TitleField = props.TitleField, - DescriptionField = props.DescriptionField; - return _react["default"].createElement("fieldset", { - id: props.idSchema.$id - }, (props.uiSchema["ui:title"] || props.title) && _react["default"].createElement(TitleField, { - id: "".concat(props.idSchema.$id, "__title"), - title: props.title || props.uiSchema["ui:title"], - required: props.required, - formContext: props.formContext - }), props.description && _react["default"].createElement(DescriptionField, { - id: "".concat(props.idSchema.$id, "__description"), - description: props.description, - formContext: props.formContext - }), props.properties.map(function (prop) { - return prop.content; - }), (0, _utils.canExpand)(props.schema, props.uiSchema, props.formData) && _react["default"].createElement(_AddButton["default"], { - className: "object-property-expand", - onClick: props.onAddClick(props.schema), - disabled: props.disabled || props.readonly - })); -} + this._handleMouseMove = function (event) { + if (self._mouseButtonDown) { + self._strokeMoveUpdate(event); + } + }; -var ObjectField = -/*#__PURE__*/ -function (_Component) { - _inherits(ObjectField, _Component); + this._handleMouseUp = function (event) { + if (event.which === 1 && self._mouseButtonDown) { + self._mouseButtonDown = false; + self._strokeEnd(event); + } + }; - function ObjectField() { - var _getPrototypeOf2; + this._handleTouchStart = function (event) { + if (event.targetTouches.length === 1) { + var touch = event.changedTouches[0]; + self._strokeBegin(touch); + } + }; - var _this; + this._handleTouchMove = function (event) { + // Prevent scrolling. + event.preventDefault(); - _classCallCheck(this, ObjectField); + var touch = event.targetTouches[0]; + self._strokeMoveUpdate(touch); + }; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + this._handleTouchEnd = function (event) { + var wasCanvasTouched = event.target === self._canvas; + if (wasCanvasTouched) { + event.preventDefault(); + self._strokeEnd(event); } + }; - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ObjectField)).call.apply(_getPrototypeOf2, [this].concat(args))); + // Enable mouse and touch event handlers + this.on(); +} - _defineProperty(_assertThisInitialized(_this), "state", { - wasPropertyKeyModified: false, - additionalProperties: {} - }); +// Public methods +SignaturePad.prototype.clear = function () { + var ctx = this._ctx; + var canvas = this._canvas; - _defineProperty(_assertThisInitialized(_this), "onPropertyChange", function (name) { - var addedByAdditionalProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - return function (value, errorSchema) { - if (!value && addedByAdditionalProperties) { - // Don't set value = undefined for fields added by - // additionalProperties. Doing so removes them from the - // formData, which causes them to completely disappear - // (including the input field for the property name). Unlike - // fields which are "mandated" by the schema, these fields can - // be set to undefined by clicking a "delete field" button, so - // set empty values to the empty string. - value = ""; - } + ctx.fillStyle = this.backgroundColor; + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillRect(0, 0, canvas.width, canvas.height); - var newFormData = _objectSpread({}, _this.props.formData, _defineProperty({}, name, value)); + this._data = []; + this._reset(); + this._isEmpty = true; +}; - _this.props.onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty({}, name, errorSchema))); - }; - }); +SignaturePad.prototype.fromDataURL = function (dataUrl) { + var _this = this; - _defineProperty(_assertThisInitialized(_this), "onDropPropertyClick", function (key) { - return function (event) { - event.preventDefault(); - var _this$props = _this.props, - onChange = _this$props.onChange, - formData = _this$props.formData; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var copiedFormData = _objectSpread({}, formData); + var image = new Image(); + var ratio = options.ratio || window.devicePixelRatio || 1; + var width = options.width || this._canvas.width / ratio; + var height = options.height || this._canvas.height / ratio; - delete copiedFormData[key]; - onChange(copiedFormData); - }; - }); + this._reset(); + image.src = dataUrl; + image.onload = function () { + _this._ctx.drawImage(image, 0, 0, width, height); + }; + this._isEmpty = false; +}; - _defineProperty(_assertThisInitialized(_this), "getAvailableKey", function (preferredKey, formData) { - var index = 0; - var newKey = preferredKey; +SignaturePad.prototype.toDataURL = function (type) { + var _canvas; - while (formData.hasOwnProperty(newKey)) { - newKey = "".concat(preferredKey, "-").concat(++index); + switch (type) { + case 'image/svg+xml': + return this._toSVG(); + default: + for (var _len = arguments.length, options = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + options[_key - 1] = arguments[_key]; } - return newKey; - }); - - _defineProperty(_assertThisInitialized(_this), "onKeyChange", function (oldValue) { - return function (value, errorSchema) { - if (oldValue === value) { - return; - } - - value = _this.getAvailableKey(value, _this.props.formData); + return (_canvas = this._canvas).toDataURL.apply(_canvas, [type].concat(options)); + } +}; - var newFormData = _objectSpread({}, _this.props.formData); +SignaturePad.prototype.on = function () { + this._handleMouseEvents(); + this._handleTouchEvents(); +}; - var newKeys = _defineProperty({}, oldValue, value); +SignaturePad.prototype.off = function () { + this._canvas.removeEventListener('mousedown', this._handleMouseDown); + this._canvas.removeEventListener('mousemove', this._handleMouseMove); + document.removeEventListener('mouseup', this._handleMouseUp); - var keyValues = Object.keys(newFormData).map(function (key) { - var newKey = newKeys[key] || key; - return _defineProperty({}, newKey, newFormData[key]); - }); + this._canvas.removeEventListener('touchstart', this._handleTouchStart); + this._canvas.removeEventListener('touchmove', this._handleTouchMove); + this._canvas.removeEventListener('touchend', this._handleTouchEnd); +}; - var renamedObj = _extends.apply(void 0, [{}].concat(_toConsumableArray(keyValues))); +SignaturePad.prototype.isEmpty = function () { + return this._isEmpty; +}; - _this.setState({ - wasPropertyKeyModified: true - }); +// Private methods +SignaturePad.prototype._strokeBegin = function (event) { + this._data.push([]); + this._reset(); + this._strokeUpdate(event); - _this.props.onChange(renamedObj, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty({}, value, errorSchema))); - }; - }); + if (typeof this.onBegin === 'function') { + this.onBegin(event); + } +}; - _defineProperty(_assertThisInitialized(_this), "handleAddClick", function (schema) { - return function () { - var type = schema.additionalProperties.type; +SignaturePad.prototype._strokeUpdate = function (event) { + var x = event.clientX; + var y = event.clientY; - var newFormData = _objectSpread({}, _this.props.formData); + var point = this._createPoint(x, y); + var lastPointGroup = this._data[this._data.length - 1]; + var lastPoint = lastPointGroup && lastPointGroup[lastPointGroup.length - 1]; + var isLastPointTooClose = lastPoint && point.distanceTo(lastPoint) < this.minDistance; - if (schema.additionalProperties.hasOwnProperty("$ref")) { - var _this$props$registry = _this.props.registry, - registry = _this$props$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props$registry; - var refSchema = (0, _utils.retrieveSchema)({ - $ref: schema.additionalProperties["$ref"] - }, registry.rootSchema, _this.props.formData); - type = refSchema.type; - } + // Skip this point if it's too close to the previous one + if (!(lastPoint && isLastPointTooClose)) { + var _addPoint = this._addPoint(point), + curve = _addPoint.curve, + widths = _addPoint.widths; - newFormData[_this.getAvailableKey("newKey", newFormData)] = _this.getDefaultValue(type); + if (curve && widths) { + this._drawCurve(curve, widths.start, widths.end); + } - _this.props.onChange(newFormData); - }; + this._data[this._data.length - 1].push({ + x: point.x, + y: point.y, + time: point.time, + color: this.penColor }); + } +}; - return _this; +SignaturePad.prototype._strokeEnd = function (event) { + var canDrawCurve = this.points.length > 2; + var point = this.points[0]; // Point instance + + if (!canDrawCurve && point) { + this._drawDot(point); } - _createClass(ObjectField, [{ - key: "isRequired", - value: function isRequired(name) { - var schema = this.props.schema; - return Array.isArray(schema.required) && schema.required.indexOf(name) !== -1; - } - }, { - key: "getDefaultValue", - value: function getDefaultValue(type) { - switch (type) { - case "string": - return "New Value"; + if (point) { + var lastPointGroup = this._data[this._data.length - 1]; + var lastPoint = lastPointGroup[lastPointGroup.length - 1]; // plain object - case "array": - return []; + // When drawing a dot, there's only one point in a group, so without this check + // such group would end up with exactly the same 2 points. + if (!point.equals(lastPoint)) { + lastPointGroup.push({ + x: point.x, + y: point.y, + time: point.time, + color: this.penColor + }); + } + } - case "boolean": - return false; + if (typeof this.onEnd === 'function') { + this.onEnd(event); + } +}; - case "null": - return null; +SignaturePad.prototype._handleMouseEvents = function () { + this._mouseButtonDown = false; - case "number": - return 0; + this._canvas.addEventListener('mousedown', this._handleMouseDown); + this._canvas.addEventListener('mousemove', this._handleMouseMove); + document.addEventListener('mouseup', this._handleMouseUp); +}; - case "object": - return {}; +SignaturePad.prototype._handleTouchEvents = function () { + // Pass touch events to canvas element on mobile IE11 and Edge. + this._canvas.style.msTouchAction = 'none'; + this._canvas.style.touchAction = 'none'; - default: - // We don't have a datatype for some reason (perhaps additionalProperties was true) - return "New Value"; - } - } - }, { - key: "render", - value: function render() { - var _this2 = this; + this._canvas.addEventListener('touchstart', this._handleTouchStart); + this._canvas.addEventListener('touchmove', this._handleTouchMove); + this._canvas.addEventListener('touchend', this._handleTouchEnd); +}; - var _this$props2 = this.props, - uiSchema = _this$props2.uiSchema, - formData = _this$props2.formData, - errorSchema = _this$props2.errorSchema, - idSchema = _this$props2.idSchema, - name = _this$props2.name, - required = _this$props2.required, - disabled = _this$props2.disabled, - readonly = _this$props2.readonly, - idPrefix = _this$props2.idPrefix, - onBlur = _this$props2.onBlur, - onFocus = _this$props2.onFocus, - _this$props2$registry = _this$props2.registry, - registry = _this$props2$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _this$props2$registry; - var rootSchema = registry.rootSchema, - fields = registry.fields, - formContext = registry.formContext; - var SchemaField = fields.SchemaField, - TitleField = fields.TitleField, - DescriptionField = fields.DescriptionField; - var schema = (0, _utils.retrieveSchema)(this.props.schema, rootSchema, formData); - var title = schema.title === undefined ? name : schema.title; - var description = uiSchema["ui:description"] || schema.description; - var orderedProperties; +SignaturePad.prototype._reset = function () { + this.points = []; + this._lastVelocity = 0; + this._lastWidth = (this.minWidth + this.maxWidth) / 2; + this._ctx.fillStyle = this.penColor; +}; - try { - var properties = Object.keys(schema.properties || {}); - orderedProperties = (0, _utils.orderProperties)(properties, uiSchema["ui:order"]); - } catch (err) { - return _react["default"].createElement("div", null, _react["default"].createElement("p", { - className: "config-error", - style: { - color: "red" - } - }, "Invalid ", name || "root", " object field configuration:", _react["default"].createElement("em", null, err.message), "."), _react["default"].createElement("pre", null, JSON.stringify(schema))); - } +SignaturePad.prototype._createPoint = function (x, y, time) { + var rect = this._canvas.getBoundingClientRect(); - var Template = uiSchema["ui:ObjectFieldTemplate"] || registry.ObjectFieldTemplate || DefaultObjectFieldTemplate; - var templateProps = { - title: uiSchema["ui:title"] || title, - description: description, - TitleField: TitleField, - DescriptionField: DescriptionField, - properties: orderedProperties.map(function (name) { - var addedByAdditionalProperties = schema.properties[name].hasOwnProperty(_utils.ADDITIONAL_PROPERTY_FLAG); - return { - content: _react["default"].createElement(SchemaField, { - key: name, - name: name, - required: _this2.isRequired(name), - schema: schema.properties[name], - uiSchema: addedByAdditionalProperties ? uiSchema.additionalProperties : uiSchema[name], - errorSchema: errorSchema[name], - idSchema: idSchema[name], - idPrefix: idPrefix, - formData: (formData || {})[name], - wasPropertyKeyModified: _this2.state.wasPropertyKeyModified, - onKeyChange: _this2.onKeyChange(name), - onChange: _this2.onPropertyChange(name, addedByAdditionalProperties), - onBlur: onBlur, - onFocus: onFocus, - registry: registry, - disabled: disabled, - readonly: readonly, - onDropPropertyClick: _this2.onDropPropertyClick - }), - name: name, - readonly: readonly, - disabled: disabled, - required: required - }; - }), - readonly: readonly, - disabled: disabled, - required: required, - idSchema: idSchema, - uiSchema: uiSchema, - schema: schema, - formData: formData, - formContext: formContext - }; - return _react["default"].createElement(Template, _extends({}, templateProps, { - onAddClick: this.handleAddClick - })); - } - }]); + return new Point(x - rect.left, y - rect.top, time || new Date().getTime()); +}; - return ObjectField; -}(_react.Component); +SignaturePad.prototype._addPoint = function (point) { + var points = this.points; + var tmp = void 0; -_defineProperty(ObjectField, "defaultProps", { - uiSchema: {}, - formData: {}, - errorSchema: {}, - idSchema: {}, - required: false, - disabled: false, - readonly: false -}); + points.push(point); -if (false) {} + if (points.length > 2) { + // To reduce the initial lag make it work with 3 points + // by copying the first point to the beginning. + if (points.length === 3) points.unshift(points[0]); -var _default = ObjectField; -exports["default"] = _default; + tmp = this._calculateCurveControlPoints(points[0], points[1], points[2]); + var c2 = tmp.c2; + tmp = this._calculateCurveControlPoints(points[1], points[2], points[3]); + var c3 = tmp.c1; + var curve = new Bezier(points[1], c2, c3, points[2]); + var widths = this._calculateCurveWidths(curve); -/***/ }), -/* 543 */ -/***/ (function(module, exports, __webpack_require__) { + // Remove the first element from the list, + // so that we always have no more than 4 points in points array. + points.shift(); -"use strict"; + return { curve: curve, widths: widths }; + } + return {}; +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +SignaturePad.prototype._calculateCurveControlPoints = function (s1, s2, s3) { + var dx1 = s1.x - s2.x; + var dy1 = s1.y - s2.y; + var dx2 = s2.x - s3.x; + var dy2 = s2.y - s3.y; -var _react = _interopRequireDefault(__webpack_require__(0)); + var m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 }; + var m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 }; -var types = _interopRequireWildcard(__webpack_require__(64)); + var l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1); + var l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2); -var _utils = __webpack_require__(41); + var dxm = m1.x - m2.x; + var dym = m1.y - m2.y; -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } + var k = l2 / (l1 + l2); + var cm = { x: m2.x + dxm * k, y: m2.y + dym * k }; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var tx = s2.x - cm.x; + var ty = s2.y - cm.y; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + return { + c1: new Point(m1.x + tx, m1.y + ty), + c2: new Point(m2.x + tx, m2.y + ty) + }; +}; -function _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; } +SignaturePad.prototype._calculateCurveWidths = function (curve) { + var startPoint = curve.startPoint; + var endPoint = curve.endPoint; + var widths = { start: null, end: null }; -function _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; } + var velocity = this.velocityFilterWeight * endPoint.velocityFrom(startPoint) + (1 - this.velocityFilterWeight) * this._lastVelocity; -function _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; } + var newWidth = this._strokeWidth(velocity); -function StringField(props) { - var schema = props.schema, - name = props.name, - uiSchema = props.uiSchema, - idSchema = props.idSchema, - formData = props.formData, - required = props.required, - disabled = props.disabled, - readonly = props.readonly, - autofocus = props.autofocus, - onChange = props.onChange, - onBlur = props.onBlur, - onFocus = props.onFocus, - _props$registry = props.registry, - registry = _props$registry === void 0 ? (0, _utils.getDefaultRegistry)() : _props$registry, - rawErrors = props.rawErrors; - var title = schema.title, - format = schema.format; - var widgets = registry.widgets, - formContext = registry.formContext; - var enumOptions = (0, _utils.isSelect)(schema) && (0, _utils.optionsList)(schema); - var defaultWidget = enumOptions ? "select" : "text"; + widths.start = this._lastWidth; + widths.end = newWidth; - if (format && (0, _utils.hasWidget)(schema, format, widgets)) { - defaultWidget = format; - } + this._lastVelocity = velocity; + this._lastWidth = newWidth; - var _getUiOptions = (0, _utils.getUiOptions)(uiSchema), - _getUiOptions$widget = _getUiOptions.widget, - widget = _getUiOptions$widget === void 0 ? defaultWidget : _getUiOptions$widget, - _getUiOptions$placeho = _getUiOptions.placeholder, - placeholder = _getUiOptions$placeho === void 0 ? "" : _getUiOptions$placeho, - options = _objectWithoutProperties(_getUiOptions, ["widget", "placeholder"]); + return widths; +}; - var Widget = (0, _utils.getWidget)(schema, widget, widgets); - return _react["default"].createElement(Widget, { - options: _objectSpread({}, options, { - enumOptions: enumOptions - }), - schema: schema, - uiSchema: uiSchema, - id: idSchema && idSchema.$id, - label: title === undefined ? name : title, - value: formData, - onChange: onChange, - onBlur: onBlur, - onFocus: onFocus, - required: required, - disabled: disabled, - readonly: readonly, - formContext: formContext, - autofocus: autofocus, - registry: registry, - placeholder: placeholder, - rawErrors: rawErrors - }); -} +SignaturePad.prototype._strokeWidth = function (velocity) { + return Math.max(this.maxWidth / (velocity + 1), this.minWidth); +}; -if (false) {} +SignaturePad.prototype._drawPoint = function (x, y, size) { + var ctx = this._ctx; -StringField.defaultProps = { - uiSchema: {}, - disabled: false, - readonly: false, - autofocus: false + ctx.moveTo(x, y); + ctx.arc(x, y, size, 0, 2 * Math.PI, false); + this._isEmpty = false; }; -var _default = StringField; -exports["default"] = _default; -/***/ }), -/* 544 */ -/***/ (function(module, exports, __webpack_require__) { +SignaturePad.prototype._drawCurve = function (curve, startWidth, endWidth) { + var ctx = this._ctx; + var widthDelta = endWidth - startWidth; + var drawSteps = Math.floor(curve.length()); -"use strict"; + ctx.beginPath(); + + for (var i = 0; i < drawSteps; i += 1) { + // Calculate the Bezier (x, y) coordinate for this step. + var t = i / drawSteps; + var tt = t * t; + var ttt = tt * t; + var u = 1 - t; + var uu = u * u; + var uuu = uu * u; + var x = uuu * curve.startPoint.x; + x += 3 * uu * t * curve.control1.x; + x += 3 * u * tt * curve.control2.x; + x += ttt * curve.endPoint.x; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; + var y = uuu * curve.startPoint.y; + y += 3 * uu * t * curve.control1.y; + y += 3 * u * tt * curve.control2.y; + y += ttt * curve.endPoint.y; -var _react = _interopRequireDefault(__webpack_require__(0)); + var width = startWidth + ttt * widthDelta; + this._drawPoint(x, y, width); + } -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + ctx.closePath(); + ctx.fill(); +}; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +SignaturePad.prototype._drawDot = function (point) { + var ctx = this._ctx; + var width = typeof this.dotSize === 'function' ? this.dotSize() : this.dotSize; -var REQUIRED_FIELD_SYMBOL = "*"; + ctx.beginPath(); + this._drawPoint(point.x, point.y, width); + ctx.closePath(); + ctx.fill(); +}; -function TitleField(props) { - var id = props.id, - title = props.title, - required = props.required; - return _react["default"].createElement("legend", { - id: id - }, title, required && _react["default"].createElement("span", { - className: "required" - }, REQUIRED_FIELD_SYMBOL)); -} +SignaturePad.prototype._fromData = function (pointGroups, drawCurve, drawDot) { + for (var i = 0; i < pointGroups.length; i += 1) { + var group = pointGroups[i]; -if (false) {} + if (group.length > 1) { + for (var j = 0; j < group.length; j += 1) { + var rawPoint = group[j]; + var point = new Point(rawPoint.x, rawPoint.y, rawPoint.time); + var color = rawPoint.color; -var _default = TitleField; -exports["default"] = _default; + if (j === 0) { + // First point in a group. Nothing to draw yet. -/***/ }), -/* 545 */ -/***/ (function(module, exports, __webpack_require__) { + // All points in the group have the same color, so it's enough to set + // penColor just at the beginning. + this.penColor = color; + this._reset(); -"use strict"; + this._addPoint(point); + } else if (j !== group.length - 1) { + // Middle point in a group. + var _addPoint2 = this._addPoint(point), + curve = _addPoint2.curve, + widths = _addPoint2.widths; + if (curve && widths) { + drawCurve(curve, widths, color); + } + } else { + // Last point in a group. Do nothing. + } + } + } else { + this._reset(); + var _rawPoint = group[0]; + drawDot(_rawPoint); + } + } +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +SignaturePad.prototype._toSVG = function () { + var _this2 = this; -var _react = __webpack_require__(0); + var pointGroups = this._data; + var canvas = this._canvas; + var ratio = Math.max(window.devicePixelRatio || 1, 1); + var minX = 0; + var minY = 0; + var maxX = canvas.width / ratio; + var maxY = canvas.height / ratio; + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); -var types = _interopRequireWildcard(__webpack_require__(64)); + svg.setAttributeNS(null, 'width', canvas.width); + svg.setAttributeNS(null, 'height', canvas.height); -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } + this._fromData(pointGroups, function (curve, widths, color) { + var path = document.createElement('path'); -function _typeof(obj) { 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); } + // Need to check curve for NaN values, these pop up when drawing + // lines on the canvas that are not continuous. E.g. Sharp corners + // or stopping mid-stroke and than continuing without lifting mouse. + if (!isNaN(curve.control1.x) && !isNaN(curve.control1.y) && !isNaN(curve.control2.x) && !isNaN(curve.control2.y)) { + var attr = 'M ' + curve.startPoint.x.toFixed(3) + ',' + curve.startPoint.y.toFixed(3) + ' ' + ('C ' + curve.control1.x.toFixed(3) + ',' + curve.control1.y.toFixed(3) + ' ') + (curve.control2.x.toFixed(3) + ',' + curve.control2.y.toFixed(3) + ' ') + (curve.endPoint.x.toFixed(3) + ',' + curve.endPoint.y.toFixed(3)); -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + path.setAttribute('d', attr); + path.setAttribute('stroke-width', (widths.end * 2.25).toFixed(3)); + path.setAttribute('stroke', color); + path.setAttribute('fill', 'none'); + path.setAttribute('stroke-linecap', 'round'); -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); } } + svg.appendChild(path); + } + }, function (rawPoint) { + var circle = document.createElement('circle'); + var dotSize = typeof _this2.dotSize === 'function' ? _this2.dotSize() : _this2.dotSize; + circle.setAttribute('r', dotSize); + circle.setAttribute('cx', rawPoint.x); + circle.setAttribute('cy', rawPoint.y); + circle.setAttribute('fill', rawPoint.color); + + svg.appendChild(circle); + }); -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + var prefix = 'data:image/svg+xml;base64,'; + var header = ''; + var body = svg.innerHTML; -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + // IE hack for missing innerHTML property on SVGElement + if (body === undefined) { + var dummy = document.createElement('dummy'); + var nodes = svg.childNodes; + dummy.innerHTML = ''; -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + for (var i = 0; i < nodes.length; i += 1) { + dummy.appendChild(nodes[i].cloneNode(true)); + } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + body = dummy.innerHTML; + } -function _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); } + var footer = ''; + var data = header + body + footer; -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + return prefix + btoa(data); +}; -var NullField = -/*#__PURE__*/ -function (_Component) { - _inherits(NullField, _Component); +SignaturePad.prototype.fromData = function (pointGroups) { + var _this3 = this; - function NullField() { - _classCallCheck(this, NullField); + this.clear(); - return _possibleConstructorReturn(this, _getPrototypeOf(NullField).apply(this, arguments)); - } + this._fromData(pointGroups, function (curve, widths) { + return _this3._drawCurve(curve, widths.start, widths.end); + }, function (rawPoint) { + return _this3._drawDot(rawPoint); + }); - _createClass(NullField, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (this.props.formData === undefined) { - this.props.onChange(null); - } - } - }, { - key: "render", - value: function render() { - return null; - } - }]); + this._data = pointGroups; +}; - return NullField; -}(_react.Component); +SignaturePad.prototype.toData = function () { + return this._data; +}; -if (false) {} +/* harmony default export */ __webpack_exports__["default"] = (SignaturePad); -var _default = NullField; -exports["default"] = _default; /***/ }), -/* 546 */ +/* 589 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _react = _interopRequireDefault(__webpack_require__(0)); +!function(e,t){ true?module.exports=t():undefined}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t){"use strict";function r(e){var t=e.getContext("2d"),r=e.width,n=e.height,o=t.getImageData(0,0,r,n).data,f=a(!0,r,n,o),i=a(!1,r,n,o),c=u(!0,r,n,o),d=u(!1,r,n,o),p=d-c+1,l=i-f+1,s=t.getImageData(c,f,p,l);return e.width=p,e.height=l,t.clearRect(0,0,p,l),t.putImageData(s,0,0),e}function n(e,t,r,n){return{red:n[4*(r*t+e)],green:n[4*(r*t+e)+1],blue:n[4*(r*t+e)+2],alpha:n[4*(r*t+e)+3]}}function o(e,t,r,o){return n(e,t,r,o).alpha}function a(e,t,r,n){for(var a=e?1:-1,u=e?0:r-1,f=u;e?f-1;f+=a)for(var i=0;i-1;f+=a)for(var i=0;i -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; } -if (false) {} +module.exports = createFind; -var _default = UnsupportedField; -exports["default"] = _default; /***/ }), -/* 547 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _AltDateWidget = _interopRequireDefault(__webpack_require__(269)); - -var _AltDateTimeWidget = _interopRequireDefault(__webpack_require__(548)); +var baseFindIndex = __webpack_require__(231), + baseIteratee = __webpack_require__(84), + toInteger = __webpack_require__(266); -var _BaseInput = _interopRequireDefault(__webpack_require__(549)); - -var _CheckboxWidget = _interopRequireDefault(__webpack_require__(550)); +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; -var _CheckboxesWidget = _interopRequireDefault(__webpack_require__(551)); +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 + */ +function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, baseIteratee(predicate, 3), index, true); +} -var _ColorWidget = _interopRequireDefault(__webpack_require__(552)); +module.exports = findLastIndex; -var _DateWidget = _interopRequireDefault(__webpack_require__(553)); -var _DateTimeWidget = _interopRequireDefault(__webpack_require__(554)); +/***/ }), +/* 592 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var _EmailWidget = _interopRequireDefault(__webpack_require__(555)); +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); -var _FileWidget = _interopRequireDefault(__webpack_require__(556)); +// EXPORTS +__webpack_require__.d(__webpack_exports__, "DataProcessingUtils", function() { return /* reexport */ DataProcessingUtils_namespaceObject; }); +__webpack_require__.d(__webpack_exports__, "Form", function() { return /* reexport */ src_form; }); +__webpack_require__.d(__webpack_exports__, "Paged", function() { return /* reexport */ components_Paged; }); +__webpack_require__.d(__webpack_exports__, "PagedByMachine", function() { return /* reexport */ components_PagedByMachine; }); +__webpack_require__.d(__webpack_exports__, "version", function() { return /* binding */ version; }); -var _HiddenWidget = _interopRequireDefault(__webpack_require__(557)); +// NAMESPACE OBJECT: ./node_modules/@rjsf/core/dist/es/utils.js +var utils_namespaceObject = {}; +__webpack_require__.r(utils_namespaceObject); +__webpack_require__.d(utils_namespaceObject, "ADDITIONAL_PROPERTY_FLAG", function() { return ADDITIONAL_PROPERTY_FLAG; }); +__webpack_require__.d(utils_namespaceObject, "canExpand", function() { return canExpand; }); +__webpack_require__.d(utils_namespaceObject, "getDefaultRegistry", function() { return getDefaultRegistry; }); +__webpack_require__.d(utils_namespaceObject, "getSchemaType", function() { return getSchemaType; }); +__webpack_require__.d(utils_namespaceObject, "getWidget", function() { return getWidget; }); +__webpack_require__.d(utils_namespaceObject, "hasWidget", function() { return hasWidget; }); +__webpack_require__.d(utils_namespaceObject, "getDefaultFormState", function() { return getDefaultFormState; }); +__webpack_require__.d(utils_namespaceObject, "mergeDefaultsWithFormData", function() { return mergeDefaultsWithFormData; }); +__webpack_require__.d(utils_namespaceObject, "getUiOptions", function() { return getUiOptions; }); +__webpack_require__.d(utils_namespaceObject, "getDisplayLabel", function() { return getDisplayLabel; }); +__webpack_require__.d(utils_namespaceObject, "isObject", function() { return isObject; }); +__webpack_require__.d(utils_namespaceObject, "mergeObjects", function() { return mergeObjects; }); +__webpack_require__.d(utils_namespaceObject, "asNumber", function() { return asNumber; }); +__webpack_require__.d(utils_namespaceObject, "orderProperties", function() { return orderProperties; }); +__webpack_require__.d(utils_namespaceObject, "isConstant", function() { return isConstant; }); +__webpack_require__.d(utils_namespaceObject, "toConstant", function() { return toConstant; }); +__webpack_require__.d(utils_namespaceObject, "isSelect", function() { return isSelect; }); +__webpack_require__.d(utils_namespaceObject, "isMultiSelect", function() { return isMultiSelect; }); +__webpack_require__.d(utils_namespaceObject, "isFilesArray", function() { return isFilesArray; }); +__webpack_require__.d(utils_namespaceObject, "isFixedItems", function() { return isFixedItems; }); +__webpack_require__.d(utils_namespaceObject, "allowAdditionalItems", function() { return allowAdditionalItems; }); +__webpack_require__.d(utils_namespaceObject, "optionsList", function() { return optionsList; }); +__webpack_require__.d(utils_namespaceObject, "findSchemaDefinition", function() { return findSchemaDefinition; }); +__webpack_require__.d(utils_namespaceObject, "guessType", function() { return utils_guessType; }); +__webpack_require__.d(utils_namespaceObject, "stubExistingAdditionalProperties", function() { return stubExistingAdditionalProperties; }); +__webpack_require__.d(utils_namespaceObject, "resolveSchema", function() { return resolveSchema; }); +__webpack_require__.d(utils_namespaceObject, "retrieveSchema", function() { return retrieveSchema; }); +__webpack_require__.d(utils_namespaceObject, "mergeSchemas", function() { return mergeSchemas; }); +__webpack_require__.d(utils_namespaceObject, "deepEquals", function() { return deepEquals; }); +__webpack_require__.d(utils_namespaceObject, "shouldRender", function() { return shouldRender; }); +__webpack_require__.d(utils_namespaceObject, "toIdSchema", function() { return toIdSchema; }); +__webpack_require__.d(utils_namespaceObject, "toPathSchema", function() { return toPathSchema; }); +__webpack_require__.d(utils_namespaceObject, "parseDateString", function() { return parseDateString; }); +__webpack_require__.d(utils_namespaceObject, "toDateString", function() { return toDateString; }); +__webpack_require__.d(utils_namespaceObject, "utcToLocal", function() { return utcToLocal; }); +__webpack_require__.d(utils_namespaceObject, "localToUTC", function() { return localToUTC; }); +__webpack_require__.d(utils_namespaceObject, "pad", function() { return pad; }); +__webpack_require__.d(utils_namespaceObject, "dataURItoBlob", function() { return dataURItoBlob; }); +__webpack_require__.d(utils_namespaceObject, "rangeSpec", function() { return rangeSpec; }); +__webpack_require__.d(utils_namespaceObject, "getMatchingOption", function() { return utils_getMatchingOption; }); +__webpack_require__.d(utils_namespaceObject, "schemaRequiresTrueValue", function() { return schemaRequiresTrueValue; }); -var _PasswordWidget = _interopRequireDefault(__webpack_require__(558)); +// NAMESPACE OBJECT: ./src/utils/DataProcessingUtils.js +var DataProcessingUtils_namespaceObject = {}; +__webpack_require__.r(DataProcessingUtils_namespaceObject); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "ATAT", function() { return ATAT; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "INDEX_MAPPERS", function() { return INDEX_MAPPERS; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "KEY_MAPPERS", function() { return KEY_MAPPERS; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "VALUE_MAPPERS", function() { return VALUE_MAPPERS; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "findEntityAddressKeyFromMap", function() { return DataProcessingUtils_findEntityAddressKeyFromMap; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "getEntityAddressKey", function() { return getEntityAddressKey; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "getEntityKeyIdsByEntitySetId", function() { return DataProcessingUtils_getEntityKeyIdsByEntitySetId; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "getPageSectionKey", function() { return getPageSectionKey; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "isValidEntityAddressKey", function() { return isValidEntityAddressKey; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "isValidPageSectionKey", function() { return isValidPageSectionKey; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "parseEntityAddressKey", function() { return parseEntityAddressKey; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "parseIdSchemaPath", function() { return parseIdSchemaPath; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "parsePageSectionKey", function() { return parsePageSectionKey; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "processAssociationEntityData", function() { return processAssociationEntityData; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "processEntityData", function() { return processEntityData; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "processEntityDataForPartialReplace", function() { return processEntityDataForPartialReplace; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "processEntityValue", function() { return processEntityValue; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "processEntityValueMap", function() { return processEntityValueMap; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "replaceEntityAddressKeys", function() { return DataProcessingUtils_replaceEntityAddressKeys; }); +__webpack_require__.d(DataProcessingUtils_namespaceObject, "wrapFormDataInPageSection", function() { return DataProcessingUtils_wrapFormDataInPageSection; }); -var _RadioWidget = _interopRequireDefault(__webpack_require__(559)); +// NAMESPACE OBJECT: ./src/fields/index.js +var src_fields_namespaceObject = {}; +__webpack_require__.r(src_fields_namespaceObject); +__webpack_require__.d(src_fields_namespaceObject, "BulletField", function() { return fields_BulletField; }); +__webpack_require__.d(src_fields_namespaceObject, "DescriptionField", function() { return src_fields_DescriptionField; }); +__webpack_require__.d(src_fields_namespaceObject, "ParagraphField", function() { return fields_ParagraphField; }); +__webpack_require__.d(src_fields_namespaceObject, "SchemaField", function() { return src_fields_SchemaField; }); -var _RangeWidget = _interopRequireDefault(__webpack_require__(560)); +// NAMESPACE OBJECT: ./src/widgets/index.js +var src_widgets_namespaceObject = {}; +__webpack_require__.r(src_widgets_namespaceObject); +__webpack_require__.d(src_widgets_namespaceObject, "BaseInput", function() { return input_BaseInput; }); +__webpack_require__.d(src_widgets_namespaceObject, "CheckboxWidget", function() { return checkbox_CheckboxWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "CheckboxesWidget", function() { return components_CheckboxesWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "DateTimeWidget", function() { return datetime_DateTimeWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "DateWidget", function() { return datetime_DateWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "RadioWidget", function() { return components_RadioWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "OtherRadioWidget", function() { return components_OtherRadioWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "SelectWidget", function() { return select_SelectWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "SignatureWidget", function() { return signature_SignatureWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "TextareaWidget", function() { return textarea_TextareaWidget; }); +__webpack_require__.d(src_widgets_namespaceObject, "TimeWidget", function() { return datetime_TimeWidget; }); -var _SelectWidget = _interopRequireDefault(__webpack_require__(561)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js +var defineProperty = __webpack_require__(5); +var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty); -var _TextareaWidget = _interopRequireDefault(__webpack_require__(562)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js +var objectWithoutProperties = __webpack_require__(66); +var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); -var _TextWidget = _interopRequireDefault(__webpack_require__(563)); +// EXTERNAL MODULE: external "react" +var external_react_ = __webpack_require__(0); +var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_); -var _URLWidget = _interopRequireDefault(__webpack_require__(564)); +// EXTERNAL MODULE: ./node_modules/lodash/isFunction.js +var isFunction = __webpack_require__(16); +var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction); -var _UpDownWidget = _interopRequireDefault(__webpack_require__(565)); +// EXTERNAL MODULE: external {"amd":"styled-components","commonjs":"styled-components","commonjs2":"styled-components"} +var external_amd_styled_components_commonjs_styled_components_commonjs2_styled_components_ = __webpack_require__(12); +var external_amd_styled_components_commonjs_styled_components_commonjs2_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_amd_styled_components_commonjs_styled_components_commonjs2_styled_components_); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +// EXTERNAL MODULE: external "lattice-ui-kit" +var external_lattice_ui_kit_ = __webpack_require__(7); -var _default = { - BaseInput: _BaseInput["default"], - PasswordWidget: _PasswordWidget["default"], - RadioWidget: _RadioWidget["default"], - UpDownWidget: _UpDownWidget["default"], - RangeWidget: _RangeWidget["default"], - SelectWidget: _SelectWidget["default"], - TextWidget: _TextWidget["default"], - DateWidget: _DateWidget["default"], - DateTimeWidget: _DateTimeWidget["default"], - AltDateWidget: _AltDateWidget["default"], - AltDateTimeWidget: _AltDateTimeWidget["default"], - EmailWidget: _EmailWidget["default"], - URLWidget: _URLWidget["default"], - TextareaWidget: _TextareaWidget["default"], - HiddenWidget: _HiddenWidget["default"], - ColorWidget: _ColorWidget["default"], - FileWidget: _FileWidget["default"], - CheckboxWidget: _CheckboxWidget["default"], - CheckboxesWidget: _CheckboxesWidget["default"] +// CONCATENATED MODULE: ./src/form/src/components/FormUtils.js +var FormUtils_transformErrors = function transformErrors(errors) { + var skip = ['should match exactly one schema in oneOf', 'should be equal to one of the allowed values']; + return errors.filter(function (error) { + return !skip.includes(error.message); + }); }; -exports["default"] = _default; - -/***/ }), -/* 548 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +// CONCATENATED MODULE: ./src/form/src/components/styled/ActionGroup.js -Object.defineProperty(exports, "__esModule", { - value: true +var ActionGroup = external_amd_styled_components_commonjs_styled_components_commonjs2_styled_components_default.a.div.withConfig({ + displayName: "ActionGroup", + componentId: "sc-1hp5mpm-0" +})(["display:flex;justify-content:space-between;padding:", ";"], function (_ref) { + var noPadding = _ref.noPadding; + return noPadding ? '0' : '0 30px 30px 30px'; }); -exports["default"] = void 0; - -var _react = _interopRequireDefault(__webpack_require__(0)); +/* harmony default export */ var styled_ActionGroup = (ActionGroup); +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +var taggedTemplateLiteral = __webpack_require__(267); +var taggedTemplateLiteral_default = /*#__PURE__*/__webpack_require__.n(taggedTemplateLiteral); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/get-own-property-descriptor.js +var get_own_property_descriptor = __webpack_require__(268); +var get_own_property_descriptor_default = /*#__PURE__*/__webpack_require__.n(get_own_property_descriptor); -var _AltDateWidget = _interopRequireDefault(__webpack_require__(269)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/get-own-property-symbols.js +var get_own_property_symbols = __webpack_require__(70); +var get_own_property_symbols_default = /*#__PURE__*/__webpack_require__.n(get_own_property_symbols); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/keys.js +var keys = __webpack_require__(11); +var keys_default = /*#__PURE__*/__webpack_require__.n(keys); -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/define-property.js +var define_property = __webpack_require__(113); +var define_property_default = /*#__PURE__*/__webpack_require__.n(define_property); -function _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; } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js -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); } +function _defineProperty(obj, key, value) { + if (key in obj) { + define_property_default()(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } -function AltDateTimeWidget(props) { - var AltDateWidget = props.registry.widgets.AltDateWidget; - return _react["default"].createElement(AltDateWidget, _extends({ - time: true - }, props)); + return obj; } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/objectSpread.js -if (false) {} - -AltDateTimeWidget.defaultProps = _objectSpread({}, _AltDateWidget["default"].defaultProps, { - time: true -}); -var _default = AltDateTimeWidget; -exports["default"] = _default; - -/***/ }), -/* 549 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _react = _interopRequireDefault(__webpack_require__(0)); +function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? Object(arguments[i]) : {}; -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + var ownKeys = keys_default()(source); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + if (typeof get_own_property_symbols_default.a === 'function') { + ownKeys = ownKeys.concat(get_own_property_symbols_default()(source).filter(function (sym) { + return get_own_property_descriptor_default()(source, sym).enumerable; + })); + } -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + ownKeys.forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + return target; +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/is-array.js +var is_array = __webpack_require__(9); +var is_array_default = /*#__PURE__*/__webpack_require__.n(is_array); -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol/iterator.js +var iterator = __webpack_require__(269); +var iterator_default = /*#__PURE__*/__webpack_require__.n(iterator); -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol.js +var symbol = __webpack_require__(55); +var symbol_default = /*#__PURE__*/__webpack_require__.n(symbol); -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); } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/typeof.js -function _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; } -function _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; } +function typeof_typeof(obj) { + "@babel/helpers - typeof"; -function BaseInput(props) { - // Note: since React 15.2.0 we can't forward unknown element attributes, so we - // exclude the "options" and "schema" ones here. - if (!props.id) { - console.log("No id for", props); - throw new Error("no id for props ".concat(JSON.stringify(props))); + if (typeof symbol_default.a === "function" && typeof iterator_default.a === "symbol") { + typeof_typeof = function _typeof(obj) { + return typeof obj; + }; + } else { + typeof_typeof = function _typeof(obj) { + return obj && typeof symbol_default.a === "function" && obj.constructor === symbol_default.a && obj !== symbol_default.a.prototype ? "symbol" : typeof obj; + }; } - var value = props.value, - readonly = props.readonly, - disabled = props.disabled, - autofocus = props.autofocus, - onBlur = props.onBlur, - onFocus = props.onFocus, - options = props.options, - schema = props.schema, - uiSchema = props.uiSchema, - formContext = props.formContext, - registry = props.registry, - rawErrors = props.rawErrors, - inputProps = _objectWithoutProperties(props, ["value", "readonly", "disabled", "autofocus", "onBlur", "onFocus", "options", "schema", "uiSchema", "formContext", "registry", "rawErrors"]); // If options.inputType is set use that as the input type - - - if (options.inputType) { - inputProps.type = options.inputType; - } else if (!inputProps.type) { - // If the schema is of type number or integer, set the input type to number - if (schema.type === "number") { - inputProps.type = "number"; // Setting step to 'any' fixes a bug in Safari where decimals are not - // allowed in number inputs - - inputProps.step = "any"; - } else if (schema.type === "integer") { - inputProps.type = "number"; // Since this is integer, you always want to step up or down in multiples - // of 1 - - inputProps.step = "1"; - } else { - inputProps.type = "text"; - } + return typeof_typeof(obj); +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/classCallCheck.js +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } - - if (options.autocomplete) { - inputProps.autoComplete = options.autocomplete; - } // If multipleOf is defined, use this as the step value. This mainly improves - // the experience for keyboard users (who can use the up/down KB arrows). +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/createClass.js - if (schema.multipleOf) { - inputProps.step = schema.multipleOf; - } +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; - if (typeof schema.minimum !== "undefined") { - inputProps.min = schema.minimum; + define_property_default()(target, descriptor.key, descriptor); } +} - if (typeof schema.maximum !== "undefined") { - inputProps.max = schema.maximum; +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/assertThisInitialized.js +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } - var _onChange = function _onChange(_ref) { - var value = _ref.target.value; - return props.onChange(value === "" ? options.emptyValue : value); - }; - - return [_react["default"].createElement("input", _extends({ - key: inputProps.id, - className: "form-control", - readOnly: readonly, - disabled: disabled, - autoFocus: autofocus, - value: value == null ? "" : value - }, inputProps, { - list: schema.examples ? "examples_".concat(inputProps.id) : null, - onChange: _onChange, - onBlur: onBlur && function (event) { - return onBlur(inputProps.id, event.target.value); - }, - onFocus: onFocus && function (event) { - return onFocus(inputProps.id, event.target.value); - } - })), schema.examples ? _react["default"].createElement("datalist", { - id: "examples_".concat(inputProps.id) - }, _toConsumableArray(new Set(schema.examples.concat(schema["default"] ? [schema["default"]] : []))).map(function (example) { - return _react["default"].createElement("option", { - key: example, - value: example - }); - })) : null]; + return self; } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/possibleConstructorReturn.js -BaseInput.defaultProps = { - required: false, - disabled: false, - readonly: false, - autofocus: false -}; -if (false) {} +function _possibleConstructorReturn(self, call) { + if (call && (typeof_typeof(call) === "object" || typeof call === "function")) { + return call; + } -var _default = BaseInput; -exports["default"] = _default; + return _assertThisInitialized(self); +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/get-prototype-of.js +var get_prototype_of = __webpack_require__(180); +var get_prototype_of_default = /*#__PURE__*/__webpack_require__.n(get_prototype_of); -/***/ }), -/* 550 */ -/***/ (function(module, exports, __webpack_require__) { +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/set-prototype-of.js +var set_prototype_of = __webpack_require__(114); +var set_prototype_of_default = /*#__PURE__*/__webpack_require__.n(set_prototype_of); -"use strict"; +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/getPrototypeOf.js -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +function getPrototypeOf_getPrototypeOf(o) { + getPrototypeOf_getPrototypeOf = set_prototype_of_default.a ? get_prototype_of_default.a : function _getPrototypeOf(o) { + return o.__proto__ || get_prototype_of_default()(o); + }; + return getPrototypeOf_getPrototypeOf(o); +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/create.js +var create = __webpack_require__(270); +var create_default = /*#__PURE__*/__webpack_require__.n(create); -var _react = _interopRequireDefault(__webpack_require__(0)); +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/setPrototypeOf.js -var _propTypes = _interopRequireDefault(__webpack_require__(4)); +function _setPrototypeOf(o, p) { + _setPrototypeOf = set_prototype_of_default.a || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; -var _utils = __webpack_require__(41); + return _setPrototypeOf(o, p); +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/inherits.js -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function CheckboxWidget(props) { - var schema = props.schema, - id = props.id, - value = props.value, - disabled = props.disabled, - readonly = props.readonly, - label = props.label, - autofocus = props.autofocus, - onBlur = props.onBlur, - onFocus = props.onFocus, - _onChange = props.onChange, - DescriptionField = props.DescriptionField; // Because an unchecked checkbox will cause html5 validation to fail, only add - // the "required" attribute if the field value must be "true", due to the - // "const" or "enum" keywords +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } - var required = (0, _utils.schemaRequiresTrueValue)(schema); - return _react["default"].createElement("div", { - className: "checkbox ".concat(disabled || readonly ? "disabled" : "") - }, schema.description && _react["default"].createElement(DescriptionField, { - description: schema.description - }), _react["default"].createElement("label", null, _react["default"].createElement("input", { - type: "checkbox", - id: id, - checked: typeof value === "undefined" ? false : value, - required: required, - disabled: disabled || readonly, - autoFocus: autofocus, - onChange: function onChange(event) { - return _onChange(event.target.checked); - }, - onBlur: onBlur && function (event) { - return onBlur(id, event.target.checked); - }, - onFocus: onFocus && function (event) { - return onFocus(id, event.target.checked); + subClass.prototype = create_default()(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true } - }), _react["default"].createElement("span", null, label))); + }); + if (superClass) _setPrototypeOf(subClass, superClass); } +// EXTERNAL MODULE: ./node_modules/prop-types/index.js +var prop_types = __webpack_require__(3); +var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); -CheckboxWidget.defaultProps = { - autofocus: false -}; - -if (false) {} - -var _default = CheckboxWidget; -exports["default"] = _default; +// EXTERNAL MODULE: ./node_modules/lodash/pick.js +var pick = __webpack_require__(271); +var pick_default = /*#__PURE__*/__webpack_require__.n(pick); -/***/ }), -/* 551 */ -/***/ (function(module, exports, __webpack_require__) { +// EXTERNAL MODULE: ./node_modules/lodash/get.js +var get = __webpack_require__(169); +var get_default = /*#__PURE__*/__webpack_require__.n(get); -"use strict"; +// EXTERNAL MODULE: ./node_modules/lodash/isEmpty.js +var isEmpty = __webpack_require__(32); +var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty); +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/ErrorList.js -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +function ErrorList_ErrorList(props) { + var errors = props.errors; + return external_react_default.a.createElement("div", { + className: "panel panel-danger errors" + }, external_react_default.a.createElement("div", { + className: "panel-heading" + }, external_react_default.a.createElement("h3", { + className: "panel-title" + }, "Errors")), external_react_default.a.createElement("ul", { + className: "list-group" + }, errors.map(function (error, i) { + return external_react_default.a.createElement("li", { + key: i, + className: "list-group-item text-danger" + }, error.stack); + }))); +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/symbol/to-primitive.js +var to_primitive = __webpack_require__(272); +var to_primitive_default = /*#__PURE__*/__webpack_require__.n(to_primitive); -var _react = _interopRequireDefault(__webpack_require__(0)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/set.js +var set = __webpack_require__(67); +var set_default = /*#__PURE__*/__webpack_require__.n(set); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/array/from.js +var from = __webpack_require__(68); +var from_default = /*#__PURE__*/__webpack_require__.n(from); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayLikeToArray.js +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; -function selectValue(value, selected, all) { - var at = all.indexOf(value); - var updated = selected.slice(0, at).concat(value, selected.slice(at)); // As inserting values at predefined index positions doesn't work with empty - // arrays, we need to reorder the updated selection to match the initial order + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } - return updated.sort(function (a, b) { - return all.indexOf(a) > all.indexOf(b); - }); + return arr2; } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/arrayWithoutHoles.js -function deselectValue(value, selected) { - return selected.filter(function (v) { - return v !== value; - }); + +function _arrayWithoutHoles(arr) { + if (is_array_default()(arr)) return _arrayLikeToArray(arr); } +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/is-iterable.js +var is_iterable = __webpack_require__(273); +var is_iterable_default = /*#__PURE__*/__webpack_require__.n(is_iterable); -function CheckboxesWidget(props) { - var id = props.id, - disabled = props.disabled, - options = props.options, - value = props.value, - autofocus = props.autofocus, - readonly = props.readonly, - _onChange = props.onChange; - var enumOptions = options.enumOptions, - enumDisabled = options.enumDisabled, - inline = options.inline; - return _react["default"].createElement("div", { - className: "checkboxes", - id: id - }, enumOptions.map(function (option, index) { - var checked = value.indexOf(option.value) !== -1; - var itemDisabled = enumDisabled && enumDisabled.indexOf(option.value) != -1; - var disabledCls = disabled || itemDisabled || readonly ? "disabled" : ""; +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/iterableToArray.js - var checkbox = _react["default"].createElement("span", null, _react["default"].createElement("input", { - type: "checkbox", - id: "".concat(id, "_").concat(index), - checked: checked, - disabled: disabled || itemDisabled || readonly, - autoFocus: autofocus && index === 0, - onChange: function onChange(event) { - var all = enumOptions.map(function (_ref) { - var value = _ref.value; - return value; - }); - if (event.target.checked) { - _onChange(selectValue(option.value, value, all)); - } else { - _onChange(deselectValue(option.value, value)); - } - } - }), _react["default"].createElement("span", null, option.label)); - return inline ? _react["default"].createElement("label", { - key: index, - className: "checkbox-inline ".concat(disabledCls) - }, checkbox) : _react["default"].createElement("div", { - key: index, - className: "checkbox ".concat(disabledCls) - }, _react["default"].createElement("label", null, checkbox)); - })); +function _iterableToArray(iter) { + if (typeof symbol_default.a !== "undefined" && is_iterable_default()(Object(iter))) return from_default()(iter); } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/unsupportedIterableToArray.js -CheckboxesWidget.defaultProps = { - autofocus: false, - options: { - inline: false - } -}; -if (false) {} +function _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 from_default()(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/nonIterableSpread.js +function _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."); +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/toConsumableArray.js -var _default = CheckboxesWidget; -exports["default"] = _default; -/***/ }), -/* 552 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/number/is-nan.js +var is_nan = __webpack_require__(181); +var is_nan_default = /*#__PURE__*/__webpack_require__.n(is_nan); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/object/assign.js +var object_assign = __webpack_require__(274); +var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign); -var _react = _interopRequireDefault(__webpack_require__(0)); +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/extends.js -var _propTypes = _interopRequireDefault(__webpack_require__(4)); +function _extends() { + _extends = assign_default.a || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } -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); } + return target; + }; -function ColorWidget(props) { - var disabled = props.disabled, - readonly = props.readonly, - BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "color" - }, props, { - disabled: disabled || readonly - })); + return _extends.apply(this, arguments); } +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutPropertiesLoose.js -if (false) {} - -var _default = ColorWidget; -exports["default"] = _default; - -/***/ }), -/* 553 */ -/***/ (function(module, exports, __webpack_require__) { +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; -"use strict"; + var sourceKeys = keys_default()(source); + var key, i; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } -var _react = _interopRequireDefault(__webpack_require__(0)); + return target; +} +// CONCATENATED MODULE: ./node_modules/@babel/runtime-corejs2/helpers/esm/objectWithoutProperties.js -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + var target = _objectWithoutPropertiesLoose(source, excluded); + var key, i; -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); } + if (get_own_property_symbols_default.a) { + var sourceSymbolKeys = get_own_property_symbols_default()(source); -function DateWidget(props) { - var _onChange = props.onChange, - BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "date" - }, props, { - onChange: function onChange(value) { - return _onChange(value || undefined); + 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]; } - })); -} - -if (false) {} + } -var _default = DateWidget; -exports["default"] = _default; + return target; +} +// EXTERNAL MODULE: ./node_modules/react-is/index.js +var react_is = __webpack_require__(115); -/***/ }), -/* 554 */ -/***/ (function(module, exports, __webpack_require__) { +// EXTERNAL MODULE: ./node_modules/json-schema-merge-allof/src/index.js +var src = __webpack_require__(170); +var src_default = /*#__PURE__*/__webpack_require__.n(src); -"use strict"; +// EXTERNAL MODULE: ./node_modules/@rjsf/core/node_modules/core-js/library/fn/array/fill.js +var fill = __webpack_require__(172); +var fill_default = /*#__PURE__*/__webpack_require__.n(fill); +// EXTERNAL MODULE: ./node_modules/lodash/union.js +var union = __webpack_require__(173); +var union_default = /*#__PURE__*/__webpack_require__.n(union); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +// EXTERNAL MODULE: ./node_modules/jsonpointer/jsonpointer.js +var jsonpointer = __webpack_require__(174); +var jsonpointer_default = /*#__PURE__*/__webpack_require__.n(jsonpointer); -var _react = _interopRequireDefault(__webpack_require__(0)); +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/parse-int.js +var parse_int = __webpack_require__(85); +var parse_int_default = /*#__PURE__*/__webpack_require__.n(parse_int); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/IconButton.js -var _utils = __webpack_require__(41); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -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); } +function IconButton_IconButton(props) { + var _props$type = props.type, + type = _props$type === void 0 ? "default" : _props$type, + icon = props.icon, + className = props.className, + otherProps = _objectWithoutProperties(props, ["type", "icon", "className"]); -function DateTimeWidget(props) { - var value = props.value, - _onChange = props.onChange, - BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "datetime-local" - }, props, { - value: (0, _utils.utcToLocal)(value), - onChange: function onChange(value) { - return _onChange((0, _utils.localToUTC)(value)); - } + return external_react_default.a.createElement("button", _extends({ + type: "button", + className: "btn btn-".concat(type, " ").concat(className) + }, otherProps), external_react_default.a.createElement("i", { + className: "glyphicon glyphicon-".concat(icon) })); } +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/AddButton.js -if (false) {} - -var _default = DateTimeWidget; -exports["default"] = _default; - -/***/ }), -/* 555 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +function AddButton(_ref) { + var className = _ref.className, + onClick = _ref.onClick, + disabled = _ref.disabled; + return external_react_default.a.createElement("div", { + className: "row" + }, external_react_default.a.createElement("p", { + className: "col-xs-3 col-xs-offset-9 text-right ".concat(className) + }, external_react_default.a.createElement(IconButton_IconButton, { + type: "info", + icon: "plus", + className: "btn-add col-xs-12", + "aria-label": "Add", + tabIndex: "0", + onClick: onClick, + disabled: disabled + }))); +} +// EXTERNAL MODULE: ./node_modules/@rjsf/core/node_modules/core-js/library/fn/array/includes.js +var includes = __webpack_require__(175); +var includes_default = /*#__PURE__*/__webpack_require__.n(includes); +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/types.js -Object.defineProperty(exports, "__esModule", { - value: true +var types_registry = prop_types_default.a.shape({ + ArrayFieldTemplate: prop_types_default.a.elementType, + FieldTemplate: prop_types_default.a.elementType, + ObjectFieldTemplate: prop_types_default.a.elementType, + definitions: prop_types_default.a.object.isRequired, + rootSchema: prop_types_default.a.object, + fields: prop_types_default.a.objectOf(prop_types_default.a.elementType).isRequired, + formContext: prop_types_default.a.object.isRequired, + widgets: prop_types_default.a.objectOf(prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.object])).isRequired }); -exports["default"] = void 0; - -var _react = _interopRequireDefault(__webpack_require__(0)); - -var _propTypes = _interopRequireDefault(__webpack_require__(4)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var types_fieldProps = { + autofocus: prop_types_default.a.bool, + disabled: prop_types_default.a.bool, + errorSchema: prop_types_default.a.object, + formData: prop_types_default.a.any, + idSchema: prop_types_default.a.object, + onBlur: prop_types_default.a.func, + onChange: prop_types_default.a.func.isRequired, + onFocus: prop_types_default.a.func, + rawErrors: prop_types_default.a.arrayOf(prop_types_default.a.string), + readonly: prop_types_default.a.bool, + registry: types_registry.isRequired, + required: prop_types_default.a.bool, + schema: prop_types_default.a.object.isRequired, + uiSchema: prop_types_default.a.shape({ + "ui:options": prop_types_default.a.shape({ + addable: prop_types_default.a.bool, + orderable: prop_types_default.a.bool, + removable: prop_types_default.a.bool + }) + }) +}; +// EXTERNAL MODULE: ./node_modules/shortid/index.js +var shortid = __webpack_require__(176); +var shortid_default = /*#__PURE__*/__webpack_require__.n(shortid); -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); } +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/ArrayField.js -function EmailWidget(props) { - var BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "email" - }, props)); -} -if (false) {} -var _default = EmailWidget; -exports["default"] = _default; -/***/ }), -/* 556 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _react = _interopRequireWildcard(__webpack_require__(0)); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -var _utils = __webpack_require__(41); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _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)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } } -function _typeof(obj) { 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); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } -function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } -function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } -function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } -function _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); } -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } +function ArrayField_ArrayFieldTitle(_ref) { + var TitleField = _ref.TitleField, + idSchema = _ref.idSchema, + title = _ref.title, + required = _ref.required; -function _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; } + if (!title) { + return null; + } -function addNameToDataURL(dataURL, name) { - return dataURL.replace(";base64", ";name=".concat(encodeURIComponent(name), ";base64")); + var id = "".concat(idSchema.$id, "__title"); + return external_react_default.a.createElement(TitleField, { + id: id, + title: title, + required: required + }); } -function processFile(file) { - var name = file.name, - size = file.size, - type = file.type; - return new Promise(function (resolve, reject) { - var reader = new window.FileReader(); - reader.onerror = reject; +function ArrayField_ArrayFieldDescription(_ref2) { + var DescriptionField = _ref2.DescriptionField, + idSchema = _ref2.idSchema, + description = _ref2.description; - reader.onload = function (event) { - resolve({ - dataURL: addNameToDataURL(event.target.result, name), - name: name, - size: size, - type: type - }); - }; + if (!description) { + return null; + } - reader.readAsDataURL(file); + var id = "".concat(idSchema.$id, "__description"); + return external_react_default.a.createElement(DescriptionField, { + id: id, + description: description }); -} +} // Used in the two templates -function processFiles(files) { - return Promise.all([].map.call(files, processFile)); -} -function FilesInfo(props) { - var filesInfo = props.filesInfo; +function ArrayField_DefaultArrayItem(props) { + var btnStyle = { + flex: 1, + paddingLeft: 6, + paddingRight: 6, + fontWeight: "bold" + }; + return external_react_default.a.createElement("div", { + key: props.key, + className: props.className + }, external_react_default.a.createElement("div", { + className: props.hasToolbar ? "col-xs-9" : "col-xs-12" + }, props.children), props.hasToolbar && external_react_default.a.createElement("div", { + className: "col-xs-3 array-item-toolbox" + }, external_react_default.a.createElement("div", { + className: "btn-group", + style: { + display: "flex", + justifyContent: "space-around" + } + }, (props.hasMoveUp || props.hasMoveDown) && external_react_default.a.createElement(IconButton_IconButton, { + icon: "arrow-up", + "aria-label": "Move up", + className: "array-item-move-up", + tabIndex: "-1", + style: btnStyle, + disabled: props.disabled || props.readonly || !props.hasMoveUp, + onClick: props.onReorderClick(props.index, props.index - 1) + }), (props.hasMoveUp || props.hasMoveDown) && external_react_default.a.createElement(IconButton_IconButton, { + icon: "arrow-down", + className: "array-item-move-down", + "aria-label": "Move down", + tabIndex: "-1", + style: btnStyle, + disabled: props.disabled || props.readonly || !props.hasMoveDown, + onClick: props.onReorderClick(props.index, props.index + 1) + }), props.hasRemove && external_react_default.a.createElement(IconButton_IconButton, { + type: "danger", + icon: "remove", + "aria-label": "Remove", + className: "array-item-remove", + tabIndex: "-1", + style: btnStyle, + disabled: props.disabled || props.readonly, + onClick: props.onDropIndexClick(props.index) + })))); +} - if (filesInfo.length === 0) { - return null; - } +function DefaultFixedArrayFieldTemplate(props) { + return external_react_default.a.createElement("fieldset", { + className: props.className, + id: props.idSchema.$id + }, external_react_default.a.createElement(ArrayField_ArrayFieldTitle, { + key: "array-field-title-".concat(props.idSchema.$id), + TitleField: props.TitleField, + idSchema: props.idSchema, + title: props.uiSchema["ui:title"] || props.title, + required: props.required + }), (props.uiSchema["ui:description"] || props.schema.description) && external_react_default.a.createElement("div", { + className: "field-description", + key: "field-description-".concat(props.idSchema.$id) + }, props.uiSchema["ui:description"] || props.schema.description), external_react_default.a.createElement("div", { + className: "row array-item-list", + key: "array-item-list-".concat(props.idSchema.$id) + }, props.items && props.items.map(ArrayField_DefaultArrayItem)), props.canAdd && external_react_default.a.createElement(AddButton, { + className: "array-item-add", + onClick: props.onAddClick, + disabled: props.disabled || props.readonly + })); +} - return _react["default"].createElement("ul", { - className: "file-info" - }, filesInfo.map(function (fileInfo, key) { - var name = fileInfo.name, - size = fileInfo.size, - type = fileInfo.type; - return _react["default"].createElement("li", { - key: key - }, _react["default"].createElement("strong", null, name), " (", type, ", ", size, " bytes)"); +function DefaultNormalArrayFieldTemplate(props) { + return external_react_default.a.createElement("fieldset", { + className: props.className, + id: props.idSchema.$id + }, external_react_default.a.createElement(ArrayField_ArrayFieldTitle, { + key: "array-field-title-".concat(props.idSchema.$id), + TitleField: props.TitleField, + idSchema: props.idSchema, + title: props.uiSchema["ui:title"] || props.title, + required: props.required + }), (props.uiSchema["ui:description"] || props.schema.description) && external_react_default.a.createElement(ArrayField_ArrayFieldDescription, { + key: "array-field-description-".concat(props.idSchema.$id), + DescriptionField: props.DescriptionField, + idSchema: props.idSchema, + description: props.uiSchema["ui:description"] || props.schema.description + }), external_react_default.a.createElement("div", { + className: "row array-item-list", + key: "array-item-list-".concat(props.idSchema.$id) + }, props.items && props.items.map(function (p) { + return ArrayField_DefaultArrayItem(p); + })), props.canAdd && external_react_default.a.createElement(AddButton, { + className: "array-item-add", + onClick: props.onAddClick, + disabled: props.disabled || props.readonly })); } -function extractFileInfo(dataURLs) { - return dataURLs.filter(function (dataURL) { - return typeof dataURL !== "undefined"; - }).map(function (dataURL) { - var _dataURItoBlob = (0, _utils.dataURItoBlob)(dataURL), - blob = _dataURItoBlob.blob, - name = _dataURItoBlob.name; +function generateRowId() { + return shortid_default.a.generate(); +} +function generateKeyedFormData(formData) { + return !is_array_default()(formData) ? [] : formData.map(function (item) { return { - name: name, - size: blob.size, - type: blob.type + key: generateRowId(), + item: item }; }); } -var FileWidget = +function keyedToPlainFormData(keyedFormData) { + return keyedFormData.map(function (keyedItem) { + return keyedItem.item; + }); +} + +var ArrayField_ArrayField = /*#__PURE__*/ function (_Component) { - _inherits(FileWidget, _Component); + _inherits(ArrayField, _Component); - function FileWidget(props) { + function ArrayField(props) { var _this; - _classCallCheck(this, FileWidget); + _classCallCheck(this, ArrayField); - _this = _possibleConstructorReturn(this, _getPrototypeOf(FileWidget).call(this, props)); + _this = _possibleConstructorReturn(this, getPrototypeOf_getPrototypeOf(ArrayField).call(this, props)); - _defineProperty(_assertThisInitialized(_this), "onChange", function (event) { + _defineProperty(_assertThisInitialized(_this), "_getNewFormDataRow", function () { var _this$props = _this.props, - multiple = _this$props.multiple, - onChange = _this$props.onChange; - processFiles(event.target.files).then(function (filesInfo) { - var state = { - values: filesInfo.map(function (fileInfo) { - return fileInfo.dataURL; - }), - filesInfo: filesInfo - }; + schema = _this$props.schema, + _this$props$registry = _this$props.registry, + registry = _this$props$registry === void 0 ? getDefaultRegistry() : _this$props$registry; + var rootSchema = registry.rootSchema; + var itemSchema = schema.items; - _this.setState(state, function () { - if (multiple) { - onChange(state.values); - } else { - onChange(state.values[0]); - } - }); - }); - }); + if (isFixedItems(schema) && allowAdditionalItems(schema)) { + itemSchema = schema.additionalItems; + } - var value = props.value; - var values = Array.isArray(value) ? value : [value]; - _this.state = { - values: values, - filesInfo: extractFileInfo(values) - }; - return _this; - } + return getDefaultFormState(itemSchema, undefined, rootSchema); + }); - _createClass(FileWidget, [{ - key: "shouldComponentUpdate", - value: function shouldComponentUpdate(nextProps, nextState) { - return (0, _utils.shouldRender)(this, nextProps, nextState); - } - }, { - key: "render", - value: function render() { - var _this2 = this; + _defineProperty(_assertThisInitialized(_this), "onAddClick", function (event) { + if (event) { + event.preventDefault(); + } - var _this$props2 = this.props, - multiple = _this$props2.multiple, - id = _this$props2.id, - readonly = _this$props2.readonly, - disabled = _this$props2.disabled, - autofocus = _this$props2.autofocus, - options = _this$props2.options; - var filesInfo = this.state.filesInfo; - return _react["default"].createElement("div", null, _react["default"].createElement("p", null, _react["default"].createElement("input", { - ref: function ref(_ref) { - return _this2.inputRef = _ref; - }, - id: id, - type: "file", - disabled: readonly || disabled, - onChange: this.onChange, - defaultValue: "", - autoFocus: autofocus, - multiple: multiple, - accept: options.accept - })), _react["default"].createElement(FilesInfo, { - filesInfo: filesInfo - })); - } - }]); + var onChange = _this.props.onChange; + var newKeyedFormDataRow = { + key: generateRowId(), + item: _this._getNewFormDataRow() + }; + var newKeyedFormData = [].concat(_toConsumableArray(_this.state.keyedFormData), [newKeyedFormDataRow]); - return FileWidget; -}(_react.Component); + _this.setState({ + keyedFormData: newKeyedFormData, + updatedKeyedFormData: true + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData)); + }); + }); -FileWidget.defaultProps = { - autofocus: false -}; + _defineProperty(_assertThisInitialized(_this), "onAddIndexClick", function (index) { + return function (event) { + if (event) { + event.preventDefault(); + } -if (false) {} + var onChange = _this.props.onChange; + var newKeyedFormDataRow = { + key: generateRowId(), + item: _this._getNewFormDataRow() + }; -var _default = FileWidget; -exports["default"] = _default; + var newKeyedFormData = _toConsumableArray(_this.state.keyedFormData); -/***/ }), -/* 557 */ -/***/ (function(module, exports, __webpack_require__) { + newKeyedFormData.splice(index, 0, newKeyedFormDataRow); -"use strict"; + _this.setState({ + keyedFormData: newKeyedFormData, + updatedKeyedFormData: true + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData)); + }); + }; + }); + _defineProperty(_assertThisInitialized(_this), "onDropIndexClick", function (index) { + return function (event) { + if (event) { + event.preventDefault(); + } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; + var onChange = _this.props.onChange; + var keyedFormData = _this.state.keyedFormData; // refs #195: revalidate to ensure properly reindexing errors -var _react = _interopRequireDefault(__webpack_require__(0)); + var newErrorSchema; -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + if (_this.props.errorSchema) { + newErrorSchema = {}; + var errorSchema = _this.props.errorSchema; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + for (var i in errorSchema) { + i = parse_int_default()(i); -function HiddenWidget(_ref) { - var id = _ref.id, - value = _ref.value; - return _react["default"].createElement("input", { - type: "hidden", - id: id, - value: typeof value === "undefined" ? "" : value - }); -} + if (i < index) { + newErrorSchema[i] = errorSchema[i]; + } else if (i > index) { + newErrorSchema[i - 1] = errorSchema[i]; + } + } + } -if (false) {} + var newKeyedFormData = keyedFormData.filter(function (_, i) { + return i !== index; + }); -var _default = HiddenWidget; -exports["default"] = _default; + _this.setState({ + keyedFormData: newKeyedFormData, + updatedKeyedFormData: true + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema); + }); + }; + }); -/***/ }), -/* 558 */ -/***/ (function(module, exports, __webpack_require__) { + _defineProperty(_assertThisInitialized(_this), "onReorderClick", function (index, newIndex) { + return function (event) { + if (event) { + event.preventDefault(); + event.target.blur(); + } -"use strict"; + var onChange = _this.props.onChange; + var newErrorSchema; + if (_this.props.errorSchema) { + newErrorSchema = {}; + var errorSchema = _this.props.errorSchema; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; + for (var i in errorSchema) { + if (i == index) { + newErrorSchema[newIndex] = errorSchema[index]; + } else if (i == newIndex) { + newErrorSchema[index] = errorSchema[newIndex]; + } else { + newErrorSchema[i] = errorSchema[i]; + } + } + } -var _react = _interopRequireDefault(__webpack_require__(0)); + var keyedFormData = _this.state.keyedFormData; -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + function reOrderArray() { + // Copy item + var _newKeyedFormData = keyedFormData.slice(); // Moves item from index to newIndex -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -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); } + _newKeyedFormData.splice(index, 1); -function PasswordWidget(props) { - var BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "password" - }, props)); -} + _newKeyedFormData.splice(newIndex, 0, keyedFormData[index]); -if (false) {} + return _newKeyedFormData; + } -var _default = PasswordWidget; -exports["default"] = _default; + var newKeyedFormData = reOrderArray(); -/***/ }), -/* 559 */ -/***/ (function(module, exports, __webpack_require__) { + _this.setState({ + keyedFormData: newKeyedFormData + }, function () { + return onChange(keyedToPlainFormData(newKeyedFormData), newErrorSchema); + }); + }; + }); -"use strict"; + _defineProperty(_assertThisInitialized(_this), "onChangeForIndex", function (index) { + return function (value, errorSchema) { + var _this$props2 = _this.props, + formData = _this$props2.formData, + onChange = _this$props2.onChange; + var newFormData = formData.map(function (item, i) { + // We need to treat undefined items as nulls to have validation. + // See https://github.com/tdegrunt/jsonschema/issues/206 + var jsonValue = typeof value === "undefined" ? null : value; + return index === i ? jsonValue : item; + }); + onChange(newFormData, errorSchema && _this.props.errorSchema && _objectSpread({}, _this.props.errorSchema, _defineProperty({}, index, errorSchema))); + }; + }); + _defineProperty(_assertThisInitialized(_this), "onSelectChange", function (value) { + _this.props.onChange(value); + }); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; + var _formData = props.formData; -var _react = _interopRequireDefault(__webpack_require__(0)); + var _keyedFormData = generateKeyedFormData(_formData); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + _this.state = { + keyedFormData: _keyedFormData, + updatedKeyedFormData: false + }; + return _this; + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + _createClass(ArrayField, [{ + key: "isItemRequired", + value: function isItemRequired(itemSchema) { + if (is_array_default()(itemSchema.type)) { + // While we don't yet support composite/nullable jsonschema types, it's + // future-proof to check for requirement against these. + return !includes_default()(itemSchema.type, "null"); + } // All non-null array item types are inherently required by design -function RadioWidget(props) { - var options = props.options, - value = props.value, - required = props.required, - disabled = props.disabled, - readonly = props.readonly, - autofocus = props.autofocus, - onBlur = props.onBlur, - onFocus = props.onFocus, - _onChange = props.onChange, - id = props.id; // Generating a unique field name to identify this set of radio buttons - var name = Math.random().toString(); - var enumOptions = options.enumOptions, - enumDisabled = options.enumDisabled, - inline = options.inline; // checked={checked} has been moved above name={name}, As mentioned in #349; - // this is a temporary fix for radio button rendering bug in React, facebook/react#7630. + return itemSchema.type !== "null"; + } + }, { + key: "canAddItem", + value: function canAddItem(formItems) { + var _this$props3 = this.props, + schema = _this$props3.schema, + uiSchema = _this$props3.uiSchema; - return _react["default"].createElement("div", { - className: "field-radio-group", - id: id - }, enumOptions.map(function (option, i) { - var checked = option.value === value; - var itemDisabled = enumDisabled && enumDisabled.indexOf(option.value) != -1; - var disabledCls = disabled || itemDisabled || readonly ? "disabled" : ""; + var _getUiOptions = getUiOptions(uiSchema), + addable = _getUiOptions.addable; - var radio = _react["default"].createElement("span", null, _react["default"].createElement("input", { - type: "radio", - checked: checked, - name: name, - required: required, - value: option.value, - disabled: disabled || itemDisabled || readonly, - autoFocus: autofocus && i === 0, - onChange: function onChange(_) { - return _onChange(option.value); - }, - onBlur: onBlur && function (event) { - return onBlur(id, event.target.value); - }, - onFocus: onFocus && function (event) { - return onFocus(id, event.target.value); + if (addable !== false) { + // if ui:options.addable was not explicitly set to false, we can add + // another item if we have not exceeded maxItems yet + if (schema.maxItems !== undefined) { + addable = formItems.length < schema.maxItems; + } else { + addable = true; + } } - }), _react["default"].createElement("span", null, option.label)); - - return inline ? _react["default"].createElement("label", { - key: i, - className: "radio-inline ".concat(disabledCls) - }, radio) : _react["default"].createElement("div", { - key: i, - className: "radio ".concat(disabledCls) - }, _react["default"].createElement("label", null, radio)); - })); -} - -RadioWidget.defaultProps = { - autofocus: false -}; - -if (false) {} - -var _default = RadioWidget; -exports["default"] = _default; - -/***/ }), -/* 560 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _react = _interopRequireDefault(__webpack_require__(0)); - -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -var _utils = __webpack_require__(41); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -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); } + return addable; + } + }, { + key: "render", + value: function render() { + var _this$props4 = this.props, + schema = _this$props4.schema, + uiSchema = _this$props4.uiSchema, + idSchema = _this$props4.idSchema, + _this$props4$registry = _this$props4.registry, + registry = _this$props4$registry === void 0 ? getDefaultRegistry() : _this$props4$registry; + var rootSchema = registry.rootSchema; -function RangeWidget(props) { - var schema = props.schema, - value = props.value, - BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement("div", { - className: "field-range-wrapper" - }, _react["default"].createElement(BaseInput, _extends({ - type: "range" - }, props, (0, _utils.rangeSpec)(schema))), _react["default"].createElement("span", { - className: "range-view" - }, value)); -} + if (!schema.hasOwnProperty("items")) { + var fields = registry.fields; + var UnsupportedField = fields.UnsupportedField; + return external_react_default.a.createElement(UnsupportedField, { + schema: schema, + idSchema: idSchema, + reason: "Missing items definition" + }); + } -if (false) {} + if (isFixedItems(schema)) { + return this.renderFixedArray(); + } -var _default = RangeWidget; -exports["default"] = _default; + if (isFilesArray(schema, uiSchema, rootSchema)) { + return this.renderFiles(); + } -/***/ }), -/* 561 */ -/***/ (function(module, exports, __webpack_require__) { + if (isMultiSelect(schema, rootSchema)) { + return this.renderMultiSelect(); + } -"use strict"; + return this.renderNormalArray(); + } + }, { + key: "renderNormalArray", + value: function renderNormalArray() { + var _this2 = this; + var _this$props5 = this.props, + schema = _this$props5.schema, + uiSchema = _this$props5.uiSchema, + errorSchema = _this$props5.errorSchema, + idSchema = _this$props5.idSchema, + name = _this$props5.name, + required = _this$props5.required, + disabled = _this$props5.disabled, + readonly = _this$props5.readonly, + autofocus = _this$props5.autofocus, + _this$props5$registry = _this$props5.registry, + registry = _this$props5$registry === void 0 ? getDefaultRegistry() : _this$props5$registry, + onBlur = _this$props5.onBlur, + onFocus = _this$props5.onFocus, + idPrefix = _this$props5.idPrefix, + rawErrors = _this$props5.rawErrors; + var title = schema.title === undefined ? name : schema.title; + var ArrayFieldTemplate = registry.ArrayFieldTemplate, + rootSchema = registry.rootSchema, + fields = registry.fields, + formContext = registry.formContext; + var TitleField = fields.TitleField, + DescriptionField = fields.DescriptionField; + var itemsSchema = retrieveSchema(schema.items, rootSchema); + var formData = keyedToPlainFormData(this.state.keyedFormData); + var arrayProps = { + canAdd: this.canAddItem(formData), + items: this.state.keyedFormData.map(function (keyedItem, index) { + var key = keyedItem.key, + item = keyedItem.item; + var itemSchema = retrieveSchema(schema.items, rootSchema, item); + var itemErrorSchema = errorSchema ? errorSchema[index] : undefined; + var itemIdPrefix = idSchema.$id + "_" + index; + var itemIdSchema = toIdSchema(itemSchema, itemIdPrefix, rootSchema, item, idPrefix); + return _this2.renderArrayFieldItem({ + key: key, + index: index, + canMoveUp: index > 0, + canMoveDown: index < formData.length - 1, + itemSchema: itemSchema, + itemIdSchema: itemIdSchema, + itemErrorSchema: itemErrorSchema, + itemData: item, + itemUiSchema: uiSchema.items, + autofocus: autofocus && index === 0, + onBlur: onBlur, + onFocus: onFocus + }); + }), + className: "field field-array field-array-of-".concat(itemsSchema.type), + DescriptionField: DescriptionField, + disabled: disabled, + idSchema: idSchema, + uiSchema: uiSchema, + onAddClick: this.onAddClick, + readonly: readonly, + required: required, + schema: schema, + title: title, + TitleField: TitleField, + formContext: formContext, + formData: formData, + rawErrors: rawErrors, + registry: registry + }; // Check if a custom render function was passed in -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; + var Component = uiSchema["ui:ArrayFieldTemplate"] || ArrayFieldTemplate || DefaultNormalArrayFieldTemplate; + return external_react_default.a.createElement(Component, arrayProps); + } + }, { + key: "renderMultiSelect", + value: function renderMultiSelect() { + var _this$props6 = this.props, + schema = _this$props6.schema, + idSchema = _this$props6.idSchema, + uiSchema = _this$props6.uiSchema, + formData = _this$props6.formData, + disabled = _this$props6.disabled, + readonly = _this$props6.readonly, + required = _this$props6.required, + label = _this$props6.label, + placeholder = _this$props6.placeholder, + autofocus = _this$props6.autofocus, + onBlur = _this$props6.onBlur, + onFocus = _this$props6.onFocus, + _this$props6$registry = _this$props6.registry, + registry = _this$props6$registry === void 0 ? getDefaultRegistry() : _this$props6$registry, + rawErrors = _this$props6.rawErrors; + var items = this.props.formData; + var widgets = registry.widgets, + rootSchema = registry.rootSchema, + formContext = registry.formContext; + var itemsSchema = retrieveSchema(schema.items, rootSchema, formData); + var enumOptions = optionsList(itemsSchema); -var _react = _interopRequireDefault(__webpack_require__(0)); + var _getUiOptions$enumOpt = _objectSpread({}, getUiOptions(uiSchema), { + enumOptions: enumOptions + }), + _getUiOptions$enumOpt2 = _getUiOptions$enumOpt.widget, + widget = _getUiOptions$enumOpt2 === void 0 ? "select" : _getUiOptions$enumOpt2, + options = _objectWithoutProperties(_getUiOptions$enumOpt, ["widget"]); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); + var Widget = getWidget(schema, widget, widgets); + return external_react_default.a.createElement(Widget, { + id: idSchema && idSchema.$id, + multiple: true, + onChange: this.onSelectChange, + onBlur: onBlur, + onFocus: onFocus, + options: options, + schema: schema, + registry: registry, + value: items, + disabled: disabled, + readonly: readonly, + required: required, + label: label, + placeholder: placeholder, + formContext: formContext, + autofocus: autofocus, + rawErrors: rawErrors + }); + } + }, { + key: "renderFiles", + value: function renderFiles() { + var _this$props7 = this.props, + schema = _this$props7.schema, + uiSchema = _this$props7.uiSchema, + idSchema = _this$props7.idSchema, + name = _this$props7.name, + disabled = _this$props7.disabled, + readonly = _this$props7.readonly, + autofocus = _this$props7.autofocus, + onBlur = _this$props7.onBlur, + onFocus = _this$props7.onFocus, + _this$props7$registry = _this$props7.registry, + registry = _this$props7$registry === void 0 ? getDefaultRegistry() : _this$props7$registry, + rawErrors = _this$props7.rawErrors; + var title = schema.title || name; + var items = this.props.formData; + var widgets = registry.widgets, + formContext = registry.formContext; -var _utils = __webpack_require__(41); + var _getUiOptions2 = getUiOptions(uiSchema), + _getUiOptions2$widget = _getUiOptions2.widget, + widget = _getUiOptions2$widget === void 0 ? "files" : _getUiOptions2$widget, + options = _objectWithoutProperties(_getUiOptions2, ["widget"]); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Widget = getWidget(schema, widget, widgets); + return external_react_default.a.createElement(Widget, { + options: options, + id: idSchema && idSchema.$id, + multiple: true, + onChange: this.onSelectChange, + onBlur: onBlur, + onFocus: onFocus, + schema: schema, + title: title, + value: items, + disabled: disabled, + readonly: readonly, + formContext: formContext, + autofocus: autofocus, + rawErrors: rawErrors + }); + } + }, { + key: "renderFixedArray", + value: function renderFixedArray() { + var _this3 = this; -var nums = new Set(["number", "integer"]); -/** - * This is a silly limitation in the DOM where option change event values are - * always retrieved as strings. - */ + var _this$props8 = this.props, + schema = _this$props8.schema, + uiSchema = _this$props8.uiSchema, + formData = _this$props8.formData, + errorSchema = _this$props8.errorSchema, + idPrefix = _this$props8.idPrefix, + idSchema = _this$props8.idSchema, + name = _this$props8.name, + required = _this$props8.required, + disabled = _this$props8.disabled, + readonly = _this$props8.readonly, + autofocus = _this$props8.autofocus, + _this$props8$registry = _this$props8.registry, + registry = _this$props8$registry === void 0 ? getDefaultRegistry() : _this$props8$registry, + onBlur = _this$props8.onBlur, + onFocus = _this$props8.onFocus, + rawErrors = _this$props8.rawErrors; + var title = schema.title || name; + var items = this.props.formData; + var ArrayFieldTemplate = registry.ArrayFieldTemplate, + rootSchema = registry.rootSchema, + fields = registry.fields, + formContext = registry.formContext; + var TitleField = fields.TitleField; + var itemSchemas = schema.items.map(function (item, index) { + return retrieveSchema(item, rootSchema, formData[index]); + }); + var additionalSchema = allowAdditionalItems(schema) ? retrieveSchema(schema.additionalItems, rootSchema, formData) : null; -function processValue(schema, value) { - // "enum" is a reserved word, so only "type" and "items" can be destructured - var type = schema.type, - items = schema.items; + if (!items || items.length < itemSchemas.length) { + // to make sure at least all fixed items are generated + items = items || []; + items = items.concat(new Array(itemSchemas.length - items.length)); + } // These are the props passed into the render function - if (value === "") { - return undefined; - } else if (type === "array" && items && nums.has(items.type)) { - return value.map(_utils.asNumber); - } else if (type === "boolean") { - return value === "true"; - } else if (type === "number") { - return (0, _utils.asNumber)(value); - } // If type is undefined, but an enum is present, try and infer the type from - // the enum values + var arrayProps = { + canAdd: this.canAddItem(items) && additionalSchema, + className: "field field-array field-array-fixed-items", + disabled: disabled, + idSchema: idSchema, + formData: formData, + items: this.state.keyedFormData.map(function (keyedItem, index) { + var key = keyedItem.key, + item = keyedItem.item; + var additional = index >= itemSchemas.length; + var itemSchema = additional ? retrieveSchema(schema.additionalItems, rootSchema, item) : itemSchemas[index]; + var itemIdPrefix = idSchema.$id + "_" + index; + var itemIdSchema = toIdSchema(itemSchema, itemIdPrefix, rootSchema, item, idPrefix); + var itemUiSchema = additional ? uiSchema.additionalItems || {} : is_array_default()(uiSchema.items) ? uiSchema.items[index] : uiSchema.items || {}; + var itemErrorSchema = errorSchema ? errorSchema[index] : undefined; + return _this3.renderArrayFieldItem({ + key: key, + index: index, + canRemove: additional, + canMoveUp: index >= itemSchemas.length + 1, + canMoveDown: additional && index < items.length - 1, + itemSchema: itemSchema, + itemData: item, + itemUiSchema: itemUiSchema, + itemIdSchema: itemIdSchema, + itemErrorSchema: itemErrorSchema, + autofocus: autofocus && index === 0, + onBlur: onBlur, + onFocus: onFocus + }); + }), + onAddClick: this.onAddClick, + readonly: readonly, + required: required, + schema: schema, + uiSchema: uiSchema, + title: title, + TitleField: TitleField, + formContext: formContext, + rawErrors: rawErrors + }; // Check if a custom template template was passed in - if (schema["enum"]) { - if (schema["enum"].every(function (x) { - return (0, _utils.guessType)(x) === "number"; - })) { - return (0, _utils.asNumber)(value); - } else if (schema["enum"].every(function (x) { - return (0, _utils.guessType)(x) === "boolean"; - })) { - return value === "true"; + var Template = uiSchema["ui:ArrayFieldTemplate"] || ArrayFieldTemplate || DefaultFixedArrayFieldTemplate; + return external_react_default.a.createElement(Template, arrayProps); } - } - - return value; -} + }, { + key: "renderArrayFieldItem", + value: function renderArrayFieldItem(props) { + var key = props.key, + index = props.index, + _props$canRemove = props.canRemove, + canRemove = _props$canRemove === void 0 ? true : _props$canRemove, + _props$canMoveUp = props.canMoveUp, + canMoveUp = _props$canMoveUp === void 0 ? true : _props$canMoveUp, + _props$canMoveDown = props.canMoveDown, + canMoveDown = _props$canMoveDown === void 0 ? true : _props$canMoveDown, + itemSchema = props.itemSchema, + itemData = props.itemData, + itemUiSchema = props.itemUiSchema, + itemIdSchema = props.itemIdSchema, + itemErrorSchema = props.itemErrorSchema, + autofocus = props.autofocus, + onBlur = props.onBlur, + onFocus = props.onFocus, + rawErrors = props.rawErrors; + var _this$props9 = this.props, + disabled = _this$props9.disabled, + readonly = _this$props9.readonly, + uiSchema = _this$props9.uiSchema, + _this$props9$registry = _this$props9.registry, + registry = _this$props9$registry === void 0 ? getDefaultRegistry() : _this$props9$registry; + var SchemaField = registry.fields.SchemaField; -function getValue(event, multiple) { - if (multiple) { - return [].slice.call(event.target.options).filter(function (o) { - return o.selected; - }).map(function (o) { - return o.value; - }); - } else { - return event.target.value; - } -} + var _orderable$removable$ = _objectSpread({ + orderable: true, + removable: true + }, uiSchema["ui:options"]), + orderable = _orderable$removable$.orderable, + removable = _orderable$removable$.removable; -function SelectWidget(props) { - var schema = props.schema, - id = props.id, - options = props.options, - value = props.value, - required = props.required, - disabled = props.disabled, - readonly = props.readonly, - multiple = props.multiple, - autofocus = props.autofocus, - _onChange = props.onChange, - onBlur = props.onBlur, - onFocus = props.onFocus, - placeholder = props.placeholder; - var enumOptions = options.enumOptions, - enumDisabled = options.enumDisabled; - var emptyValue = multiple ? [] : ""; - return _react["default"].createElement("select", { - id: id, - multiple: multiple, - className: "form-control", - value: typeof value === "undefined" ? emptyValue : value, - required: required, - disabled: disabled || readonly, - autoFocus: autofocus, - onBlur: onBlur && function (event) { - var newValue = getValue(event, multiple); - onBlur(id, processValue(schema, newValue)); - }, - onFocus: onFocus && function (event) { - var newValue = getValue(event, multiple); - onFocus(id, processValue(schema, newValue)); - }, - onChange: function onChange(event) { - var newValue = getValue(event, multiple); + var has = { + moveUp: orderable && canMoveUp, + moveDown: orderable && canMoveDown, + remove: removable && canRemove + }; + has.toolbar = keys_default()(has).some(function (key) { + return has[key]; + }); + return { + children: external_react_default.a.createElement(SchemaField, { + index: index, + schema: itemSchema, + uiSchema: itemUiSchema, + formData: itemData, + errorSchema: itemErrorSchema, + idSchema: itemIdSchema, + required: this.isItemRequired(itemSchema), + onChange: this.onChangeForIndex(index), + onBlur: onBlur, + onFocus: onFocus, + registry: this.props.registry, + disabled: this.props.disabled, + readonly: this.props.readonly, + autofocus: autofocus, + rawErrors: rawErrors + }), + className: "array-item", + disabled: disabled, + hasToolbar: has.toolbar, + hasMoveUp: has.moveUp, + hasMoveDown: has.moveDown, + hasRemove: has.remove, + index: index, + key: key, + onAddIndexClick: this.onAddIndexClick, + onDropIndexClick: this.onDropIndexClick, + onReorderClick: this.onReorderClick, + readonly: readonly + }; + } + }, { + key: "itemTitle", + get: function get() { + var schema = this.props.schema; + return schema.items.title || schema.items.description || "Item"; + } + }], [{ + key: "getDerivedStateFromProps", + value: function getDerivedStateFromProps(nextProps, prevState) { + // Don't call getDerivedStateFromProps if keyed formdata was just updated. + if (prevState.updatedKeyedFormData) { + return { + updatedKeyedFormData: false + }; + } - _onChange(processValue(schema, newValue)); + var nextFormData = nextProps.formData || []; + var previousKeyedFormData = prevState.keyedFormData || []; + var newKeyedFormData = nextFormData.length === previousKeyedFormData.length ? previousKeyedFormData.map(function (previousKeyedFormDatum, index) { + return { + key: previousKeyedFormDatum.key, + item: nextFormData[index] + }; + }) : generateKeyedFormData(nextFormData); + return { + keyedFormData: newKeyedFormData + }; } - }, !multiple && schema["default"] === undefined && _react["default"].createElement("option", { - value: "" - }, placeholder), enumOptions.map(function (_ref, i) { - var value = _ref.value, - label = _ref.label; - var disabled = enumDisabled && enumDisabled.indexOf(value) != -1; - return _react["default"].createElement("option", { - key: i, - value: value, - disabled: disabled - }, label); - })); -} + }]); -SelectWidget.defaultProps = { + return ArrayField; +}(external_react_["Component"]); + +_defineProperty(ArrayField_ArrayField, "defaultProps", { + uiSchema: {}, + formData: [], + idSchema: {}, + required: false, + disabled: false, + readonly: false, autofocus: false -}; +}); if (false) {} -var _default = SelectWidget; -exports["default"] = _default; - -/***/ }), -/* 562 */ -/***/ (function(module, exports, __webpack_require__) { +/* harmony default export */ var fields_ArrayField = (ArrayField_ArrayField); +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/BooleanField.js -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _react = _interopRequireDefault(__webpack_require__(0)); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function TextareaWidget(props) { - var id = props.id, - options = props.options, - placeholder = props.placeholder, - value = props.value, +function BooleanField(props) { + var schema = props.schema, + name = props.name, + uiSchema = props.uiSchema, + idSchema = props.idSchema, + formData = props.formData, + _props$registry = props.registry, + registry = _props$registry === void 0 ? getDefaultRegistry() : _props$registry, required = props.required, disabled = props.disabled, readonly = props.readonly, autofocus = props.autofocus, onChange = props.onChange, + onFocus = props.onFocus, onBlur = props.onBlur, - onFocus = props.onFocus; + rawErrors = props.rawErrors; + var title = schema.title; + var widgets = registry.widgets, + formContext = registry.formContext, + fields = registry.fields; - var _onChange = function _onChange(_ref) { - var value = _ref.target.value; - return onChange(value === "" ? options.emptyValue : value); - }; + var _getUiOptions = getUiOptions(uiSchema), + _getUiOptions$widget = _getUiOptions.widget, + widget = _getUiOptions$widget === void 0 ? "checkbox" : _getUiOptions$widget, + options = _objectWithoutProperties(_getUiOptions, ["widget"]); - return _react["default"].createElement("textarea", { - id: id, - className: "form-control", - value: value ? value : "", - placeholder: placeholder, + var Widget = getWidget(schema, widget, widgets); + var enumOptions; + + if (is_array_default()(schema.oneOf)) { + enumOptions = optionsList({ + oneOf: schema.oneOf.map(function (option) { + return _objectSpread({}, option, { + title: option.title || (option["const"] === true ? "Yes" : "No") + }); + }) + }); + } else { + enumOptions = optionsList({ + "enum": schema["enum"] || [true, false], + enumNames: schema.enumNames || (schema["enum"] && schema["enum"][0] === false ? ["No", "Yes"] : ["Yes", "No"]) + }); + } + + return external_react_default.a.createElement(Widget, { + options: _objectSpread({}, options, { + enumOptions: enumOptions + }), + schema: schema, + id: idSchema && idSchema.$id, + onChange: onChange, + onFocus: onFocus, + onBlur: onBlur, + label: title === undefined ? name : title, + value: formData, required: required, disabled: disabled, - readOnly: readonly, - autoFocus: autofocus, - rows: options.rows, - onBlur: onBlur && function (event) { - return onBlur(id, event.target.value); - }, - onFocus: onFocus && function (event) { - return onFocus(id, event.target.value); - }, - onChange: _onChange + readonly: readonly, + registry: registry, + formContext: formContext, + autofocus: autofocus, + rawErrors: rawErrors, + DescriptionField: fields.DescriptionField }); } -TextareaWidget.defaultProps = { - autofocus: false, - options: {} -}; - -if (false) {} - -var _default = TextareaWidget; -exports["default"] = _default; - -/***/ }), -/* 563 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; - -var _react = _interopRequireDefault(__webpack_require__(0)); - -var _propTypes = _interopRequireDefault(__webpack_require__(4)); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function TextWidget(props) { - var BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, props); -} - if (false) {} -var _default = TextWidget; -exports["default"] = _default; - -/***/ }), -/* 564 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; +BooleanField.defaultProps = { + uiSchema: {}, + disabled: false, + readonly: false, + autofocus: false +}; +/* harmony default export */ var fields_BooleanField = (BooleanField); +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/DescriptionField.js -var _react = _interopRequireDefault(__webpack_require__(0)); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +function DescriptionField_DescriptionField(props) { + var id = props.id, + description = props.description; -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); } + if (!description) { + return null; + } -function URLWidget(props) { - var BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "url" - }, props)); + if (typeof description === "string") { + return external_react_default.a.createElement("p", { + id: id, + className: "field-description" + }, description); + } else { + return external_react_default.a.createElement("div", { + id: id, + className: "field-description" + }, description); + } } if (false) {} -var _default = URLWidget; -exports["default"] = _default; +/* harmony default export */ var fields_DescriptionField = (DescriptionField_DescriptionField); +// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/get-iterator.js +var get_iterator = __webpack_require__(116); +var get_iterator_default = /*#__PURE__*/__webpack_require__.n(get_iterator); -/***/ }), -/* 565 */ -/***/ (function(module, exports, __webpack_require__) { +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/MultiSchemaField.js -"use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = void 0; -var _react = _interopRequireDefault(__webpack_require__(0)); -var _propTypes = _interopRequireDefault(__webpack_require__(4)); -var _utils = __webpack_require__(41); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -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); } -function UpDownWidget(props) { - var BaseInput = props.registry.widgets.BaseInput; - return _react["default"].createElement(BaseInput, _extends({ - type: "number" - }, props, (0, _utils.rangeSpec)(props.schema))); -} -if (false) {} -var _default = UpDownWidget; -exports["default"] = _default; -/***/ }), -/* 566 */ -/***/ (function(module, exports) { -function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; -} -module.exports = _arrayWithHoles; -/***/ }), -/* 567 */ -/***/ (function(module, exports) { -function _iterableToArrayLimit(arr, i) { - if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; +var MultiSchemaField_AnyOfField = +/*#__PURE__*/ +function (_Component) { + _inherits(AnyOfField, _Component); - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); + function AnyOfField(props) { + var _this; - 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; - } - } + _classCallCheck(this, AnyOfField); - return _arr; -} + _this = _possibleConstructorReturn(this, getPrototypeOf_getPrototypeOf(AnyOfField).call(this, props)); -module.exports = _iterableToArrayLimit; + _defineProperty(_assertThisInitialized(_this), "onOptionChange", function (option) { + var selectedOption = parse_int_default()(option, 10); -/***/ }), -/* 568 */ -/***/ (function(module, exports) { + var _this$props = _this.props, + formData = _this$props.formData, + onChange = _this$props.onChange, + options = _this$props.options, + registry = _this$props.registry; + var rootSchema = registry.rootSchema; + var newOption = retrieveSchema(options[selectedOption], rootSchema, formData); // If the new option is of type object and the current data is an object, + // discard properties added using the old option. -function _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."); -} + var newFormData = undefined; -module.exports = _nonIterableRest; + if (utils_guessType(formData) === "object" && (newOption.type === "object" || newOption.properties)) { + newFormData = _extends({}, formData); + var optionsToDiscard = options.slice(); + optionsToDiscard.splice(selectedOption, 1); // Discard any data added using other options -/***/ }), -/* 569 */ -/***/ (function(module, exports) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; -function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; -} + try { + for (var _iterator = get_iterator_default()(optionsToDiscard), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _option = _step.value; -module.exports = _isNativeFunction; + if (_option.properties) { + for (var key in _option.properties) { + if (newFormData.hasOwnProperty(key)) { + delete newFormData[key]; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator["return"] != null) { + _iterator["return"](); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } // Call getDefaultFormState to make sure defaults are populated on change. -/***/ }), -/* 570 */ -/***/ (function(module, exports, __webpack_require__) { -var setPrototypeOf = __webpack_require__(180); + onChange(getDefaultFormState(options[selectedOption], newFormData, rootSchema)); -var isNativeReflectConstruct = __webpack_require__(571); + _this.setState({ + selectedOption: parse_int_default()(option, 10) + }); + }); -function _construct(Parent, args, Class) { - if (isNativeReflectConstruct()) { - module.exports = _construct = Reflect.construct; - } else { - module.exports = _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) setPrototypeOf(instance, Class.prototype); - return instance; + var _this$props2 = _this.props, + _formData = _this$props2.formData, + _options = _this$props2.options; + _this.state = { + selectedOption: _this.getMatchingOption(_formData, _options) }; + return _this; } - return _construct.apply(null, arguments); -} + _createClass(AnyOfField, [{ + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps, prevState) { + if (!deepEquals(this.props.formData, prevProps.formData) && this.props.idSchema.$id === prevProps.idSchema.$id) { + var matchingOption = this.getMatchingOption(this.props.formData, this.props.options); -module.exports = _construct; + if (!prevState || matchingOption === this.state.selectedOption) { + return; + } -/***/ }), -/* 571 */ -/***/ (function(module, exports) { + this.setState({ + selectedOption: matchingOption + }); + } + } + }, { + key: "getMatchingOption", + value: function getMatchingOption(formData, options) { + var rootSchema = this.props.registry.rootSchema; -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; + var option = utils_getMatchingOption(formData, options, rootSchema); - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } -} + if (option !== 0) { + return option; + } // If the form data matches none of the options, use the currently selected + // option, assuming it's available; otherwise use the first option -module.exports = _isNativeReflectConstruct; -/***/ }), -/* 572 */ -/***/ (function(module, exports, __webpack_require__) { + return this && this.state ? this.state.selectedOption : 0; + } + }, { + key: "render", + value: function render() { + var _this$props3 = this.props, + baseType = _this$props3.baseType, + disabled = _this$props3.disabled, + errorSchema = _this$props3.errorSchema, + formData = _this$props3.formData, + idPrefix = _this$props3.idPrefix, + idSchema = _this$props3.idSchema, + onBlur = _this$props3.onBlur, + onChange = _this$props3.onChange, + onFocus = _this$props3.onFocus, + options = _this$props3.options, + registry = _this$props3.registry, + uiSchema = _this$props3.uiSchema, + schema = _this$props3.schema; + var _SchemaField = registry.fields.SchemaField; + var widgets = registry.widgets; + var selectedOption = this.state.selectedOption; -var toNumber = __webpack_require__(573); + var _getUiOptions = getUiOptions(uiSchema), + _getUiOptions$widget = _getUiOptions.widget, + widget = _getUiOptions$widget === void 0 ? "select" : _getUiOptions$widget, + uiOptions = _objectWithoutProperties(_getUiOptions, ["widget"]); -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; + var Widget = getWidget({ + type: "number" + }, widget, widgets); + var option = options[selectedOption] || null; + var optionSchema; -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} + if (option) { + // If the subschema doesn't declare a type, infer the type from the + // parent schema + optionSchema = option.type ? option : _extends({}, option, { + type: baseType + }); + } -module.exports = toFinite; + var enumOptions = options.map(function (option, index) { + return { + label: option.title || "Option ".concat(index + 1), + value: index + }; + }); + return external_react_default.a.createElement("div", { + className: "panel panel-default panel-body" + }, external_react_default.a.createElement("div", { + className: "form-group" + }, external_react_default.a.createElement(Widget, _extends({ + id: "".concat(idSchema.$id).concat(schema.oneOf ? "__oneof_select" : "__anyof_select"), + schema: { + type: "number", + "default": 0 + }, + onChange: this.onOptionChange, + onBlur: onBlur, + onFocus: onFocus, + value: selectedOption, + options: { + enumOptions: enumOptions + } + }, uiOptions))), option !== null && external_react_default.a.createElement(_SchemaField, { + schema: optionSchema, + uiSchema: uiSchema, + errorSchema: errorSchema, + idSchema: idSchema, + idPrefix: idPrefix, + formData: formData, + onChange: onChange, + onBlur: onBlur, + onFocus: onFocus, + registry: registry, + disabled: disabled + })); + } + }]); + return AnyOfField; +}(external_react_["Component"]); -/***/ }), -/* 573 */ -/***/ (function(module, exports, __webpack_require__) { +MultiSchemaField_AnyOfField.defaultProps = { + disabled: false, + errorSchema: {}, + idSchema: {}, + uiSchema: {} +}; -var isObject = __webpack_require__(44), - isSymbol = __webpack_require__(75); +if (false) {} -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; +/* harmony default export */ var MultiSchemaField = (MultiSchemaField_AnyOfField); +// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/NumberField.js -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; + + + + + + // Matches a string that ends in a . character, optionally followed by a sequence of +// digits followed by any number of 0 characters up until the end of the line. +// Ensuring that there is at least one prefixed character is important so that +// you don't incorrectly match against "0". + +var trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/; // This is used for trimming the trailing 0 and . characters without affecting +// the rest of the string. Its possible to use one RegEx with groups for this +// functionality, but it is fairly complex compared to simply defining two +// different matchers. + +var trailingCharMatcher = /[0.]0*$/; /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example + * The NumberField class has some special handling for dealing with trailing + * decimal points and/or zeroes. This logic is designed to allow trailing values + * to be visible in the input element, but not be represented in the + * corresponding form data. * - * _.toNumber(3.2); - * // => 3.2 + * The algorithm is as follows: * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 + * 1. When the input value changes the value is cached in the component state * - * _.toNumber(Infinity); - * // => Infinity + * 2. The value is then normalized, removing trailing decimal points and zeros, + * then passed to the "onChange" callback * - * _.toNumber('3.2'); - * // => 3.2 + * 3. When the component is rendered, the formData value is checked against the + * value cached in the state. If it matches the cached value, the cached + * value is passed to the input instead of the formData value */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} -module.exports = toNumber; +var NumberField_NumberField = +/*#__PURE__*/ +function (_React$Component) { + _inherits(NumberField, _React$Component); + function NumberField(props) { + var _this; -/***/ }), -/* 574 */ -/***/ (function(module, exports, __webpack_require__) { + _classCallCheck(this, NumberField); -var arrayLikeToArray = __webpack_require__(271); + _this = _possibleConstructorReturn(this, getPrototypeOf_getPrototypeOf(NumberField).call(this, props)); -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return arrayLikeToArray(arr); -} + _defineProperty(_assertThisInitialized(_this), "handleChange", function (value) { + // Cache the original value in component state + _this.setState({ + lastValue: value + }); // Normalize decimals that don't start with a zero character in advance so + // that the rest of the normalization logic is simpler -module.exports = _arrayWithoutHoles; -/***/ }), -/* 575 */ -/***/ (function(module, exports) { + if ("".concat(value).charAt(0) === ".") { + value = "0".concat(value); + } // Check that the value is a string (this can happen if the widget used is a + // , due to an enum declaration etc) then, if the value ends in a - // trailing decimal point or multiple zeroes, strip the trailing values + if (_this.status !== InterpreterStatus.Running && !_this.options.deferEvents) { + throw new Error("Event \"" + _event.name + "\" was sent to uninitialized service \"" + _this.machine.id + "\". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: " + JSON.stringify(_event.data)); + } + _this.scheduler.schedule(function () { + // Forward copy of event to child actors + _this.forward(_event); - var processed = typeof value === "string" && value.match(trailingCharMatcherWithPrefix) ? Object(utils["asNumber"])(value.replace(trailingCharMatcher, "")) : Object(utils["asNumber"])(value); + var nextState = _this.nextState(_event); - _this.props.onChange(processed); - }); + _this.update(nextState, _event); + }); - _this.state = { - lastValue: props.value + return _this._state; // TODO: deprecate (should return void) + // tslint:disable-next-line:semicolon }; - return _this; - } - - Object(createClass["a" /* default */])(NumberField, [{ - key: "render", - value: function render() { - var StringField = this.props.registry.fields.StringField; - var _this$props = this.props, - formData = _this$props.formData, - props = Object(objectWithoutProperties["a" /* default */])(_this$props, ["formData"]); + this.sendTo = function (event, to) { + var isParent = _this.parent && (to === _types_js__WEBPACK_IMPORTED_MODULE_3__[/* SpecialTargets */ "b"].Parent || _this.parent.id === to); + var target = isParent ? _this.parent : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(to) ? _this.children.get(to) || _registry_js__WEBPACK_IMPORTED_MODULE_11__[/* registry */ "a"].get(to) : Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isActor */ "d"])(to) ? to : undefined; - var lastValue = this.state.lastValue; - var value = formData; + if (!target) { + if (!isParent) { + throw new Error("Unable to send event to child '" + to + "' from service '" + _this.id + "'."); + } // tslint:disable-next-line:no-console - if (typeof lastValue === "string" && typeof value === "number") { - // Construct a regular expression that checks for a string that consists - // of the formData value suffixed with zero or one '.' characters and zero - // or more '0' characters - var re = new RegExp("".concat(value).replace(".", "\\.") + "\\.?0*$"); // If the cached "lastValue" is a match, use that instead of the formData - // value to prevent the input value from changing in the UI - if (lastValue.match(re)) { - value = lastValue; + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(false, "Service '" + _this.id + "' has no parent: unable to send event " + event.type); } + + return; } - return external_react_default.a.createElement(StringField, Object(esm_extends["a" /* default */])({}, props, { - formData: value, - onChange: this.handleChange - })); - } - }]); + if ('machine' in target) { + // Send SCXML events to machines + target.send(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, event), { + name: event.name === _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* error */ "d"] ? "" + Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "b"])(_this.id) : event.name, + origin: _this.sessionId + })); + } else { + // Send normal events to other targets + target.send(event.data); + } + }; - return NumberField; -}(external_react_default.a.Component); + var resolvedOptions = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, Interpreter.defaultOptions), options); + + var clock = resolvedOptions.clock, + logger = resolvedOptions.logger, + parent = resolvedOptions.parent, + id = resolvedOptions.id; + var resolvedId = id !== undefined ? id : machine.id; + this.id = resolvedId; + this.logger = logger; + this.clock = clock; + this.parent = parent; + this.options = resolvedOptions; + this.scheduler = new _scheduler_js__WEBPACK_IMPORTED_MODULE_10__[/* Scheduler */ "a"]({ + deferEvents: this.options.deferEvents + }); + this.sessionId = _registry_js__WEBPACK_IMPORTED_MODULE_11__[/* registry */ "a"].bookId(); + } -if (false) {} + Object.defineProperty(Interpreter.prototype, "initialState", { + get: function () { + var _this = this; -NumberField_NumberField.defaultProps = { - uiSchema: {} -}; -/* harmony default export */ var fields_NumberField = (NumberField_NumberField); -// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs2/core-js/json/stringify.js -var stringify = __webpack_require__(85); -var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify); + if (this._initialState) { + return this._initialState; + } -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/ObjectField.js + return Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(this, function () { + _this._initialState = _this.machine.initialState; + return _this._initialState; + }); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Interpreter.prototype, "state", { + get: function () { + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '" + this.id + "'. Make sure the service is started first."); + } + return this._state; + }, + enumerable: false, + configurable: true + }); + /** + * Executes the actions of the given state, with that state's `context` and `event`. + * + * @param state The state whose actions will be executed + * @param actionsConfig The action implementations to use + */ + Interpreter.prototype.execute = function (state, actionsConfig) { + var e_1, _a; + try { + for (var _b = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(state.actions), _c = _b.next(); !_c.done; _c = _b.next()) { + var action = _c.value; + this.exec(action, state, actionsConfig); + } + } catch (e_1_1) { + e_1 = { + error: e_1_1 + }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + }; + Interpreter.prototype.update = function (state, _event) { + var e_2, _a, e_3, _b, e_4, _c, e_5, _d; + var _this = this; // Attach session ID to state + state._sessionid = this.sessionId; // Update state + this._state = state; // Execute actions + if (this.options.execute) { + this.execute(this.state); + } // Update children + this.children.forEach(function (child) { + _this.state.children[child.id] = child; + }); // Dev tools + if (this.devTools) { + this.devTools.send(_event.data, state); + } // Execute listeners + if (state.event) { + try { + for (var _e = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.eventListeners), _f = _e.next(); !_f.done; _f = _e.next()) { + var listener = _f.value; + listener(state.event); + } + } catch (e_2_1) { + e_2 = { + error: e_2_1 + }; + } finally { + try { + if (_f && !_f.done && (_a = _e.return)) _a.call(_e); + } finally { + if (e_2) throw e_2.error; + } + } + } + try { + for (var _g = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.listeners), _h = _g.next(); !_h.done; _h = _g.next()) { + var listener = _h.value; + listener(state, state.event); + } + } catch (e_3_1) { + e_3 = { + error: e_3_1 + }; + } finally { + try { + if (_h && !_h.done && (_b = _g.return)) _b.call(_g); + } finally { + if (e_3) throw e_3.error; + } + } + try { + for (var _j = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.contextListeners), _k = _j.next(); !_k.done; _k = _j.next()) { + var contextListener = _k.value; + contextListener(this.state.context, this.state.history ? this.state.history.context : undefined); + } + } catch (e_4_1) { + e_4 = { + error: e_4_1 + }; + } finally { + try { + if (_k && !_k.done && (_c = _j.return)) _c.call(_j); + } finally { + if (e_4) throw e_4.error; + } + } + var isDone = Object(_stateUtils_js__WEBPACK_IMPORTED_MODULE_4__[/* isInFinalState */ "a"])(state.configuration || [], this.machine); -function DefaultObjectFieldTemplate(props) { - var TitleField = props.TitleField, - DescriptionField = props.DescriptionField; - return external_react_default.a.createElement("fieldset", { - id: props.idSchema.$id - }, (props.uiSchema["ui:title"] || props.title) && external_react_default.a.createElement(TitleField, { - id: "".concat(props.idSchema.$id, "__title"), - title: props.title || props.uiSchema["ui:title"], - required: props.required, - formContext: props.formContext - }), props.description && external_react_default.a.createElement(DescriptionField, { - id: "".concat(props.idSchema.$id, "__description"), - description: props.description, - formContext: props.formContext - }), props.properties.map(function (prop) { - return prop.content; - }), Object(utils["canExpand"])(props.schema, props.uiSchema, props.formData) && external_react_default.a.createElement(AddButton, { - className: "object-property-expand", - onClick: props.onAddClick(props.schema), - disabled: props.disabled || props.readonly - })); -} + if (this.state.configuration && isDone) { + // get final child state node + var finalChildStateNode = state.configuration.find(function (sn) { + return sn.type === 'final' && sn.parent === _this.machine; + }); + var doneData = finalChildStateNode && finalChildStateNode.doneData ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* mapContext */ "l"])(finalChildStateNode.doneData, state.context, _event) : undefined; -var ObjectField_ObjectField = -/*#__PURE__*/ -function (_Component) { - Object(inherits["a" /* default */])(ObjectField, _Component); + try { + for (var _l = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.doneListeners), _m = _l.next(); !_m.done; _m = _l.next()) { + var listener = _m.value; + listener(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* doneInvoke */ "a"])(this.id, doneData)); + } + } catch (e_5_1) { + e_5 = { + error: e_5_1 + }; + } finally { + try { + if (_m && !_m.done && (_d = _l.return)) _d.call(_l); + } finally { + if (e_5) throw e_5.error; + } + } - function ObjectField() { - var _getPrototypeOf2; + this.stop(); + } + }; + /* + * Adds a listener that is notified whenever a state transition happens. The listener is called with + * the next state and the event object that caused the state transition. + * + * @param listener The state listener + */ - var _this; - Object(classCallCheck["a" /* default */])(this, ObjectField); + Interpreter.prototype.onTransition = function (listener) { + this.listeners.add(listener); // Send current state to listener - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + if (this.status === InterpreterStatus.Running) { + listener(this.state, this.state.event); } - _this = Object(possibleConstructorReturn["a" /* default */])(this, (_getPrototypeOf2 = Object(getPrototypeOf["a" /* default */])(ObjectField)).call.apply(_getPrototypeOf2, [this].concat(args))); + return this; + }; - Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "state", { - wasPropertyKeyModified: false, - additionalProperties: {} - }); + Interpreter.prototype.subscribe = function (nextListenerOrObserver, _, // TODO: error listener + completeListener) { + var _this = this; - Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "onPropertyChange", function (name) { - var addedByAdditionalProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - return function (value, errorSchema) { - if (!value && addedByAdditionalProperties) { - // Don't set value = undefined for fields added by - // additionalProperties. Doing so removes them from the - // formData, which causes them to completely disappear - // (including the input field for the property name). Unlike - // fields which are "mandated" by the schema, these fields can - // be set to undefined by clicking a "delete field" button, so - // set empty values to the empty string. - value = ""; + if (!nextListenerOrObserver) { + return { + unsubscribe: function () { + return void 0; } - - var newFormData = Object(objectSpread["a" /* default */])({}, _this.props.formData, Object(defineProperty["a" /* default */])({}, name, value)); - - _this.props.onChange(newFormData, errorSchema && _this.props.errorSchema && Object(objectSpread["a" /* default */])({}, _this.props.errorSchema, Object(defineProperty["a" /* default */])({}, name, errorSchema))); }; - }); + } - Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "onDropPropertyClick", function (key) { - return function (event) { - event.preventDefault(); - var _this$props = _this.props, - onChange = _this$props.onChange, - formData = _this$props.formData; + var listener; + var resolvedCompleteListener = completeListener; + + if (typeof nextListenerOrObserver === 'function') { + listener = nextListenerOrObserver; + } else { + listener = nextListenerOrObserver.next.bind(nextListenerOrObserver); + resolvedCompleteListener = nextListenerOrObserver.complete.bind(nextListenerOrObserver); + } - var copiedFormData = Object(objectSpread["a" /* default */])({}, formData); + this.listeners.add(listener); // Send current state to listener - delete copiedFormData[key]; - onChange(copiedFormData); - }; - }); + if (this.status === InterpreterStatus.Running) { + listener(this.state); + } - Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "getAvailableKey", function (preferredKey, formData) { - var index = 0; - var newKey = preferredKey; + if (resolvedCompleteListener) { + this.onDone(resolvedCompleteListener); + } - while (formData.hasOwnProperty(newKey)) { - newKey = "".concat(preferredKey, "-").concat(++index); + return { + unsubscribe: function () { + listener && _this.listeners.delete(listener); + resolvedCompleteListener && _this.doneListeners.delete(resolvedCompleteListener); } + }; + }; + /** + * Adds an event listener that is notified whenever an event is sent to the running interpreter. + * @param listener The event listener + */ - return newKey; - }); - - Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "onKeyChange", function (oldValue) { - return function (value, errorSchema) { - if (oldValue === value) { - return; - } - value = _this.getAvailableKey(value, _this.props.formData); + Interpreter.prototype.onEvent = function (listener) { + this.eventListeners.add(listener); + return this; + }; + /** + * Adds an event listener that is notified whenever a `send` event occurs. + * @param listener The event listener + */ - var newFormData = Object(objectSpread["a" /* default */])({}, _this.props.formData); - var newKeys = Object(defineProperty["a" /* default */])({}, oldValue, value); + Interpreter.prototype.onSend = function (listener) { + this.sendListeners.add(listener); + return this; + }; + /** + * Adds a context listener that is notified whenever the state context changes. + * @param listener The context listener + */ - var keyValues = keys_default()(newFormData).map(function (key) { - var newKey = newKeys[key] || key; - return Object(defineProperty["a" /* default */])({}, newKey, newFormData[key]); - }); - var renamedObj = esm_extends["a" /* default */].apply(void 0, [{}].concat(Object(toConsumableArray["a" /* default */])(keyValues))); + Interpreter.prototype.onChange = function (listener) { + this.contextListeners.add(listener); + return this; + }; + /** + * Adds a listener that is notified when the machine is stopped. + * @param listener The listener + */ - _this.setState({ - wasPropertyKeyModified: true - }); - _this.props.onChange(renamedObj, errorSchema && _this.props.errorSchema && Object(objectSpread["a" /* default */])({}, _this.props.errorSchema, Object(defineProperty["a" /* default */])({}, value, errorSchema))); - }; - }); + Interpreter.prototype.onStop = function (listener) { + this.stopListeners.add(listener); + return this; + }; + /** + * Adds a state listener that is notified when the statechart has reached its final state. + * @param listener The state listener + */ - Object(defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "handleAddClick", function (schema) { - return function () { - var type = schema.additionalProperties.type; - var newFormData = Object(objectSpread["a" /* default */])({}, _this.props.formData); + Interpreter.prototype.onDone = function (listener) { + this.doneListeners.add(listener); + return this; + }; + /** + * Removes a listener. + * @param listener The listener to remove + */ - if (schema.additionalProperties.hasOwnProperty("$ref")) { - var _this$props$registry = _this.props.registry, - registry = _this$props$registry === void 0 ? Object(utils["getDefaultRegistry"])() : _this$props$registry; - var refSchema = Object(utils["retrieveSchema"])({ - $ref: schema.additionalProperties["$ref"] - }, registry.rootSchema, _this.props.formData); - type = refSchema.type; - } - newFormData[_this.getAvailableKey("newKey", newFormData)] = _this.getDefaultValue(type); + Interpreter.prototype.off = function (listener) { + this.listeners.delete(listener); + this.eventListeners.delete(listener); + this.sendListeners.delete(listener); + this.stopListeners.delete(listener); + this.doneListeners.delete(listener); + this.contextListeners.delete(listener); + return this; + }; + /** + * Starts the interpreter from the given state, or the initial state. + * @param initialState The state to start the statechart from + */ - _this.props.onChange(newFormData); - }; - }); - return _this; - } + Interpreter.prototype.start = function (initialState) { + var _this = this; - Object(createClass["a" /* default */])(ObjectField, [{ - key: "isRequired", - value: function isRequired(name) { - var schema = this.props.schema; - return is_array_default()(schema.required) && schema.required.indexOf(name) !== -1; + if (this.status === InterpreterStatus.Running) { + // Do not restart the service if it is already started + return this; } - }, { - key: "getDefaultValue", - value: function getDefaultValue(type) { - switch (type) { - case "string": - return "New Value"; - case "array": - return []; + _registry_js__WEBPACK_IMPORTED_MODULE_11__[/* registry */ "a"].register(this.sessionId, this); + this.initialized = true; + this.status = InterpreterStatus.Running; + var resolvedState = initialState === undefined ? this.initialState : Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(this, function () { + return Object(_State_js__WEBPACK_IMPORTED_MODULE_7__[/* isState */ "c"])(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(_State_js__WEBPACK_IMPORTED_MODULE_7__[/* State */ "a"].from(initialState, _this.machine.context)); + }); - case "boolean": - return false; + if (this.options.devTools) { + this.attachDev(); + } - case "null": - return null; + this.scheduler.initialize(function () { + _this.update(resolvedState, _actions_js__WEBPACK_IMPORTED_MODULE_6__[/* initEvent */ "d"]); + }); + return this; + }; + /** + * Stops the interpreter and unsubscribe all listeners. + * + * This will also notify the `onStop` listeners. + */ - case "number": - return 0; - case "object": - return {}; + Interpreter.prototype.stop = function () { + var e_6, _a, e_7, _b, e_8, _c, e_9, _d, e_10, _e; - default: - // We don't have a datatype for some reason (perhaps additionalProperties was true) - return "New Value"; + var _this = this; + + try { + for (var _f = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.listeners), _g = _f.next(); !_g.done; _g = _f.next()) { + var listener = _g.value; + this.listeners.delete(listener); + } + } catch (e_6_1) { + e_6 = { + error: e_6_1 + }; + } finally { + try { + if (_g && !_g.done && (_a = _f.return)) _a.call(_f); + } finally { + if (e_6) throw e_6.error; } } - }, { - key: "render", - value: function render() { - var _this2 = this; - var _this$props2 = this.props, - uiSchema = _this$props2.uiSchema, - formData = _this$props2.formData, - errorSchema = _this$props2.errorSchema, - idSchema = _this$props2.idSchema, - name = _this$props2.name, - required = _this$props2.required, - disabled = _this$props2.disabled, - readonly = _this$props2.readonly, - idPrefix = _this$props2.idPrefix, - onBlur = _this$props2.onBlur, - onFocus = _this$props2.onFocus, - _this$props2$registry = _this$props2.registry, - registry = _this$props2$registry === void 0 ? Object(utils["getDefaultRegistry"])() : _this$props2$registry; - var rootSchema = registry.rootSchema, - fields = registry.fields, - formContext = registry.formContext; - var SchemaField = fields.SchemaField, - TitleField = fields.TitleField, - DescriptionField = fields.DescriptionField; - var schema = Object(utils["retrieveSchema"])(this.props.schema, rootSchema, formData); - var title = schema.title === undefined ? name : schema.title; - var description = uiSchema["ui:description"] || schema.description; - var orderedProperties; + try { + for (var _h = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.stopListeners), _j = _h.next(); !_j.done; _j = _h.next()) { + var listener = _j.value; // call listener, then remove + listener(); + this.stopListeners.delete(listener); + } + } catch (e_7_1) { + e_7 = { + error: e_7_1 + }; + } finally { try { - var properties = keys_default()(schema.properties || {}); + if (_j && !_j.done && (_b = _h.return)) _b.call(_h); + } finally { + if (e_7) throw e_7.error; + } + } - orderedProperties = Object(utils["orderProperties"])(properties, uiSchema["ui:order"]); - } catch (err) { - return external_react_default.a.createElement("div", null, external_react_default.a.createElement("p", { - className: "config-error", - style: { - color: "red" - } - }, "Invalid ", name || "root", " object field configuration:", external_react_default.a.createElement("em", null, err.message), "."), external_react_default.a.createElement("pre", null, stringify_default()(schema))); + try { + for (var _k = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.contextListeners), _l = _k.next(); !_l.done; _l = _k.next()) { + var listener = _l.value; + this.contextListeners.delete(listener); } + } catch (e_8_1) { + e_8 = { + error: e_8_1 + }; + } finally { + try { + if (_l && !_l.done && (_c = _k.return)) _c.call(_k); + } finally { + if (e_8) throw e_8.error; + } + } - var Template = uiSchema["ui:ObjectFieldTemplate"] || registry.ObjectFieldTemplate || DefaultObjectFieldTemplate; - var templateProps = { - title: uiSchema["ui:title"] || title, - description: description, - TitleField: TitleField, - DescriptionField: DescriptionField, - properties: orderedProperties.map(function (name) { - var addedByAdditionalProperties = schema.properties[name].hasOwnProperty(utils["ADDITIONAL_PROPERTY_FLAG"]); - return { - content: external_react_default.a.createElement(SchemaField, { - key: name, - name: name, - required: _this2.isRequired(name), - schema: schema.properties[name], - uiSchema: addedByAdditionalProperties ? uiSchema.additionalProperties : uiSchema[name], - errorSchema: errorSchema[name], - idSchema: idSchema[name], - idPrefix: idPrefix, - formData: (formData || {})[name], - wasPropertyKeyModified: _this2.state.wasPropertyKeyModified, - onKeyChange: _this2.onKeyChange(name), - onChange: _this2.onPropertyChange(name, addedByAdditionalProperties), - onBlur: onBlur, - onFocus: onFocus, - registry: registry, - disabled: disabled, - readonly: readonly, - onDropPropertyClick: _this2.onDropPropertyClick - }), - name: name, - readonly: readonly, - disabled: disabled, - required: required - }; - }), - readonly: readonly, - disabled: disabled, - required: required, - idSchema: idSchema, - uiSchema: uiSchema, - schema: schema, - formData: formData, - formContext: formContext + try { + for (var _m = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.doneListeners), _o = _m.next(); !_o.done; _o = _m.next()) { + var listener = _o.value; + this.doneListeners.delete(listener); + } + } catch (e_9_1) { + e_9 = { + error: e_9_1 }; - return external_react_default.a.createElement(Template, Object(esm_extends["a" /* default */])({}, templateProps, { - onAddClick: this.handleAddClick - })); + } finally { + try { + if (_o && !_o.done && (_d = _m.return)) _d.call(_m); + } finally { + if (e_9) throw e_9.error; + } } - }]); - return ObjectField; -}(external_react_["Component"]); + if (!this.initialized) { + // Interpreter already stopped; do nothing + return this; + } -Object(defineProperty["a" /* default */])(ObjectField_ObjectField, "defaultProps", { - uiSchema: {}, - formData: {}, - errorSchema: {}, - idSchema: {}, - required: false, - disabled: false, - readonly: false -}); + this.state.configuration.forEach(function (stateNode) { + var e_11, _a; -if (false) {} + try { + for (var _b = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(stateNode.definition.exit), _c = _b.next(); !_c.done; _c = _b.next()) { + var action = _c.value; -/* harmony default export */ var fields_ObjectField = (ObjectField_ObjectField); -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/SchemaField.js + _this.exec(action, _this.state); + } + } catch (e_11_1) { + e_11 = { + error: e_11_1 + }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } finally { + if (e_11) throw e_11.error; + } + } + }); // Stop all children + this.children.forEach(function (child) { + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(child.stop)) { + child.stop(); + } + }); + try { + // Cancel all delayed events + for (var _p = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* keys */ "k"])(this.delayedEventsMap)), _q = _p.next(); !_q.done; _q = _p.next()) { + var key = _q.value; + this.clock.clearTimeout(this.delayedEventsMap[key]); + } + } catch (e_10_1) { + e_10 = { + error: e_10_1 + }; + } finally { + try { + if (_q && !_q.done && (_e = _p.return)) _e.call(_p); + } finally { + if (e_10) throw e_10.error; + } + } + this.scheduler.clear(); + this.initialized = false; + this.status = InterpreterStatus.Stopped; + _registry_js__WEBPACK_IMPORTED_MODULE_11__[/* registry */ "a"].free(this.sessionId); + return this; + }; + Interpreter.prototype.batch = function (events) { + var _this = this; + if (this.status === InterpreterStatus.NotStarted && this.options.deferEvents) { + // tslint:disable-next-line:no-console + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(false, events.length + " event(s) were sent to uninitialized service \"" + this.machine.id + "\" and are deferred. Make sure .start() is called for this service.\nEvent: " + JSON.stringify(event)); + } + } else if (this.status !== InterpreterStatus.Running) { + throw new Error( // tslint:disable-next-line:max-line-length + events.length + " event(s) were sent to uninitialized service \"" + this.machine.id + "\". Make sure .start() is called for this service, or set { deferEvents: true } in the service options."); + } + this.scheduler.schedule(function () { + var e_12, _a; + var nextState = _this.state; + var batchChanged = false; + var batchedActions = []; + var _loop_1 = function (event_1) { + var _event = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(event_1); + _this.forward(_event); + nextState = Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(_this, function () { + return _this.machine.transition(nextState, _event); + }); + batchedActions.push.apply(batchedActions, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __spread */ "d"])(nextState.actions.map(function (a) { + return Object(_State_js__WEBPACK_IMPORTED_MODULE_7__[/* bindActionToState */ "b"])(a, nextState); + }))); + batchChanged = batchChanged || !!nextState.changed; + }; + try { + for (var events_1 = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(events), events_1_1 = events_1.next(); !events_1_1.done; events_1_1 = events_1.next()) { + var event_1 = events_1_1.value; + _loop_1(event_1); + } + } catch (e_12_1) { + e_12 = { + error: e_12_1 + }; + } finally { + try { + if (events_1_1 && !events_1_1.done && (_a = events_1.return)) _a.call(events_1); + } finally { + if (e_12) throw e_12.error; + } + } + nextState.changed = batchChanged; + nextState.actions = batchedActions; -var REQUIRED_FIELD_SYMBOL = "*"; -var COMPONENT_TYPES = { - array: "ArrayField", - "boolean": "BooleanField", - integer: "NumberField", - number: "NumberField", - object: "ObjectField", - string: "StringField", - "null": "NullField" -}; + _this.update(nextState, Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(events[events.length - 1])); + }); + }; + /** + * Returns a send function bound to this interpreter instance. + * + * @param event The event to be sent by the sender. + */ -function getFieldComponent(schema, uiSchema, idSchema, fields) { - var field = uiSchema["ui:field"]; - if (typeof field === "function") { - return field; - } + Interpreter.prototype.sender = function (event) { + return this.send.bind(this, event); + }; + /** + * Returns the next state given the interpreter's current state and the event. + * + * This is a pure method that does _not_ update the interpreter's state. + * + * @param event The event to determine the next state + */ - if (typeof field === "string" && field in fields) { - return fields[field]; - } - var componentName = COMPONENT_TYPES[Object(utils["getSchemaType"])(schema)]; // If the type is not defined and the schema uses 'anyOf' or 'oneOf', don't - // render a field and let the MultiSchemaField component handle the form display + Interpreter.prototype.nextState = function (event) { + var _this = this; - if (!componentName && (schema.anyOf || schema.oneOf)) { - return function () { - return null; - }; - } + var _event = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(event); - return componentName in fields ? fields[componentName] : function () { - var UnsupportedField = fields.UnsupportedField; - return external_react_default.a.createElement(UnsupportedField, { - schema: schema, - idSchema: idSchema, - reason: "Unknown field type ".concat(schema.type) + if (_event.name.indexOf(_actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* errorPlatform */ "e"]) === 0 && !this.state.nextEvents.some(function (nextEvent) { + return nextEvent.indexOf(_actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* errorPlatform */ "e"]) === 0; + })) { + throw _event.data.data; + } + + var nextState = Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* provide */ "b"])(this, function () { + return _this.machine.transition(_this.state, _event); }); + return nextState; }; -} - -function Label(props) { - var label = props.label, - required = props.required, - id = props.id; - - if (!label) { - return null; - } - - return external_react_default.a.createElement("label", { - className: "control-label", - htmlFor: id - }, label, required && external_react_default.a.createElement("span", { - className: "required" - }, REQUIRED_FIELD_SYMBOL)); -} - -function LabelInput(props) { - var id = props.id, - label = props.label, - onChange = props.onChange; - return external_react_default.a.createElement("input", { - className: "form-control", - type: "text", - id: id, - onBlur: function onBlur(event) { - return onChange(event.target.value); - }, - defaultValue: label - }); -} -function Help(props) { - var help = props.help; + Interpreter.prototype.forward = function (event) { + var e_13, _a; - if (!help) { - return null; - } + try { + for (var _b = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __values */ "e"])(this.forwardTo), _c = _b.next(); !_c.done; _c = _b.next()) { + var id = _c.value; + var child = this.children.get(id); - if (typeof help === "string") { - return external_react_default.a.createElement("p", { - className: "help-block" - }, help); - } + if (!child) { + throw new Error("Unable to forward event '" + event + "' from interpreter '" + this.id + "' to nonexistant child '" + id + "'."); + } - return external_react_default.a.createElement("div", { - className: "help-block" - }, help); -} + child.send(event); + } + } catch (e_13_1) { + e_13 = { + error: e_13_1 + }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) _a.call(_b); + } finally { + if (e_13) throw e_13.error; + } + } + }; -function ErrorList(props) { - var _props$errors = props.errors, - errors = _props$errors === void 0 ? [] : _props$errors; + Interpreter.prototype.defer = function (sendAction) { + var _this = this; - if (errors.length === 0) { - return null; - } + this.delayedEventsMap[sendAction.id] = this.clock.setTimeout(function () { + if (sendAction.to) { + _this.sendTo(sendAction._event, sendAction.to); + } else { + _this.send(sendAction._event); + } + }, sendAction.delay); + }; - return external_react_default.a.createElement("div", null, external_react_default.a.createElement("ul", { - className: "error-detail bs-callout bs-callout-info" - }, errors.filter(function (elem) { - return !!elem; - }).map(function (error, index) { - return external_react_default.a.createElement("li", { - className: "text-danger", - key: index - }, error); - }))); -} + Interpreter.prototype.cancel = function (sendId) { + this.clock.clearTimeout(this.delayedEventsMap[sendId]); + delete this.delayedEventsMap[sendId]; + }; -function DefaultTemplate(props) { - var id = props.id, - label = props.label, - children = props.children, - errors = props.errors, - help = props.help, - description = props.description, - hidden = props.hidden, - required = props.required, - displayLabel = props.displayLabel; + Interpreter.prototype.exec = function (action, state, actionFunctionMap) { + if (actionFunctionMap === void 0) { + actionFunctionMap = this.machine.options.actions; + } - if (hidden) { - return external_react_default.a.createElement("div", { - className: "hidden" - }, children); - } + var context = state.context, + _event = state._event; + var actionOrExec = action.exec || Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* getActionFunction */ "c"])(action.type, actionFunctionMap); + var exec = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec; - return external_react_default.a.createElement(WrapIfAdditional, props, displayLabel && external_react_default.a.createElement(Label, { - label: label, - required: required, - id: id - }), displayLabel && description ? description : null, children, errors, help); -} + if (exec) { + try { + return exec(context, _event.data, { + action: action, + state: this.state, + _event: _event + }); + } catch (err) { + if (this.parent) { + this.parent.send({ + type: 'xstate.error', + data: err + }); + } -if (false) {} + throw err; + } + } -DefaultTemplate.defaultProps = { - hidden: false, - readonly: false, - required: false, - displayLabel: true -}; + switch (action.type) { + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* send */ "j"]: + var sendAction = action; -function WrapIfAdditional(props) { - var id = props.id, - classNames = props.classNames, - disabled = props.disabled, - label = props.label, - onKeyChange = props.onKeyChange, - onDropPropertyClick = props.onDropPropertyClick, - readonly = props.readonly, - required = props.required, - schema = props.schema; - var keyLabel = "".concat(label, " Key"); // i18n ? + if (typeof sendAction.delay === 'number') { + this.defer(sendAction); + return; + } else { + if (sendAction.to) { + this.sendTo(sendAction._event, sendAction.to); + } else { + this.send(sendAction._event); + } + } - var additional = schema.hasOwnProperty(utils["ADDITIONAL_PROPERTY_FLAG"]); + break; - if (!additional) { - return external_react_default.a.createElement("div", { - className: classNames - }, props.children); - } + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* cancel */ "b"]: + this.cancel(action.sendId); + break; - return external_react_default.a.createElement("div", { - className: classNames - }, external_react_default.a.createElement("div", { - className: "row" - }, external_react_default.a.createElement("div", { - className: "col-xs-5 form-additional" - }, external_react_default.a.createElement("div", { - className: "form-group" - }, external_react_default.a.createElement(Label, { - label: keyLabel, - required: required, - id: "".concat(id, "-key") - }), external_react_default.a.createElement(LabelInput, { - label: label, - required: required, - id: "".concat(id, "-key"), - onChange: onKeyChange - }))), external_react_default.a.createElement("div", { - className: "form-additional form-group col-xs-5" - }, props.children), external_react_default.a.createElement("div", { - className: "col-xs-2" - }, external_react_default.a.createElement(IconButton, { - type: "danger", - icon: "remove", - className: "array-item-remove btn-block", - tabIndex: "-1", - style: { - border: "0" - }, - disabled: disabled || readonly, - onClick: onDropPropertyClick(label) - })))); -} + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* start */ "k"]: + { + var activity = action.activity; // If the activity will be stopped right after it's started + // (such as in transient states) + // don't bother starting the activity. -function SchemaFieldRender(props) { - var uiSchema = props.uiSchema, - formData = props.formData, - errorSchema = props.errorSchema, - idPrefix = props.idPrefix, - name = props.name, - onKeyChange = props.onKeyChange, - onDropPropertyClick = props.onDropPropertyClick, - required = props.required, - _props$registry = props.registry, - registry = _props$registry === void 0 ? Object(utils["getDefaultRegistry"])() : _props$registry, - _props$wasPropertyKey = props.wasPropertyKeyModified, - wasPropertyKeyModified = _props$wasPropertyKey === void 0 ? false : _props$wasPropertyKey; - var rootSchema = registry.rootSchema, - fields = registry.fields, - formContext = registry.formContext; - var FieldTemplate = uiSchema["ui:FieldTemplate"] || registry.FieldTemplate || DefaultTemplate; - var idSchema = props.idSchema; - var schema = Object(utils["retrieveSchema"])(props.schema, rootSchema, formData); - idSchema = Object(utils["mergeObjects"])(Object(utils["toIdSchema"])(schema, null, rootSchema, formData, idPrefix), idSchema); - var FieldComponent = getFieldComponent(schema, uiSchema, idSchema, fields); - var DescriptionField = fields.DescriptionField; - var disabled = Boolean(props.disabled || uiSchema["ui:disabled"]); - var readonly = Boolean(props.readonly || uiSchema["ui:readonly"] || props.schema.readOnly || schema.readOnly); - var autofocus = Boolean(props.autofocus || uiSchema["ui:autofocus"]); + if (!this.state.activities[activity.id || activity.type]) { + break; + } // Invoked services - if (keys_default()(schema).length === 0) { - return null; - } - var displayLabel = Object(utils["getDisplayLabel"])(schema, uiSchema, rootSchema); + if (activity.type === _types_js__WEBPACK_IMPORTED_MODULE_3__[/* ActionTypes */ "a"].Invoke) { + var invokeSource = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toInvokeSource */ "t"])(activity.src); + var serviceCreator = this.machine.options.services ? this.machine.options.services[invokeSource.type] : undefined; + var id = activity.id, + data = activity.data; - var __errors = errorSchema.__errors, - fieldErrorSchema = Object(objectWithoutProperties["a" /* default */])(errorSchema, ["__errors"]); // See #439: uiSchema: Don't pass consumed class names to child components + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(!('forward' in activity), // tslint:disable-next-line:max-line-length + "`forward` property is deprecated (found in invocation of '" + activity.src + "' in in machine '" + this.machine.id + "'). " + "Please use `autoForward` instead."); + } + var autoForward = 'autoForward' in activity ? activity.autoForward : !!activity.forward; - var field = external_react_default.a.createElement(FieldComponent, Object(esm_extends["a" /* default */])({}, props, { - idSchema: idSchema, - schema: schema, - uiSchema: Object(objectSpread["a" /* default */])({}, uiSchema, { - classNames: undefined - }), - disabled: disabled, - readonly: readonly, - autofocus: autofocus, - errorSchema: fieldErrorSchema, - formContext: formContext, - rawErrors: __errors - })); - var id = idSchema.$id; // If this schema has a title defined, but the user has set a new key/label, retain their input. + if (!serviceCreator) { + // tslint:disable-next-line:no-console + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(false, "No service found for invocation '" + activity.src + "' in machine '" + this.machine.id + "'."); + } - var label; + return; + } - if (wasPropertyKeyModified) { - label = name; - } else { - label = uiSchema["ui:title"] || props.schema.title || schema.title || name; - } + var resolvedData = data ? Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* mapContext */ "l"])(data, context, _event) : undefined; + var source = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(serviceCreator) ? serviceCreator(context, _event.data, { + data: resolvedData, + src: invokeSource + }) : serviceCreator; - var description = uiSchema["ui:description"] || props.schema.description || schema.description; - var errors = __errors; - var help = uiSchema["ui:help"]; - var hidden = uiSchema["ui:widget"] === "hidden"; - var classNames = ["form-group", "field", "field-".concat(schema.type), errors && errors.length > 0 ? "field-error has-error has-danger" : "", uiSchema.classNames].join(" ").trim(); - var fieldProps = { - description: external_react_default.a.createElement(DescriptionField, { - id: id + "__description", - description: description, - formContext: formContext - }), - rawDescription: description, - help: external_react_default.a.createElement(Help, { - help: help - }), - rawHelp: typeof help === "string" ? help : undefined, - errors: external_react_default.a.createElement(ErrorList, { - errors: errors - }), - rawErrors: errors, - id: id, - label: label, - hidden: hidden, - onKeyChange: onKeyChange, - onDropPropertyClick: onDropPropertyClick, - required: required, - disabled: disabled, - readonly: readonly, - displayLabel: displayLabel, - classNames: classNames, - formContext: formContext, - fields: fields, - schema: schema, - uiSchema: uiSchema, - registry: registry - }; - var _AnyOfField = registry.fields.AnyOfField; - var _OneOfField = registry.fields.OneOfField; - return external_react_default.a.createElement(FieldTemplate, fieldProps, external_react_default.a.createElement(external_react_default.a.Fragment, null, field, schema.anyOf && !Object(utils["isSelect"])(schema) && external_react_default.a.createElement(_AnyOfField, { - disabled: disabled, - errorSchema: errorSchema, - formData: formData, - idPrefix: idPrefix, - idSchema: idSchema, - onBlur: props.onBlur, - onChange: props.onChange, - onFocus: props.onFocus, - options: schema.anyOf, - baseType: schema.type, - registry: registry, - schema: schema, - uiSchema: uiSchema - }), schema.oneOf && !Object(utils["isSelect"])(schema) && external_react_default.a.createElement(_OneOfField, { - disabled: disabled, - errorSchema: errorSchema, - formData: formData, - idPrefix: idPrefix, - idSchema: idSchema, - onBlur: props.onBlur, - onChange: props.onChange, - onFocus: props.onFocus, - options: schema.oneOf, - baseType: schema.type, - registry: registry, - schema: schema, - uiSchema: uiSchema - }))); -} + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isPromiseLike */ "i"])(source)) { + this.spawnPromise(Promise.resolve(source), id); + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(source)) { + this.spawnCallback(source, id); + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isObservable */ "h"])(source)) { + this.spawnObservable(source, id); + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(source)) { + // TODO: try/catch here + this.spawnMachine(resolvedData ? source.withContext(resolvedData) : source, { + id: id, + autoForward: autoForward + }); + } else ; + } else { + this.spawnActivity(activity); + } -var SchemaField_SchemaField = -/*#__PURE__*/ -function (_React$Component) { - Object(inherits["a" /* default */])(SchemaField, _React$Component); + break; + } - function SchemaField() { - Object(classCallCheck["a" /* default */])(this, SchemaField); + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* stop */ "l"]: + { + this.stopChild(action.activity.id); + break; + } - return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(SchemaField).apply(this, arguments)); - } + case _actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* log */ "g"]: + var label = action.label, + value = action.value; - Object(createClass["a" /* default */])(SchemaField, [{ - key: "shouldComponentUpdate", - value: function shouldComponentUpdate(nextProps, nextState) { - return !Object(utils["deepEquals"])(this.props, nextProps); - } - }, { - key: "render", - value: function render() { - return SchemaFieldRender(this.props); + if (label) { + this.logger(label, value); + } else { + this.logger(value); + } + + break; + + default: + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(false, "No implementation found for action type '" + action.type + "'"); + } + + break; } - }]); - return SchemaField; -}(external_react_default.a.Component); + return undefined; + }; -SchemaField_SchemaField.defaultProps = { - uiSchema: {}, - errorSchema: {}, - idSchema: {}, - disabled: false, - readonly: false, - autofocus: false -}; + Interpreter.prototype.removeChild = function (childId) { + this.children.delete(childId); + this.forwardTo.delete(childId); + delete this.state.children[childId]; + }; -if (false) {} + Interpreter.prototype.stopChild = function (childId) { + var child = this.children.get(childId); -/* harmony default export */ var fields_SchemaField = (SchemaField_SchemaField); -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/StringField.js + if (!child) { + return; + } + this.removeChild(childId); + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(child.stop)) { + child.stop(); + } + }; + Interpreter.prototype.spawn = function (entity, name, options) { + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isPromiseLike */ "i"])(entity)) { + return this.spawnPromise(Promise.resolve(entity), name); + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(entity)) { + return this.spawnCallback(entity, name); + } else if (Object(_Actor_js__WEBPACK_IMPORTED_MODULE_9__[/* isSpawnedActor */ "b"])(entity)) { + return this.spawnActor(entity); + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isObservable */ "h"])(entity)) { + return this.spawnObservable(entity, name); + } else if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(entity)) { + return this.spawnMachine(entity, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, options), { + id: name + })); + } else { + throw new Error("Unable to spawn entity \"" + name + "\" of type \"" + typeof entity + "\"."); + } + }; + Interpreter.prototype.spawnMachine = function (machine, options) { + var _this = this; + if (options === void 0) { + options = {}; + } -function StringField_StringField(props) { - var schema = props.schema, - name = props.name, - uiSchema = props.uiSchema, - idSchema = props.idSchema, - formData = props.formData, - required = props.required, - disabled = props.disabled, - readonly = props.readonly, - autofocus = props.autofocus, - onChange = props.onChange, - onBlur = props.onBlur, - onFocus = props.onFocus, - _props$registry = props.registry, - registry = _props$registry === void 0 ? Object(utils["getDefaultRegistry"])() : _props$registry, - rawErrors = props.rawErrors; - var title = schema.title, - format = schema.format; - var widgets = registry.widgets, - formContext = registry.formContext; - var enumOptions = Object(utils["isSelect"])(schema) && Object(utils["optionsList"])(schema); - var defaultWidget = enumOptions ? "select" : "text"; + var childService = new Interpreter(machine, Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, this.options), { + parent: this, + id: options.id || machine.id + })); - if (format && Object(utils["hasWidget"])(schema, format, widgets)) { - defaultWidget = format; - } + var resolvedOptions = Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, DEFAULT_SPAWN_OPTIONS), options); - var _getUiOptions = Object(utils["getUiOptions"])(uiSchema), - _getUiOptions$widget = _getUiOptions.widget, - widget = _getUiOptions$widget === void 0 ? defaultWidget : _getUiOptions$widget, - _getUiOptions$placeho = _getUiOptions.placeholder, - placeholder = _getUiOptions$placeho === void 0 ? "" : _getUiOptions$placeho, - options = Object(objectWithoutProperties["a" /* default */])(_getUiOptions, ["widget", "placeholder"]); + if (resolvedOptions.sync) { + childService.onTransition(function (state) { + _this.send(_actionTypes_js__WEBPACK_IMPORTED_MODULE_5__[/* update */ "m"], { + state: state, + id: childService.id + }); + }); + } - var Widget = Object(utils["getWidget"])(schema, widget, widgets); - return external_react_default.a.createElement(Widget, { - options: Object(objectSpread["a" /* default */])({}, options, { - enumOptions: enumOptions - }), - schema: schema, - uiSchema: uiSchema, - id: idSchema && idSchema.$id, - label: title === undefined ? name : title, - value: formData, - onChange: onChange, - onBlur: onBlur, - onFocus: onFocus, - required: required, - disabled: disabled, - readonly: readonly, - formContext: formContext, - autofocus: autofocus, - registry: registry, - placeholder: placeholder, - rawErrors: rawErrors - }); -} + var actor = childService; + this.children.set(childService.id, actor); -if (false) {} + if (resolvedOptions.autoForward) { + this.forwardTo.add(childService.id); + } -StringField_StringField.defaultProps = { - uiSchema: {}, - disabled: false, - readonly: false, - autofocus: false -}; -/* harmony default export */ var fields_StringField = (StringField_StringField); -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/TitleField.js + childService.onDone(function (doneEvent) { + _this.removeChild(childService.id); + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(doneEvent, { + origin: childService.id + })); + }).start(); + return actor; + }; -var TitleField_REQUIRED_FIELD_SYMBOL = "*"; + Interpreter.prototype.spawnPromise = function (promise, id) { + var _this = this; -function TitleField_TitleField(props) { - var id = props.id, - title = props.title, - required = props.required; - return external_react_default.a.createElement("legend", { - id: id - }, title, required && external_react_default.a.createElement("span", { - className: "required" - }, TitleField_REQUIRED_FIELD_SYMBOL)); -} + var canceled = false; + promise.then(function (response) { + if (!canceled) { + _this.removeChild(id); -if (false) {} + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* doneInvoke */ "a"])(id, response), { + origin: id + })); + } + }, function (errorData) { + if (!canceled) { + _this.removeChild(id); -/* harmony default export */ var fields_TitleField = (TitleField_TitleField); -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/NullField.js + var errorEvent = Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "b"])(id, errorData); + try { + // Send "error.platform.id" to this (parent). + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(errorEvent, { + origin: id + })); + } catch (error) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* reportUnhandledExceptionOnInvocation */ "o"])(errorData, error, id); + if (_this.devTools) { + _this.devTools.send(errorEvent, _this.state); + } + if (_this.machine.strict) { + // it would be better to always stop the state machine if unhandled + // exception/promise rejection happens but because we don't want to + // break existing code so enforce it on strict mode only especially so + // because documentation says that onError is optional + _this.stop(); + } + } + } + }); + var actor = { + id: id, + send: function () { + return void 0; + }, + subscribe: function (next, handleError, complete) { + var observer = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toObserver */ "u"])(next, handleError, complete); + var unsubscribed = false; + promise.then(function (response) { + if (unsubscribed) { + return; + } + observer.next(response); + if (unsubscribed) { + return; + } + observer.complete(); + }, function (err) { + if (unsubscribed) { + return; + } + observer.error(err); + }); + return { + unsubscribe: function () { + return unsubscribed = true; + } + }; + }, + stop: function () { + canceled = true; + }, + toJSON: function () { + return { + id: id + }; + } + }; + this.children.set(id, actor); + return actor; + }; -var NullField_NullField = -/*#__PURE__*/ -function (_Component) { - Object(inherits["a" /* default */])(NullField, _Component); + Interpreter.prototype.spawnCallback = function (callback, id) { + var _this = this; - function NullField() { - Object(classCallCheck["a" /* default */])(this, NullField); + var canceled = false; + var receivers = new Set(); + var listeners = new Set(); - return Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(NullField).apply(this, arguments)); - } + var receive = function (e) { + listeners.forEach(function (listener) { + return listener(e); + }); - Object(createClass["a" /* default */])(NullField, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (this.props.formData === undefined) { - this.props.onChange(null); + if (canceled) { + return; } + + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(e, { + origin: id + })); + }; + + var callbackStop; + + try { + callbackStop = callback(receive, function (newListener) { + receivers.add(newListener); + }); + } catch (err) { + this.send(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "b"])(id, err)); } - }, { - key: "render", - value: function render() { - return null; + + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isPromiseLike */ "i"])(callbackStop)) { + // it turned out to be an async function, can't reliably check this before calling `callback` + // because transpiled async functions are not recognizable + return this.spawnPromise(callbackStop, id); } - }]); - return NullField; -}(external_react_["Component"]); + var actor = { + id: id, + send: function (event) { + return receivers.forEach(function (receiver) { + return receiver(event); + }); + }, + subscribe: function (next) { + listeners.add(next); + return { + unsubscribe: function () { + listeners.delete(next); + } + }; + }, + stop: function () { + canceled = true; -if (false) {} + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(callbackStop)) { + callbackStop(); + } + }, + toJSON: function () { + return { + id: id + }; + } + }; + this.children.set(id, actor); + return actor; + }; -/* harmony default export */ var fields_NullField = (NullField_NullField); -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/UnsupportedField.js + Interpreter.prototype.spawnObservable = function (source, id) { + var _this = this; + + var subscription = source.subscribe(function (value) { + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(value, { + origin: id + })); + }, function (err) { + _this.removeChild(id); + + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* error */ "b"])(id, err), { + origin: id + })); + }, function () { + _this.removeChild(id); + + _this.send(Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* toSCXMLEvent */ "v"])(Object(_actions_js__WEBPACK_IMPORTED_MODULE_6__[/* doneInvoke */ "a"])(id), { + origin: id + })); + }); + var actor = { + id: id, + send: function () { + return void 0; + }, + subscribe: function (next, handleError, complete) { + return source.subscribe(next, handleError, complete); + }, + stop: function () { + return subscription.unsubscribe(); + }, + toJSON: function () { + return { + id: id + }; + } + }; + this.children.set(id, actor); + return actor; + }; + Interpreter.prototype.spawnActor = function (actor) { + this.children.set(actor.id, actor); + return actor; + }; + Interpreter.prototype.spawnActivity = function (activity) { + var implementation = this.machine.options && this.machine.options.activities ? this.machine.options.activities[activity.type] : undefined; + if (!implementation) { + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(false, "No implementation found for activity '" + activity.type + "'"); + } // tslint:disable-next-line:no-console -function UnsupportedField_UnsupportedField(_ref) { - var schema = _ref.schema, - idSchema = _ref.idSchema, - reason = _ref.reason; - return external_react_default.a.createElement("div", { - className: "unsupported-field" - }, external_react_default.a.createElement("p", null, "Unsupported field schema", idSchema && idSchema.$id && external_react_default.a.createElement("span", null, " for", " field ", external_react_default.a.createElement("code", null, idSchema.$id)), reason && external_react_default.a.createElement("em", null, ": ", reason), "."), schema && external_react_default.a.createElement("pre", null, stringify_default()(schema, null, 2))); -} -if (false) {} + return; + } // Start implementation -/* harmony default export */ var fields_UnsupportedField = (UnsupportedField_UnsupportedField); -// CONCATENATED MODULE: ./node_modules/@rjsf/core/dist/es/components/fields/index.js + + var dispose = implementation(this.state.context, activity); + this.spawnEffect(activity.id, dispose); + }; + + Interpreter.prototype.spawnEffect = function (id, dispose) { + this.children.set(id, { + id: id, + send: function () { + return void 0; + }, + subscribe: function () { + return { + unsubscribe: function () { + return void 0; + } + }; + }, + stop: dispose || undefined, + toJSON: function () { + return { + id: id + }; + } + }); + }; + + Interpreter.prototype.attachDev = function () { + var global = Object(_devTools_js__WEBPACK_IMPORTED_MODULE_12__[/* getGlobal */ "a"])(); + + if (this.options.devTools && global) { + if (global.__REDUX_DEVTOOLS_EXTENSION__) { + var devToolsOptions = typeof this.options.devTools === 'object' ? this.options.devTools : undefined; + this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ + name: this.id, + autoPause: true, + stateSanitizer: function (state) { + return { + value: state.value, + context: state.context, + actions: state.actions + }; + } + }, devToolsOptions), { + features: Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({ + jump: false, + skip: false + }, devToolsOptions ? devToolsOptions.features : undefined) + }), this.machine); + this.devTools.init(this.state); + } // add XState-specific dev tooling hook + + + Object(_devTools_js__WEBPACK_IMPORTED_MODULE_12__[/* registerService */ "b"])(this); + } + }; + + Interpreter.prototype.toJSON = function () { + return { + id: this.id + }; + }; + + Interpreter.prototype[_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* symbolObservable */ "p"]] = function () { + return this; + }; + /** + * The default interpreter options: + * + * - `clock` uses the global `setTimeout` and `clearTimeout` functions + * - `logger` uses the global `console.log()` method + */ + Interpreter.defaultOptions = /*#__PURE__*/function (global) { + return { + execute: true, + deferEvents: true, + clock: { + setTimeout: function (fn, ms) { + return setTimeout(fn, ms); + }, + clearTimeout: function (id) { + return clearTimeout(id); + } + }, + logger: global.console.log.bind(console), + devTools: false + }; + }(typeof self !== 'undefined' ? self : global); + Interpreter.interpret = interpret; + return Interpreter; +}(); +var resolveSpawnOptions = function (nameOrOptions) { + if (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isString */ "j"])(nameOrOptions)) { + return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, DEFAULT_SPAWN_OPTIONS), { + name: nameOrOptions + }); + } + return Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])(Object(_virtual_tslib_js__WEBPACK_IMPORTED_MODULE_0__[/* __assign */ "a"])({}, DEFAULT_SPAWN_OPTIONS), { + name: Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* uniqueId */ "w"])() + }), nameOrOptions); +}; +function spawn(entity, nameOrOptions) { + var resolvedOptions = resolveSpawnOptions(nameOrOptions); + return Object(_serviceScope_js__WEBPACK_IMPORTED_MODULE_8__[/* consume */ "a"])(function (service) { + if (!_environment_js__WEBPACK_IMPORTED_MODULE_1__[/* IS_PRODUCTION */ "a"]) { + var isLazyEntity = Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(entity) || Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isFunction */ "f"])(entity); + Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* warn */ "y"])(!!service || isLazyEntity, "Attempted to spawn an Actor (ID: \"" + (Object(_utils_js__WEBPACK_IMPORTED_MODULE_2__[/* isMachine */ "g"])(entity) ? entity.id : 'undefined') + "\") outside of a service. This will have no effect."); + } + if (service) { + return service.spawn(entity, resolvedOptions.name, resolvedOptions); + } else { + return Object(_Actor_js__WEBPACK_IMPORTED_MODULE_9__[/* createDeferredActor */ "a"])(entity, resolvedOptions.name); + } + }); +} +/** + * Creates a new Interpreter instance for the given machine with the provided options, if any. + * + * @param machine The machine to interpret + * @param options Interpreter options + */ +function interpret(machine, options) { + var interpreter = new Interpreter(machine, options); + return interpreter; +} -/* harmony default export */ var components_fields = __webpack_exports__["default"] = ({ - AnyOfField: MultiSchemaField, - ArrayField: fields_ArrayField, - BooleanField: fields_BooleanField, - DescriptionField: fields_DescriptionField, - NumberField: fields_NumberField, - ObjectField: fields_ObjectField, - OneOfField: MultiSchemaField, - SchemaField: fields_SchemaField, - StringField: fields_StringField, - TitleField: fields_TitleField, - NullField: fields_NullField, - UnsupportedField: fields_UnsupportedField -}); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(121))) /***/ }) /******/ ]); diff --git a/package-lock.json b/package-lock.json index 7ec34da8..add51eb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "lattice-fabricate", - "version": "0.14.6", + "version": "0.15.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0cd4fb33..83e438fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lattice-fabricate", - "version": "0.14.6", + "version": "0.15.0", "homepage": "https://github.com/openlattice/lattice-fabricate", "description": "React HOCs for components dependent on the OpenLattice EDM.", "author": {