diff --git a/server/README.md b/server/README.md index 76ac08dd..4789bd61 100644 --- a/server/README.md +++ b/server/README.md @@ -1 +1,65 @@ # Server + +The server is composed of two parts: the admin panel and the api. It is built on top of [Strapi](https://strapi.io/documentation/3.0.0-beta.x/getting-started/introduction.html), a headless content management system. The file structure is documented [here](https://strapi.io/documentation/3.0.0-beta.x/concepts/file-structure.html#files-structure). + + + +## Setup + +### Installation + +`yarn install` + +### Developing + +`yarn develop` + + + +## Admin Panel `/admin` + +Built with [React](https://reactjs.org/) and served by [Node](https://nodejs.org/en/), the admin panel allows for full customization of the server. Here you can create new content types and their corresponding endpoints, configure roles and permissions, and much more. The interface itself can be customized and configured as needed. + +Read the full [documentation](https://strapi.io/documentation/3.0.0-beta.x/admin-panel/customization.html) on the admin panel. + + + +## API `/` + +Built with [Node](https://nodejs.org/en/), [Koa](https://github.com/koajs/koa#readme), and [Bookshelf](https://bookshelfjs.org/), the REST API enables CRUD functionality with the application's content. Authentication is enabled via JWTs. The current database is sqlite3 running locally. + +### Entity Relationships + +The content available via the API is modeled as follows. + +![ER Digram](er_diagram.png) + +### Endpoints + +Each endpoint corresponds to an entity from the ER digram, a content type in the admin panel, a folder in the `./api` directory, and a database table. + +| Endpoint | Note | +| ------------------- | ---- | +| activities | | +| blocks | | +| blocks-categories | | +| complexities | | +| difficulties | | +| learning-categories | | +| models | | +| topics | | +| types | | + +Each and every endpoint can be interacted with by using the following method and path combinations. + +| Method | Path | Description | +| ------ | ----------------- | --------------------- | +| GET | /{endpoint} | Get a list of entries | +| GET | /{endpoint}/:id | Get a specific entry | +| GET | /{endpoint}/count | Count entries | +| POST | /{endpoint} | Create a new entry | +| DELETE | /{endpoint}/:id | Delete an entry | +| PUT | /{endpoint}/:id | Update an entry | + +Read the full [documentation](https://strapi.io/documentation/3.0.0-beta.x/content-api/api-endpoints.html#api-endpoints) on the api endpoints. + diff --git a/server/api/.gitkeep b/server/api/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/server/api/activity/config/routes.json b/server/api/activity/config/routes.json new file mode 100644 index 00000000..2c71f4a9 --- /dev/null +++ b/server/api/activity/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/activities", + "handler": "activity.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/activities/count", + "handler": "activity.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/activities/:id", + "handler": "activity.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/activities", + "handler": "activity.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/activities/:id", + "handler": "activity.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/activities/:id", + "handler": "activity.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/activity/controllers/activity.js b/server/api/activity/controllers/activity.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/activity/controllers/activity.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/activity/models/activity.js b/server/api/activity/models/activity.js new file mode 100644 index 00000000..446f0e1a --- /dev/null +++ b/server/api/activity/models/activity.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `activity` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/activity/models/activity.settings.json b/server/api/activity/models/activity.settings.json new file mode 100644 index 00000000..5b48df1a --- /dev/null +++ b/server/api/activity/models/activity.settings.json @@ -0,0 +1,36 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "activities", + "info": { + "name": "activity" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string", + "required": true + }, + "description": { + "type": "text" + }, + "difficulty": { + "model": "difficulty" + }, + "models": { + "collection": "model" + }, + "blocks_categories": { + "collection": "blocks-category" + }, + "learning_category": { + "model": "learning-category" + }, + "topic": { + "model": "topic" + } + } +} diff --git a/server/api/activity/services/activity.js b/server/api/activity/services/activity.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/activity/services/activity.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/block/config/routes.json b/server/api/block/config/routes.json new file mode 100644 index 00000000..f9c6daa3 --- /dev/null +++ b/server/api/block/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/blocks", + "handler": "block.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/blocks/count", + "handler": "block.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/blocks/:id", + "handler": "block.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/blocks", + "handler": "block.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/blocks/:id", + "handler": "block.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/blocks/:id", + "handler": "block.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/block/controllers/block.js b/server/api/block/controllers/block.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/block/controllers/block.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/block/models/block.js b/server/api/block/models/block.js new file mode 100644 index 00000000..8269486e --- /dev/null +++ b/server/api/block/models/block.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `block` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/block/models/block.settings.json b/server/api/block/models/block.settings.json new file mode 100644 index 00000000..d736d1d8 --- /dev/null +++ b/server/api/block/models/block.settings.json @@ -0,0 +1,20 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "blocks", + "info": { + "name": "Block" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string" + }, + "definition": { + "type": "text" + } + } +} diff --git a/server/api/block/services/block.js b/server/api/block/services/block.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/block/services/block.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/blocks-category/config/routes.json b/server/api/blocks-category/config/routes.json new file mode 100644 index 00000000..17b4b7fd --- /dev/null +++ b/server/api/blocks-category/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/blocks-categories", + "handler": "blocks-category.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/blocks-categories/count", + "handler": "blocks-category.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/blocks-categories/:id", + "handler": "blocks-category.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/blocks-categories", + "handler": "blocks-category.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/blocks-categories/:id", + "handler": "blocks-category.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/blocks-categories/:id", + "handler": "blocks-category.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/blocks-category/controllers/blocks-category.js b/server/api/blocks-category/controllers/blocks-category.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/blocks-category/controllers/blocks-category.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/blocks-category/models/blocks-category.js b/server/api/blocks-category/models/blocks-category.js new file mode 100644 index 00000000..39793a8b --- /dev/null +++ b/server/api/blocks-category/models/blocks-category.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `blocks-category` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/blocks-category/models/blocks-category.settings.json b/server/api/blocks-category/models/blocks-category.settings.json new file mode 100644 index 00000000..141c71b1 --- /dev/null +++ b/server/api/blocks-category/models/blocks-category.settings.json @@ -0,0 +1,23 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "blocks_categories", + "info": { + "name": "Blocks Category" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string" + }, + "definition": { + "type": "text" + }, + "blocks": { + "collection": "block" + } + } +} diff --git a/server/api/blocks-category/services/blocks-category.js b/server/api/blocks-category/services/blocks-category.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/blocks-category/services/blocks-category.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/complexity/config/routes.json b/server/api/complexity/config/routes.json new file mode 100644 index 00000000..4f170733 --- /dev/null +++ b/server/api/complexity/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/complexities", + "handler": "complexity.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/complexities/count", + "handler": "complexity.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/complexities/:id", + "handler": "complexity.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/complexities", + "handler": "complexity.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/complexities/:id", + "handler": "complexity.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/complexities/:id", + "handler": "complexity.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/complexity/controllers/complexity.js b/server/api/complexity/controllers/complexity.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/complexity/controllers/complexity.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/complexity/models/complexity.js b/server/api/complexity/models/complexity.js new file mode 100644 index 00000000..7422b2f4 --- /dev/null +++ b/server/api/complexity/models/complexity.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `complexity` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/complexity/models/complexity.settings.json b/server/api/complexity/models/complexity.settings.json new file mode 100644 index 00000000..70cdd6c4 --- /dev/null +++ b/server/api/complexity/models/complexity.settings.json @@ -0,0 +1,19 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "complexities", + "info": { + "name": "Complexity" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string", + "required": true, + "unique": true + } + } +} diff --git a/server/api/complexity/services/complexity.js b/server/api/complexity/services/complexity.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/complexity/services/complexity.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/difficulty/config/routes.json b/server/api/difficulty/config/routes.json new file mode 100644 index 00000000..0ac9dcab --- /dev/null +++ b/server/api/difficulty/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/difficulties", + "handler": "difficulty.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/difficulties/count", + "handler": "difficulty.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/difficulties/:id", + "handler": "difficulty.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/difficulties", + "handler": "difficulty.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/difficulties/:id", + "handler": "difficulty.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/difficulties/:id", + "handler": "difficulty.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/difficulty/controllers/difficulty.js b/server/api/difficulty/controllers/difficulty.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/difficulty/controllers/difficulty.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/difficulty/models/difficulty.js b/server/api/difficulty/models/difficulty.js new file mode 100644 index 00000000..9bd362a7 --- /dev/null +++ b/server/api/difficulty/models/difficulty.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `difficulty` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/difficulty/models/difficulty.settings.json b/server/api/difficulty/models/difficulty.settings.json new file mode 100644 index 00000000..9334bd26 --- /dev/null +++ b/server/api/difficulty/models/difficulty.settings.json @@ -0,0 +1,17 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "difficulties", + "info": { + "name": "Difficulty" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string" + } + } +} diff --git a/server/api/difficulty/services/difficulty.js b/server/api/difficulty/services/difficulty.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/difficulty/services/difficulty.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/learning-category/config/routes.json b/server/api/learning-category/config/routes.json new file mode 100644 index 00000000..9dd4118c --- /dev/null +++ b/server/api/learning-category/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/learning-categories", + "handler": "learning-category.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/learning-categories/count", + "handler": "learning-category.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/learning-categories/:id", + "handler": "learning-category.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/learning-categories", + "handler": "learning-category.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/learning-categories/:id", + "handler": "learning-category.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/learning-categories/:id", + "handler": "learning-category.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/learning-category/controllers/learning-category.js b/server/api/learning-category/controllers/learning-category.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/learning-category/controllers/learning-category.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/learning-category/models/learning-category.js b/server/api/learning-category/models/learning-category.js new file mode 100644 index 00000000..c135d92a --- /dev/null +++ b/server/api/learning-category/models/learning-category.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `learning-category` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/learning-category/models/learning-category.settings.json b/server/api/learning-category/models/learning-category.settings.json new file mode 100644 index 00000000..fb299227 --- /dev/null +++ b/server/api/learning-category/models/learning-category.settings.json @@ -0,0 +1,19 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "learning_categories", + "info": { + "name": "Learning Category" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string", + "required": true, + "unique": true + } + } +} diff --git a/server/api/learning-category/services/learning-category.js b/server/api/learning-category/services/learning-category.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/learning-category/services/learning-category.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/model/config/routes.json b/server/api/model/config/routes.json new file mode 100644 index 00000000..df15afff --- /dev/null +++ b/server/api/model/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/models", + "handler": "model.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/models/count", + "handler": "model.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/models/:id", + "handler": "model.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/models", + "handler": "model.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/models/:id", + "handler": "model.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/models/:id", + "handler": "model.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/model/controllers/model.js b/server/api/model/controllers/model.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/model/controllers/model.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/model/models/model.js b/server/api/model/models/model.js new file mode 100644 index 00000000..83752081 --- /dev/null +++ b/server/api/model/models/model.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `model` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/model/models/model.settings.json b/server/api/model/models/model.settings.json new file mode 100644 index 00000000..06c33164 --- /dev/null +++ b/server/api/model/models/model.settings.json @@ -0,0 +1,26 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "models", + "info": { + "name": "Model" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string" + }, + "representation": { + "model": "file", + "via": "related", + "plugin": "upload", + "required": false + }, + "complexity": { + "model": "complexity" + } + } +} diff --git a/server/api/model/services/model.js b/server/api/model/services/model.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/model/services/model.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/topic/config/routes.json b/server/api/topic/config/routes.json new file mode 100644 index 00000000..bde16d8a --- /dev/null +++ b/server/api/topic/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/topics", + "handler": "topic.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/topics/count", + "handler": "topic.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/topics/:id", + "handler": "topic.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/topics", + "handler": "topic.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/topics/:id", + "handler": "topic.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/topics/:id", + "handler": "topic.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/topic/controllers/topic.js b/server/api/topic/controllers/topic.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/topic/controllers/topic.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/topic/models/topic.js b/server/api/topic/models/topic.js new file mode 100644 index 00000000..e16d6321 --- /dev/null +++ b/server/api/topic/models/topic.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `topic` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/topic/models/topic.settings.json b/server/api/topic/models/topic.settings.json new file mode 100644 index 00000000..7e5f2715 --- /dev/null +++ b/server/api/topic/models/topic.settings.json @@ -0,0 +1,27 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "topics", + "info": { + "name": "Topic" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string", + "required": true, + "unique": true + }, + "description": { + "type": "text", + "unique": false, + "required": true + }, + "type": { + "model": "type" + } + } +} diff --git a/server/api/topic/services/topic.js b/server/api/topic/services/topic.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/topic/services/topic.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/api/type/config/routes.json b/server/api/type/config/routes.json new file mode 100644 index 00000000..1d8cc284 --- /dev/null +++ b/server/api/type/config/routes.json @@ -0,0 +1,52 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/types", + "handler": "type.find", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/types/count", + "handler": "type.count", + "config": { + "policies": [] + } + }, + { + "method": "GET", + "path": "/types/:id", + "handler": "type.findOne", + "config": { + "policies": [] + } + }, + { + "method": "POST", + "path": "/types", + "handler": "type.create", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/types/:id", + "handler": "type.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/types/:id", + "handler": "type.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/server/api/type/controllers/type.js b/server/api/type/controllers/type.js new file mode 100644 index 00000000..f94f2273 --- /dev/null +++ b/server/api/type/controllers/type.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/server/api/type/models/type.js b/server/api/type/models/type.js new file mode 100644 index 00000000..9dd61545 --- /dev/null +++ b/server/api/type/models/type.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `type` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/server/api/type/models/type.settings.json b/server/api/type/models/type.settings.json new file mode 100644 index 00000000..727df063 --- /dev/null +++ b/server/api/type/models/type.settings.json @@ -0,0 +1,19 @@ +{ + "kind": "collectionType", + "connection": "default", + "collectionName": "types", + "info": { + "name": "Type" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "name": { + "type": "string", + "unique": true, + "required": true + } + } +} diff --git a/server/api/type/services/type.js b/server/api/type/services/type.js new file mode 100644 index 00000000..d0dcc883 --- /dev/null +++ b/server/api/type/services/type.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/server/build/0.617e4a57.chunk.js b/server/build/0.617e4a57.chunk.js new file mode 100644 index 00000000..33d21875 --- /dev/null +++ b/server/build/0.617e4a57.chunk.js @@ -0,0 +1,325 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{ + +/***/ 1893: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactRouterDom=__webpack_require__(30);var _lodash=__webpack_require__(8);var _strapiHelperPlugin=__webpack_require__(10);var _custom=__webpack_require__(72);var _reactIntl=__webpack_require__(15);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _getRequestUrl=_interopRequireDefault(__webpack_require__(645));var _FieldsReorder=_interopRequireDefault(__webpack_require__(2029));var _FormTitle=_interopRequireDefault(__webpack_require__(2038));var _LayoutTitle=_interopRequireDefault(__webpack_require__(2039));var _PopupForm=_interopRequireDefault(__webpack_require__(1931));var _SettingsViewWrapper=_interopRequireDefault(__webpack_require__(1932));var _SortableList=_interopRequireDefault(__webpack_require__(2040));var _layout=__webpack_require__(1965);var _getComponents=_interopRequireDefault(__webpack_require__(1938));var _LayoutDndProvider=_interopRequireDefault(__webpack_require__(647));var _getInputProps=_interopRequireDefault(__webpack_require__(2042));var _reducer=_interopRequireWildcard(__webpack_require__(2043));var EditSettingsView=function EditSettingsView(_ref){var currentEnvironment=_ref.currentEnvironment,deleteLayout=_ref.deleteLayout,deleteLayouts=_ref.deleteLayouts,componentsAndModelsMainPossibleMainFields=_ref.componentsAndModelsMainPossibleMainFields,push=_ref.history.push,plugins=_ref.plugins,slug=_ref.slug;var _useParams=(0,_reactRouterDom.useParams)(),componentSlug=_useParams.componentSlug,type=_useParams.type;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent;var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),reducerState=_useReducer2[0],dispatch=_useReducer2[1];var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isModalFormOpen=_useState2[0],setIsModalFormOpen=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),isDraggingSibling=_useState4[0],setIsDraggingSibling=_useState4[1];var fieldsReorderClassName=type==='content-types'?'col-8':'col-12';var abortController=new AbortController();var signal=abortController.signal;var _reducerState$toJS=reducerState.toJS(),componentLayouts=_reducerState$toJS.componentLayouts,isLoading=_reducerState$toJS.isLoading,initialData=_reducerState$toJS.initialData,metaToEdit=_reducerState$toJS.metaToEdit,modifiedData=_reducerState$toJS.modifiedData,metaForm=_reducerState$toJS.metaForm;var getAttributes=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','attributes'],{});},[modifiedData]);var getName=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','info','name'],'');},[modifiedData]);var getEditLayout=(0,_react.useCallback)(function(){return(0,_lodash.get)(modifiedData,['layouts','edit'],[]);},[modifiedData]);var getForm=function getForm(){return Object.keys((0,_lodash.get)(modifiedData,['metadatas',metaToEdit,'edit'],{})).filter(function(meta){return meta!=='visible';});};var getRelationsLayout=(0,_react.useCallback)(function(){return(0,_lodash.get)(modifiedData,['layouts','editRelations'],[]);},[modifiedData]);var getEditRelationsRemaingFields=function getEditRelationsRemaingFields(){var attributes=getAttributes;var displayedFields=getRelationsLayout();return Object.keys(attributes).filter(function(attr){return(0,_lodash.get)(attributes,[attr,'type'],'')==='relation';}).filter(function(attr){return displayedFields.indexOf(attr)===-1;});};var getEditRemainingFields=function getEditRemainingFields(){var attributes=getAttributes;var metadatas=(0,_lodash.get)(modifiedData,['metadatas'],{});var displayedFields=getEditLayout().reduce(function(acc,curr){return[].concat((0,_toConsumableArray2["default"])(acc),(0,_toConsumableArray2["default"])(curr.rowContent));},[]);return Object.keys(attributes).filter(function(attr){return(0,_lodash.get)(attributes,[attr,'type'],'')!=='relation';}).filter(function(attr){return(0,_lodash.get)(metadatas,[attr,'edit','visible'],false)===true;}).filter(function(attr){return displayedFields.findIndex(function(el){return el.name===attr;})===-1;});};var getSelectedItemSelectOptions=(0,_react.useCallback)(function(formType){if(formType!=='relation'&&formType!=='component'){return[];}var targetKey=formType==='component'?'component':'targetModel';var key=(0,_lodash.get)(modifiedData,['schema','attributes',metaToEdit,targetKey],'');return(0,_lodash.get)(componentsAndModelsMainPossibleMainFields,[key],[]);},[metaToEdit,componentsAndModelsMainPossibleMainFields,modifiedData]);(0,_react.useEffect)(function(){var getData=/*#__PURE__*/function(){var _ref2=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){var _yield$request,data;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("".concat(type,"/").concat(slug||componentSlug)),{method:'GET',signal:signal});case 3:_yield$request=_context.sent;data=_yield$request.data;dispatch({type:'GET_DATA_SUCCEEDED',data:data.contentType||data.component,componentLayouts:data.components});_context.next=11;break;case 8:_context.prev=8;_context.t0=_context["catch"](0);if(_context.t0.code!==20){strapi.notification.error('notification.error');}case 11:case"end":return _context.stop();}}},_callee,null,[[0,8]]);}));return function getData(){return _ref2.apply(this,arguments);};}();getData();return function(){abortController.abort();};// eslint-disable-next-line react-hooks/exhaustive-deps +},[slug,type,componentSlug]);var handleChange=function handleChange(_ref3){var _ref3$target=_ref3.target,name=_ref3$target.name,value=_ref3$target.value;dispatch({type:'ON_CHANGE',keys:name.split('.'),value:value});};var handleChangeMeta=function handleChangeMeta(_ref4){var _ref4$target=_ref4.target,name=_ref4$target.name,value=_ref4$target.value;dispatch({type:'ON_CHANGE_META',keys:name.split('.'),value:value});};var handleConfirm=/*#__PURE__*/function(){var _ref5=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){var body;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;body=(0,_lodash.cloneDeep)(modifiedData);// We need to send the unformated edit layout +(0,_lodash.set)(body,'layouts.edit',(0,_layout.unformatLayout)(body.layouts.edit));delete body.schema;delete body.uid;delete body.isComponent;delete body.category;delete body.apiID;_context2.next=10;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("".concat(type,"/").concat(slug||componentSlug)),{method:'PUT',body:body,signal:signal});case 10:dispatch({type:'SUBMIT_SUCCEEDED'});if(slug){deleteLayout(slug);}if(componentSlug){deleteLayouts();}emitEvent('didEditEditSettings');_context2.next=19;break;case 16:_context2.prev=16;_context2.t0=_context2["catch"](0);strapi.notification.error('notification.error');case 19:case"end":return _context2.stop();}}},_callee2,null,[[0,16]]);}));return function handleConfirm(){return _ref5.apply(this,arguments);};}();var handleSubmitMetaForm=function handleSubmitMetaForm(e){e.preventDefault();dispatch({type:'SUBMIT_META_FORM'});toggleModalForm();};var moveItem=function moveItem(dragIndex,hoverIndex,dragRowIndex,hoverRowIndex){// Same row = just reorder +if(dragRowIndex===hoverRowIndex){dispatch({type:'REORDER_ROW',dragRowIndex:dragRowIndex,dragIndex:dragIndex,hoverIndex:hoverIndex});}else{dispatch({type:'REORDER_DIFF_ROW',dragIndex:dragIndex,hoverIndex:hoverIndex,dragRowIndex:dragRowIndex,hoverRowIndex:hoverRowIndex});}};var moveRow=function moveRow(dragRowIndex,hoverRowIndex){dispatch({type:'MOVE_ROW',dragRowIndex:dragRowIndex,hoverRowIndex:hoverRowIndex});};var toggleModalForm=function toggleModalForm(){setIsModalFormOpen(function(prevState){return!prevState;});};var renderForm=function renderForm(){return getForm().map(function(meta,index){var formType=(0,_lodash.get)(getAttributes,[metaToEdit,'type']);if(formType==='dynamiczone'&&!['label','description'].includes(meta)){return null;}if((formType==='component'||formType==='media')&&meta!=='label'){return null;}if((formType==='json'||formType==='boolean')&&meta==='placeholder'){return null;}if(formType==='richtext'&&meta==='editable'){return null;}return/*#__PURE__*/_react["default"].createElement("div",{className:"col-6",key:meta,style:{marginBottom:4}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title.description")},function(description){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_lodash.get)((0,_getInputProps["default"])(meta),'label.id','app.utils.defaultMessage')},function(label){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,{autoFocus:index===0,description:meta==='mainField'?description:'',label:label,name:meta,type:(0,_getInputProps["default"])(meta).type,onBlur:function onBlur(){},value:(0,_lodash.get)(metaForm,meta,''),onChange:handleChangeMeta,options:getSelectedItemSelectOptions(formType)});});}));});};return/*#__PURE__*/_react["default"].createElement(_LayoutDndProvider["default"],{attributes:getAttributes,buttonData:getEditRemainingFields(),componentLayouts:componentLayouts,goTo:push,isDraggingSibling:isDraggingSibling,layout:getEditLayout(),metadatas:(0,_lodash.get)(modifiedData,['metadatas'],{}),moveItem:moveItem,moveRow:moveRow,onAddData:function onAddData(name){dispatch({type:'ON_ADD_DATA',name:name});},relationsLayout:getRelationsLayout(),removeField:function removeField(rowIndex,fieldIndex){dispatch({type:'REMOVE_FIELD',rowIndex:rowIndex,fieldIndex:fieldIndex});},setEditFieldToSelect:function setEditFieldToSelect(name){dispatch({type:'SET_FIELD_TO_EDIT',name:name});toggleModalForm();},setIsDraggingSibling:setIsDraggingSibling,selectedItemName:metaToEdit},/*#__PURE__*/_react["default"].createElement(_SettingsViewWrapper["default"],{inputs:[{label:{id:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title")},description:{id:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title.description")},type:'select',name:'settings.mainField',customBootstrapClass:'col-md-4',selectOptions:['id'],didCheckErrors:false,validations:{}}],initialData:initialData,isLoading:isLoading,modifiedData:modifiedData,name:getName,onChange:handleChange,onConfirmReset:function onConfirmReset(){dispatch({type:'ON_RESET'});},onConfirmSubmit:handleConfirm,slug:slug||componentSlug,isEditSettings:true},/*#__PURE__*/_react["default"].createElement("div",{className:"row"},/*#__PURE__*/_react["default"].createElement(_LayoutTitle["default"],{className:fieldsReorderClassName},/*#__PURE__*/_react["default"].createElement("div",{style:{display:'flex',justifyContent:'space-between'}},/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement(_FormTitle["default"],{title:"".concat(_pluginId["default"],".global.displayedFields"),description:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.description")})),/*#__PURE__*/_react["default"].createElement("div",{style:{marginTop:-6}},(0,_getComponents["default"])('editSettingsView','left.links',plugins,currentEnvironment,slug,push,{componentSlug:componentSlug,type:type,modifiedData:modifiedData})))),type!=='components'&&/*#__PURE__*/_react["default"].createElement(_LayoutTitle["default"],{className:"col-4"},/*#__PURE__*/_react["default"].createElement(_FormTitle["default"],{title:"".concat(_pluginId["default"],".containers.SettingPage.relations"),description:"".concat(_pluginId["default"],".containers.SettingPage.editSettings.description")})),/*#__PURE__*/_react["default"].createElement(_FieldsReorder["default"],{className:fieldsReorderClassName}),type!=='components'&&/*#__PURE__*/_react["default"].createElement(_SortableList["default"],{addItem:function addItem(name){dispatch({type:'ADD_RELATION',name:name});},buttonData:getEditRelationsRemaingFields(),moveItem:function moveItem(dragIndex,hoverIndex){dispatch({type:'MOVE_RELATION',dragIndex:dragIndex,hoverIndex:hoverIndex});},removeItem:function removeItem(index){dispatch({type:'REMOVE_RELATION',index:index});}}))),/*#__PURE__*/_react["default"].createElement(_PopupForm["default"],{headerId:"".concat(_pluginId["default"],".containers.EditSettingsView.modal-form.edit-field"),isOpen:isModalFormOpen,onClosed:function onClosed(){dispatch({type:'UNSET_FIELD_TO_EDIT'});},onSubmit:handleSubmitMetaForm,onToggle:toggleModalForm,renderForm:renderForm,subHeaderContent:metaToEdit,type:(0,_lodash.get)(getAttributes,[metaToEdit,'type'],'')}));};EditSettingsView.defaultProps={slug:null};EditSettingsView.propTypes={currentEnvironment:_propTypes["default"].string.isRequired,deleteLayout:_propTypes["default"].func.isRequired,deleteLayouts:_propTypes["default"].func.isRequired,componentsAndModelsMainPossibleMainFields:_propTypes["default"].object.isRequired,history:_propTypes["default"].shape({push:_propTypes["default"].func}).isRequired,location:_propTypes["default"].shape({search:_propTypes["default"].string.isRequired}).isRequired,plugins:_propTypes["default"].object.isRequired,slug:_propTypes["default"].string};var _default=EditSettingsView;exports["default"]=_default; + +/***/ }), + +/***/ 1908: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding: 18px 30px 18px 30px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Container=_styledComponents["default"].div(_templateObject());var _default=Container;exports["default"]=_default; + +/***/ }), + +/***/ 1920: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _pluginId=_interopRequireDefault(__webpack_require__(105));var getTrad=function getTrad(id){return"".concat(_pluginId["default"],".").concat(id);};var _default=getTrad;exports["default"]=_default; + +/***/ }), + +/***/ 1921: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n .btn-group button {\n line-height: 28px;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var SortWrapper=_styledComponents["default"].div(_templateObject());var _default=SortWrapper;exports["default"]=_default; + +/***/ }), + +/***/ 1929: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactFontawesome=__webpack_require__(45);var _Wrapper=_interopRequireDefault(__webpack_require__(1930));var DynamicComponentCard=function DynamicComponentCard(_ref){var children=_ref.children,componentUid=_ref.componentUid,friendlyName=_ref.friendlyName,icon=_ref.icon,_onClick=_ref.onClick;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{onClick:function onClick(e){e.preventDefault();e.stopPropagation();_onClick(componentUid);}},/*#__PURE__*/_react["default"].createElement("button",{className:"component-icon",type:"button"},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:icon})),/*#__PURE__*/_react["default"].createElement("div",{className:"component-uid"},/*#__PURE__*/_react["default"].createElement("span",null,friendlyName)),children);};DynamicComponentCard.defaultProps={children:null,friendlyName:'',onClick:function onClick(){},icon:'smile'};DynamicComponentCard.propTypes={children:_propTypes["default"].node,componentUid:_propTypes["default"].string.isRequired,friendlyName:_propTypes["default"].string,icon:_propTypes["default"].string,onClick:_propTypes["default"].func};var _default=DynamicComponentCard;exports["default"]=_default; + +/***/ }), + +/***/ 1930: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n height: 90px;\n width: 139px !important;\n margin-right: 10px;\n padding: 18px 10px;\n background-color: #ffffff;\n color: #919bae;\n text-align: center;\n border-radius: 2px;\n cursor: pointer;\n border: 1px solid #ffffff;\n\n button {\n outline: 0;\n }\n\n .component-uid {\n width: 119px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: #919bae;\n font-weight: 500;\n font-size: 13px;\n line-height: normal;\n }\n\n .component-icon {\n width: 35px;\n height: 35px;\n margin-bottom: 5px;\n line-height: 35px;\n align-self: center;\n border-radius: 50%;\n background-color: #e9eaeb;\n color: #b4b6ba;\n padding: 0;\n i,\n svg {\n margin: auto;\n display: block;\n }\n }\n\n &:hover {\n background-color: #e6f0fb;\n color: #007eff;\n border: 1px solid #aed4fb;\n\n .component-icon {\n background-color: #aed4fb;\n color: #007eff;\n }\n .component-uid {\n color: #007eff;\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 1931: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _strapiHelperPlugin=__webpack_require__(10);var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _core=__webpack_require__(53);var PopupForm=function PopupForm(_ref){var headerId=_ref.headerId,isOpen=_ref.isOpen,onClosed=_ref.onClosed,onSubmit=_ref.onSubmit,onToggle=_ref.onToggle,renderForm=_ref.renderForm,subHeaderContent=_ref.subHeaderContent,type=_ref.type;var getAttrType=function getAttrType(){if(type==='timestamp'){return'date';}if(['decimal','float','integer','biginter'].includes(type)){return'number';}return type;};return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.Modal,{isOpen:isOpen,onClosed:onClosed,onToggle:onToggle},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModal,null,/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModalTitle,{style:{textTransform:'none'}},/*#__PURE__*/_react["default"].createElement(_core.AttributeIcon,{type:getAttrType(),style:{margin:'auto 20px auto 0'}}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:headerId}))),/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModalTitle,null,/*#__PURE__*/_react["default"].createElement("span",null,(0,_lodash.upperFirst)(subHeaderContent)),/*#__PURE__*/_react["default"].createElement("hr",null)))),/*#__PURE__*/_react["default"].createElement("form",{onSubmit:onSubmit},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalForm,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalBody,null,renderForm())),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalFooter,null,/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_core.Button,{onClick:onToggle,color:"cancel"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.popUpWarning.button.cancel"})),/*#__PURE__*/_react["default"].createElement(_core.Button,{type:"submit",color:"success"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"form.button.done"}))))));};PopupForm.defaultProps={isOpen:false,onClosed:function onClosed(){},onSubmit:function onSubmit(){},onToggle:function onToggle(){},renderForm:function renderForm(){},subHeaderContent:'',type:''};PopupForm.propTypes={headerId:_propTypes["default"].string.isRequired,isOpen:_propTypes["default"].bool,onClosed:_propTypes["default"].func,onSubmit:_propTypes["default"].func,onToggle:_propTypes["default"].func,renderForm:_propTypes["default"].func,subHeaderContent:_propTypes["default"].string,type:_propTypes["default"].string};var _default=PopupForm;exports["default"]=_default; + +/***/ }), + +/***/ 1932: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _extends2=_interopRequireDefault(__webpack_require__(14));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactRouterDom=__webpack_require__(30);var _reactIntl=__webpack_require__(15);var _custom=__webpack_require__(72);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _Block=_interopRequireDefault(__webpack_require__(1933));var _Container=_interopRequireDefault(__webpack_require__(1908));var _SectionTitle=_interopRequireDefault(__webpack_require__(1935));var _Separator=_interopRequireDefault(__webpack_require__(1937));var SettingsViewWrapper=function SettingsViewWrapper(_ref){var children=_ref.children,goBack=_ref.history.goBack,getListDisplayedFields=_ref.getListDisplayedFields,inputs=_ref.inputs,initialData=_ref.initialData,isEditSettings=_ref.isEditSettings,isLoading=_ref.isLoading,modifiedData=_ref.modifiedData,onChange=_ref.onChange,onConfirmReset=_ref.onConfirmReset,onConfirmSubmit=_ref.onConfirmSubmit,name=_ref.name;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent,formatMessage=_useGlobalContext.formatMessage;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),showWarningCancel=_useState2[0],setWarningCancel=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),showWarningSubmit=_useState4[0],setWarningSubmit=_useState4[1];var getAttributes=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','attributes'],{});},[modifiedData]);var toggleWarningCancel=function toggleWarningCancel(){return setWarningCancel(function(prevState){return!prevState;});};var toggleWarningSubmit=function toggleWarningSubmit(){return setWarningSubmit(function(prevState){return!prevState;});};var getPluginHeaderActions=function getPluginHeaderActions(){return[{color:'cancel',onClick:toggleWarningCancel,label:formatMessage({id:"".concat(_pluginId["default"],".popUpWarning.button.cancel")}),type:'button',disabled:(0,_lodash.isEqual)(modifiedData,initialData),style:{fontWeight:600,paddingLeft:15,paddingRight:15}},{color:'success',label:formatMessage({id:"".concat(_pluginId["default"],".containers.Edit.submit")}),type:'submit',disabled:(0,_lodash.isEqual)(modifiedData,initialData),style:{minWidth:150,fontWeight:600}}];};var headerProps={actions:getPluginHeaderActions(),title:{label:formatMessage({id:"".concat(_pluginId["default"],".components.SettingsViewWrapper.pluginHeader.title")},{name:(0,_lodash.upperFirst)(name)})},content:formatMessage({id:"".concat(_pluginId["default"],".components.SettingsViewWrapper.pluginHeader.description.").concat(isEditSettings?'edit':'list',"-settings")})};var getSelectOptions=function getSelectOptions(input){if(input.name==='settings.defaultSortBy'){return['id'].concat((0,_toConsumableArray2["default"])(getListDisplayedFields().filter(function(name){return(0,_lodash.get)(getAttributes,[name,'type'],'')!=='media'&&name!=='id'&&(0,_lodash.get)(getAttributes,[name,'type'],'')!=='richtext';})));}if(input.name==='settings.mainField'){var attributes=getAttributes;var options=Object.keys(attributes).filter(function(attr){var type=(0,_lodash.get)(attributes,[attr,'type'],'');return!['json','text','relation','component','boolean','date','media','richtext'].includes(type)&&!!type;});return options;}return input.options;};var handleSubmit=function handleSubmit(e){e.preventDefault();toggleWarningSubmit();emitEvent('willSaveContentTypeLayout');};if(isLoading){return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicatorPage,null);}return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.BackHeader,{onClick:goBack}),/*#__PURE__*/_react["default"].createElement(_Container["default"],{className:"container-fluid"},/*#__PURE__*/_react["default"].createElement("form",{onSubmit:handleSubmit},/*#__PURE__*/_react["default"].createElement(_custom.Header,headerProps),/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{paddingTop:'3px'}},/*#__PURE__*/_react["default"].createElement(_Block["default"],{style:{marginBottom:'13px',paddingBottom:'30px',paddingTop:'24px'}},/*#__PURE__*/_react["default"].createElement(_SectionTitle["default"],{isSettings:true}),/*#__PURE__*/_react["default"].createElement("div",{className:"row"},inputs.map(function(input){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{key:input.name,id:input.label.id},function(label){return/*#__PURE__*/_react["default"].createElement("div",{className:input.customBootstrapClass,style:{marginBottom:1}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_lodash.get)(input,'description.id','app.utils.defaultMessage')},function(description){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,(0,_extends2["default"])({},input,{description:description,label:label===' '?null:label,onChange:onChange,options:getSelectOptions(input),value:(0,_lodash.get)(modifiedData,input.name,'')}));}));});}),/*#__PURE__*/_react["default"].createElement("div",{className:"col-12"},/*#__PURE__*/_react["default"].createElement(_Separator["default"],{style:{marginBottom:23}}))),/*#__PURE__*/_react["default"].createElement(_SectionTitle["default"],null),children)),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningCancel,toggleModal:toggleWarningCancel,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.cancelAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:function onConfirm(){onConfirmReset();toggleWarningCancel();}}),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningSubmit,toggleModal:toggleWarningSubmit,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.updateAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:/*#__PURE__*/(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return onConfirmSubmit();case 2:toggleWarningSubmit();case 3:case"end":return _context.stop();}}},_callee);}))}))));};SettingsViewWrapper.defaultProps={getListDisplayedFields:function getListDisplayedFields(){return[];},inputs:[],initialData:{},isEditSettings:false,modifiedData:{},name:'',onConfirmReset:function onConfirmReset(){},onConfirmSubmit:function(){var _onConfirmSubmit=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:case"end":return _context2.stop();}}},_callee2);}));function onConfirmSubmit(){return _onConfirmSubmit.apply(this,arguments);}return onConfirmSubmit;}(),onSubmit:function onSubmit(){},pluginHeaderProps:{actions:[],description:{id:'app.utils.defaultMessage'},title:{id:'app.utils.defaultMessage',values:{}}}};SettingsViewWrapper.propTypes={children:_propTypes["default"].node.isRequired,getListDisplayedFields:_propTypes["default"].func,history:_propTypes["default"].shape({goBack:_propTypes["default"].func.isRequired}).isRequired,initialData:_propTypes["default"].object,inputs:_propTypes["default"].array,isEditSettings:_propTypes["default"].bool,isLoading:_propTypes["default"].bool.isRequired,modifiedData:_propTypes["default"].object,name:_propTypes["default"].string,onChange:_propTypes["default"].func.isRequired,onConfirmReset:_propTypes["default"].func,onConfirmSubmit:_propTypes["default"].func,onSubmit:_propTypes["default"].func,pluginHeaderProps:_propTypes["default"].shape({actions:_propTypes["default"].array,description:_propTypes["default"].shape({id:_propTypes["default"].string}),title:_propTypes["default"].shape({id:_propTypes["default"].string,values:_propTypes["default"].object})})};var _default=(0,_reactRouterDom.withRouter)(SettingsViewWrapper);exports["default"]=_default; + +/***/ }), + +/***/ 1933: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _components=__webpack_require__(1934);/** + * + * Block + */var renderMsg=function renderMsg(msg){return/*#__PURE__*/_react["default"].createElement("p",null,msg);};var Block=function Block(_ref){var children=_ref.children,description=_ref.description,style=_ref.style,title=_ref.title;return/*#__PURE__*/_react["default"].createElement("div",{className:"col-md-12"},/*#__PURE__*/_react["default"].createElement(_components.Wrapper,{style:style},/*#__PURE__*/_react["default"].createElement(_components.Sub,null,!!title&&/*#__PURE__*/_react["default"].createElement("p",null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:title})),!!description&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:description},renderMsg)),children));};Block.defaultProps={children:null,description:null,style:{},title:null};Block.propTypes={children:_propTypes["default"].any,description:_propTypes["default"].string,style:_propTypes["default"].object,title:_propTypes["default"].string};var _default=(0,_react.memo)(Block);exports["default"]=_default; + +/***/ }), + +/***/ 1934: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Sub=exports.Wrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding-top: 0px;\n line-height: 18px;\n > p:first-child {\n margin-bottom: 1px;\n font-weight: 700;\n color: #333740;\n font-size: 1.8rem;\n }\n > p {\n color: #787e8f;\n font-size: 13px;\n }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n margin-bottom: 35px;\n background: #ffffff;\n padding: 22px 28px 18px;\n padding-bottom: 13px;\n border-radius: 2px;\n box-shadow: 0 2px 4px #e3e9f3;\n -webkit-font-smoothing: antialiased;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var Sub=_styledComponents["default"].div(_templateObject2());exports.Sub=Sub; + +/***/ }), + +/***/ 1935: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _Title=_interopRequireDefault(__webpack_require__(1936));var SectionTitle=function SectionTitle(_ref){var isSettings=_ref.isSettings;var suffix=isSettings?'settings':'view';var msgId="".concat(_pluginId["default"],".containers.SettingPage.").concat(suffix);return/*#__PURE__*/_react["default"].createElement("div",{style:{marginBottom:'18px'}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:msgId},function(msg){return/*#__PURE__*/_react["default"].createElement(_Title["default"],null,msg);}));};SectionTitle.propTypes={isSettings:_propTypes["default"].bool};SectionTitle.defaultProps={isSettings:false};var _default=(0,_react.memo)(SectionTitle);exports["default"]=_default; + +/***/ }), + +/***/ 1936: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n color: #787e8f;\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.77px;\n text-transform: uppercase;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Title=_styledComponents["default"].div(_templateObject());var _default=Title;exports["default"]=_default; + +/***/ }), + +/***/ 1937: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n margin-top: 17px;\n margin-bottom: 24px;\n border-top: 1px solid #f6f6f6;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Separator=_styledComponents["default"].div(_templateObject());var _default=Separator;exports["default"]=_default; + +/***/ }), + +/***/ 1938: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireDefault(__webpack_require__(1));var _lodash=__webpack_require__(8);var _pluginId=_interopRequireDefault(__webpack_require__(105));/** + * Retrieve external links from injected components + * @type {Array} List of external links to display + */var getInjectedComponents=function getInjectedComponents(container,area,plugins,currentEnvironment,slug,push){for(var _len=arguments.length,rest=new Array(_len>6?_len-6:0),_key=6;_key<_len;_key++){rest[_key-6]=arguments[_key];}var componentsToInject=Object.keys(plugins).reduce(function(acc,current){// Retrieve injected compos from plugin +var currentPlugin=plugins[current];var injectedComponents=(0,_lodash.get)(currentPlugin,'injectedComponents',[]);var compos=injectedComponents.filter(function(compo){return compo.plugin==="".concat(_pluginId["default"],".").concat(container)&&compo.area===area;}).map(function(compo){var Component=compo.component;return/*#__PURE__*/_react["default"].createElement(Component,(0,_extends2["default"])({viewProps:rest,currentEnvironment:currentEnvironment,getModelName:function getModelName(){return slug;},push:push},compo.props,{key:compo.key}));});return[].concat((0,_toConsumableArray2["default"])(acc),(0,_toConsumableArray2["default"])(compos));},[]);return componentsToInject;};var _default=getInjectedComponents;exports["default"]=_default; + +/***/ }), + +/***/ 1963: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactIntl=__webpack_require__(15);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _icons=__webpack_require__(94);var _reactstrap=__webpack_require__(71);var _getTrad=_interopRequireDefault(__webpack_require__(1920));var _components=__webpack_require__(2030);function Add(_ref){var data=_ref.data,isRelation=_ref.isRelation,_onClick=_ref.onClick,pStyle=_ref.pStyle,style=_ref.style;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1];return/*#__PURE__*/_react["default"].createElement(_components.Wrapper,{isOpen:isOpen,notAllowed:data.length===0,style:style},/*#__PURE__*/_react["default"].createElement(_reactstrap.ButtonDropdown,{isOpen:isOpen,toggle:function toggle(){if(data.length>0){setIsOpen(function(prevState){return!prevState;});}}},/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownToggle,null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_getTrad["default"])("containers.SettingPage.".concat(isRelation?'add.relational-field':'add.field'))},function(msg){return/*#__PURE__*/_react["default"].createElement("p",{style:pStyle},/*#__PURE__*/_react["default"].createElement(_icons.Plus,{fill:"#007eff",height:"11px",width:"11px"}),msg);})),/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownMenu,null,data.map(function(item){return/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem,{key:item,onClick:function onClick(){_onClick(item);}},item);}))));}Add.defaultProps={data:[],isRelation:false,onClick:function onClick(){},pStyle:{},style:{}};Add.propTypes={data:_propTypes["default"].array,isRelation:_propTypes["default"].bool,onClick:_propTypes["default"].func,pStyle:_propTypes["default"].object,style:_propTypes["default"].object};var _default=(0,_react.memo)(Add);exports["default"]=_default; + +/***/ }), + +/***/ 1964: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _lodash=__webpack_require__(8);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _DraggedField=_interopRequireDefault(__webpack_require__(649));var _PreviewCarret=_interopRequireDefault(__webpack_require__(653));var _Carret=_interopRequireDefault(__webpack_require__(2033));var _DynamicZoneWrapper=_interopRequireDefault(__webpack_require__(2034));var _Wrapper=_interopRequireDefault(__webpack_require__(2035));var _DynamicComponent=_interopRequireDefault(__webpack_require__(2036));/* eslint-disable react/no-array-index-key */var DraggedFieldWithPreview=(0,_react.forwardRef)(function(_ref,refs){var goTo=_ref.goTo,componentUid=_ref.componentUid,componentLayouts=_ref.componentLayouts,dynamicZoneComponents=_ref.dynamicZoneComponents,isDragging=_ref.isDragging,label=_ref.label,name=_ref.name,onClickEdit=_ref.onClickEdit,onClickRemove=_ref.onClickRemove,selectedItem=_ref.selectedItem,showLeftCarret=_ref.showLeftCarret,showRightCarret=_ref.showRightCarret,size=_ref.size,style=_ref.style,type=_ref.type;var isHidden=name==='_TEMP_';var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),dragStart=_useState2[0],setDragStart=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),isOverDynamicZone=_useState4[0],setIsOverDynamicZone=_useState4[1];var opacity=isDragging?0.2:1;var isFullSize=size===12;var display=isFullSize&&dragStart?'none':'';var width=isFullSize&&dragStart?0:'100%';var higherFields=['json','text','file','media','component','richtext','dynamiczone'];var withLongerHeight=higherFields.includes(type)&&!dragStart;var getCompoInfos=function getCompoInfos(uid){return(0,_lodash.get)(componentLayouts,[uid,'schema','info'],{name:'',icon:''});};var componentData=(0,_lodash.get)(componentLayouts,[componentUid],{});var componentLayout=(0,_lodash.get)(componentData,['layouts','edit'],[]);var getWrapperWitdh=function getWrapperWitdh(colNum){return"".concat(1/12*colNum*100,"%");};return/*#__PURE__*/_react["default"].createElement("div",{style:{width:getWrapperWitdh(size)},onDrag:function onDrag(){if(isFullSize&&!dragStart){setDragStart(true);}},onDragEnd:function onDragEnd(){if(isFullSize){setDragStart(false);}}},/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{ref:refs.dropRef,withLongerHeight:withLongerHeight,style:style},dragStart&&isFullSize&&/*#__PURE__*/_react["default"].createElement(_PreviewCarret["default"],{style:{marginRight:'-10px'}}),/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,showLeftCarret&&/*#__PURE__*/_react["default"].createElement(_Carret["default"],null),/*#__PURE__*/_react["default"].createElement("div",{className:"sub",style:{width:width,opacity:opacity}},/*#__PURE__*/_react["default"].createElement(_DraggedField["default"],{goTo:goTo,componentUid:componentUid,isHidden:isHidden,isOverDynamicZone:isOverDynamicZone,label:label,name:name,onClick:onClickEdit,onRemove:onClickRemove,ref:refs.dragRef,selectedItem:selectedItem,style:{display:display,marginRight:0,paddingRight:0},type:type,withLongerHeight:withLongerHeight},type==='component'&&componentLayout.map(function(row,i){var marginBottom=i===componentLayout.length-1?'29px':'';var marginTop=i===0?'5px':'';return/*#__PURE__*/_react["default"].createElement("div",{style:{display:'flex',marginBottom:marginBottom,marginTop:marginTop},key:i},row.map(function(field){var fieldType=(0,_lodash.get)(componentData,['schema','attributes',field.name,'type'],'');var label=(0,_lodash.get)(componentData,['metadatas',field.name,'edit','label'],'');return/*#__PURE__*/_react["default"].createElement("div",{key:field.name,style:{width:getWrapperWitdh(field.size),marginBottom:'6px'}},/*#__PURE__*/_react["default"].createElement(_DraggedField["default"],{label:label,name:field.name,isSub:true,withLongerHeight:higherFields.includes(fieldType)}));}));}),type==='dynamiczone'&&/*#__PURE__*/_react["default"].createElement(_DynamicZoneWrapper["default"],null,dynamicZoneComponents.map(function(compo){var _getCompoInfos=getCompoInfos(compo),name=_getCompoInfos.name,icon=_getCompoInfos.icon;return/*#__PURE__*/_react["default"].createElement(_DynamicComponent["default"],{key:compo,componentUid:compo,friendlyName:name,icon:icon,setIsOverDynamicZone:setIsOverDynamicZone});})))),showRightCarret&&/*#__PURE__*/_react["default"].createElement(_Carret["default"],{right:true}))));});DraggedFieldWithPreview.defaultProps={goTo:function goTo(){},componentLayouts:{},componentUid:null,dynamicZoneComponents:[],isDragging:false,label:'',onClickEdit:function onClickEdit(){},onClickRemove:function onClickRemove(){},selectedItem:'',showLeftCarret:false,showRightCarret:false,size:1,style:{},type:'string'};DraggedFieldWithPreview.propTypes={goTo:_propTypes["default"].func,componentLayouts:_propTypes["default"].object,componentUid:_propTypes["default"].string,dynamicZoneComponents:_propTypes["default"].array,isDragging:_propTypes["default"].bool,label:_propTypes["default"].string,name:_propTypes["default"].string.isRequired,onClickEdit:_propTypes["default"].func,onClickRemove:_propTypes["default"].func,selectedItem:_propTypes["default"].string,showLeftCarret:_propTypes["default"].bool,showRightCarret:_propTypes["default"].bool,size:_propTypes["default"].number,style:_propTypes["default"].object,type:_propTypes["default"].string};DraggedFieldWithPreview.displayName='DraggedFieldWithPreview';var _default=DraggedFieldWithPreview;exports["default"]=_default; + +/***/ }), + +/***/ 1965: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.unformatLayout=exports.getRowSize=exports.getInputSize=exports.getFieldType=exports.formatLayout=exports.createLayout=void 0;var getRowSize=function getRowSize(arr){return arr.reduce(function(sum,value){return sum+value.size;},0);};exports.getRowSize=getRowSize;var createLayout=function createLayout(arr){return arr.reduce(function(acc,current,index){var row={rowId:index,rowContent:current};return acc.concat(row);},[]);};exports.createLayout=createLayout;var formatLayout=function formatLayout(arr){return arr.reduce(function(acc,current){var toPush=[];var currentRow=current.rowContent.reduce(function(acc2,curr){var acc2Size=getRowSize(acc2);if(curr.name==='_TEMP_'){return acc2;}if(acc2Size+curr.size<=12){acc2.push(curr);}else{toPush.push(curr);}return acc2;},[]);var rowId=acc.length===0?0:Math.max.apply(Math,acc.map(function(o){return o.rowId;}))+1;var currentRowSize=getRowSize(currentRow);if(currentRowSize<12){currentRow.push({name:'_TEMP_',size:12-currentRowSize});}acc.push({rowId:rowId,rowContent:currentRow});if(toPush.length>0){var toPushSize=getRowSize(toPush);if(toPushSize<12){toPush.push({name:'_TEMP_',size:12-toPushSize});}acc.push({rowId:rowId+1,rowContent:toPush});toPush=[];}return acc;},[]).filter(function(row){return row.rowContent.length>0;}).filter(function(row){if(row.rowContent.length===1){return row.rowContent[0].name!=='_TEMP_';}return true;});};exports.formatLayout=formatLayout;var unformatLayout=function unformatLayout(arr){return arr.reduce(function(acc,current){var currentRow=current.rowContent.filter(function(content){return content.name!=='_TEMP_';});return acc.concat([currentRow]);},[]);};exports.unformatLayout=unformatLayout;var getInputSize=function getInputSize(type){switch(type){case'boolean':case'date':case'integer':case'float':case'biginteger':case'decimal':case'time':return 4;case'json':case'component':case'richtext':case'dynamiczone':return 12;default:return 6;}};exports.getInputSize=getInputSize;var getFieldType=function getFieldType(state,name){return state.getIn(['modifiedData','schema','attributes',name,'type']);};exports.getFieldType=getFieldType; + +/***/ }), + +/***/ 2029: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(643));var _AddDropdown=_interopRequireDefault(__webpack_require__(1963));var _SortWrapper=_interopRequireDefault(__webpack_require__(1921));var _components=_interopRequireDefault(__webpack_require__(2031));var _Item=_interopRequireDefault(__webpack_require__(2032));var FieldsReorder=function FieldsReorder(_ref){var className=_ref.className;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),attributes=_useLayoutDnd.attributes,buttonData=_useLayoutDnd.buttonData,layout=_useLayoutDnd.layout,moveItem=_useLayoutDnd.moveItem,moveRow=_useLayoutDnd.moveRow,onAddData=_useLayoutDnd.onAddData,removeField=_useLayoutDnd.removeField;var getComponent=(0,_react.useCallback)(function(attributeName){return(0,_lodash.get)(attributes,[attributeName,'component'],'');},[attributes]);var getType=(0,_react.useCallback)(function(attributeName){var attribute=(0,_lodash.get)(attributes,[attributeName],{});return attribute.type;},[attributes]);var getDynamicZoneComponents=(0,_react.useCallback)(function(attributeName){var attribute=(0,_lodash.get)(attributes,[attributeName],{});return attribute.components||[];},[attributes]);return/*#__PURE__*/_react["default"].createElement("div",{className:className},/*#__PURE__*/_react["default"].createElement(_SortWrapper["default"],{style:{marginTop:7,paddingTop:11,paddingLeft:5,paddingRight:5,border:'1px dashed #e3e9f3'}},layout.map(function(row,rowIndex){return/*#__PURE__*/_react["default"].createElement(_components["default"],{key:row.rowId,style:{}},row.rowContent.map(function(rowContent,index){var name=rowContent.name,size=rowContent.size;return/*#__PURE__*/_react["default"].createElement(_Item["default"],{componentUid:getComponent(name),dynamicZoneComponents:getDynamicZoneComponents(name),itemIndex:index,key:name,moveRow:moveRow,moveItem:moveItem,name:name,removeField:removeField,rowIndex:rowIndex,size:size,type:getType(name)});}));}),/*#__PURE__*/_react["default"].createElement(_components["default"],{style:{marginBottom:10}},/*#__PURE__*/_react["default"].createElement(_AddDropdown["default"],{data:buttonData,onClick:onAddData,style:{width:'100%',margin:'0 5px'}}))));};FieldsReorder.defaultProps={className:'col-8'};FieldsReorder.propTypes={className:_propTypes["default"].string};var _default=(0,_react.memo)(FieldsReorder);exports["default"]=_default; + +/***/ }), + +/***/ 2030: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n > div {\n > button {\n cursor: not-allowed !important;\n }\n }\n "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n > div {\n background-color: #e6f0fb !important;\n border-color: #aed4fb !important;\n }\n "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n margin-left: 29px;\n > div {\n height: 30px;\n width: 100%;\n justify-content: space-between;\n background: #ffffff;\n color: #333740;\n border-radius: 2px;\n border: solid 1px #007eff;\n\n > button {\n cursor: pointer;\n padding-left: 10px !important;\n line-height: 30px;\n width: 100%;\n color: #333740;\n text-align: left;\n background-color: #ffffff;\n border: none;\n font-size: 13px;\n font-weight: 500;\n &:focus,\n &:active,\n &:hover,\n &:visited {\n background-color: transparent !important;\n box-shadow: none;\n color: #333740;\n }\n > p {\n position: relative;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: center;\n margin-bottom: 0;\n margin-top: -1px;\n color: #007eff !important;\n font-size: 13px !important;\n svg {\n fill: #007eff;\n margin-right: 7px;\n vertical-align: initial;\n }\n }\n }\n > div {\n max-height: 180px;\n min-width: calc(100% + 2px);\n margin-left: -1px;\n margin-top: -1px;\n padding: 0;\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0;\n border-color: #e3e9f3 !important;\n border-top-color: #aed4fb !important;\n box-shadow: 0 2px 3px rgba(227, 233, 245, 0.5);\n\n overflow: scroll;\n\n button {\n height: 30px;\n padding-left: 10px !important;\n line-height: 26px;\n cursor: pointer;\n font-size: 13px !important;\n &:focus,\n &:active,\n &:hover,\n &:hover {\n background-color: #fafafb !important;\n color: #333740;\n outline: 0;\n }\n div {\n margin: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n }\n }\n\n ","\n\n ","\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var Wrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isOpen=_ref.isOpen;if(isOpen){return(0,_styledComponents.css)(_templateObject2());}},function(_ref2){var notAllowed=_ref2.notAllowed;if(notAllowed){return(0,_styledComponents.css)(_templateObject3());}});exports.Wrapper=Wrapper; + +/***/ }), + +/***/ 2031: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: flex;\n margin-bottom: 6px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2032: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactDnd=__webpack_require__(352);var _reactDndHtml5Backend=__webpack_require__(644);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(643));var _DraggedFieldWithPreview=_interopRequireDefault(__webpack_require__(1964));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var Item=function Item(_ref){var componentUid=_ref.componentUid,dynamicZoneComponents=_ref.dynamicZoneComponents,itemIndex=_ref.itemIndex,moveItem=_ref.moveItem,moveRow=_ref.moveRow,name=_ref.name,removeField=_ref.removeField,rowIndex=_ref.rowIndex,size=_ref.size,type=_ref.type;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),goTo=_useLayoutDnd.goTo,componentLayouts=_useLayoutDnd.componentLayouts,metadatas=_useLayoutDnd.metadatas,setEditFieldToSelect=_useLayoutDnd.setEditFieldToSelect,selectedItemName=_useLayoutDnd.selectedItemName,setIsDraggingSibling=_useLayoutDnd.setIsDraggingSibling;var dragRef=(0,_react.useRef)(null);var dropRef=(0,_react.useRef)(null);var _useDrop=(0,_reactDnd.useDrop)({// Source code from http://react-dnd.github.io/react-dnd/examples/sortable/simple +// And also from https://codesandbox.io/s/6v7l7z68jk +accept:_ItemTypes["default"].EDIT_FIELD,hover:function hover(item,monitor){if(!dropRef.current){return;}// We use the hover only to reorder full size items +if(item.size!==12){return;}var dragIndex=monitor.getItem().itemIndex;var hoverIndex=itemIndex;var dragRow=monitor.getItem().rowIndex;var targetRow=rowIndex;// Don't replace item with themselves +if(dragIndex===hoverIndex&&dragRow===targetRow){return;}// Determine rectangle on screen +var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Get vertical middle +var hoverMiddleY=(hoverBoundingRect.bottom-hoverBoundingRect.top)/2;// Determine mouse position +var clientOffset=monitor.getClientOffset();// Get pixels to the top +var hoverClientY=clientOffset.y-hoverBoundingRect.top;// Only perform the move when the mouse has crossed half of the items height +// When dragging downwards, only move when the cursor is below 50% +// When dragging upwards, only move when the cursor is above 50% +// Dragging downwards +if(dragRowtargetRow&&hoverClientY>hoverMiddleY){return;}moveRow(dragRow,targetRow);item.rowIndex=targetRow;item.itemIndex=hoverIndex;},drop:function drop(item,monitor){if(!dropRef.current){return;}var dragIndex=monitor.getItem().itemIndex;var hoverIndex=itemIndex;var dragRow=monitor.getItem().rowIndex;var targetRow=rowIndex;// Don't reorder on drop for full size elements since it is already done in the hover +if(item.size===12){return;}// Don't replace item with themselves +if(dragIndex===hoverIndex&&dragRow===targetRow){return;}// Determine rectangle on screen +var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Scroll window if mouse near vertical edge(100px) +// Horizontal Check -- +if(Math.abs(monitor.getClientOffset().x-hoverBoundingRect.left)>hoverBoundingRect.width/1.8){moveItem(dragIndex,hoverIndex+1,dragRow,targetRow);item.itemIndex=hoverIndex+1;item.rowIndex=targetRow;return;}// Vertical Check | +// Time to actually perform the action +moveItem(dragIndex,hoverIndex,dragRow,targetRow);// Note: we're mutating the monitor item here! +// Generally it's better to avoid mutations, +// but it's good here for the sake of performance +// to avoid expensive index searches. +item.itemIndex=hoverIndex;item.rowIndex=targetRow;},collect:function collect(monitor){return{canDrop:monitor.canDrop(),clientOffset:monitor.getClientOffset(),isOver:monitor.isOver(),isOverCurrent:monitor.isOver({shallow:true}),itemType:monitor.getItemType()};}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),_useDrop2$=_useDrop2[0],clientOffset=_useDrop2$.clientOffset,isOver=_useDrop2$.isOver,drop=_useDrop2[1];var _useDrag=(0,_reactDnd.useDrag)({begin:function begin(){setIsDraggingSibling(true);},canDrag:function canDrag(){// Each row of the layout has a max size of 12 (based on bootstrap grid system) +// So in order to offer a better drop zone we add the _TEMP_ div to complete the remaining substract (12 - existing) +// Those divs cannot be dragged +// If we wanted to offer the ability to create new lines in the layout (which will come later) +// We will need to add a 12 size _TEMP_ div to offer a drop target between each existing row. +return name!=='_TEMP_';},collect:function collect(monitor){return{isDragging:monitor.isDragging(),getItem:monitor.getItem()};},end:function end(){setIsDraggingSibling(false);},item:{type:_ItemTypes["default"].EDIT_FIELD,itemIndex:itemIndex,rowIndex:rowIndex,name:name,size:size}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),_useDrag2$=_useDrag2[0],isDragging=_useDrag2$.isDragging,getItem=_useDrag2$.getItem,drag=_useDrag2[1],preview=_useDrag2[2];// Remove the default preview when the item is being dragged +// The preview is handled by the DragLayer +(0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:true});},[preview]);// Create the refs +// We need 1 for the drop target +// 1 for the drag target +var refs={dragRef:drag(dragRef),dropRef:drop(dropRef)};var showLeftCarret=false;var showRightCarret=false;if(dropRef.current&&clientOffset){var hoverBoundingRect=dropRef.current.getBoundingClientRect();showLeftCarret=isOver&&getItem.size!==12&&Math.abs(clientOffset.x-hoverBoundingRect.left)hoverBoundingRect.width/2;if(name==='_TEMP_'){showLeftCarret=isOver&&getItem.size!==12;showRightCarret=false;}}return/*#__PURE__*/_react["default"].createElement(_DraggedFieldWithPreview["default"],{goTo:goTo,componentUid:componentUid,componentLayouts:componentLayouts,dynamicZoneComponents:dynamicZoneComponents,isDragging:isDragging,label:(0,_lodash.get)(metadatas,[name,'edit','label'],''),name:name,onClickEdit:setEditFieldToSelect,onClickRemove:function onClickRemove(e){e.stopPropagation();removeField(rowIndex,itemIndex);},selectedItem:selectedItemName,showLeftCarret:showLeftCarret,showRightCarret:showRightCarret,size:size,type:type,ref:refs});};Item.defaultProps={componentUid:'',dynamicZoneComponents:[],type:'string'};Item.propTypes={componentUid:_propTypes["default"].string,dynamicZoneComponents:_propTypes["default"].array,itemIndex:_propTypes["default"].number.isRequired,moveItem:_propTypes["default"].func.isRequired,moveRow:_propTypes["default"].func.isRequired,name:_propTypes["default"].string.isRequired,removeField:_propTypes["default"].func.isRequired,rowIndex:_propTypes["default"].number.isRequired,size:_propTypes["default"].number.isRequired,type:_propTypes["default"].string};var _default=Item;exports["default"]=_default; + +/***/ }), + +/***/ 2033: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: absolute;\n ","\n height: 100%;\n width: 2px;\n margin-right: 3px;\n border-radius: 2px;\n background: #007eff;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Carret=_styledComponents["default"].div(_templateObject(),function(_ref){var right=_ref.right;if(right){return"\n right: -4px;\n ";}return"\n left: -1px;\n ";});var _default=Carret;exports["default"]=_default; + +/***/ }), + +/***/ 2034: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: flex;\n margin: 5px 0 0px 0;\n overflow: auto;\n height: 119px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var DynamicZoneWrapper=_styledComponents["default"].div(_templateObject());var _default=DynamicZoneWrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2035: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _propTypes=_interopRequireDefault(__webpack_require__(2));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: flex;\n position: relative;\n min-height: ",";\n\n .sub {\n width: 100%;\n padding: 0 5px;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var withLongerHeight=_ref.withLongerHeight;return withLongerHeight?'102px':'30px';});Wrapper.defaultProps={withLongerHeight:false};Wrapper.propTypes={withLongerHeight:_propTypes["default"].bool};var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2036: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(30);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _pluginId=_interopRequireDefault(__webpack_require__(105));var _DynamicComponentCard=_interopRequireDefault(__webpack_require__(1929));var _Tooltip=_interopRequireDefault(__webpack_require__(2037));var DynamicComponent=function DynamicComponent(_ref){var componentUid=_ref.componentUid,friendlyName=_ref.friendlyName,icon=_ref.icon,setIsOverDynamicZone=_ref.setIsOverDynamicZone;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),state=_useState2[0],setState=_useState2[1];var _useHistory=(0,_reactRouterDom.useHistory)(),push=_useHistory.push;var handleMouseEvent=function handleMouseEvent(){setIsOverDynamicZone(function(v){return!v;});setState(function(v){return!v;});};return/*#__PURE__*/_react["default"].createElement(_DynamicComponentCard["default"],{componentUid:componentUid,friendlyName:friendlyName,icon:icon,isOver:state,onClick:function onClick(){push("/plugins/".concat(_pluginId["default"],"/ctm-configurations/edit-settings/components/").concat(componentUid,"/"));},onMouseEvent:handleMouseEvent,tradId:"components.DraggableAttr.edit"},/*#__PURE__*/_react["default"].createElement(_Tooltip["default"],{isOver:state},componentUid));};DynamicComponent.defaultProps={friendlyName:'',icon:'smile'};DynamicComponent.propTypes={componentUid:_propTypes["default"].string.isRequired,friendlyName:_propTypes["default"].string,icon:_propTypes["default"].string,setIsOverDynamicZone:_propTypes["default"].func.isRequired};var _default=DynamicComponent;exports["default"]=_default; + +/***/ }), + +/***/ 2037: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: absolute;\n bottom: -10px;\n left: 105px;\n visibility: ",";\n line-height: 20px;\n height: 20px;\n padding: 0 10px;\n background-color: #000000;\n font-size: 12px;\n color: #fff;\n opacity: 0.5;\n border: 1px solid #e3e9f3;\n z-index: 99;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Tooltip=_styledComponents["default"].div(_templateObject(),function(_ref){var isOver=_ref.isOver;return isOver?'visible':'hidden';});var _default=Tooltip;exports["default"]=_default; + +/***/ }), + +/***/ 2038: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var FormTitle=function FormTitle(_ref){var description=_ref.description,title=_ref.title;return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,!!title&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:title}),!!description&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:description},function(msg){return/*#__PURE__*/_react["default"].createElement("p",null,msg);}));};FormTitle.propTypes={description:_propTypes["default"].string,title:_propTypes["default"].string};FormTitle.defaultProps={description:null,title:null};var _default=(0,_react.memo)(FormTitle);exports["default"]=_default; + +/***/ }), + +/***/ 2039: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n color: #333740;\n font-size: 13px;\n font-weight: 500;\n line-height: 18px;\n\n p {\n margin-top: 2px;\n margin-bottom: 13px;\n color: #9ea7b8;\n font-size: 12px;\n font-weight: 400;\n line-height: normal;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var LayoutTitle=_styledComponents["default"].div(_templateObject());var _default=LayoutTitle;exports["default"]=_default; + +/***/ }), + +/***/ 2040: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(643));var _AddDropdown=_interopRequireDefault(__webpack_require__(1963));var _SortWrapper=_interopRequireDefault(__webpack_require__(1921));var _Item=_interopRequireDefault(__webpack_require__(2041));var SortableList=function SortableList(_ref){var addItem=_ref.addItem,buttonData=_ref.buttonData,moveItem=_ref.moveItem,removeItem=_ref.removeItem;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),relationsLayout=_useLayoutDnd.relationsLayout;return/*#__PURE__*/_react["default"].createElement("div",{className:"col-4"},/*#__PURE__*/_react["default"].createElement(_SortWrapper["default"],{style:{marginTop:7,paddingTop:11,paddingLeft:5,paddingRight:5,border:'1px dashed #e3e9f3'}},relationsLayout.map(function(relationName,index){return/*#__PURE__*/_react["default"].createElement(_Item["default"],{index:index,key:relationName,move:moveItem,name:relationName,removeItem:removeItem});}),/*#__PURE__*/_react["default"].createElement(_AddDropdown["default"],{data:buttonData,isRelation:true,onClick:addItem,style:{marginLeft:10,marginRight:10,marginBottom:13}})));};SortableList.defaultProps={buttonData:[]};SortableList.propTypes={addItem:_propTypes["default"].func.isRequired,buttonData:_propTypes["default"].array,moveItem:_propTypes["default"].func.isRequired,removeItem:_propTypes["default"].func.isRequired};var _default=(0,_react.memo)(SortableList);exports["default"]=_default; + +/***/ }), + +/***/ 2041: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactDnd=__webpack_require__(352);var _reactDndHtml5Backend=__webpack_require__(644);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(643));var _DraggedFieldWithPreview=_interopRequireDefault(__webpack_require__(1964));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var Item=function Item(_ref){var index=_ref.index,move=_ref.move,name=_ref.name,removeItem=_ref.removeItem;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),goTo=_useLayoutDnd.goTo,metadatas=_useLayoutDnd.metadatas,selectedItemName=_useLayoutDnd.selectedItemName,setEditFieldToSelect=_useLayoutDnd.setEditFieldToSelect,setIsDraggingSibling=_useLayoutDnd.setIsDraggingSibling;var dragRef=(0,_react.useRef)(null);var dropRef=(0,_react.useRef)(null);// from: https://codesandbox.io/s/github/react-dnd/react-dnd/tree/gh-pages/examples_hooks_js/04-sortable/simple?from-embed +var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].EDIT_RELATION,hover:function hover(item,monitor){if(!dropRef.current){return;}var dragIndex=item.index;var hoverIndex=index;// Don't replace items with themselves +if(dragIndex===hoverIndex){return;}// Determine rectangle on screen +var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Get vertical middle +var hoverMiddleY=(hoverBoundingRect.bottom-hoverBoundingRect.top)/2;// Determine mouse position +var clientOffset=monitor.getClientOffset();// Get pixels to the top +var hoverClientY=clientOffset.y-hoverBoundingRect.top;// Only perform the move when the mouse has crossed half of the items height +// When dragging downwards, only move when the cursor is below 50% +// When dragging upwards, only move when the cursor is above 50% +// Dragging downwards +if(dragIndexhoverIndex&&hoverClientY>hoverMiddleY){return;}// Time to actually perform the action +move(dragIndex,hoverIndex);// Note: we're mutating the monitor item here! +// Generally it's better to avoid mutations, +// but it's good here for the sake of performance +// to avoid expensive index searches. +item.index=hoverIndex;}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var _useDrag=(0,_reactDnd.useDrag)({item:{type:_ItemTypes["default"].EDIT_RELATION,id:name,name:name,index:index},begin:function begin(){// Remove the over state from other components +// Since it's a dynamic list where items are replaced on the fly we need to disable all the over state +setIsDraggingSibling(true);},end:function end(){setIsDraggingSibling(false);},collect:function collect(monitor){return{isDragging:monitor.isDragging()};}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),isDragging=_useDrag2[0].isDragging,drag=_useDrag2[1],preview=_useDrag2[2];(0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:false});},[preview]);// Create the refs +// We need 1 for the drop target +// 1 for the drag target +var refs={dragRef:drag(dragRef),dropRef:drop(dropRef)};return/*#__PURE__*/_react["default"].createElement(_DraggedFieldWithPreview["default"],{isDragging:isDragging,label:(0,_lodash.get)(metadatas,[name,'edit','label'],''),name:name,onClickEdit:function onClickEdit(){return setEditFieldToSelect(name);},onClickRemove:function onClickRemove(e){e.stopPropagation();removeItem(index);},push:goTo,ref:refs,selectedItem:selectedItemName,size:12,style:{marginBottom:6,paddingLeft:5,paddingRight:5},type:"relation",i:index===0});};Item.defaultProps={move:function move(){}};Item.propTypes={index:_propTypes["default"].number.isRequired,move:_propTypes["default"].func,name:_propTypes["default"].string.isRequired,removeItem:_propTypes["default"].func.isRequired};var _default=Item;exports["default"]=_default; + +/***/ }), + +/***/ 2042: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _pluginId=_interopRequireDefault(__webpack_require__(105));var getInputProps=function getInputProps(fieldName){var type;switch(fieldName){case'description':case'label':case'placeholder':type='text';break;case'mainField':type='select';break;case'editable':type='bool';break;default:type='';}var labelId=fieldName==='mainField'?"".concat(_pluginId["default"],".containers.SettingPage.editSettings.entry.title"):"".concat(_pluginId["default"],".form.Input.").concat(fieldName);return{type:type,label:{id:labelId}};};var _default=getInputProps;exports["default"]=_default; + +/***/ }), + +/***/ 2043: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);var _layout=__webpack_require__(1965);var initialState=(0,_immutable.fromJS)({fieldForm:{},componentLayouts:{},metaToEdit:'',initialData:{},isLoading:true,metaForm:{},modifiedData:{}});exports.initialState=initialState;var reducer=function reducer(state,action){var layoutPathEdit=['modifiedData','layouts','edit'];var layoutPathRelations=['modifiedData','layouts','editRelations'];switch(action.type){case'ADD_RELATION':return state.updateIn(layoutPathRelations,function(list){return list.push(action.name);});case'GET_DATA_SUCCEEDED':{var data=(0,_lodash.cloneDeep)(action.data);(0,_lodash.set)(data,['layouts','edit'],(0,_layout.formatLayout)((0,_layout.createLayout)(data.layouts.edit)));return state.update('componentLayouts',function(){return(0,_immutable.fromJS)(action.componentLayouts);}).update('initialData',function(){return(0,_immutable.fromJS)(data||{});}).update('isLoading',function(){return false;}).update('modifiedData',function(){return(0,_immutable.fromJS)(data||{});});}case'MOVE_RELATION':{return state.updateIn(layoutPathRelations,function(list){return list["delete"](action.dragIndex).insert(action.hoverIndex,state.getIn([].concat(layoutPathRelations,[action.dragIndex])));});}case'MOVE_ROW':return state.updateIn(layoutPathEdit,function(list){return list["delete"](action.dragRowIndex).insert(action.hoverRowIndex,state.getIn([].concat(layoutPathEdit,[action.dragRowIndex])));});case'ON_ADD_DATA':{var size=(0,_layout.getInputSize)(state.getIn(['modifiedData','schema','attributes',action.name,'type']));var listSize=state.getIn(layoutPathEdit).size;var newList=state.getIn(layoutPathEdit).updateIn([listSize-1,'rowContent'],function(list){if(list){return list.push({name:action.name,size:size});}return(0,_immutable.fromJS)([{name:action.name,size:size}]);});var formattedList=(0,_layout.formatLayout)(newList.toJS());return state.updateIn(layoutPathEdit,function(){return(0,_immutable.fromJS)(formattedList);});}case'ON_CHANGE':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){return action.value;});case'ON_CHANGE_META':return state.updateIn(['metaForm'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){return action.value;});case'ON_RESET':return state.update('modifiedData',function(){return state.get('initialData');});case'REMOVE_FIELD':{var row=state.getIn([].concat(layoutPathEdit,[action.rowIndex,'rowContent']));var newState;// Delete the entire row if length is one or if lenght is equal to 2 and the second element is the hidden div used to make the dnd exp smoother +if(row.size===1||row.size===2&&row.getIn([1,'name'])==='_TEMP_'){newState=state.updateIn(layoutPathEdit,function(list){return list["delete"](action.rowIndex);});}else{newState=state.updateIn([].concat(layoutPathEdit,[action.rowIndex,'rowContent']),function(list){return list["delete"](action.fieldIndex);});}var updatedList=(0,_immutable.fromJS)((0,_layout.formatLayout)(newState.getIn(layoutPathEdit).toJS()));return state.updateIn(layoutPathEdit,function(){return updatedList;});}case'REMOVE_RELATION':return state.updateIn(layoutPathRelations,function(list){return list["delete"](action.index);});case'REORDER_DIFF_ROW':{var _newState=state.updateIn([].concat(layoutPathEdit,[action.dragRowIndex,'rowContent']),function(list){return list.remove(action.dragIndex);}).updateIn([].concat(layoutPathEdit,[action.hoverRowIndex,'rowContent']),function(list){return list.insert(action.hoverIndex,state.getIn([].concat(layoutPathEdit,[action.dragRowIndex,'rowContent',action.dragIndex])));});var _updatedList=(0,_layout.formatLayout)(_newState.getIn(layoutPathEdit).toJS());return state.updateIn(layoutPathEdit,function(){return(0,_immutable.fromJS)(_updatedList);});}case'REORDER_ROW':{var _newState2=state.updateIn([].concat(layoutPathEdit,[action.dragRowIndex,'rowContent']),function(list){return list["delete"](action.dragIndex).insert(action.hoverIndex,list.get(action.dragIndex));});var _updatedList2=(0,_layout.formatLayout)(_newState2.getIn(layoutPathEdit).toJS());return state.updateIn(layoutPathEdit,function(){return(0,_immutable.fromJS)(_updatedList2);});}case'SET_FIELD_TO_EDIT':return state.update('metaToEdit',function(){return action.name;}).updateIn(['metaForm'],function(){return state.getIn(['modifiedData','metadatas',action.name,'edit']);});case'SUBMIT_META_FORM':{var metaPath=['modifiedData','metadatas',state.get('metaToEdit'),'edit'];return state.updateIn(metaPath,function(){return state.getIn(['metaForm']);});}case'SUBMIT_SUCCEEDED':return state.update('initialData',function(){return state.get('modifiedData');});case'UNSET_FIELD_TO_EDIT':return state.update('metaToEdit',function(){return'';}).update('metaForm',function(){return(0,_immutable.fromJS)({});});default:return state;}};var _default=reducer;exports["default"]=_default; + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/0b6bb6725576b072c5d0b02ecdd1900d.woff2 b/server/build/0b6bb6725576b072c5d0b02ecdd1900d.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/server/build/0b6bb6725576b072c5d0b02ecdd1900d.woff2 differ diff --git a/server/build/0cb5a5c0d251c109458c85c6afeffbaa.svg b/server/build/0cb5a5c0d251c109458c85c6afeffbaa.svg new file mode 100644 index 00000000..46ad237a --- /dev/null +++ b/server/build/0cb5a5c0d251c109458c85c6afeffbaa.svg @@ -0,0 +1,3570 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/build/0f4fa9755f480e75463e74b3dce5a3ee.woff2 b/server/build/0f4fa9755f480e75463e74b3dce5a3ee.woff2 new file mode 100644 index 00000000..6a59bdbe Binary files /dev/null and b/server/build/0f4fa9755f480e75463e74b3dce5a3ee.woff2 differ diff --git a/server/build/0faa1074c17a74a7f5e32cbe6f9d76f3.woff2 b/server/build/0faa1074c17a74a7f5e32cbe6f9d76f3.woff2 new file mode 100644 index 00000000..2c4f52f2 Binary files /dev/null and b/server/build/0faa1074c17a74a7f5e32cbe6f9d76f3.woff2 differ diff --git a/server/build/1.1f0ac0b1.chunk.js b/server/build/1.1f0ac0b1.chunk.js new file mode 100644 index 00000000..e6e22a1b --- /dev/null +++ b/server/build/1.1f0ac0b1.chunk.js @@ -0,0 +1,31938 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[1],{ + +/***/ 1900: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EditorState + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var BlockTree = __webpack_require__(1976); +var ContentState = __webpack_require__(1941); +var EditorBidiService = __webpack_require__(2096); +var Immutable = __webpack_require__(35); +var SelectionState = __webpack_require__(1913); + +var OrderedSet = Immutable.OrderedSet, + Record = Immutable.Record, + Stack = Immutable.Stack; + + +var defaultRecord = { + allowUndo: true, + currentContent: null, + decorator: null, + directionMap: null, + forceSelection: false, + inCompositionMode: false, + inlineStyleOverride: null, + lastChangeType: null, + nativelyRenderedContent: null, + redoStack: Stack(), + selection: null, + treeMap: null, + undoStack: Stack() +}; + +var EditorStateRecord = Record(defaultRecord); + +var EditorState = function () { + EditorState.createEmpty = function createEmpty(decorator) { + return EditorState.createWithContent(ContentState.createFromText(''), decorator); + }; + + EditorState.createWithContent = function createWithContent(contentState, decorator) { + var firstKey = contentState.getBlockMap().first().getKey(); + return EditorState.create({ + currentContent: contentState, + undoStack: Stack(), + redoStack: Stack(), + decorator: decorator || null, + selection: SelectionState.createEmpty(firstKey) + }); + }; + + EditorState.create = function create(config) { + var currentContent = config.currentContent, + decorator = config.decorator; + + var recordConfig = _extends({}, config, { + treeMap: generateNewTreeMap(currentContent, decorator), + directionMap: EditorBidiService.getDirectionMap(currentContent) + }); + return new EditorState(new EditorStateRecord(recordConfig)); + }; + + EditorState.set = function set(editorState, put) { + var map = editorState.getImmutable().withMutations(function (state) { + var existingDecorator = state.get('decorator'); + var decorator = existingDecorator; + if (put.decorator === null) { + decorator = null; + } else if (put.decorator) { + decorator = put.decorator; + } + + var newContent = put.currentContent || editorState.getCurrentContent(); + + if (decorator !== existingDecorator) { + var treeMap = state.get('treeMap'); + var newTreeMap; + if (decorator && existingDecorator) { + newTreeMap = regenerateTreeForNewDecorator(newContent, newContent.getBlockMap(), treeMap, decorator, existingDecorator); + } else { + newTreeMap = generateNewTreeMap(newContent, decorator); + } + + state.merge({ + decorator: decorator, + treeMap: newTreeMap, + nativelyRenderedContent: null + }); + return; + } + + var existingContent = editorState.getCurrentContent(); + if (newContent !== existingContent) { + state.set('treeMap', regenerateTreeForNewBlocks(editorState, newContent.getBlockMap(), newContent.getEntityMap(), decorator)); + } + + state.merge(put); + }); + + return new EditorState(map); + }; + + EditorState.prototype.toJS = function toJS() { + return this.getImmutable().toJS(); + }; + + EditorState.prototype.getAllowUndo = function getAllowUndo() { + return this.getImmutable().get('allowUndo'); + }; + + EditorState.prototype.getCurrentContent = function getCurrentContent() { + return this.getImmutable().get('currentContent'); + }; + + EditorState.prototype.getUndoStack = function getUndoStack() { + return this.getImmutable().get('undoStack'); + }; + + EditorState.prototype.getRedoStack = function getRedoStack() { + return this.getImmutable().get('redoStack'); + }; + + EditorState.prototype.getSelection = function getSelection() { + return this.getImmutable().get('selection'); + }; + + EditorState.prototype.getDecorator = function getDecorator() { + return this.getImmutable().get('decorator'); + }; + + EditorState.prototype.isInCompositionMode = function isInCompositionMode() { + return this.getImmutable().get('inCompositionMode'); + }; + + EditorState.prototype.mustForceSelection = function mustForceSelection() { + return this.getImmutable().get('forceSelection'); + }; + + EditorState.prototype.getNativelyRenderedContent = function getNativelyRenderedContent() { + return this.getImmutable().get('nativelyRenderedContent'); + }; + + EditorState.prototype.getLastChangeType = function getLastChangeType() { + return this.getImmutable().get('lastChangeType'); + }; + + /** + * While editing, the user may apply inline style commands with a collapsed + * cursor, intending to type text that adopts the specified style. In this + * case, we track the specified style as an "override" that takes precedence + * over the inline style of the text adjacent to the cursor. + * + * If null, there is no override in place. + */ + + + EditorState.prototype.getInlineStyleOverride = function getInlineStyleOverride() { + return this.getImmutable().get('inlineStyleOverride'); + }; + + EditorState.setInlineStyleOverride = function setInlineStyleOverride(editorState, inlineStyleOverride) { + return EditorState.set(editorState, { inlineStyleOverride: inlineStyleOverride }); + }; + + /** + * Get the appropriate inline style for the editor state. If an + * override is in place, use it. Otherwise, the current style is + * based on the location of the selection state. + */ + + + EditorState.prototype.getCurrentInlineStyle = function getCurrentInlineStyle() { + var override = this.getInlineStyleOverride(); + if (override != null) { + return override; + } + + var content = this.getCurrentContent(); + var selection = this.getSelection(); + + if (selection.isCollapsed()) { + return getInlineStyleForCollapsedSelection(content, selection); + } + + return getInlineStyleForNonCollapsedSelection(content, selection); + }; + + EditorState.prototype.getBlockTree = function getBlockTree(blockKey) { + return this.getImmutable().getIn(['treeMap', blockKey]); + }; + + EditorState.prototype.isSelectionAtStartOfContent = function isSelectionAtStartOfContent() { + var firstKey = this.getCurrentContent().getBlockMap().first().getKey(); + return this.getSelection().hasEdgeWithin(firstKey, 0, 0); + }; + + EditorState.prototype.isSelectionAtEndOfContent = function isSelectionAtEndOfContent() { + var content = this.getCurrentContent(); + var blockMap = content.getBlockMap(); + var last = blockMap.last(); + var end = last.getLength(); + return this.getSelection().hasEdgeWithin(last.getKey(), end, end); + }; + + EditorState.prototype.getDirectionMap = function getDirectionMap() { + return this.getImmutable().get('directionMap'); + }; + + /** + * Incorporate native DOM selection changes into the EditorState. This + * method can be used when we simply want to accept whatever the DOM + * has given us to represent selection, and we do not need to re-render + * the editor. + * + * To forcibly move the DOM selection, see `EditorState.forceSelection`. + */ + + + EditorState.acceptSelection = function acceptSelection(editorState, selection) { + return updateSelection(editorState, selection, false); + }; + + /** + * At times, we need to force the DOM selection to be where we + * need it to be. This can occur when the anchor or focus nodes + * are non-text nodes, for instance. In this case, we want to trigger + * a re-render of the editor, which in turn forces selection into + * the correct place in the DOM. The `forceSelection` method + * accomplishes this. + * + * This method should be used in cases where you need to explicitly + * move the DOM selection from one place to another without a change + * in ContentState. + */ + + + EditorState.forceSelection = function forceSelection(editorState, selection) { + if (!selection.getHasFocus()) { + selection = selection.set('hasFocus', true); + } + return updateSelection(editorState, selection, true); + }; + + /** + * Move selection to the end of the editor without forcing focus. + */ + + + EditorState.moveSelectionToEnd = function moveSelectionToEnd(editorState) { + var content = editorState.getCurrentContent(); + var lastBlock = content.getLastBlock(); + var lastKey = lastBlock.getKey(); + var length = lastBlock.getLength(); + + return EditorState.acceptSelection(editorState, new SelectionState({ + anchorKey: lastKey, + anchorOffset: length, + focusKey: lastKey, + focusOffset: length, + isBackward: false + })); + }; + + /** + * Force focus to the end of the editor. This is useful in scenarios + * where we want to programmatically focus the input and it makes sense + * to allow the user to continue working seamlessly. + */ + + + EditorState.moveFocusToEnd = function moveFocusToEnd(editorState) { + var afterSelectionMove = EditorState.moveSelectionToEnd(editorState); + return EditorState.forceSelection(afterSelectionMove, afterSelectionMove.getSelection()); + }; + + /** + * Push the current ContentState onto the undo stack if it should be + * considered a boundary state, and set the provided ContentState as the + * new current content. + */ + + + EditorState.push = function push(editorState, contentState, changeType) { + if (editorState.getCurrentContent() === contentState) { + return editorState; + } + + var forceSelection = changeType !== 'insert-characters'; + var directionMap = EditorBidiService.getDirectionMap(contentState, editorState.getDirectionMap()); + + if (!editorState.getAllowUndo()) { + return EditorState.set(editorState, { + currentContent: contentState, + directionMap: directionMap, + lastChangeType: changeType, + selection: contentState.getSelectionAfter(), + forceSelection: forceSelection, + inlineStyleOverride: null + }); + } + + var selection = editorState.getSelection(); + var currentContent = editorState.getCurrentContent(); + var undoStack = editorState.getUndoStack(); + var newContent = contentState; + + if (selection !== currentContent.getSelectionAfter() || mustBecomeBoundary(editorState, changeType)) { + undoStack = undoStack.push(currentContent); + newContent = newContent.set('selectionBefore', selection); + } else if (changeType === 'insert-characters' || changeType === 'backspace-character' || changeType === 'delete-character') { + // Preserve the previous selection. + newContent = newContent.set('selectionBefore', currentContent.getSelectionBefore()); + } + + var inlineStyleOverride = editorState.getInlineStyleOverride(); + + // Don't discard inline style overrides for the following change types: + var overrideChangeTypes = ['adjust-depth', 'change-block-type', 'split-block']; + + if (overrideChangeTypes.indexOf(changeType) === -1) { + inlineStyleOverride = null; + } + + var editorStateChanges = { + currentContent: newContent, + directionMap: directionMap, + undoStack: undoStack, + redoStack: Stack(), + lastChangeType: changeType, + selection: contentState.getSelectionAfter(), + forceSelection: forceSelection, + inlineStyleOverride: inlineStyleOverride + }; + + return EditorState.set(editorState, editorStateChanges); + }; + + /** + * Make the top ContentState in the undo stack the new current content and + * push the current content onto the redo stack. + */ + + + EditorState.undo = function undo(editorState) { + if (!editorState.getAllowUndo()) { + return editorState; + } + + var undoStack = editorState.getUndoStack(); + var newCurrentContent = undoStack.peek(); + if (!newCurrentContent) { + return editorState; + } + + var currentContent = editorState.getCurrentContent(); + var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap()); + + return EditorState.set(editorState, { + currentContent: newCurrentContent, + directionMap: directionMap, + undoStack: undoStack.shift(), + redoStack: editorState.getRedoStack().push(currentContent), + forceSelection: true, + inlineStyleOverride: null, + lastChangeType: 'undo', + nativelyRenderedContent: null, + selection: currentContent.getSelectionBefore() + }); + }; + + /** + * Make the top ContentState in the redo stack the new current content and + * push the current content onto the undo stack. + */ + + + EditorState.redo = function redo(editorState) { + if (!editorState.getAllowUndo()) { + return editorState; + } + + var redoStack = editorState.getRedoStack(); + var newCurrentContent = redoStack.peek(); + if (!newCurrentContent) { + return editorState; + } + + var currentContent = editorState.getCurrentContent(); + var directionMap = EditorBidiService.getDirectionMap(newCurrentContent, editorState.getDirectionMap()); + + return EditorState.set(editorState, { + currentContent: newCurrentContent, + directionMap: directionMap, + undoStack: editorState.getUndoStack().push(currentContent), + redoStack: redoStack.shift(), + forceSelection: true, + inlineStyleOverride: null, + lastChangeType: 'redo', + nativelyRenderedContent: null, + selection: newCurrentContent.getSelectionAfter() + }); + }; + + /** + * Not for public consumption. + */ + + + function EditorState(immutable) { + _classCallCheck(this, EditorState); + + this._immutable = immutable; + } + + /** + * Not for public consumption. + */ + + + EditorState.prototype.getImmutable = function getImmutable() { + return this._immutable; + }; + + return EditorState; +}(); + +/** + * Set the supplied SelectionState as the new current selection, and set + * the `force` flag to trigger manual selection placement by the view. + */ + + +function updateSelection(editorState, selection, forceSelection) { + return EditorState.set(editorState, { + selection: selection, + forceSelection: forceSelection, + nativelyRenderedContent: null, + inlineStyleOverride: null + }); +} + +/** + * Regenerate the entire tree map for a given ContentState and decorator. + * Returns an OrderedMap that maps all available ContentBlock objects. + */ +function generateNewTreeMap(contentState, decorator) { + return contentState.getBlockMap().map(function (block) { + return BlockTree.generate(contentState, block, decorator); + }).toOrderedMap(); +} + +/** + * Regenerate tree map objects for all ContentBlocks that have changed + * between the current editorState and newContent. Returns an OrderedMap + * with only changed regenerated tree map objects. + */ +function regenerateTreeForNewBlocks(editorState, newBlockMap, newEntityMap, decorator) { + var contentState = editorState.getCurrentContent().set('entityMap', newEntityMap); + var prevBlockMap = contentState.getBlockMap(); + var prevTreeMap = editorState.getImmutable().get('treeMap'); + return prevTreeMap.merge(newBlockMap.toSeq().filter(function (block, key) { + return block !== prevBlockMap.get(key); + }).map(function (block) { + return BlockTree.generate(contentState, block, decorator); + })); +} + +/** + * Generate tree map objects for a new decorator object, preserving any + * decorations that are unchanged from the previous decorator. + * + * Note that in order for this to perform optimally, decoration Lists for + * decorators should be preserved when possible to allow for direct immutable + * List comparison. + */ +function regenerateTreeForNewDecorator(content, blockMap, previousTreeMap, decorator, existingDecorator) { + return previousTreeMap.merge(blockMap.toSeq().filter(function (block) { + return decorator.getDecorations(block, content) !== existingDecorator.getDecorations(block, content); + }).map(function (block) { + return BlockTree.generate(content, block, decorator); + })); +} + +/** + * Return whether a change should be considered a boundary state, given + * the previous change type. Allows us to discard potential boundary states + * during standard typing or deletion behavior. + */ +function mustBecomeBoundary(editorState, changeType) { + var lastChangeType = editorState.getLastChangeType(); + return changeType !== lastChangeType || changeType !== 'insert-characters' && changeType !== 'backspace-character' && changeType !== 'delete-character'; +} + +function getInlineStyleForCollapsedSelection(content, selection) { + var startKey = selection.getStartKey(); + var startOffset = selection.getStartOffset(); + var startBlock = content.getBlockForKey(startKey); + + // If the cursor is not at the start of the block, look backward to + // preserve the style of the preceding character. + if (startOffset > 0) { + return startBlock.getInlineStyleAt(startOffset - 1); + } + + // The caret is at position zero in this block. If the block has any + // text at all, use the style of the first character. + if (startBlock.getLength()) { + return startBlock.getInlineStyleAt(0); + } + + // Otherwise, look upward in the document to find the closest character. + return lookUpwardForInlineStyle(content, startKey); +} + +function getInlineStyleForNonCollapsedSelection(content, selection) { + var startKey = selection.getStartKey(); + var startOffset = selection.getStartOffset(); + var startBlock = content.getBlockForKey(startKey); + + // If there is a character just inside the selection, use its style. + if (startOffset < startBlock.getLength()) { + return startBlock.getInlineStyleAt(startOffset); + } + + // Check if the selection at the end of a non-empty block. Use the last + // style in the block. + if (startOffset > 0) { + return startBlock.getInlineStyleAt(startOffset - 1); + } + + // Otherwise, look upward in the document to find the closest character. + return lookUpwardForInlineStyle(content, startKey); +} + +function lookUpwardForInlineStyle(content, fromKey) { + var lastNonEmpty = content.getBlockMap().reverse().skipUntil(function (_, k) { + return k === fromKey; + }).skip(1).skipUntil(function (block, _) { + return block.getLength(); + }).first(); + + if (lastNonEmpty) return lastNonEmpty.getInlineStyleAt(lastNonEmpty.getLength() - 1); + return OrderedSet(); +} + +module.exports = EditorState; + +/***/ }), + +/***/ 1901: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftModifier + * @format + * + */ + + + +var CharacterMetadata = __webpack_require__(1902); +var ContentStateInlineStyle = __webpack_require__(2085); +var DraftFeatureFlags = __webpack_require__(1909); +var Immutable = __webpack_require__(35); + +var applyEntityToContentState = __webpack_require__(2086); +var getCharacterRemovalRange = __webpack_require__(2088); +var getContentStateFragment = __webpack_require__(1925); +var insertFragmentIntoContentState = __webpack_require__(2091); +var insertTextIntoContentState = __webpack_require__(2092); +var invariant = __webpack_require__(641); +var modifyBlockForContentState = __webpack_require__(2093); +var removeEntitiesAtEdges = __webpack_require__(1973); +var removeRangeFromContentState = __webpack_require__(2094); +var splitBlockInContentState = __webpack_require__(2095); + +var OrderedSet = Immutable.OrderedSet; + +/** + * `DraftModifier` provides a set of convenience methods that apply + * modifications to a `ContentState` object based on a target `SelectionState`. + * + * Any change to a `ContentState` should be decomposable into a series of + * transaction functions that apply the required changes and return output + * `ContentState` objects. + * + * These functions encapsulate some of the most common transaction sequences. + */ + +var DraftModifier = { + replaceText: function replaceText(contentState, rangeToReplace, text, inlineStyle, entityKey) { + var withoutEntities = removeEntitiesAtEdges(contentState, rangeToReplace); + var withoutText = removeRangeFromContentState(withoutEntities, rangeToReplace); + + var character = CharacterMetadata.create({ + style: inlineStyle || OrderedSet(), + entity: entityKey || null + }); + + return insertTextIntoContentState(withoutText, withoutText.getSelectionAfter(), text, character); + }, + + insertText: function insertText(contentState, targetRange, text, inlineStyle, entityKey) { + !targetRange.isCollapsed() ? false ? undefined : invariant(false) : void 0; + return DraftModifier.replaceText(contentState, targetRange, text, inlineStyle, entityKey); + }, + + moveText: function moveText(contentState, removalRange, targetRange) { + var movedFragment = getContentStateFragment(contentState, removalRange); + + var afterRemoval = DraftModifier.removeRange(contentState, removalRange, 'backward'); + + return DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment); + }, + + replaceWithFragment: function replaceWithFragment(contentState, targetRange, fragment) { + var withoutEntities = removeEntitiesAtEdges(contentState, targetRange); + var withoutText = removeRangeFromContentState(withoutEntities, targetRange); + + return insertFragmentIntoContentState(withoutText, withoutText.getSelectionAfter(), fragment); + }, + + removeRange: function removeRange(contentState, rangeToRemove, removalDirection) { + var startKey = void 0, + endKey = void 0, + startBlock = void 0, + endBlock = void 0; + if (rangeToRemove.getIsBackward()) { + rangeToRemove = rangeToRemove.merge({ + anchorKey: rangeToRemove.getFocusKey(), + anchorOffset: rangeToRemove.getFocusOffset(), + focusKey: rangeToRemove.getAnchorKey(), + focusOffset: rangeToRemove.getAnchorOffset(), + isBackward: false + }); + } + startKey = rangeToRemove.getAnchorKey(); + endKey = rangeToRemove.getFocusKey(); + startBlock = contentState.getBlockForKey(startKey); + endBlock = contentState.getBlockForKey(endKey); + var startOffset = rangeToRemove.getStartOffset(); + var endOffset = rangeToRemove.getEndOffset(); + + var startEntityKey = startBlock.getEntityAt(startOffset); + var endEntityKey = endBlock.getEntityAt(endOffset - 1); + + // Check whether the selection state overlaps with a single entity. + // If so, try to remove the appropriate substring of the entity text. + if (startKey === endKey) { + if (startEntityKey && startEntityKey === endEntityKey) { + var _adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection); + return removeRangeFromContentState(contentState, _adjustedRemovalRange); + } + } + var adjustedRemovalRange = rangeToRemove; + if (DraftFeatureFlags.draft_segmented_entities_behavior) { + // Adjust the selection to properly delete segemented and immutable + // entities + adjustedRemovalRange = getCharacterRemovalRange(contentState.getEntityMap(), startBlock, endBlock, rangeToRemove, removalDirection); + } + + var withoutEntities = removeEntitiesAtEdges(contentState, adjustedRemovalRange); + return removeRangeFromContentState(withoutEntities, adjustedRemovalRange); + }, + + splitBlock: function splitBlock(contentState, selectionState) { + var withoutEntities = removeEntitiesAtEdges(contentState, selectionState); + var withoutText = removeRangeFromContentState(withoutEntities, selectionState); + + return splitBlockInContentState(withoutText, withoutText.getSelectionAfter()); + }, + + applyInlineStyle: function applyInlineStyle(contentState, selectionState, inlineStyle) { + return ContentStateInlineStyle.add(contentState, selectionState, inlineStyle); + }, + + removeInlineStyle: function removeInlineStyle(contentState, selectionState, inlineStyle) { + return ContentStateInlineStyle.remove(contentState, selectionState, inlineStyle); + }, + + setBlockType: function setBlockType(contentState, selectionState, blockType) { + return modifyBlockForContentState(contentState, selectionState, function (block) { + return block.merge({ type: blockType, depth: 0 }); + }); + }, + + setBlockData: function setBlockData(contentState, selectionState, blockData) { + return modifyBlockForContentState(contentState, selectionState, function (block) { + return block.merge({ data: blockData }); + }); + }, + + mergeBlockData: function mergeBlockData(contentState, selectionState, blockData) { + return modifyBlockForContentState(contentState, selectionState, function (block) { + return block.merge({ data: block.getData().merge(blockData) }); + }); + }, + + applyEntity: function applyEntity(contentState, selectionState, entityKey) { + var withoutEntities = removeEntitiesAtEdges(contentState, selectionState); + return applyEntityToContentState(withoutEntities, selectionState, entityKey); + } +}; + +module.exports = DraftModifier; + +/***/ }), + +/***/ 1902: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CharacterMetadata + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var _require = __webpack_require__(35), + Map = _require.Map, + OrderedSet = _require.OrderedSet, + Record = _require.Record; + +// Immutable.map is typed such that the value for every key in the map +// must be the same type + + +var EMPTY_SET = OrderedSet(); + +var defaultRecord = { + style: EMPTY_SET, + entity: null +}; + +var CharacterMetadataRecord = Record(defaultRecord); + +var CharacterMetadata = function (_CharacterMetadataRec) { + _inherits(CharacterMetadata, _CharacterMetadataRec); + + function CharacterMetadata() { + _classCallCheck(this, CharacterMetadata); + + return _possibleConstructorReturn(this, _CharacterMetadataRec.apply(this, arguments)); + } + + CharacterMetadata.prototype.getStyle = function getStyle() { + return this.get('style'); + }; + + CharacterMetadata.prototype.getEntity = function getEntity() { + return this.get('entity'); + }; + + CharacterMetadata.prototype.hasStyle = function hasStyle(style) { + return this.getStyle().includes(style); + }; + + CharacterMetadata.applyStyle = function applyStyle(record, style) { + var withStyle = record.set('style', record.getStyle().add(style)); + return CharacterMetadata.create(withStyle); + }; + + CharacterMetadata.removeStyle = function removeStyle(record, style) { + var withoutStyle = record.set('style', record.getStyle().remove(style)); + return CharacterMetadata.create(withoutStyle); + }; + + CharacterMetadata.applyEntity = function applyEntity(record, entityKey) { + var withEntity = record.getEntity() === entityKey ? record : record.set('entity', entityKey); + return CharacterMetadata.create(withEntity); + }; + + /** + * Use this function instead of the `CharacterMetadata` constructor. + * Since most content generally uses only a very small number of + * style/entity permutations, we can reuse these objects as often as + * possible. + */ + + + CharacterMetadata.create = function create(config) { + if (!config) { + return EMPTY; + } + + var defaultConfig = { + style: EMPTY_SET, + entity: null + }; + + // Fill in unspecified properties, if necessary. + var configMap = Map(defaultConfig).merge(config); + + var existing = pool.get(configMap); + if (existing) { + return existing; + } + + var newCharacter = new CharacterMetadata(configMap); + pool = pool.set(configMap, newCharacter); + return newCharacter; + }; + + return CharacterMetadata; +}(CharacterMetadataRecord); + +var EMPTY = new CharacterMetadata(); +var pool = Map([[Map(defaultRecord), EMPTY]]); + +CharacterMetadata.EMPTY = EMPTY; + +module.exports = CharacterMetadata; + +/***/ }), + +/***/ 1903: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ContentBlockNode + * @format + * + * + * This file is a fork of ContentBlock adding support for nesting references by + * providing links to children, parent, prevSibling, and nextSibling. + * + * This is unstable and not part of the public API and should not be used by + * production systems. This file may be update/removed without notice. + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var CharacterMetadata = __webpack_require__(1902); +var Immutable = __webpack_require__(35); + +var findRangesImmutable = __webpack_require__(1917); + +var List = Immutable.List, + Map = Immutable.Map, + OrderedSet = Immutable.OrderedSet, + Record = Immutable.Record, + Repeat = Immutable.Repeat; + + +var EMPTY_SET = OrderedSet(); + +var defaultRecord = { + parent: null, + characterList: List(), + data: Map(), + depth: 0, + key: '', + text: '', + type: 'unstyled', + children: List(), + prevSibling: null, + nextSibling: null +}; + +var haveEqualStyle = function haveEqualStyle(charA, charB) { + return charA.getStyle() === charB.getStyle(); +}; + +var haveEqualEntity = function haveEqualEntity(charA, charB) { + return charA.getEntity() === charB.getEntity(); +}; + +var decorateCharacterList = function decorateCharacterList(config) { + if (!config) { + return config; + } + + var characterList = config.characterList, + text = config.text; + + + if (text && !characterList) { + config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length)); + } + + return config; +}; + +var ContentBlockNode = function (_Record) { + _inherits(ContentBlockNode, _Record); + + function ContentBlockNode() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultRecord; + + _classCallCheck(this, ContentBlockNode); + + return _possibleConstructorReturn(this, _Record.call(this, decorateCharacterList(props))); + } + + ContentBlockNode.prototype.getKey = function getKey() { + return this.get('key'); + }; + + ContentBlockNode.prototype.getType = function getType() { + return this.get('type'); + }; + + ContentBlockNode.prototype.getText = function getText() { + return this.get('text'); + }; + + ContentBlockNode.prototype.getCharacterList = function getCharacterList() { + return this.get('characterList'); + }; + + ContentBlockNode.prototype.getLength = function getLength() { + return this.getText().length; + }; + + ContentBlockNode.prototype.getDepth = function getDepth() { + return this.get('depth'); + }; + + ContentBlockNode.prototype.getData = function getData() { + return this.get('data'); + }; + + ContentBlockNode.prototype.getInlineStyleAt = function getInlineStyleAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getStyle() : EMPTY_SET; + }; + + ContentBlockNode.prototype.getEntityAt = function getEntityAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getEntity() : null; + }; + + ContentBlockNode.prototype.getChildKeys = function getChildKeys() { + return this.get('children'); + }; + + ContentBlockNode.prototype.getParentKey = function getParentKey() { + return this.get('parent'); + }; + + ContentBlockNode.prototype.getPrevSiblingKey = function getPrevSiblingKey() { + return this.get('prevSibling'); + }; + + ContentBlockNode.prototype.getNextSiblingKey = function getNextSiblingKey() { + return this.get('nextSibling'); + }; + + ContentBlockNode.prototype.findStyleRanges = function findStyleRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback); + }; + + ContentBlockNode.prototype.findEntityRanges = function findEntityRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback); + }; + + return ContentBlockNode; +}(Record(defaultRecord)); + +module.exports = ContentBlockNode; + +/***/ }), + +/***/ 1904: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * + */ + +var nullthrows = function nullthrows(x) { + if (x != null) { + return x; + } + throw new Error("Got unexpected null or undefined"); +}; + +module.exports = nullthrows; + +/***/ }), + +/***/ 1905: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + */ + + + +var UserAgentData = __webpack_require__(2106); +var VersionRange = __webpack_require__(2108); + +var mapObject = __webpack_require__(2109); +var memoizeStringOnly = __webpack_require__(2110); + +/** + * Checks to see whether `name` and `version` satisfy `query`. + * + * @param {string} name Name of the browser, device, engine or platform + * @param {?string} version Version of the browser, engine or platform + * @param {string} query Query of form "Name [range expression]" + * @param {?function} normalizer Optional pre-processor for range expression + * @return {boolean} + */ +function compare(name, version, query, normalizer) { + // check for exact match with no version + if (name === query) { + return true; + } + + // check for non-matching names + if (!query.startsWith(name)) { + return false; + } + + // full comparison with version + var range = query.slice(name.length); + if (version) { + range = normalizer ? normalizer(range) : range; + return VersionRange.contains(range, version); + } + + return false; +} + +/** + * Normalizes `version` by stripping any "NT" prefix, but only on the Windows + * platform. + * + * Mimics the stripping performed by the `UserAgentWindowsPlatform` PHP class. + * + * @param {string} version + * @return {string} + */ +function normalizePlatformVersion(version) { + if (UserAgentData.platformName === 'Windows') { + return version.replace(/^\s*NT/, ''); + } + + return version; +} + +/** + * Provides client-side access to the authoritative PHP-generated User Agent + * information supplied by the server. + */ +var UserAgent = { + /** + * Check if the User Agent browser matches `query`. + * + * `query` should be a string like "Chrome" or "Chrome > 33". + * + * Valid browser names include: + * + * - ACCESS NetFront + * - AOL + * - Amazon Silk + * - Android + * - BlackBerry + * - BlackBerry PlayBook + * - Chrome + * - Chrome for iOS + * - Chrome frame + * - Facebook PHP SDK + * - Facebook for iOS + * - Firefox + * - IE + * - IE Mobile + * - Mobile Safari + * - Motorola Internet Browser + * - Nokia + * - Openwave Mobile Browser + * - Opera + * - Opera Mini + * - Opera Mobile + * - Safari + * - UIWebView + * - Unknown + * - webOS + * - etc... + * + * An authoritative list can be found in the PHP `BrowserDetector` class and + * related classes in the same file (see calls to `new UserAgentBrowser` here: + * https://fburl.com/50728104). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isBrowser: function isBrowser(query) { + return compare(UserAgentData.browserName, UserAgentData.browserFullVersion, query); + }, + + + /** + * Check if the User Agent browser uses a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isBrowserArchitecture: function isBrowserArchitecture(query) { + return compare(UserAgentData.browserArchitecture, null, query); + }, + + + /** + * Check if the User Agent device matches `query`. + * + * `query` should be a string like "iPhone" or "iPad". + * + * Valid device names include: + * + * - Kindle + * - Kindle Fire + * - Unknown + * - iPad + * - iPhone + * - iPod + * - etc... + * + * An authoritative list can be found in the PHP `DeviceDetector` class and + * related classes in the same file (see calls to `new UserAgentDevice` here: + * https://fburl.com/50728332). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name" + * @return {boolean} + */ + isDevice: function isDevice(query) { + return compare(UserAgentData.deviceName, null, query); + }, + + + /** + * Check if the User Agent rendering engine matches `query`. + * + * `query` should be a string like "WebKit" or "WebKit >= 537". + * + * Valid engine names include: + * + * - Gecko + * - Presto + * - Trident + * - WebKit + * - etc... + * + * An authoritative list can be found in the PHP `RenderingEngineDetector` + * class related classes in the same file (see calls to `new + * UserAgentRenderingEngine` here: https://fburl.com/50728617). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isEngine: function isEngine(query) { + return compare(UserAgentData.engineName, UserAgentData.engineVersion, query); + }, + + + /** + * Check if the User Agent platform matches `query`. + * + * `query` should be a string like "Windows" or "iOS 5 - 6". + * + * Valid platform names include: + * + * - Android + * - BlackBerry OS + * - Java ME + * - Linux + * - Mac OS X + * - Mac OS X Calendar + * - Mac OS X Internet Account + * - Symbian + * - SymbianOS + * - Windows + * - Windows Mobile + * - Windows Phone + * - iOS + * - iOS Facebook Integration Account + * - iOS Facebook Social Sharing UI + * - webOS + * - Chrome OS + * - etc... + * + * An authoritative list can be found in the PHP `PlatformDetector` class and + * related classes in the same file (see calls to `new UserAgentPlatform` + * here: https://fburl.com/50729226). + * + * @note Function results are memoized + * + * @param {string} query Query of the form "Name [range expression]" + * @return {boolean} + */ + isPlatform: function isPlatform(query) { + return compare(UserAgentData.platformName, UserAgentData.platformFullVersion, query, normalizePlatformVersion); + }, + + + /** + * Check if the User Agent platform is a 32 or 64 bit architecture. + * + * @note Function results are memoized + * + * @param {string} query Query of the form "32" or "64". + * @return {boolean} + */ + isPlatformArchitecture: function isPlatformArchitecture(query) { + return compare(UserAgentData.platformArchitecture, null, query); + } +}; + +module.exports = mapObject(UserAgent, memoizeStringOnly); + +/***/ }), + +/***/ 1907: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule generateRandomKey + * @format + * + */ + + + +var seenKeys = {}; +var MULTIPLIER = Math.pow(2, 24); + +function generateRandomKey() { + var key = void 0; + while (key === undefined || seenKeys.hasOwnProperty(key) || !isNaN(+key)) { + key = Math.floor(Math.random() * MULTIPLIER).toString(32); + } + seenKeys[key] = true; + return key; +} + +module.exports = generateRandomKey; + +/***/ }), + +/***/ 1909: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftFeatureFlags + * @format + * + */ + + + +var DraftFeatureFlags = __webpack_require__(2084); + +module.exports = DraftFeatureFlags; + +/***/ }), + +/***/ 1910: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ContentBlock + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var CharacterMetadata = __webpack_require__(1902); +var Immutable = __webpack_require__(35); + +var findRangesImmutable = __webpack_require__(1917); + +var List = Immutable.List, + Map = Immutable.Map, + OrderedSet = Immutable.OrderedSet, + Record = Immutable.Record, + Repeat = Immutable.Repeat; + + +var EMPTY_SET = OrderedSet(); + +var defaultRecord = { + key: '', + type: 'unstyled', + text: '', + characterList: List(), + depth: 0, + data: Map() +}; + +var ContentBlockRecord = Record(defaultRecord); + +var decorateCharacterList = function decorateCharacterList(config) { + if (!config) { + return config; + } + + var characterList = config.characterList, + text = config.text; + + + if (text && !characterList) { + config.characterList = List(Repeat(CharacterMetadata.EMPTY, text.length)); + } + + return config; +}; + +var ContentBlock = function (_ContentBlockRecord) { + _inherits(ContentBlock, _ContentBlockRecord); + + function ContentBlock(config) { + _classCallCheck(this, ContentBlock); + + return _possibleConstructorReturn(this, _ContentBlockRecord.call(this, decorateCharacterList(config))); + } + + ContentBlock.prototype.getKey = function getKey() { + return this.get('key'); + }; + + ContentBlock.prototype.getType = function getType() { + return this.get('type'); + }; + + ContentBlock.prototype.getText = function getText() { + return this.get('text'); + }; + + ContentBlock.prototype.getCharacterList = function getCharacterList() { + return this.get('characterList'); + }; + + ContentBlock.prototype.getLength = function getLength() { + return this.getText().length; + }; + + ContentBlock.prototype.getDepth = function getDepth() { + return this.get('depth'); + }; + + ContentBlock.prototype.getData = function getData() { + return this.get('data'); + }; + + ContentBlock.prototype.getInlineStyleAt = function getInlineStyleAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getStyle() : EMPTY_SET; + }; + + ContentBlock.prototype.getEntityAt = function getEntityAt(offset) { + var character = this.getCharacterList().get(offset); + return character ? character.getEntity() : null; + }; + + /** + * Execute a callback for every contiguous range of styles within the block. + */ + + + ContentBlock.prototype.findStyleRanges = function findStyleRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualStyle, filterFn, callback); + }; + + /** + * Execute a callback for every contiguous range of entities within the block. + */ + + + ContentBlock.prototype.findEntityRanges = function findEntityRanges(filterFn, callback) { + findRangesImmutable(this.getCharacterList(), haveEqualEntity, filterFn, callback); + }; + + return ContentBlock; +}(ContentBlockRecord); + +function haveEqualStyle(charA, charB) { + return charA.getStyle() === charB.getStyle(); +} + +function haveEqualEntity(charA, charB) { + return charA.getEntity() === charB.getEntity(); +} + +module.exports = ContentBlock; + +/***/ }), + +/***/ 1911: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + */ + +/** + * Unicode-enabled replacesments for basic String functions. + * + * All the functions in this module assume that the input string is a valid + * UTF-16 encoding of a Unicode sequence. If it's not the case, the behavior + * will be undefined. + * + * WARNING: Since this module is typechecks-enforced, you may find new bugs + * when replacing normal String functions with ones provided here. + */ + + + +var invariant = __webpack_require__(641); + +// These two ranges are consecutive so anything in [HIGH_START, LOW_END] is a +// surrogate code unit. +var SURROGATE_HIGH_START = 0xD800; +var SURROGATE_HIGH_END = 0xDBFF; +var SURROGATE_LOW_START = 0xDC00; +var SURROGATE_LOW_END = 0xDFFF; +var SURROGATE_UNITS_REGEX = /[\uD800-\uDFFF]/; + +/** + * @param {number} codeUnit A Unicode code-unit, in range [0, 0x10FFFF] + * @return {boolean} Whether code-unit is in a surrogate (hi/low) range + */ +function isCodeUnitInSurrogateRange(codeUnit) { + return SURROGATE_HIGH_START <= codeUnit && codeUnit <= SURROGATE_LOW_END; +} + +/** + * Returns whether the two characters starting at `index` form a surrogate pair. + * For example, given the string s = "\uD83D\uDE0A", (s, 0) returns true and + * (s, 1) returns false. + * + * @param {string} str + * @param {number} index + * @return {boolean} + */ +function isSurrogatePair(str, index) { + !(0 <= index && index < str.length) ? false ? undefined : invariant(false) : void 0; + if (index + 1 === str.length) { + return false; + } + var first = str.charCodeAt(index); + var second = str.charCodeAt(index + 1); + return SURROGATE_HIGH_START <= first && first <= SURROGATE_HIGH_END && SURROGATE_LOW_START <= second && second <= SURROGATE_LOW_END; +} + +/** + * @param {string} str Non-empty string + * @return {boolean} True if the input includes any surrogate code units + */ +function hasSurrogateUnit(str) { + return SURROGATE_UNITS_REGEX.test(str); +} + +/** + * Return the length of the original Unicode character at given position in the + * String by looking into the UTF-16 code unit; that is equal to 1 for any + * non-surrogate characters in BMP ([U+0000..U+D7FF] and [U+E000, U+FFFF]); and + * returns 2 for the hi/low surrogates ([U+D800..U+DFFF]), which are in fact + * representing non-BMP characters ([U+10000..U+10FFFF]). + * + * Examples: + * - '\u0020' => 1 + * - '\u3020' => 1 + * - '\uD835' => 2 + * - '\uD835\uDDEF' => 2 + * - '\uDDEF' => 2 + * + * @param {string} str Non-empty string + * @param {number} pos Position in the string to look for one code unit + * @return {number} Number 1 or 2 + */ +function getUTF16Length(str, pos) { + return 1 + isCodeUnitInSurrogateRange(str.charCodeAt(pos)); +} + +/** + * Fully Unicode-enabled replacement for String#length + * + * @param {string} str Valid Unicode string + * @return {number} The number of Unicode characters in the string + */ +function strlen(str) { + // Call the native functions if there's no surrogate char + if (!hasSurrogateUnit(str)) { + return str.length; + } + + var len = 0; + for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) { + len++; + } + return len; +} + +/** + * Fully Unicode-enabled replacement for String#substr() + * + * @param {string} str Valid Unicode string + * @param {number} start Location in Unicode sequence to begin extracting + * @param {?number} length The number of Unicode characters to extract + * (default: to the end of the string) + * @return {string} Extracted sub-string + */ +function substr(str, start, length) { + start = start || 0; + length = length === undefined ? Infinity : length || 0; + + // Call the native functions if there's no surrogate char + if (!hasSurrogateUnit(str)) { + return str.substr(start, length); + } + + // Obvious cases + var size = str.length; + if (size <= 0 || start > size || length <= 0) { + return ''; + } + + // Find the actual starting position + var posA = 0; + if (start > 0) { + for (; start > 0 && posA < size; start--) { + posA += getUTF16Length(str, posA); + } + if (posA >= size) { + return ''; + } + } else if (start < 0) { + for (posA = size; start < 0 && 0 < posA; start++) { + posA -= getUTF16Length(str, posA - 1); + } + if (posA < 0) { + posA = 0; + } + } + + // Find the actual ending position + var posB = size; + if (length < size) { + for (posB = posA; length > 0 && posB < size; length--) { + posB += getUTF16Length(str, posB); + } + } + + return str.substring(posA, posB); +} + +/** + * Fully Unicode-enabled replacement for String#substring() + * + * @param {string} str Valid Unicode string + * @param {number} start Location in Unicode sequence to begin extracting + * @param {?number} end Location in Unicode sequence to end extracting + * (default: end of the string) + * @return {string} Extracted sub-string + */ +function substring(str, start, end) { + start = start || 0; + end = end === undefined ? Infinity : end || 0; + + if (start < 0) { + start = 0; + } + if (end < 0) { + end = 0; + } + + var length = Math.abs(end - start); + start = start < end ? start : end; + return substr(str, start, length); +} + +/** + * Get a list of Unicode code-points from a String + * + * @param {string} str Valid Unicode string + * @return {array} A list of code-points in [0..0x10FFFF] + */ +function getCodePoints(str) { + var codePoints = []; + for (var pos = 0; pos < str.length; pos += getUTF16Length(str, pos)) { + codePoints.push(str.codePointAt(pos)); + } + return codePoints; +} + +var UnicodeUtils = { + getCodePoints: getCodePoints, + getUTF16Length: getUTF16Length, + hasSurrogateUnit: hasSurrogateUnit, + isCodeUnitInSurrogateRange: isCodeUnitInSurrogateRange, + isSurrogatePair: isSurrogatePair, + strlen: strlen, + substring: substring, + substr: substr +}; + +module.exports = UnicodeUtils; + +/***/ }), + +/***/ 1912: +/***/ (function(module, exports, __webpack_require__) { + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// This is CodeMirror (https://codemirror.net), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +(function (global, factory) { + true ? module.exports = factory() : + undefined; +}(this, (function () { 'use strict'; + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + var userAgent = navigator.userAgent; + var platform = navigator.platform; + + var gecko = /gecko\/\d/i.test(userAgent); + var ie_upto10 = /MSIE \d/.test(userAgent); + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent); + var edge = /Edge\/(\d+)/.exec(userAgent); + var ie = ie_upto10 || ie_11up || edge; + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]); + var webkit = !edge && /WebKit\//.test(userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent); + var chrome = !edge && /Chrome\//.test(userAgent); + var presto = /Opera\//.test(userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent); + var phantom = /PhantomJS/.test(userAgent); + + var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent); + var android = /Android/.test(userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); + var mac = ios || /Mac/.test(platform); + var chromeOS = /\bCrOS\b/.test(userAgent); + var windows = /win/i.test(platform); + + var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); + if (presto_version) { presto_version = Number(presto_version[1]); } + if (presto_version && presto_version >= 15) { presto = false; webkit = true; } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); + var captureRightClick = gecko || (ie && ie_version >= 9); + + function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") } + + var rmClass = function(node, cls) { + var current = node.className; + var match = classTest(cls).exec(current); + if (match) { + var after = current.slice(match.index + match[0].length); + node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); + } + }; + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) + { e.removeChild(e.firstChild); } + return e + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e) + } + + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) { e.className = className; } + if (style) { e.style.cssText = style; } + if (typeof content == "string") { e.appendChild(document.createTextNode(content)); } + else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } } + return e + } + // wrapper for elt, which removes the elt from the accessibility tree + function eltP(tag, content, className, style) { + var e = elt(tag, content, className, style); + e.setAttribute("role", "presentation"); + return e + } + + var range; + if (document.createRange) { range = function(node, start, end, endNode) { + var r = document.createRange(); + r.setEnd(endNode || node, end); + r.setStart(node, start); + return r + }; } + else { range = function(node, start, end) { + var r = document.body.createTextRange(); + try { r.moveToElementText(node.parentNode); } + catch(e) { return r } + r.collapse(true); + r.moveEnd("character", end); + r.moveStart("character", start); + return r + }; } + + function contains(parent, child) { + if (child.nodeType == 3) // Android browser always returns false when child is a textnode + { child = child.parentNode; } + if (parent.contains) + { return parent.contains(child) } + do { + if (child.nodeType == 11) { child = child.host; } + if (child == parent) { return true } + } while (child = child.parentNode) + } + + function activeElt() { + // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement. + // IE < 10 will throw when accessed while the page is loading or in an iframe. + // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable. + var activeElement; + try { + activeElement = document.activeElement; + } catch(e) { + activeElement = document.body || null; + } + while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) + { activeElement = activeElement.shadowRoot.activeElement; } + return activeElement + } + + function addClass(node, cls) { + var current = node.className; + if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; } + } + function joinClasses(a, b) { + var as = a.split(" "); + for (var i = 0; i < as.length; i++) + { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } } + return b + } + + var selectInput = function(node) { node.select(); }; + if (ios) // Mobile Safari apparently has a bug where select() is broken. + { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; } + else if (ie) // Suppress mysterious IE10 errors + { selectInput = function(node) { try { node.select(); } catch(_e) {} }; } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function(){return f.apply(null, args)} + } + + function copyObj(obj, target, overwrite) { + if (!target) { target = {}; } + for (var prop in obj) + { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) + { target[prop] = obj[prop]; } } + return target + } + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) { end = string.length; } + } + for (var i = startIndex || 0, n = startValue || 0;;) { + var nextTab = string.indexOf("\t", i); + if (nextTab < 0 || nextTab >= end) + { return n + (end - i) } + n += nextTab - i; + n += tabSize - (n % tabSize); + i = nextTab + 1; + } + } + + var Delayed = function() { + this.id = null; + this.f = null; + this.time = 0; + this.handler = bind(this.onTimeout, this); + }; + Delayed.prototype.onTimeout = function (self) { + self.id = 0; + if (self.time <= +new Date) { + self.f(); + } else { + setTimeout(self.handler, self.time - +new Date); + } + }; + Delayed.prototype.set = function (ms, f) { + this.f = f; + var time = +new Date + ms; + if (!this.id || time < this.time) { + clearTimeout(this.id); + this.id = setTimeout(this.handler, ms); + this.time = time; + } + }; + + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) + { if (array[i] == elt) { return i } } + return -1 + } + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 30; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = {toString: function(){return "CodeMirror.Pass"}}; + + // Reused option objects for setSelection & friends + var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + function findColumn(string, goal, tabSize) { + for (var pos = 0, col = 0;;) { + var nextTab = string.indexOf("\t", pos); + if (nextTab == -1) { nextTab = string.length; } + var skipped = nextTab - pos; + if (nextTab == string.length || col + skipped >= goal) + { return pos + Math.min(skipped, goal - col) } + col += nextTab - pos; + col += tabSize - (col % tabSize); + pos = nextTab + 1; + if (col >= goal) { return pos } + } + } + + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) + { spaceStrs.push(lst(spaceStrs) + " "); } + return spaceStrs[n] + } + + function lst(arr) { return arr[arr.length-1] } + + function map(array, f) { + var out = []; + for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); } + return out + } + + function insertSorted(array, value, score) { + var pos = 0, priority = score(value); + while (pos < array.length && score(array[pos]) <= priority) { pos++; } + array.splice(pos, 0, value); + } + + function nothing() {} + + function createObj(base, props) { + var inst; + if (Object.create) { + inst = Object.create(base); + } else { + nothing.prototype = base; + inst = new nothing(); + } + if (props) { copyObj(props, inst); } + return inst + } + + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + function isWordCharBasic(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)) + } + function isWordChar(ch, helper) { + if (!helper) { return isWordCharBasic(ch) } + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true } + return helper.test(ch) + } + + function isEmpty(obj) { + for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } } + return true + } + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/fonts/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; + function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) } + + // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. + function skipExtendingChars(str, pos, dir) { + while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; } + return pos + } + + // Returns the value from the range [`from`; `to`] that satisfies + // `pred` and is closest to `from`. Assumes that at least `to` + // satisfies `pred`. Supports `from` being greater than `to`. + function findFirst(pred, from, to) { + // At any point we are certain `to` satisfies `pred`, don't know + // whether `from` does. + var dir = from > to ? -1 : 1; + for (;;) { + if (from == to) { return from } + var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF); + if (mid == from) { return pred(mid) ? from : to } + if (pred(mid)) { to = mid; } + else { from = mid + dir; } + } + } + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) { return f(from, to, "ltr", 0) } + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i); + found = true; + } + } + if (!found) { f(from, to, "ltr"); } + } + + var bidiOther = null; + function getBidiPartAt(order, ch, sticky) { + var found; + bidiOther = null; + for (var i = 0; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < ch && cur.to > ch) { return i } + if (cur.to == ch) { + if (cur.from != cur.to && sticky == "before") { found = i; } + else { bidiOther = i; } + } + if (cur.from == ch) { + if (cur.from != cur.to && sticky != "before") { found = i; } + else { bidiOther = i; } + } + } + return found != null ? found : bidiOther + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; + // Character types for codepoints 0x600 to 0x6f9 + var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"; + function charType(code) { + if (code <= 0xf7) { return lowTypes.charAt(code) } + else if (0x590 <= code && code <= 0x5f4) { return "R" } + else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) } + else if (0x6ee <= code && code <= 0x8ac) { return "r" } + else if (0x2000 <= code && code <= 0x200b) { return "w" } + else if (code == 0x200c) { return "b" } + else { return "L" } + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; + + function BidiSpan(level, from, to) { + this.level = level; + this.from = from; this.to = to; + } + + return function(str, direction) { + var outerType = direction == "ltr" ? "L" : "R"; + + if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false } + var len = str.length, types = []; + for (var i = 0; i < len; ++i) + { types.push(charType(str.charCodeAt(i))); } + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) { + var type = types[i$1]; + if (type == "m") { types[i$1] = prev; } + else { prev = type; } + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) { + var type$1 = types[i$2]; + if (type$1 == "1" && cur == "r") { types[i$2] = "n"; } + else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) { + var type$2 = types[i$3]; + if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; } + else if (type$2 == "," && prev$1 == types[i$3+1] && + (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; } + prev$1 = type$2; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i$4 = 0; i$4 < len; ++i$4) { + var type$3 = types[i$4]; + if (type$3 == ",") { types[i$4] = "N"; } + else if (type$3 == "%") { + var end = (void 0); + for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {} + var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; + for (var j = i$4; j < end; ++j) { types[j] = replace; } + i$4 = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) { + var type$4 = types[i$5]; + if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; } + else if (isStrong.test(type$4)) { cur$1 = type$4; } + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i$6 = 0; i$6 < len; ++i$6) { + if (isNeutral.test(types[i$6])) { + var end$1 = (void 0); + for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {} + var before = (i$6 ? types[i$6-1] : outerType) == "L"; + var after = (end$1 < len ? types[end$1] : outerType) == "L"; + var replace$1 = before == after ? (before ? "L" : "R") : outerType; + for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; } + i$6 = end$1 - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], m; + for (var i$7 = 0; i$7 < len;) { + if (countsAsLeft.test(types[i$7])) { + var start = i$7; + for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {} + order.push(new BidiSpan(0, start, i$7)); + } else { + var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0; + for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {} + for (var j$2 = pos; j$2 < i$7;) { + if (countsAsNum.test(types[j$2])) { + if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; } + var nstart = j$2; + for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {} + order.splice(at, 0, new BidiSpan(2, nstart, j$2)); + at += isRTL; + pos = j$2; + } else { ++j$2; } + } + if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); } + } + } + if (direction == "ltr") { + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift(new BidiSpan(0, 0, m[0].length)); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push(new BidiSpan(0, len - m[0].length, len)); + } + } + + return direction == "rtl" ? order.reverse() : order + } + })(); + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line, direction) { + var order = line.order; + if (order == null) { order = line.order = bidiOrdering(line.text, direction); } + return order + } + + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var noHandlers = []; + + var on = function(emitter, type, f) { + if (emitter.addEventListener) { + emitter.addEventListener(type, f, false); + } else if (emitter.attachEvent) { + emitter.attachEvent("on" + type, f); + } else { + var map = emitter._handlers || (emitter._handlers = {}); + map[type] = (map[type] || noHandlers).concat(f); + } + }; + + function getHandlers(emitter, type) { + return emitter._handlers && emitter._handlers[type] || noHandlers + } + + function off(emitter, type, f) { + if (emitter.removeEventListener) { + emitter.removeEventListener(type, f, false); + } else if (emitter.detachEvent) { + emitter.detachEvent("on" + type, f); + } else { + var map = emitter._handlers, arr = map && map[type]; + if (arr) { + var index = indexOf(arr, f); + if (index > -1) + { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); } + } + } + } + + function signal(emitter, type /*, values...*/) { + var handlers = getHandlers(emitter, type); + if (!handlers.length) { return } + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); } + } + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") + { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; } + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore + } + + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity; + if (!arr) { return } + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); + for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1) + { set.push(arr[i]); } } + } + + function hasHandler(emitter, type) { + return getHandlers(emitter, type).length > 0 + } + + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f);}; + ctor.prototype.off = function(type, f) {off(this, type, f);}; + } + + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. + + function e_preventDefault(e) { + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + } + function e_stopPropagation(e) { + if (e.stopPropagation) { e.stopPropagation(); } + else { e.cancelBubble = true; } + } + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false + } + function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} + + function e_target(e) {return e.target || e.srcElement} + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) { b = 1; } + else if (e.button & 2) { b = 3; } + else if (e.button & 4) { b = 2; } + } + if (mac && e.ctrlKey && b == 1) { b = 3; } + return b + } + + // Detect drag-and-drop + var dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) { return false } + var div = elt('div'); + return "draggable" in div || "dragDrop" in div + }(); + + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) + { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); } + } + var node = zwspSupported ? elt("span", "\u200b") : + elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + node.setAttribute("cm-text", ""); + return node + } + + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects; + function hasBadBidiRects(measure) { + if (badBidiRects != null) { return badBidiRects } + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); + var r0 = range(txt, 0, 1).getBoundingClientRect(); + var r1 = range(txt, 1, 2).getBoundingClientRect(); + removeChildren(measure); + if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780) + return badBidiRects = (r1.right - r0.right < 3) + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) { + var pos = 0, result = [], l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) { nl = string.length; } + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result + } : function (string) { return string.split(/\r\n?|\n/); }; + + var hasSelection = window.getSelection ? function (te) { + try { return te.selectionStart != te.selectionEnd } + catch(e) { return false } + } : function (te) { + var range; + try {range = te.ownerDocument.selection.createRange();} + catch(e) {} + if (!range || range.parentElement() != te) { return false } + return range.compareEndPoints("StartToEnd", range) != 0 + }; + + var hasCopyEvent = (function () { + var e = elt("div"); + if ("oncopy" in e) { return true } + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == "function" + })(); + + var badZoomedRects = null; + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) { return badZoomedRects } + var node = removeChildrenAndAdd(measure, elt("span", "x")); + var normal = node.getBoundingClientRect(); + var fromRange = range(node, 0, 1).getBoundingClientRect(); + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1 + } + + // Known modes, by name and by MIME + var modes = {}, mimeModes = {}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + function defineMode(name, mode) { + if (arguments.length > 2) + { mode.dependencies = Array.prototype.slice.call(arguments, 2); } + modes[name] = mode; + } + + function defineMIME(mime, spec) { + mimeModes[mime] = spec; + } + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + function resolveMode(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + if (typeof found == "string") { found = {name: found}; } + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return resolveMode("application/xml") + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { + return resolveMode("application/json") + } + if (typeof spec == "string") { return {name: spec} } + else { return spec || {name: "null"} } + } + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + function getMode(options, spec) { + spec = resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) { return getMode(options, "text/plain") } + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) { continue } + if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; } + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + if (spec.helperType) { modeObj.helperType = spec.helperType; } + if (spec.modeProps) { for (var prop$1 in spec.modeProps) + { modeObj[prop$1] = spec.modeProps[prop$1]; } } + + return modeObj + } + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = {}; + function extendMode(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + copyObj(properties, exts); + } + + function copyState(mode, state) { + if (state === true) { return state } + if (mode.copyState) { return mode.copyState(state) } + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) { val = val.concat([]); } + nstate[n] = val; + } + return nstate + } + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + function innerMode(mode, state) { + var info; + while (mode.innerMode) { + info = mode.innerMode(state); + if (!info || info.mode == mode) { break } + state = info.state; + mode = info.mode; + } + return info || {mode: mode, state: state} + } + + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true + } + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = function(string, tabSize, lineOracle) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; + this.lineOracle = lineOracle; + }; + + StringStream.prototype.eol = function () {return this.pos >= this.string.length}; + StringStream.prototype.sol = function () {return this.pos == this.lineStart}; + StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined}; + StringStream.prototype.next = function () { + if (this.pos < this.string.length) + { return this.string.charAt(this.pos++) } + }; + StringStream.prototype.eat = function (match) { + var ch = this.string.charAt(this.pos); + var ok; + if (typeof match == "string") { ok = ch == match; } + else { ok = ch && (match.test ? match.test(ch) : match(ch)); } + if (ok) {++this.pos; return ch} + }; + StringStream.prototype.eatWhile = function (match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start + }; + StringStream.prototype.eatSpace = function () { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; } + return this.pos > start + }; + StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;}; + StringStream.prototype.skipTo = function (ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true} + }; + StringStream.prototype.backUp = function (n) {this.pos -= n;}; + StringStream.prototype.column = function () { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + }; + StringStream.prototype.indentation = function () { + return countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + }; + StringStream.prototype.match = function (pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) { this.pos += pattern.length; } + return true + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) { return null } + if (match && consume !== false) { this.pos += match[0].length; } + return match + } + }; + StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)}; + StringStream.prototype.hideFirstChars = function (n, inner) { + this.lineStart += n; + try { return inner() } + finally { this.lineStart -= n; } + }; + StringStream.prototype.lookAhead = function (n) { + var oracle = this.lineOracle; + return oracle && oracle.lookAhead(n) + }; + StringStream.prototype.baseToken = function () { + var oracle = this.lineOracle; + return oracle && oracle.baseToken(this.pos) + }; + + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first; + if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") } + var chunk = doc; + while (!chunk.lines) { + for (var i = 0;; ++i) { + var child = chunk.children[i], sz = child.chunkSize(); + if (n < sz) { chunk = child; break } + n -= sz; + } + } + return chunk.lines[n] + } + + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], n = start.line; + doc.iter(start.line, end.line + 1, function (line) { + var text = line.text; + if (n == end.line) { text = text.slice(0, end.ch); } + if (n == start.line) { text = text.slice(start.ch); } + out.push(text); + ++n; + }); + return out + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to) { + var out = []; + doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value + return out + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height; + if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } } + } + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) { return null } + var cur = line.parent, no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) { break } + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first + } + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) { + var child = chunk.children[i$1], ch = child.height; + if (h < ch) { chunk = child; continue outer } + h -= ch; + n += child.chunkSize(); + } + return n + } while (!chunk.lines) + var i = 0; + for (; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], lh = line.height; + if (h < lh) { break } + h -= lh; + } + return n + i + } + + function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size} + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)) + } + + // A Pos instance represents a position within the text. + function Pos(line, ch, sticky) { + if ( sticky === void 0 ) sticky = null; + + if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) } + this.line = line; + this.ch = ch; + this.sticky = sticky; + } + + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + function cmp(a, b) { return a.line - b.line || a.ch - b.ch } + + function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 } + + function copyPos(x) {return Pos(x.line, x.ch)} + function maxPos(a, b) { return cmp(a, b) < 0 ? b : a } + function minPos(a, b) { return cmp(a, b) < 0 ? a : b } + + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))} + function clipPos(doc, pos) { + if (pos.line < doc.first) { return Pos(doc.first, 0) } + var last = doc.first + doc.size - 1; + if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) } + return clipToLen(pos, getLine(doc, pos.line).text.length) + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) { return Pos(pos.line, linelen) } + else if (ch < 0) { return Pos(pos.line, 0) } + else { return pos } + } + function clipPosArray(doc, array) { + var out = []; + for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); } + return out + } + + var SavedContext = function(state, lookAhead) { + this.state = state; + this.lookAhead = lookAhead; + }; + + var Context = function(doc, state, line, lookAhead) { + this.state = state; + this.doc = doc; + this.line = line; + this.maxLookAhead = lookAhead || 0; + this.baseTokens = null; + this.baseTokenPos = 1; + }; + + Context.prototype.lookAhead = function (n) { + var line = this.doc.getLine(this.line + n); + if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; } + return line + }; + + Context.prototype.baseToken = function (n) { + if (!this.baseTokens) { return null } + while (this.baseTokens[this.baseTokenPos] <= n) + { this.baseTokenPos += 2; } + var type = this.baseTokens[this.baseTokenPos + 1]; + return {type: type && type.replace(/( |^)overlay .*/, ""), + size: this.baseTokens[this.baseTokenPos] - n} + }; + + Context.prototype.nextLine = function () { + this.line++; + if (this.maxLookAhead > 0) { this.maxLookAhead--; } + }; + + Context.fromSaved = function (doc, saved, line) { + if (saved instanceof SavedContext) + { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) } + else + { return new Context(doc, copyState(doc.mode, saved), line) } + }; + + Context.prototype.save = function (copy) { + var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state; + return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state + }; + + + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, context, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], lineClasses = {}; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); }, + lineClasses, forceToEnd); + var state = context.state; + + // Run overlays, adjust style array. + var loop = function ( o ) { + context.baseTokens = st; + var overlay = cm.state.overlays[o], i = 1, at = 0; + context.state = true; + runMode(cm, line.text, overlay.mode, context, function (end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) + { st.splice(i, 1, end, st[i+1], i_end); } + i += 2; + at = Math.min(end, i_end); + } + if (!style) { return } + if (overlay.opaque) { + st.splice(start, i - start, end, "overlay " + style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start+1]; + st[start+1] = (cur ? cur + " " : "") + "overlay " + style; + } + } + }, lineClasses); + context.state = state; + context.baseTokens = null; + context.baseTokenPos = 1; + }; + + for (var o = 0; o < cm.state.overlays.length; ++o) loop( o ); + + return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null} + } + + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var context = getContextBefore(cm, lineNo(line)); + var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state); + var result = highlightLine(cm, line, context); + if (resetState) { context.state = resetState; } + line.stateAfter = context.save(!resetState); + line.styles = result.styles; + if (result.classes) { line.styleClasses = result.classes; } + else if (line.styleClasses) { line.styleClasses = null; } + if (updateFrontier === cm.doc.highlightFrontier) + { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); } + } + return line.styles + } + + function getContextBefore(cm, n, precise) { + var doc = cm.doc, display = cm.display; + if (!doc.mode.startState) { return new Context(doc, true, n) } + var start = findStartLine(cm, n, precise); + var saved = start > doc.first && getLine(doc, start - 1).stateAfter; + var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start); + + doc.iter(start, n, function (line) { + processLine(cm, line.text, context); + var pos = context.line; + line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null; + context.nextLine(); + }); + if (precise) { doc.modeFrontier = context.line; } + return context + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, context, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize, context); + stream.start = stream.pos = startAt || 0; + if (text == "") { callBlankLine(mode, context.state); } + while (!stream.eol()) { + readToken(mode, stream, context.state); + stream.start = stream.pos; + } + } + + function callBlankLine(mode, state) { + if (mode.blankLine) { return mode.blankLine(state) } + if (!mode.innerMode) { return } + var inner = innerMode(mode, state); + if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) } + } + + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) { inner[0] = innerMode(mode, state).mode; } + var style = mode.token(stream, state); + if (stream.pos > stream.start) { return style } + } + throw new Error("Mode " + mode.name + " failed to advance stream.") + } + + var Token = function(stream, type, state) { + this.start = stream.start; this.end = stream.pos; + this.string = stream.current(); + this.type = type || null; + this.state = state; + }; + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + var doc = cm.doc, mode = doc.mode, style; + pos = clipPos(doc, pos); + var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise); + var stream = new StringStream(line.text, cm.options.tabSize, context), tokens; + if (asArray) { tokens = []; } + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos; + style = readToken(mode, stream, context.state); + if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); } + } + return asArray ? tokens : new Token(stream, style, context.state) + } + + function extractLineClasses(type, output) { + if (type) { for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!lineClass) { break } + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (output[prop] == null) + { output[prop] = lineClass[2]; } + else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) + { output[prop] += " " + lineClass[2]; } + } } + return type + } + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; } + var curStart = 0, curStyle = null; + var stream = new StringStream(text, cm.options.tabSize, context), style; + var inner = cm.options.addModeClass && [null]; + if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); } + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) { processLine(cm, text, context, stream.pos); } + stream.pos = text.length; + style = null; + } else { + style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses); + } + if (inner) { + var mName = inner[0].name; + if (mName) { style = "m-" + (style ? mName + " " + style : mName); } + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 5000); + f(curStart, curStyle); + } + curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 + // characters, and returns inaccurate measurements in nodes + // starting around 5000 chars. + var pos = Math.min(stream.pos, curStart + 5000); + f(pos, curStyle); + curStart = pos; + } + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, minline, doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) { return doc.first } + var line = getLine(doc, search - 1), after = line.stateAfter; + if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) + { return search } + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline + } + + function retreatFrontier(doc, n) { + doc.modeFrontier = Math.min(doc.modeFrontier, n); + if (doc.highlightFrontier < n - 10) { return } + var start = doc.first; + for (var line = n - 1; line > start; line--) { + var saved = getLine(doc, line).stateAfter; + // change is on 3 + // state on line 1 looked ahead 2 -- so saw 3 + // test 1 + 2 < 3 should cover this + if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) { + start = line + 1; + break + } + } + doc.highlightFrontier = Math.min(doc.highlightFrontier, start); + } + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, sawCollapsedSpans = false; + + function seeReadOnlySpans() { + sawReadOnlySpans = true; + } + + function seeCollapsedSpans() { + sawCollapsedSpans = true; + } + + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker; + this.from = from; this.to = to; + } + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) { for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) { return span } + } } + } + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + var r; + for (var i = 0; i < spans.length; ++i) + { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } } + return r + } + // Add a span to a line. + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + span.marker.attachLine(line); + } + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + var nw; + if (old) { for (var i = 0; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) + ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); + } + } } + return nw + } + function markedSpansAfter(old, endCh, isInsert) { + var nw; + if (old) { for (var i = 0; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh) + ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh)); + } + } } + return nw + } + + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) { return null } + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) { return null } + + var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) { span.to = startCh; } + else if (sameLine) { span.to = found.to == null ? null : found.to + offset; } + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i$1 = 0; i$1 < last.length; ++i$1) { + var span$1 = last[i$1]; + if (span$1.to != null) { span$1.to += offset; } + if (span$1.from == null) { + var found$1 = getMarkedSpanFor(first, span$1.marker); + if (!found$1) { + span$1.from = offset; + if (sameLine) { (first || (first = [])).push(span$1); } + } + } else { + span$1.from += offset; + if (sameLine) { (first || (first = [])).push(span$1); } + } + } + } + // Make sure we didn't create any zero-length spans + if (first) { first = clearEmptySpans(first); } + if (last && last != first) { last = clearEmptySpans(last); } + + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, gapMarkers; + if (gap > 0 && first) + { for (var i$2 = 0; i$2 < first.length; ++i$2) + { if (first[i$2].to == null) + { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } } + for (var i$3 = 0; i$3 < gap; ++i$3) + { newMarkers.push(gapMarkers); } + newMarkers.push(last); + } + return newMarkers + } + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) + { spans.splice(i--, 1); } + } + if (!spans.length) { return null } + return spans + } + + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function (line) { + if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + { (markers || (markers = [])).push(mark); } + } } + }); + if (!markers) { return null } + var parts = [{from: from, to: to}]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], m = mk.find(0); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue } + var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) + { newParts.push({from: p.from, to: m.from}); } + if (dto > 0 || !mk.inclusiveRight && !dto) + { newParts.push({from: m.to, to: p.to}); } + parts.splice.apply(parts, newParts); + j += newParts.length - 3; + } + } + return parts + } + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) { return } + for (var i = 0; i < spans.length; ++i) + { spans[i].marker.detachLine(line); } + line.markedSpans = null; + } + function attachMarkedSpans(line, spans) { + if (!spans) { return } + for (var i = 0; i < spans.length; ++i) + { spans[i].marker.attachLine(line); } + line.markedSpans = spans; + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 } + function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length; + if (lenDiff != 0) { return lenDiff } + var aPos = a.find(), bPos = b.find(); + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); + if (fromCmp) { return -fromCmp } + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); + if (toCmp) { return toCmp } + return b.id - a.id + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) + { found = sp.marker; } + } } + return found + } + function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) } + function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) } + + function collapsedSpanAround(line, ch) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) { for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; } + } } + return found + } + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo); + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) { for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (!sp.marker.collapsed) { continue } + var found = sp.marker.find(0); + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue } + if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || + fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) + { return true } + } } + } + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged; + while (merged = collapsedSpanAtStart(line)) + { line = merged.find(-1, true).line; } + return line + } + + function visualLineEnd(line) { + var merged; + while (merged = collapsedSpanAtEnd(line)) + { line = merged.find(1, true).line; } + return line + } + + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line + ;(lines || (lines = [])).push(line); + } + return lines + } + + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), vis = visualLine(line); + if (line == vis) { return lineN } + return lineNo(vis) + } + + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) { return lineN } + var line = getLine(doc, lineN), merged; + if (!lineIsHidden(doc, line)) { return lineN } + while (merged = collapsedSpanAtEnd(line)) + { line = merged.find(1, true).line; } + return lineNo(line) + 1 + } + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) { continue } + if (sp.from == null) { return true } + if (sp.marker.widgetNode) { continue } + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + { return true } + } } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true); + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)) + } + if (span.marker.inclusiveRight && span.to == line.text.length) + { return true } + for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) { return true } + } + } + + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj); + + var h = 0, chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) { break } + else { h += line.height; } + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i$1 = 0; i$1 < p.children.length; ++i$1) { + var cur = p.children[i$1]; + if (cur == chunk) { break } + else { h += cur.height; } + } + } + return h + } + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) { return 0 } + var len = line.text.length, merged, cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(0, true); + cur = found.from.line; + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found$1 = merged.find(0, true); + len -= cur.text.length - found$1.from.ch; + cur = found$1.to.line; + len += cur.text.length - found$1.to.ch; + } + return len + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(d.maxLine); + d.maxLineChanged = true; + doc.iter(function (line) { + var len = lineLength(line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = function(text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; + }; + + Line.prototype.lineNo = function () { return lineNo(this) }; + eventMixin(Line); + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) { line.stateAfter = null; } + if (line.styles) { line.styles = null; } + if (line.order != null) { line.order = null; } + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) { updateLineHeight(line, estHeight); } + } + + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, styleToClassCacheWithMode = {}; + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) { return null } + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; + return cache[style] || + (cache[style] = style.replace(/\S+/g, "cm-$&")) + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null); + var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content, + col: 0, pos: 0, cm: cm, + trailingSpace: false, + splitSpaces: cm.getOption("lineWrapping")}; + lineView.measure = {}; + + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0); + builder.pos = 0; + builder.addToken = buildToken; + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) + { builder.addToken = buildTokenBadBidi(builder.addToken, order); } + builder.map = []; + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); + if (line.styleClasses) { + if (line.styleClasses.bgClass) + { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); } + if (line.styleClasses.textClass) + { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); } + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) + { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); } + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map; + lineView.measure.cache = {}; + } else { + (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map) + ;(lineView.measure.caches || (lineView.measure.caches = [])).push({}); + } + } + + // See issue #2901 + if (webkit) { + var last = builder.content.lastChild; + if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab"))) + { builder.content.className = "cm-tab-wrap-hack"; } + } + + signal(cm, "renderLine", cm, lineView.line, builder.pre); + if (builder.pre.className) + { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); } + + return builder + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + token.setAttribute("aria-label", token.title); + return token + } + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, css, attributes) { + if (!text) { return } + var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text; + var special = builder.cm.state.specialChars, mustWrap = false; + var content; + if (!special.test(text)) { + builder.col += text.length; + content = document.createTextNode(displayText); + builder.map.push(builder.pos, builder.pos + text.length, content); + if (ie && ie_version < 9) { mustWrap = true; } + builder.pos += text.length; + } else { + content = document.createDocumentFragment(); + var pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); + if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); } + else { content.appendChild(txt); } + builder.map.push(builder.pos, builder.pos + skipped, txt); + builder.col += skipped; + builder.pos += skipped; + } + if (!m) { break } + pos += skipped + 1; + var txt$1 = (void 0); + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; + txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + txt$1.setAttribute("role", "presentation"); + txt$1.setAttribute("cm-text", "\t"); + builder.col += tabWidth; + } else if (m[0] == "\r" || m[0] == "\n") { + txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar")); + txt$1.setAttribute("cm-text", m[0]); + builder.col += 1; + } else { + txt$1 = builder.cm.options.specialCharPlaceholder(m[0]); + txt$1.setAttribute("cm-text", m[0]); + if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); } + else { content.appendChild(txt$1); } + builder.col += 1; + } + builder.map.push(builder.pos, builder.pos + 1, txt$1); + builder.pos++; + } + } + builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32; + if (style || startStyle || endStyle || mustWrap || css) { + var fullStyle = style || ""; + if (startStyle) { fullStyle += startStyle; } + if (endStyle) { fullStyle += endStyle; } + var token = elt("span", [content], fullStyle, css); + if (attributes) { + for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") + { token.setAttribute(attr, attributes[attr]); } } + } + return builder.content.appendChild(token) + } + builder.content.appendChild(content); + } + + // Change some spaces to NBSP to prevent the browser from collapsing + // trailing spaces at the end of a line when rendering text (issue #1362). + function splitSpaces(text, trailingBefore) { + if (text.length > 1 && !/ /.test(text)) { return text } + var spaceBefore = trailingBefore, result = ""; + for (var i = 0; i < text.length; i++) { + var ch = text.charAt(i); + if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) + { ch = "\u00a0"; } + result += ch; + spaceBefore = ch == " "; + } + return result + } + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function (builder, text, style, startStyle, endStyle, css, attributes) { + style = style ? style + " cm-force-border" : "cm-force-border"; + var start = builder.pos, end = start + text.length; + for (;;) { + // Find the part that overlaps with the start of this text + var part = (void 0); + for (var i = 0; i < order.length; i++) { + part = order[i]; + if (part.to > start && part.from <= start) { break } + } + if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) } + inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes); + startStyle = null; + text = text.slice(part.to - start); + start = part.to; + } + } + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode; + if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); } + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) + { widget = builder.content.appendChild(document.createElement("span")); } + widget.setAttribute("cm-marker", marker.id); + } + if (widget) { + builder.cm.display.input.setUneditable(widget); + builder.content.appendChild(widget); + } + builder.pos += size; + builder.trailingSpace = false; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, allText = line.text, at = 0; + if (!spans) { + for (var i$1 = 1; i$1 < styles.length; i$1+=2) + { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); } + return + } + + var len = allText.length, pos = 0, i = 1, text = "", style, css; + var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = css = ""; + attributes = null; + collapsed = null; nextChange = Infinity; + var foundBookmarks = [], endStyles = (void 0); + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], m = sp.marker; + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m); + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to; + spanEndStyle = ""; + } + if (m.className) { spanStyle += " " + m.className; } + if (m.css) { css = (css ? css + ";" : "") + m.css; } + if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; } + if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); } + // support for the old title property + // https://github.com/codemirror/CodeMirror/pull/5673 + if (m.title) { (attributes || (attributes = {})).title = m.title; } + if (m.attributes) { + for (var attr in m.attributes) + { (attributes || (attributes = {}))[attr] = m.attributes[attr]; } + } + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) + { collapsed = sp; } + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + } + if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) + { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } } + + if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) + { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, collapsed.from == null); + if (collapsed.to == null) { return } + if (collapsed.to == pos) { collapsed = false; } + } + } + if (pos >= len) { break } + + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes); + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break} + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder.cm.options); + } + } + } + + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line; + // Continuing lines, if any + this.rest = visualLineContinued(line); + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; + this.node = this.text = null; + this.hidden = lineIsHidden(doc, line); + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], nextPos; + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); + nextPos = pos + view.size; + array.push(view); + } + return array + } + + var operationGroup = null; + + function pushOperation(op) { + if (operationGroup) { + operationGroup.ops.push(op); + } else { + op.ownsGroup = operationGroup = { + ops: [op], + delayedCallbacks: [] + }; + } + } + + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, i = 0; + do { + for (; i < callbacks.length; i++) + { callbacks[i].call(null); } + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j]; + if (op.cursorActivityHandlers) + { while (op.cursorActivityCalled < op.cursorActivityHandlers.length) + { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } } + } + } while (i < callbacks.length) + } + + function finishOperation(op, endCb) { + var group = op.ownsGroup; + if (!group) { return } + + try { fireCallbacksForOps(group); } + finally { + operationGroup = null; + endCb(group); + } + } + + var orphanDelayedCallbacks = null; + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = getHandlers(emitter, type); + if (!arr.length) { return } + var args = Array.prototype.slice.call(arguments, 2), list; + if (operationGroup) { + list = operationGroup.delayedCallbacks; + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks; + } else { + list = orphanDelayedCallbacks = []; + setTimeout(fireOrphanDelayed, 0); + } + var loop = function ( i ) { + list.push(function () { return arr[i].apply(null, args); }); + }; + + for (var i = 0; i < arr.length; ++i) + loop( i ); + } + + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks; + orphanDelayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) { delayed[i](); } + } + + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j]; + if (type == "text") { updateLineText(cm, lineView); } + else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); } + else if (type == "class") { updateLineClasses(cm, lineView); } + else if (type == "widget") { updateLineWidgets(cm, lineView, dims); } + } + lineView.changes = null; + } + + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative"); + if (lineView.text.parentNode) + { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); } + lineView.node.appendChild(lineView.text); + if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; } + } + return lineView.node + } + + function updateLineBackground(cm, lineView) { + var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; + if (cls) { cls += " CodeMirror-linebackground"; } + if (lineView.background) { + if (cls) { lineView.background.className = cls; } + else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } + } else if (cls) { + var wrap = ensureLineWrapped(lineView); + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); + cm.display.input.setUneditable(lineView.background); + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured; + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null; + lineView.measure = ext.measure; + return ext.built + } + return buildLineContent(cm, lineView) + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className; + var built = getLineContent(cm, lineView); + if (lineView.text == lineView.node) { lineView.node = built.pre; } + lineView.text.parentNode.replaceChild(built.pre, lineView.text); + lineView.text = built.pre; + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass; + lineView.textClass = built.textClass; + updateLineClasses(cm, lineView); + } else if (cls) { + lineView.text.className = cls; + } + } + + function updateLineClasses(cm, lineView) { + updateLineBackground(cm, lineView); + if (lineView.line.wrapClass) + { ensureLineWrapped(lineView).className = lineView.line.wrapClass; } + else if (lineView.node != lineView.text) + { lineView.node.className = ""; } + var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; + lineView.text.className = textClass || ""; + } + + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter); + lineView.gutter = null; + } + if (lineView.gutterBackground) { + lineView.node.removeChild(lineView.gutterBackground); + lineView.gutterBackground = null; + } + if (lineView.line.gutterClass) { + var wrap = ensureLineWrapped(lineView); + lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, + ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px")); + cm.display.input.setUneditable(lineView.gutterBackground); + wrap.insertBefore(lineView.gutterBackground, lineView.text); + } + var markers = lineView.line.gutterMarkers; + if (cm.options.lineNumbers || markers) { + var wrap$1 = ensureLineWrapped(lineView); + var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px")); + cm.display.input.setUneditable(gutterWrap); + wrap$1.insertBefore(gutterWrap, lineView.text); + if (lineView.line.gutterClass) + { gutterWrap.className += " " + lineView.line.gutterClass; } + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + { lineView.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); } + if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) { + var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id]; + if (found) + { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", + ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); } + } } + } + } + + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) { lineView.alignable = null; } + var isWidget = classTest("CodeMirror-linewidget"); + for (var node = lineView.node.firstChild, next = (void 0); node; node = next) { + next = node.nextSibling; + if (isWidget.test(node.className)) { lineView.node.removeChild(node); } + } + insertLineWidgets(cm, lineView, dims); + } + + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView); + lineView.text = lineView.node = built.pre; + if (built.bgClass) { lineView.bgClass = built.bgClass; } + if (built.textClass) { lineView.textClass = built.textClass; } + + updateLineClasses(cm, lineView); + updateLineGutter(cm, lineView, lineN, dims); + insertLineWidgets(cm, lineView, dims); + return lineView.node + } + + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); + if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++) + { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } } + } + + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) { return } + var wrap = ensureLineWrapped(lineView); + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : "")); + if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); } + positionLineWidget(widget, node, lineView, dims); + cm.display.input.setUneditable(node); + if (allowAbove && widget.above) + { wrap.insertBefore(node, lineView.gutter || lineView.text); } + else + { wrap.appendChild(node); } + signalLater(widget, "redraw"); + } + } + + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + (lineView.alignable || (lineView.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; } + } + } + + function widgetHeight(widget) { + if (widget.height != null) { return widget.height } + var cm = widget.doc.cm; + if (!cm) { return 0 } + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;"; + if (widget.coverGutter) + { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; } + if (widget.noHScroll) + { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; } + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); + } + return widget.height = widget.node.parentNode.offsetHeight + } + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover)) + { return true } + } + } + + // POSITION MEASUREMENT + + function paddingTop(display) {return display.lineSpace.offsetTop} + function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight} + function paddingH(display) { + if (display.cachedPaddingH) { return display.cachedPaddingH } + var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like")); + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; + var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; + if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; } + return data + } + + function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping; + var curWidth = wrapping && displayWidth(cm); + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + var heights = lineView.measure.heights = []; + if (wrapping) { + lineView.measure.width = curWidth; + var rects = lineView.text.firstChild.getClientRects(); + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], next = rects[i + 1]; + if (Math.abs(cur.bottom - next.bottom) > 2) + { heights.push((cur.bottom + next.top) / 2 - rect.top); } + } + } + heights.push(rect.bottom - rect.top); + } + } + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) + { return {map: lineView.measure.map, cache: lineView.measure.cache} } + for (var i = 0; i < lineView.rest.length; i++) + { if (lineView.rest[i] == line) + { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } } + for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) + { if (lineNo(lineView.rest[i$1]) > lineN) + { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } } + } + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line); + var lineN = lineNo(line); + var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); + view.lineN = lineN; + var built = view.built = buildLineContent(cm, view); + view.text = built.pre; + removeChildrenAndAdd(cm.display.lineMeasure, built.pre); + return view + } + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias) + } + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) + { return cm.display.view[findViewIndex(cm, lineN)] } + var ext = cm.display.externalMeasured; + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) + { return ext } + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line); + var view = findViewForLine(cm, lineN); + if (view && !view.text) { + view = null; + } else if (view && view.changes) { + updateLineForChanges(cm, view, lineN, getDimensions(cm)); + cm.curOp.forceUpdate = true; + } + if (!view) + { view = updateExternalMeasurement(cm, line); } + + var info = mapFromLineView(view, line, lineN); + return { + line: line, view: view, rect: null, + map: info.map, cache: info.cache, before: info.before, + hasHeights: false + } + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) { ch = -1; } + var key = ch + (bias || ""), found; + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key]; + } else { + if (!prepared.rect) + { prepared.rect = prepared.view.text.getBoundingClientRect(); } + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect); + prepared.hasHeights = true; + } + found = measureCharInner(cm, prepared, ch, bias); + if (!found.bogus) { prepared.cache[key] = found; } + } + return {left: found.left, right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom} + } + + var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; + + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse, mStart, mEnd; + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + mStart = map[i]; + mEnd = map[i + 1]; + if (ch < mStart) { + start = 0; end = 1; + collapse = "left"; + } else if (ch < mEnd) { + start = ch - mStart; + end = start + 1; + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart; + start = end - 1; + if (ch >= mEnd) { collapse = "right"; } + } + if (start != null) { + node = map[i + 2]; + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) + { collapse = bias; } + if (bias == "left" && start == 0) + { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2]; + collapse = "left"; + } } + if (bias == "right" && start == mEnd - mStart) + { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2]; + collapse = "right"; + } } + break + } + } + return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd} + } + + function getUsefulRect(rects, bias) { + var rect = nullRect; + if (bias == "left") { for (var i = 0; i < rects.length; i++) { + if ((rect = rects[i]).left != rect.right) { break } + } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) { + if ((rect = rects[i$1]).left != rect.right) { break } + } } + return rect + } + + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); + var node = place.node, start = place.start, end = place.end, collapse = place.collapse; + + var rect; + if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. + for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; } + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; } + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) + { rect = node.parentNode.getBoundingClientRect(); } + else + { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); } + if (rect.left || rect.right || start == 0) { break } + end = start; + start = start - 1; + collapse = "right"; + } + if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); } + } else { // If it is a widget, simply get the box for the whole widget. + if (start > 0) { collapse = bias = "right"; } + var rects; + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) + { rect = rects[bias == "right" ? rects.length - 1 : 0]; } + else + { rect = node.getBoundingClientRect(); } + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + var rSpan = node.parentNode.getClientRects()[0]; + if (rSpan) + { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; } + else + { rect = nullRect; } + } + + var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; + var mid = (rtop + rbot) / 2; + var heights = prepared.view.measure.heights; + var i = 0; + for (; i < heights.length - 1; i++) + { if (mid < heights[i]) { break } } + var top = i ? heights[i - 1] : 0, bot = heights[i]; + var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, bottom: bot}; + if (!rect.left && !rect.right) { result.bogus = true; } + if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } + + return result + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) + { return rect } + var scaleX = screen.logicalXDPI / screen.deviceXDPI; + var scaleY = screen.logicalYDPI / screen.deviceYDPI; + return {left: rect.left * scaleX, right: rect.right * scaleX, + top: rect.top * scaleY, bottom: rect.bottom * scaleY} + } + + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {}; + lineView.measure.heights = null; + if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++) + { lineView.measure.caches[i] = {}; } } + } + } + + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null; + removeChildren(cm.display.lineMeasure); + for (var i = 0; i < cm.display.view.length; i++) + { clearLineMeasurementCacheFor(cm.display.view[i]); } + } + + function clearCaches(cm) { + clearLineMeasurementCache(cm); + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; + if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; } + cm.display.lineNumChars = null; + } + + function pageScrollX() { + // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206 + // which causes page_Offset and bounding client rects to use + // different reference viewports and invalidate our calculations. + if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) } + return window.pageXOffset || (document.documentElement || document.body).scrollLeft + } + function pageScrollY() { + if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) } + return window.pageYOffset || (document.documentElement || document.body).scrollTop + } + + function widgetTopHeight(lineObj) { + var height = 0; + if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above) + { height += widgetHeight(lineObj.widgets[i]); } } } + return height + } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"./null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) { + if (!includeWidgets) { + var height = widgetTopHeight(lineObj); + rect.top += height; rect.bottom += height; + } + if (context == "line") { return rect } + if (!context) { context = "local"; } + var yOff = heightAtLine(lineObj); + if (context == "local") { yOff += paddingTop(cm.display); } + else { yOff -= cm.display.viewOffset; } + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"./null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") { return coords } + var left = coords.left, top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(); + top -= pageScrollY(); + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect(); + left += localBox.left; + top += localBox.top; + } + + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top} + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) { lineObj = getLine(cm.doc, pos.line); } + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context) + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + // A cursor Pos(line, char, "before") is on the same visual line as `char - 1` + // and after `char - 1` in writing order of `char - 1` + // A cursor Pos(line, char, "after") is on the same visual line as `char` + // and before `char` in writing order of `char` + // Examples (upper-case letters are RTL, lower-case are LTR): + // Pos(0, 1, ...) + // before after + // ab a|b a|b + // aB a|B aB| + // Ab |Ab A|b + // AB B|A B|A + // Every position after the last character on a line is considered to stick + // to the last character on the line. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); } + function get(ch, right) { + var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); + if (right) { m.left = m.right; } else { m.right = m.left; } + return intoCoordSystem(cm, lineObj, m, context) + } + var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky; + if (ch >= lineObj.text.length) { + ch = lineObj.text.length; + sticky = "before"; + } else if (ch <= 0) { + ch = 0; + sticky = "after"; + } + if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") } + + function getBidi(ch, partPos, invert) { + var part = order[partPos], right = part.level == 1; + return get(invert ? ch - 1 : ch, right != invert) + } + var partPos = getBidiPartAt(order, ch, sticky); + var other = bidiOther; + var val = getBidi(ch, partPos, sticky == "before"); + if (other != null) { val.other = getBidi(ch, other, sticky != "before"); } + return val + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0; + pos = clipPos(cm.doc, pos); + if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; } + var lineObj = getLine(cm.doc, pos.line); + var top = heightAtLine(lineObj) + paddingTop(cm.display); + return {left: left, right: left, top: top, bottom: top + lineObj.height} + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, sticky, outside, xRel) { + var pos = Pos(line, ch, sticky); + pos.xRel = xRel; + if (outside) { pos.outside = outside; } + return pos + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) } + var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; + if (lineN > last) + { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) } + if (x < 0) { x = 0; } + + var lineObj = getLine(doc, lineN); + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y); + var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0)); + if (!collapsed) { return found } + var rangeEnd = collapsed.find(1); + if (rangeEnd.line == lineN) { return rangeEnd } + lineObj = getLine(doc, lineN = rangeEnd.line); + } + } + + function wrappedLineExtent(cm, lineObj, preparedMeasure, y) { + y -= widgetTopHeight(lineObj); + var end = lineObj.text.length; + var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0); + end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end); + return {begin: begin, end: end} + } + + function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) { + if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); } + var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top; + return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop) + } + + // Returns true if the given side of a box is after the given + // coordinates, in top-to-bottom, left-to-right order. + function boxIsAfter(box, x, y, left) { + return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + // Move y into line-local coordinate space + y -= heightAtLine(lineObj); + var preparedMeasure = prepareMeasureForLine(cm, lineObj); + // When directly calling `measureCharPrepared`, we have to adjust + // for the widgets at this line. + var widgetHeight = widgetTopHeight(lineObj); + var begin = 0, end = lineObj.text.length, ltr = true; + + var order = getOrder(lineObj, cm.doc.direction); + // If the line isn't plain left-to-right text, first figure out + // which bidi section the coordinates fall into. + if (order) { + var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart) + (cm, lineObj, lineNo, preparedMeasure, order, x, y); + ltr = part.level != 1; + // The awkward -1 offsets are needed because findFirst (called + // on these below) will treat its first bound as inclusive, + // second as exclusive, but we want to actually address the + // characters in the part's range + begin = ltr ? part.from : part.to - 1; + end = ltr ? part.to : part.from - 1; + } + + // A binary search to find the first character whose bounding box + // starts after the coordinates. If we run across any whose box wrap + // the coordinates, store that. + var chAround = null, boxAround = null; + var ch = findFirst(function (ch) { + var box = measureCharPrepared(cm, preparedMeasure, ch); + box.top += widgetHeight; box.bottom += widgetHeight; + if (!boxIsAfter(box, x, y, false)) { return false } + if (box.top <= y && box.left <= x) { + chAround = ch; + boxAround = box; + } + return true + }, begin, end); + + var baseX, sticky, outside = false; + // If a box around the coordinates was found, use that + if (boxAround) { + // Distinguish coordinates nearer to the left or right side of the box + var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr; + ch = chAround + (atStart ? 0 : 1); + sticky = atStart ? "after" : "before"; + baseX = atLeft ? boxAround.left : boxAround.right; + } else { + // (Adjust for extended bound, if necessary.) + if (!ltr && (ch == end || ch == begin)) { ch++; } + // To determine which side to associate with, get the box to the + // left of the character and compare it's vertical position to the + // coordinates + sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : + (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ? + "after" : "before"; + // Now get accurate coordinates for this place, in order to get a + // base X position + var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure); + baseX = coords.left; + outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0; + } + + ch = skipExtendingChars(lineObj.text, ch, 1); + return PosWithInfo(lineNo, ch, sticky, outside, x - baseX) + } + + function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) { + // Bidi parts are sorted left-to-right, and in a non-line-wrapping + // situation, we can take this ordering to correspond to the visual + // ordering. This finds the first part whose end is after the given + // coordinates. + var index = findFirst(function (i) { + var part = order[i], ltr = part.level != 1; + return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), + "line", lineObj, preparedMeasure), x, y, true) + }, 0, order.length - 1); + var part = order[index]; + // If this isn't the first part, the part's start is also after + // the coordinates, and the coordinates aren't on the same line as + // that start, move one part back. + if (index > 0) { + var ltr = part.level != 1; + var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), + "line", lineObj, preparedMeasure); + if (boxIsAfter(start, x, y, true) && start.top > y) + { part = order[index - 1]; } + } + return part + } + + function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) { + // In a wrapped line, rtl text on wrapping boundaries can do things + // that don't correspond to the ordering in our `order` array at + // all, so a binary search doesn't work, and we want to return a + // part that only spans one line so that the binary search in + // coordsCharInner is safe. As such, we first find the extent of the + // wrapped line, and then do a flat search in which we discard any + // spans that aren't on the line. + var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y); + var begin = ref.begin; + var end = ref.end; + if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; } + var part = null, closestDist = null; + for (var i = 0; i < order.length; i++) { + var p = order[i]; + if (p.from >= end || p.to <= begin) { continue } + var ltr = p.level != 1; + var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right; + // Weigh against spans ending before this, so that they are only + // picked if nothing ends after + var dist = endX < x ? x - endX + 1e9 : endX - x; + if (!part || closestDist > dist) { + part = p; + closestDist = dist; + } + } + if (!part) { part = order[order.length - 1]; } + // Clip the part to the wrapped line. + if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; } + if (part.to > end) { part = {from: part.from, to: end, level: part.level}; } + return part + } + + var measureText; + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) { return display.cachedTextHeight } + if (measureText == null) { + measureText = elt("pre", null, "CodeMirror-line-like"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) { display.cachedTextHeight = height; } + removeChildren(display.measure); + return height || 1 + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) { return display.cachedCharWidth } + var anchor = elt("span", "xxxxxxxxxx"); + var pre = elt("pre", [anchor], "CodeMirror-line-like"); + removeChildrenAndAdd(display.measure, pre); + var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; + if (width > 2) { display.cachedCharWidth = width; } + return width || 10 + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, left = {}, width = {}; + var gutterLeft = d.gutters.clientLeft; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + var id = cm.display.gutterSpecs[i].className; + left[id] = n.offsetLeft + n.clientLeft + gutterLeft; + width[id] = n.clientWidth; + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth} + } + + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left + } + + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function (line) { + if (lineIsHidden(cm.doc, line)) { return 0 } + + var widgetsHeight = 0; + if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; } + } } + + if (wrapping) + { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th } + else + { return widgetsHeight + th } + } + } + + function estimateLineHeights(cm) { + var doc = cm.doc, est = estimateHeight(cm); + doc.iter(function (line) { + var estHeight = est(line); + if (estHeight != line.height) { updateLineHeight(line, estHeight); } + }); + } + + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display; + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null } + + var x, y, space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX - space.left; y = e.clientY - space.top; } + catch (e) { return null } + var coords = coordsChar(cm, x, y), line; + if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); + } + return coords + } + + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) { return null } + n -= cm.display.viewFrom; + if (n < 0) { return null } + var view = cm.display.view; + for (var i = 0; i < view.length; i++) { + n -= view[i].size; + if (n < 0) { return i } + } + } + + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) { from = cm.doc.first; } + if (to == null) { to = cm.doc.first + cm.doc.size; } + if (!lendiff) { lendiff = 0; } + + var display = cm.display; + if (lendiff && to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from)) + { display.updateLineNumbers = from; } + + cm.curOp.viewChanged = true; + + if (from >= display.viewTo) { // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) + { resetView(cm); } + } else if (to <= display.viewFrom) { // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm); + } else { + display.viewFrom += lendiff; + display.viewTo += lendiff; + } + } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap + resetView(cm); + } else if (from <= display.viewFrom) { // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cut) { + display.view = display.view.slice(cut.index); + display.viewFrom = cut.lineN; + display.viewTo += lendiff; + } else { + resetView(cm); + } + } else if (to >= display.viewTo) { // Bottom overlap + var cut$1 = viewCuttingPoint(cm, from, from, -1); + if (cut$1) { + display.view = display.view.slice(0, cut$1.index); + display.viewTo = cut$1.lineN; + } else { + resetView(cm); + } + } else { // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1); + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)); + display.viewTo += lendiff; + } else { + resetView(cm); + } + } + + var ext = display.externalMeasured; + if (ext) { + if (to < ext.lineN) + { ext.lineN += lendiff; } + else if (from < ext.lineN + ext.size) + { display.externalMeasured = null; } + } + } + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true; + var display = cm.display, ext = cm.display.externalMeasured; + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) + { display.externalMeasured = null; } + + if (line < display.viewFrom || line >= display.viewTo) { return } + var lineView = display.view[findViewIndex(cm, line)]; + if (lineView.node == null) { return } + var arr = lineView.changes || (lineView.changes = []); + if (indexOf(arr, type) == -1) { arr.push(type); } + } + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first; + cm.display.view = []; + cm.display.viewOffset = 0; + } + + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), diff, view = cm.display.view; + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) + { return {index: index, lineN: newN} } + var n = cm.display.viewFrom; + for (var i = 0; i < index; i++) + { n += view[i].size; } + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) { return null } + diff = (n + view[index].size) - oldN; + index++; + } else { + diff = n - oldN; + } + oldN += diff; newN += diff; + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) { return null } + newN += dir * view[index - (dir < 0 ? 1 : 0)].size; + index += dir; + } + return {index: index, lineN: newN} + } + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, view = display.view; + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to); + display.viewFrom = from; + } else { + if (display.viewFrom > from) + { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); } + else if (display.viewFrom < from) + { display.view = display.view.slice(findViewIndex(cm, from)); } + display.viewFrom = from; + if (display.viewTo < to) + { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); } + else if (display.viewTo > to) + { display.view = display.view.slice(0, findViewIndex(cm, to)); } + } + display.viewTo = to; + } + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, dirty = 0; + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; } + } + return dirty + } + + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()); + } + + function prepareSelection(cm, primary) { + if ( primary === void 0 ) primary = true; + + var doc = cm.doc, result = {}; + var curFragment = result.cursors = document.createDocumentFragment(); + var selFragment = result.selection = document.createDocumentFragment(); + + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (!primary && i == doc.sel.primIndex) { continue } + var range = doc.sel.ranges[i]; + if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue } + var collapsed = range.empty(); + if (collapsed || cm.options.showCursorWhenSelecting) + { drawSelectionCursor(cm, range.head, curFragment); } + if (!collapsed) + { drawSelectionRange(cm, range, selFragment); } + } + return result + } + + // Draws a cursor for the given range + function drawSelectionCursor(cm, head, output) { + var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine); + + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); + cursor.style.left = pos.left + "px"; + cursor.style.top = pos.top + "px"; + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); + otherCursor.style.display = ""; + otherCursor.style.left = pos.other.left + "px"; + otherCursor.style.top = pos.other.top + "px"; + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } + } + + function cmpCoords(a, b) { return a.top - b.top || a.left - b.left } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, doc = cm.doc; + var fragment = document.createDocumentFragment(); + var padding = paddingH(cm.display), leftSide = padding.left; + var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; + var docLTR = doc.direction == "ltr"; + + function add(left, top, width, bottom) { + if (top < 0) { top = 0; } + top = Math.round(top); + bottom = Math.round(bottom); + fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px"))); + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias) + } + + function wrapX(pos, dir, side) { + var extent = wrappedLineExtentChar(cm, lineObj, null, pos); + var prop = (dir == "ltr") == (side == "after") ? "left" : "right"; + var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1); + return coords(ch, prop)[prop] + } + + var order = getOrder(lineObj, doc.direction); + iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) { + var ltr = dir == "ltr"; + var fromPos = coords(from, ltr ? "left" : "right"); + var toPos = coords(to - 1, ltr ? "right" : "left"); + + var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen; + var first = i == 0, last = !order || i == order.length - 1; + if (toPos.top - fromPos.top <= 3) { // Single line + var openLeft = (docLTR ? openStart : openEnd) && first; + var openRight = (docLTR ? openEnd : openStart) && last; + var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left; + var right = openRight ? rightSide : (ltr ? toPos : fromPos).right; + add(left, fromPos.top, right - left, fromPos.bottom); + } else { // Multiple lines + var topLeft, topRight, botLeft, botRight; + if (ltr) { + topLeft = docLTR && openStart && first ? leftSide : fromPos.left; + topRight = docLTR ? rightSide : wrapX(from, dir, "before"); + botLeft = docLTR ? leftSide : wrapX(to, dir, "after"); + botRight = docLTR && openEnd && last ? rightSide : toPos.right; + } else { + topLeft = !docLTR ? leftSide : wrapX(from, dir, "before"); + topRight = !docLTR && openStart && first ? rightSide : fromPos.right; + botLeft = !docLTR && openEnd && last ? leftSide : toPos.left; + botRight = !docLTR ? rightSide : wrapX(to, dir, "after"); + } + add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom); + if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); } + add(botLeft, toPos.top, botRight - botLeft, toPos.bottom); + } + + if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; } + if (cmpCoords(toPos, start) < 0) { start = toPos; } + if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; } + if (cmpCoords(toPos, end) < 0) { end = toPos; } + }); + return {start: start, end: end} + } + + var sFrom = range.from(), sTo = range.to(); + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch); + } else { + var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); + var singleVLine = visualLine(fromLine) == visualLine(toLine); + var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) + { add(leftSide, leftEnd.bottom, null, rightStart.top); } + } + + output.appendChild(fragment); + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) { return } + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursorDiv.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) + { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; }, + cm.options.cursorBlinkRate); } + else if (cm.options.cursorBlinkRate < 0) + { display.cursorDiv.style.visibility = "hidden"; } + } + + function ensureFocus(cm) { + if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } + } + + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true; + setTimeout(function () { if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false; + onBlur(cm); + } }, 100); + } + + function onFocus(cm, e) { + if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; } + + if (cm.options.readOnly == "nocursor") { return } + if (!cm.state.focused) { + signal(cm, "focus", cm, e); + cm.state.focused = true; + addClass(cm.display.wrapper, "CodeMirror-focused"); + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset(); + if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730 + } + cm.display.input.receivedFocus(); + } + restartBlink(cm); + } + function onBlur(cm, e) { + if (cm.state.delayingBlurEvent) { return } + + if (cm.state.focused) { + signal(cm, "blur", cm, e); + cm.state.focused = false; + rmClass(cm.display.wrapper, "CodeMirror-focused"); + } + clearInterval(cm.display.blinker); + setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150); + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], wrapping = cm.options.lineWrapping; + var height = (void 0), width = 0; + if (cur.hidden) { continue } + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = cur.node.getBoundingClientRect(); + height = box.bottom - box.top; + // Check that lines don't extend past the right of the current + // editor width + if (!wrapping && cur.text.firstChild) + { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; } + } + var diff = cur.line.height - height; + if (diff > .005 || diff < -.005) { + updateLineHeight(cur.line, height); + updateWidgetHeight(cur.line); + if (cur.rest) { for (var j = 0; j < cur.rest.length; j++) + { updateWidgetHeight(cur.rest[j]); } } + } + if (width > cm.display.sizerWidth) { + var chWidth = Math.ceil(width / charWidth(cm.display)); + if (chWidth > cm.display.maxLineLength) { + cm.display.maxLineLength = chWidth; + cm.display.maxLine = cur.line; + cm.display.maxLineChanged = true; + } + } + } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) { + var w = line.widgets[i], parent = w.node.parentNode; + if (parent) { w.height = parent.offsetHeight; } + } } + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; + top = Math.floor(top - paddingTop(display)); + var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; + + var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; + if (ensureFrom < from) { + from = ensureFrom; + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); + to = ensureTo; + } + } + return {from: from, to: Math.max(to, from + 1)} + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, rect) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) { return } + + var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; + if (rect.top + box.top < 0) { doScroll = true; } + else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; } + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;")); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) { margin = 0; } + var rect; + if (!cm.options.lineWrapping && pos == end) { + // Set pos and end to the cursor positions around the character pos sticks to + // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch + // If pos == Pos(_, 0, "before"), pos and end are unchanged + pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos; + end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos; + } + for (var limit = 0; limit < 5; limit++) { + var changed = false; + var coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + rect = {left: Math.min(coords.left, endCoords.left), + top: Math.min(coords.top, endCoords.top) - margin, + right: Math.max(coords.left, endCoords.left), + bottom: Math.max(coords.bottom, endCoords.bottom) + margin}; + var scrollPos = calculateScrollPos(cm, rect); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; } + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; } + } + if (!changed) { break } + } + return rect + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, rect) { + var scrollPos = calculateScrollPos(cm, rect); + if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); } + if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); } + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, rect) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (rect.top < 0) { rect.top = 0; } + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), result = {}; + if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; } + var docBottom = cm.doc.height + paddingVert(display); + var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin; + if (rect.top < screentop) { + result.scrollTop = atTop ? 0 : rect.top; + } else if (rect.bottom > screentop + screen) { + var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen); + if (newTop != screentop) { result.scrollTop = newTop; } + } + + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; + var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); + var tooWide = rect.right - rect.left > screenw; + if (tooWide) { rect.right = rect.left + screenw; } + if (rect.left < 10) + { result.scrollLeft = 0; } + else if (rect.left < screenleft) + { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); } + else if (rect.right > screenw + screenleft - 3) + { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; } + return result + } + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollTop(cm, top) { + if (top == null) { return } + resolveScrollToPos(cm); + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(); + cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin}; + } + + function scrollToCoords(cm, x, y) { + if (x != null || y != null) { resolveScrollToPos(cm); } + if (x != null) { cm.curOp.scrollLeft = x; } + if (y != null) { cm.curOp.scrollTop = y; } + } + + function scrollToRange(cm, range) { + resolveScrollToPos(cm); + cm.curOp.scrollToPos = range; + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos; + if (range) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); + scrollToCoordsRange(cm, from, to, range.margin); + } + } + + function scrollToCoordsRange(cm, from, to, margin) { + var sPos = calculateScrollPos(cm, { + left: Math.min(from.left, to.left), + top: Math.min(from.top, to.top) - margin, + right: Math.max(from.right, to.right), + bottom: Math.max(from.bottom, to.bottom) + margin + }); + scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop); + } + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function updateScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) { return } + if (!gecko) { updateDisplaySimple(cm, {top: val}); } + setScrollTop(cm, val, true); + if (gecko) { updateDisplaySimple(cm); } + startWorker(cm, 100); + } + + function setScrollTop(cm, val, forceScroll) { + val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val)); + if (cm.display.scroller.scrollTop == val && !forceScroll) { return } + cm.doc.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; } + } + + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller, forceScroll) { + val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth)); + if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return } + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; } + cm.display.scrollbars.setScrollLeft(val); + } + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, gutterW = d.gutters.offsetWidth; + var docH = Math.round(cm.doc.height + paddingVert(cm.display)); + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + } + } + + var NativeScrollbars = function(place, scroll, cm) { + this.cm = cm; + var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); + var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); + vert.tabIndex = horiz.tabIndex = -1; + place(vert); place(horiz); + + on(vert, "scroll", function () { + if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); } + }); + on(horiz, "scroll", function () { + if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); } + }); + + this.checkedZeroWidth = false; + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; } + }; + + NativeScrollbars.prototype.update = function (measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1; + var needsV = measure.scrollHeight > measure.clientHeight + 1; + var sWidth = measure.nativeBarWidth; + + if (needsV) { + this.vert.style.display = "block"; + this.vert.style.bottom = needsH ? sWidth + "px" : "0"; + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; + } else { + this.vert.style.display = ""; + this.vert.firstChild.style.height = "0"; + } + + if (needsH) { + this.horiz.style.display = "block"; + this.horiz.style.right = needsV ? sWidth + "px" : "0"; + this.horiz.style.left = measure.barLeft + "px"; + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); + this.horiz.firstChild.style.width = + Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; + } else { + this.horiz.style.display = ""; + this.horiz.firstChild.style.width = "0"; + } + + if (!this.checkedZeroWidth && measure.clientHeight > 0) { + if (sWidth == 0) { this.zeroWidthHack(); } + this.checkedZeroWidth = true; + } + + return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0} + }; + + NativeScrollbars.prototype.setScrollLeft = function (pos) { + if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; } + if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); } + }; + + NativeScrollbars.prototype.setScrollTop = function (pos) { + if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; } + if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); } + }; + + NativeScrollbars.prototype.zeroWidthHack = function () { + var w = mac && !mac_geMountainLion ? "12px" : "18px"; + this.horiz.style.height = this.vert.style.width = w; + this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none"; + this.disableHoriz = new Delayed; + this.disableVert = new Delayed; + }; + + NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) { + bar.style.pointerEvents = "auto"; + function maybeDisable() { + // To find out whether the scrollbar is still visible, we + // check whether the element under the pixel in the bottom + // right corner of the scrollbar box is the scrollbar box + // itself (when the bar is still visible) or its filler child + // (when the bar is hidden). If it is still visible, we keep + // it enabled, if it's hidden, we disable pointer events. + var box = bar.getBoundingClientRect(); + var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) + : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1); + if (elt != bar) { bar.style.pointerEvents = "none"; } + else { delay.set(1000, maybeDisable); } + } + delay.set(1000, maybeDisable); + }; + + NativeScrollbars.prototype.clear = function () { + var parent = this.horiz.parentNode; + parent.removeChild(this.horiz); + parent.removeChild(this.vert); + }; + + var NullScrollbars = function () {}; + + NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} }; + NullScrollbars.prototype.setScrollLeft = function () {}; + NullScrollbars.prototype.setScrollTop = function () {}; + NullScrollbars.prototype.clear = function () {}; + + function updateScrollbars(cm, measure) { + if (!measure) { measure = measureForScrollbars(cm); } + var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; + updateScrollbarsInner(cm, measure); + for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) + { updateHeightsInViewport(cm); } + updateScrollbarsInner(cm, measureForScrollbars(cm)); + startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display; + var sizes = d.scrollbars.update(measure); + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent"; + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = sizes.bottom + "px"; + d.scrollbarFiller.style.width = sizes.right + "px"; + } else { d.scrollbarFiller.style.display = ""; } + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = sizes.bottom + "px"; + d.gutterFiller.style.width = measure.gutterWidth + "px"; + } else { d.gutterFiller.style.display = ""; } + } + + var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; + + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear(); + if (cm.display.scrollbars.addClass) + { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); } + } + + cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function () { + if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); } + }); + node.setAttribute("cm-not-content", "true"); + }, function (pos, axis) { + if (axis == "horizontal") { setScrollLeft(cm, pos); } + else { updateScrollTop(cm, pos); } + }, cm); + if (cm.display.scrollbars.addClass) + { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); } + } + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var nextOpId = 0; + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: 0, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId // Unique ID + }; + pushOperation(cm.curOp); + } + + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp; + if (op) { finishOperation(op, function (group) { + for (var i = 0; i < group.ops.length; i++) + { group.ops[i].cm.curOp = null; } + endOperations(group); + }); } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops; + for (var i = 0; i < ops.length; i++) // Read DOM + { endOperation_R1(ops[i]); } + for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe) + { endOperation_W1(ops[i$1]); } + for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM + { endOperation_R2(ops[i$2]); } + for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe) + { endOperation_W2(ops[i$3]); } + for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM + { endOperation_finish(ops[i$4]); } + } + + function endOperation_R1(op) { + var cm = op.cm, display = cm.display; + maybeClipScrollbars(cm); + if (op.updateMaxLine) { findMaxLine(cm); } + + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || + op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo) || + display.maxLineChanged && cm.options.lineWrapping; + op.update = op.mustUpdate && + new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); + } + + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); + } + + function endOperation_R2(op) { + var cm = op.cm, display = cm.display; + if (op.updatedDisplay) { updateHeightsInViewport(cm); } + + op.barMeasure = measureForScrollbars(cm); + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; + cm.display.sizerWidth = op.adjustWidthTo; + op.barMeasure.scrollWidth = + Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); + } + + if (op.updatedDisplay || op.selectionChanged) + { op.preparedSelection = display.input.prepareSelection(); } + } + + function endOperation_W2(op) { + var cm = op.cm; + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; + if (op.maxScrollLeft < cm.doc.scrollLeft) + { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); } + cm.display.maxLineChanged = false; + } + + var takeFocus = op.focus && op.focus == activeElt(); + if (op.preparedSelection) + { cm.display.input.showSelection(op.preparedSelection, takeFocus); } + if (op.updatedDisplay || op.startHeight != cm.doc.height) + { updateScrollbars(cm, op.barMeasure); } + if (op.updatedDisplay) + { setDocumentHeight(cm, op.barMeasure); } + + if (op.selectionChanged) { restartBlink(cm); } + + if (cm.state.focused && op.updateInput) + { cm.display.input.reset(op.typing); } + if (takeFocus) { ensureFocus(op.cm); } + } + + function endOperation_finish(op) { + var cm = op.cm, display = cm.display, doc = cm.doc; + + if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); } + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) + { display.wheelStartX = display.wheelStartY = null; } + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); } + + if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); + maybeScrollWindow(cm, rect); + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; + if (hidden) { for (var i = 0; i < hidden.length; ++i) + { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } } + if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1) + { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } } + + if (display.wrapper.offsetHeight) + { doc.scrollTop = cm.display.scroller.scrollTop; } + + // Fire change events, and delayed event handlers + if (op.changeObjs) + { signal(cm, "changes", cm, op.changeObjs); } + if (op.update) + { op.update.finish(); } + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) { return f() } + startOperation(cm); + try { return f() } + finally { endOperation(cm); } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function() { + if (cm.curOp) { return f.apply(cm, arguments) } + startOperation(cm); + try { return f.apply(cm, arguments) } + finally { endOperation(cm); } + } + } + // Used to add methods to editor and doc instances, wrapping them in + // operations. + function methodOp(f) { + return function() { + if (this.curOp) { return f.apply(this, arguments) } + startOperation(this); + try { return f.apply(this, arguments) } + finally { endOperation(this); } + } + } + function docMethodOp(f) { + return function() { + var cm = this.cm; + if (!cm || cm.curOp) { return f.apply(this, arguments) } + startOperation(cm); + try { return f.apply(this, arguments) } + finally { endOperation(cm); } + } + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.highlightFrontier < cm.display.viewTo) + { cm.state.highlight.set(time, bind(highlightWorker, cm)); } + } + + function highlightWorker(cm) { + var doc = cm.doc; + if (doc.highlightFrontier >= cm.display.viewTo) { return } + var end = +new Date + cm.options.workTime; + var context = getContextBefore(cm, doc.highlightFrontier); + var changedLines = []; + + doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) { + if (context.line >= cm.display.viewFrom) { // Visible + var oldStyles = line.styles; + var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null; + var highlighted = highlightLine(cm, line, context, true); + if (resetState) { context.state = resetState; } + line.styles = highlighted.styles; + var oldCls = line.styleClasses, newCls = highlighted.classes; + if (newCls) { line.styleClasses = newCls; } + else if (oldCls) { line.styleClasses = null; } + var ischange = !oldStyles || oldStyles.length != line.styles.length || + oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); + for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; } + if (ischange) { changedLines.push(context.line); } + line.stateAfter = context.save(); + context.nextLine(); + } else { + if (line.text.length <= cm.options.maxHighlightLength) + { processLine(cm, line.text, context); } + line.stateAfter = context.line % 5 == 0 ? context.save() : null; + context.nextLine(); + } + if (+new Date > end) { + startWorker(cm, cm.options.workDelay); + return true + } + }); + doc.highlightFrontier = context.line; + doc.modeFrontier = Math.max(doc.modeFrontier, context.line); + if (changedLines.length) { runInOp(cm, function () { + for (var i = 0; i < changedLines.length; i++) + { regLineChange(cm, changedLines[i], "text"); } + }); } + } + + // DISPLAY DRAWING + + var DisplayUpdate = function(cm, viewport, force) { + var display = cm.display; + + this.viewport = viewport; + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport); + this.editorIsHidden = !display.wrapper.offsetWidth; + this.wrapperHeight = display.wrapper.clientHeight; + this.wrapperWidth = display.wrapper.clientWidth; + this.oldDisplayWidth = displayWidth(cm); + this.force = force; + this.dims = getDimensions(cm); + this.events = []; + }; + + DisplayUpdate.prototype.signal = function (emitter, type) { + if (hasHandler(emitter, type)) + { this.events.push(arguments); } + }; + DisplayUpdate.prototype.finish = function () { + for (var i = 0; i < this.events.length; i++) + { signal.apply(null, this.events[i]); } + }; + + function maybeClipScrollbars(cm) { + var display = cm.display; + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; + display.heightForcer.style.height = scrollGap(cm) + "px"; + display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; + display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; + display.scrollbarsClipped = true; + } + } + + function selectionSnapshot(cm) { + if (cm.hasFocus()) { return null } + var active = activeElt(); + if (!active || !contains(cm.display.lineDiv, active)) { return null } + var result = {activeElt: active}; + if (window.getSelection) { + var sel = window.getSelection(); + if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) { + result.anchorNode = sel.anchorNode; + result.anchorOffset = sel.anchorOffset; + result.focusNode = sel.focusNode; + result.focusOffset = sel.focusOffset; + } + } + return result + } + + function restoreSelection(snapshot) { + if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return } + snapshot.activeElt.focus(); + if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) { + var sel = window.getSelection(), range = document.createRange(); + range.setEnd(snapshot.anchorNode, snapshot.anchorOffset); + range.collapse(false); + sel.removeAllRanges(); + sel.addRange(range); + sel.extend(snapshot.focusNode, snapshot.focusOffset); + } + } + + // Does the actual updating of the line display. Bails out + // (returning false) when there is nothing to be done and forced is + // false. + function updateDisplayIfNeeded(cm, update) { + var display = cm.display, doc = cm.doc; + + if (update.editorIsHidden) { + resetView(cm); + return false + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!update.force && + update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && countDirtyView(cm) == 0) + { return false } + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm); + update.dims = getDimensions(cm); + } + + // Compute a suitable new viewport (from & to) + var end = doc.first + doc.size; + var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); + var to = Math.min(end, update.visible.to + cm.options.viewportMargin); + if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); } + if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); } + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from); + to = visualLineEndNo(cm.doc, to); + } + + var different = from != display.viewFrom || to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; + adjustView(cm, from, to); + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px"; + + var toUpdate = countDirtyView(cm); + if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) + { return false } + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + var selSnapshot = selectionSnapshot(cm); + if (toUpdate > 4) { display.lineDiv.style.display = "none"; } + patchDisplay(cm, display.updateLineNumbers, update.dims); + if (toUpdate > 4) { display.lineDiv.style.display = ""; } + display.renderedView = display.view; + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + restoreSelection(selSnapshot); + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv); + removeChildren(display.selectionDiv); + display.gutters.style.height = display.sizer.style.minHeight = 0; + + if (different) { + display.lastWrapHeight = update.wrapperHeight; + display.lastWrapWidth = update.wrapperWidth; + startWorker(cm, 400); + } + + display.updateLineNumbers = null; + + return true + } + + function postUpdateDisplay(cm, update) { + var viewport = update.viewport; + + for (var first = true;; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) + { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; } + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport); + if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) + { break } + } else if (first) { + update.visible = visibleLines(cm.display, cm.doc, viewport); + } + if (!updateDisplayIfNeeded(cm, update)) { break } + updateHeightsInViewport(cm); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + updateScrollbars(cm, barMeasure); + setDocumentHeight(cm, barMeasure); + update.force = false; + } + + update.signal(cm, "update", cm); + if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); + cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; + } + } + + function updateDisplaySimple(cm, viewport) { + var update = new DisplayUpdate(cm, viewport); + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm); + postUpdateDisplay(cm, update); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + updateScrollbars(cm, barMeasure); + setDocumentHeight(cm, barMeasure); + update.finish(); + } + } + + // Sync the actual display DOM structure with display.view, removing + // nodes for lines that are no longer in view, and creating the ones + // that are not there yet, and updating the ones that are out of + // date. + function patchDisplay(cm, updateNumbersFrom, dims) { + var display = cm.display, lineNumbers = cm.options.lineNumbers; + var container = display.lineDiv, cur = container.firstChild; + + function rm(node) { + var next = node.nextSibling; + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) + { node.style.display = "none"; } + else + { node.parentNode.removeChild(node); } + return next + } + + var view = display.view, lineN = display.viewFrom; + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet + var node = buildLineElement(cm, lineView, lineN, dims); + container.insertBefore(node, cur); + } else { // Already drawn + while (cur != lineView.node) { cur = rm(cur); } + var updateNumber = lineNumbers && updateNumbersFrom != null && + updateNumbersFrom <= lineN && lineView.lineNumber; + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; } + updateLineForChanges(cm, lineView, lineN, dims); + } + if (updateNumber) { + removeChildren(lineView.lineNumber); + lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); + } + cur = lineView.node.nextSibling; + } + lineN += lineView.size; + } + while (cur) { cur = rm(cur); } + } + + function updateGutterSpace(display) { + var width = display.gutters.offsetWidth; + display.sizer.style.marginLeft = width + "px"; + } + + function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px"; + cm.display.heightForcer.style.top = measure.docHeight + "px"; + cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px"; + } + + // Re-align line numbers and gutter marks to compensate for + // horizontal scrolling. + function alignHorizontally(cm) { + var display = cm.display, view = display.view; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return } + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, left = comp + "px"; + for (var i = 0; i < view.length; i++) { if (!view[i].hidden) { + if (cm.options.fixedGutter) { + if (view[i].gutter) + { view[i].gutter.style.left = left; } + if (view[i].gutterBackground) + { view[i].gutterBackground.style.left = left; } + } + var align = view[i].alignable; + if (align) { for (var j = 0; j < align.length; j++) + { align[j].style.left = left; } } + } } + if (cm.options.fixedGutter) + { display.gutters.style.left = (comp + gutterW) + "px"; } + } + + // Used to ensure that the line number gutter is still the right + // size for the current document size. Returns true when an update + // is needed. + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) { return false } + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + updateGutterSpace(cm.display); + return true + } + return false + } + + function getGutters(gutters, lineNumbers) { + var result = [], sawLineNumbers = false; + for (var i = 0; i < gutters.length; i++) { + var name = gutters[i], style = null; + if (typeof name != "string") { style = name.style; name = name.className; } + if (name == "CodeMirror-linenumbers") { + if (!lineNumbers) { continue } + else { sawLineNumbers = true; } + } + result.push({className: name, style: style}); + } + if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); } + return result + } + + // Rebuild the gutter elements, ensure the margin to the left of the + // code matches their width. + function renderGutters(display) { + var gutters = display.gutters, specs = display.gutterSpecs; + removeChildren(gutters); + display.lineGutter = null; + for (var i = 0; i < specs.length; ++i) { + var ref = specs[i]; + var className = ref.className; + var style = ref.style; + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className)); + if (style) { gElt.style.cssText = style; } + if (className == "CodeMirror-linenumbers") { + display.lineGutter = gElt; + gElt.style.width = (display.lineNumWidth || 1) + "px"; + } + } + gutters.style.display = specs.length ? "" : "none"; + updateGutterSpace(display); + } + + function updateGutters(cm) { + renderGutters(cm.display); + regChange(cm); + alignHorizontally(cm); + } + + // The display handles the DOM integration, both for input reading + // and content drawing. It holds references to DOM nodes and + // display-related state. + + function Display(place, doc, input, options) { + var d = this; + this.input = input; + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); + d.scrollbarFiller.setAttribute("cm-not-content", "true"); + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); + d.gutterFiller.setAttribute("cm-not-content", "true"); + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = eltP("div", null, "CodeMirror-code"); + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); + d.cursorDiv = elt("div", null, "CodeMirror-cursors"); + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure"); + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure"); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, "position: relative; outline: none"); + var lines = eltP("div", [d.lineSpace], "CodeMirror-lines"); + // Moved around its parent to cover visible view. + d.mover = elt("div", [lines], null, "position: relative"); + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); + d.sizerWidth = null; + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters"); + d.lineGutter = null; + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); + d.scroller.setAttribute("tabIndex", "-1"); + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; } + + if (place) { + if (place.appendChild) { place.appendChild(d.wrapper); } + else { place(d.wrapper); } + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first; + d.reportedViewFrom = d.reportedViewTo = doc.first; + // Information about the rendered lines. + d.view = []; + d.renderedView = null; + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null; + // Empty space (in pixels) above the view + d.viewOffset = 0; + d.lastWrapHeight = d.lastWrapWidth = 0; + d.updateLineNumbers = null; + + d.nativeBarWidth = d.barHeight = d.barWidth = 0; + d.scrollbarsClipped = false; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false; + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null; + d.maxLineLength = 0; + d.maxLineChanged = false; + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; + + // True when shift is held down. + d.shift = false; + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null; + + d.activeTouch = null; + + d.gutterSpecs = getGutters(options.gutters, options.lineNumbers); + renderGutters(d); + + input.init(d); + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) { wheelPixelsPerUnit = -.53; } + else if (gecko) { wheelPixelsPerUnit = 15; } + else if (chrome) { wheelPixelsPerUnit = -.7; } + else if (safari) { wheelPixelsPerUnit = -1/3; } + + function wheelEventDelta(e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; } + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; } + else if (dy == null) { dy = e.wheelDelta; } + return {x: dx, y: dy} + } + function wheelEventPixels(e) { + var delta = wheelEventDelta(e); + delta.x *= wheelPixelsPerUnit; + delta.y *= wheelPixelsPerUnit; + return delta + } + + function onScrollWheel(cm, e) { + var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + var canScrollX = scroll.scrollWidth > scroll.clientWidth; + var canScrollY = scroll.scrollHeight > scroll.clientHeight; + if (!(dx && canScrollX || dy && canScrollY)) { return } + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur; + break outer + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { + if (dy && canScrollY) + { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); } + setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit)); + // Only prevent default scrolling if vertical scrolling is + // actually possible. Otherwise, it causes vertical scroll + // jitter on OSX trackpads when deltaX is small and deltaY + // is large (issue #3579) + if (!dy || (dy && canScrollY)) + { e_preventDefault(e); } + display.wheelStartX = null; // Abort measurement, if in progress + return + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) { top = Math.max(0, top + pixels - 50); } + else { bot = Math.min(cm.doc.height, bot + pixels + 50); } + updateDisplaySimple(cm, {top: top, bottom: bot}); + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function () { + if (display.wheelStartX == null) { return } + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) { return } + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } + } + + // Selection objects are immutable. A new one is created every time + // the selection changes. A selection is one or more non-overlapping + // (and non-touching) ranges, sorted, and an integer that indicates + // which one is the primary selection (the one that's scrolled into + // view, that getCursor returns, etc). + var Selection = function(ranges, primIndex) { + this.ranges = ranges; + this.primIndex = primIndex; + }; + + Selection.prototype.primary = function () { return this.ranges[this.primIndex] }; + + Selection.prototype.equals = function (other) { + if (other == this) { return true } + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false } + for (var i = 0; i < this.ranges.length; i++) { + var here = this.ranges[i], there = other.ranges[i]; + if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false } + } + return true + }; + + Selection.prototype.deepCopy = function () { + var out = []; + for (var i = 0; i < this.ranges.length; i++) + { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); } + return new Selection(out, this.primIndex) + }; + + Selection.prototype.somethingSelected = function () { + for (var i = 0; i < this.ranges.length; i++) + { if (!this.ranges[i].empty()) { return true } } + return false + }; + + Selection.prototype.contains = function (pos, end) { + if (!end) { end = pos; } + for (var i = 0; i < this.ranges.length; i++) { + var range = this.ranges[i]; + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) + { return i } + } + return -1 + }; + + var Range = function(anchor, head) { + this.anchor = anchor; this.head = head; + }; + + Range.prototype.from = function () { return minPos(this.anchor, this.head) }; + Range.prototype.to = function () { return maxPos(this.anchor, this.head) }; + Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch }; + + // Take an unsorted, potentially overlapping set of ranges, and + // build a selection out of it. 'Consumes' ranges array (modifying + // it). + function normalizeSelection(cm, ranges, primIndex) { + var mayTouch = cm && cm.options.selectionsMayTouch; + var prim = ranges[primIndex]; + ranges.sort(function (a, b) { return cmp(a.from(), b.from()); }); + primIndex = indexOf(ranges, prim); + for (var i = 1; i < ranges.length; i++) { + var cur = ranges[i], prev = ranges[i - 1]; + var diff = cmp(prev.to(), cur.from()); + if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) { + var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); + var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; + if (i <= primIndex) { --primIndex; } + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); + } + } + return new Selection(ranges, primIndex) + } + + function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0) + } + + // Compute the position of the end of a change (its 'to' property + // refers to the pre-change end). + function changeEnd(change) { + if (!change.text) { return change.to } + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)) + } + + // Adjust a position to refer to the post-change position of the + // same text, or the end of the change if the change covers it. + function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) { return pos } + if (cmp(pos, change.to) <= 0) { return changeEnd(change) } + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; + if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; } + return Pos(line, ch) + } + + function computeSelAfterChange(doc, change) { + var out = []; + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + out.push(new Range(adjustForChange(range.anchor, change), + adjustForChange(range.head, change))); + } + return normalizeSelection(doc.cm, out, doc.sel.primIndex) + } + + function offsetPos(pos, old, nw) { + if (pos.line == old.line) + { return Pos(nw.line, pos.ch - old.ch + nw.ch) } + else + { return Pos(nw.line + (pos.line - old.line), pos.ch) } + } + + // Used by replaceSelections to allow moving the selection to the + // start or around the replaced test. Hint may be "start" or "around". + function computeReplacedSel(doc, changes, hint) { + var out = []; + var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + var from = offsetPos(change.from, oldPrev, newPrev); + var to = offsetPos(changeEnd(change), oldPrev, newPrev); + oldPrev = change.to; + newPrev = to; + if (hint == "around") { + var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; + out[i] = new Range(inv ? to : from, inv ? from : to); + } else { + out[i] = new Range(from, from); + } + } + return new Selection(out, doc.sel.primIndex) + } + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = getMode(cm.options, cm.doc.modeOption); + resetModeState(cm); + } + + function resetModeState(cm) { + cm.doc.iter(function (line) { + if (line.stateAfter) { line.stateAfter = null; } + if (line.styles) { line.styles = null; } + }); + cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first; + startWorker(cm, 100); + cm.state.modeGen++; + if (cm.curOp) { regChange(cm); } + } + + // DOCUMENT DATA STRUCTURE + + // By default, updates that start and end at the beginning of a line + // are treated specially, in order to make the association of line + // widgets and marker elements with the text behave more intuitive. + function isWholeLineUpdate(doc, change) { + return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore) + } + + // Perform a change on the document data structure. + function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight); + signalLater(line, "change", line, change); + } + function linesFor(start, end) { + var result = []; + for (var i = start; i < end; ++i) + { result.push(new Line(text[i], spansFor(i), estimateHeight)); } + return result + } + + var from = change.from, to = change.to, text = change.text; + var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); + var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)); + doc.remove(text.length, doc.size - text.length); + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = linesFor(0, text.length - 1); + update(lastLine, lastLine.text, lastSpans); + if (nlines) { doc.remove(from.line, nlines); } + if (added.length) { doc.insert(from.line, added); } + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); + } else { + var added$1 = linesFor(1, text.length - 1); + added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + doc.insert(from.line + 1, added$1); + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); + doc.remove(from.line + 1, nlines); + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); + var added$2 = linesFor(1, text.length - 1); + if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); } + doc.insert(from.line + 1, added$2); + } + + signalLater(doc, "change", doc, change); + } + + // Call f for all linked documents. + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i]; + if (rel.doc == skip) { continue } + var shared = sharedHist && rel.sharedHist; + if (sharedHistOnly && !shared) { continue } + f(rel.doc, shared); + propagate(rel.doc, doc, shared); + } } + } + propagate(doc, null, true); + } + + // Attach a document to an editor. + function attachDoc(cm, doc) { + if (doc.cm) { throw new Error("This document is already in use.") } + cm.doc = doc; + doc.cm = cm; + estimateLineHeights(cm); + loadMode(cm); + setDirectionClass(cm); + if (!cm.options.lineWrapping) { findMaxLine(cm); } + cm.options.mode = doc.modeOption; + regChange(cm); + } + + function setDirectionClass(cm) { + (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl"); + } + + function directionChanged(cm) { + runInOp(cm, function () { + setDirectionClass(cm); + regChange(cm); + }); + } + + function History(startGen) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = []; this.undone = []; + this.undoDepth = Infinity; + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0; + this.lastOp = this.lastSelOp = null; + this.lastOrigin = this.lastSelOrigin = null; + // Used by the isClean() method + this.generation = this.maxGeneration = startGen || 1; + } + + // Create a history change event from an updateDoc-style change + // object. + function historyChangeFromChange(doc, change) { + var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); + linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true); + return histChange + } + + // Pop all selection events off the end of a history array. Stop at + // a change event. + function clearSelectionEvents(array) { + while (array.length) { + var last = lst(array); + if (last.ranges) { array.pop(); } + else { break } + } + } + + // Find the top change event in the history. Pop off selection + // events that are in the way. + function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done); + return lst(hist.done) + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done) + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop(); + return lst(hist.done) + } + } + + // Register a change in the history. Merges changes that are within + // a single operation, or are close together with an origin that + // allows merging (starting with "+") into a single event. + function addChangeToHistory(doc, change, selAfter, opId) { + var hist = doc.history; + hist.undone.length = 0; + var time = +new Date, cur; + var last; + + if ((hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) || + change.origin.charAt(0) == "*")) && + (cur = lastChangeEvent(hist, hist.lastOp == opId))) { + // Merge this change into the last event + last = lst(cur.changes); + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change); + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)); + } + } else { + // Can not be merged, start a new event. + var before = lst(hist.done); + if (!before || !before.ranges) + { pushSelectionToHistory(doc.sel, hist.done); } + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation}; + hist.done.push(cur); + while (hist.done.length > hist.undoDepth) { + hist.done.shift(); + if (!hist.done[0].ranges) { hist.done.shift(); } + } + } + hist.done.push(selAfter); + hist.generation = ++hist.maxGeneration; + hist.lastModTime = hist.lastSelTime = time; + hist.lastOp = hist.lastSelOp = opId; + hist.lastOrigin = hist.lastSelOrigin = change.origin; + + if (!last) { signal(doc, "historyAdded"); } + } + + function selectionEventCanBeMerged(doc, origin, prev, sel) { + var ch = origin.charAt(0); + return ch == "*" || + ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500) + } + + // Called whenever the selection changes, sets the new selection as + // the pending selection in the history, and pushes the old pending + // selection into the 'done' array when it was significantly + // different (in number of selected ranges, emptiness, or time). + function addSelectionToHistory(doc, sel, opId, options) { + var hist = doc.history, origin = options && options.origin; + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if (opId == hist.lastSelOp || + (origin && hist.lastSelOrigin == origin && + (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) + { hist.done[hist.done.length - 1] = sel; } + else + { pushSelectionToHistory(sel, hist.done); } + + hist.lastSelTime = +new Date; + hist.lastSelOrigin = origin; + hist.lastSelOp = opId; + if (options && options.clearRedo !== false) + { clearSelectionEvents(hist.undone); } + } + + function pushSelectionToHistory(sel, dest) { + var top = lst(dest); + if (!(top && top.ranges && top.equals(sel))) + { dest.push(sel); } + } + + // Used to store marked span information in the history. + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], n = 0; + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) { + if (line.markedSpans) + { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; } + ++n; + }); + } + + // When un/re-doing restores text containing marked spans, those + // that have been explicitly cleared should not be restored. + function removeClearedSpans(spans) { + if (!spans) { return null } + var out; + for (var i = 0; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } } + else if (out) { out.push(spans[i]); } + } + return !out ? spans : out.length ? out : null + } + + // Retrieve and filter the old marked spans stored in a change event. + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id]; + if (!found) { return null } + var nw = []; + for (var i = 0; i < change.text.length; ++i) + { nw.push(removeClearedSpans(found[i])); } + return nw + } + + // Used for un/re-doing changes from the history. Combines the + // result of computing the existing spans with the set of spans that + // existed in the history (so that deleting around a span and then + // undoing brings back the span). + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change); + var stretched = stretchSpansOverChange(doc, change); + if (!old) { return stretched } + if (!stretched) { return old } + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], stretchCur = stretched[i]; + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j]; + for (var k = 0; k < oldCur.length; ++k) + { if (oldCur[k].marker == span.marker) { continue spans } } + oldCur.push(span); + } + } else if (stretchCur) { + old[i] = stretchCur; + } + } + return old + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup, instantiateSel) { + var copy = []; + for (var i = 0; i < events.length; ++i) { + var event = events[i]; + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); + continue + } + var changes = event.changes, newChanges = []; + copy.push({changes: newChanges}); + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], m = (void 0); + newChanges.push({from: change.from, to: change.to, text: change.text}); + if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop]; + delete change[prop]; + } + } } } + } + } + return copy + } + + // The 'scroll' parameter given to many of these indicated whether + // the new cursor position should be scrolled into view after + // modifying the selection. + + // If shift is held or the extend flag is set, extends a range to + // include a given position (and optionally a second position). + // Otherwise, simply returns the range between the given positions. + // Used for cursor motion and such. + function extendRange(range, head, other, extend) { + if (extend) { + var anchor = range.anchor; + if (other) { + var posBefore = cmp(head, anchor) < 0; + if (posBefore != (cmp(other, anchor) < 0)) { + anchor = head; + head = other; + } else if (posBefore != (cmp(head, other) < 0)) { + head = other; + } + } + return new Range(anchor, head) + } else { + return new Range(other || head, head) + } + } + + // Extend the primary selection range, discard the rest. + function extendSelection(doc, head, other, options, extend) { + if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); } + setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options); + } + + // Extend all selections (pos is an array of selections with length + // equal the number of selections) + function extendSelections(doc, heads, options) { + var out = []; + var extend = doc.cm && (doc.cm.display.shift || doc.extend); + for (var i = 0; i < doc.sel.ranges.length; i++) + { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); } + var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex); + setSelection(doc, newSel, options); + } + + // Updates a single range in the selection. + function replaceOneSelection(doc, i, range, options) { + var ranges = doc.sel.ranges.slice(0); + ranges[i] = range; + setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options); + } + + // Reset the selection to a single range. + function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options); + } + + // Give beforeSelectionChange handlers a change to influence a + // selection update. + function filterSelectionChange(doc, sel, options) { + var obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = []; + for (var i = 0; i < ranges.length; i++) + { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head)); } + }, + origin: options && options.origin + }; + signal(doc, "beforeSelectionChange", doc, obj); + if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); } + if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) } + else { return sel } + } + + function setSelectionReplaceHistory(doc, sel, options) { + var done = doc.history.done, last = lst(done); + if (last && last.ranges) { + done[done.length - 1] = sel; + setSelectionNoUndo(doc, sel, options); + } else { + setSelection(doc, sel, options); + } + } + + // Set a new selection. + function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options); + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); + } + + function setSelectionNoUndo(doc, sel, options) { + if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + { sel = filterSelectionChange(doc, sel, options); } + + var bias = options && options.bias || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); + + if (!(options && options.scroll === false) && doc.cm) + { ensureCursorVisible(doc.cm); } + } + + function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) { return } + + doc.sel = sel; + + if (doc.cm) { + doc.cm.curOp.updateInput = 1; + doc.cm.curOp.selectionChanged = true; + signalCursorActivity(doc.cm); + } + signalLater(doc, "cursorActivity", doc); + } + + // Verify that the selection does not partially select any atomic + // marked ranges. + function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false)); + } + + // Return a selection that does not partially select any atomic + // ranges. + function skipAtomicInSelection(doc, sel, bias, mayClear) { + var out; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i]; + var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear); + var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear); + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) { out = sel.ranges.slice(0, i); } + out[i] = new Range(newAnchor, newHead); + } + } + return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel + } + + function skipAtomicInner(doc, pos, oldPos, dir, mayClear) { + var line = getLine(doc, pos.line); + if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], m = sp.marker; + + // Determine if we should prevent the cursor being placed to the left/right of an atomic marker + // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it + // is with selectLeft/Right + var preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft; + var preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight; + + if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && + (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter"); + if (m.explicitlyCleared) { + if (!line.markedSpans) { break } + else {--i; continue} + } + } + if (!m.atomic) { continue } + + if (oldPos) { + var near = m.find(dir < 0 ? 1 : -1), diff = (void 0); + if (dir < 0 ? preventCursorRight : preventCursorLeft) + { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); } + if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) + { return skipAtomicInner(doc, near, pos, dir, mayClear) } + } + + var far = m.find(dir < 0 ? -1 : 1); + if (dir < 0 ? preventCursorLeft : preventCursorRight) + { far = movePos(doc, far, dir, far.line == pos.line ? line : null); } + return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null + } + } } + return pos + } + + // Ensure a given position is not inside an atomic range. + function skipAtomic(doc, pos, oldPos, bias, mayClear) { + var dir = bias || 1; + var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) || + skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true)); + if (!found) { + doc.cantEdit = true; + return Pos(doc.first, 0) + } + return found + } + + function movePos(doc, pos, dir, line) { + if (dir < 0 && pos.ch == 0) { + if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) } + else { return null } + } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) { + if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) } + else { return null } + } else { + return new Pos(pos.line, pos.ch + dir) + } + } + + function selectAll(cm) { + cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll); + } + + // UPDATING + + // Allow "beforeChange" event handlers to influence a change + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function () { return obj.canceled = true; } + }; + if (update) { obj.update = function (from, to, text, origin) { + if (from) { obj.from = clipPos(doc, from); } + if (to) { obj.to = clipPos(doc, to); } + if (text) { obj.text = text; } + if (origin !== undefined) { obj.origin = origin; } + }; } + signal(doc, "beforeChange", doc, obj); + if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); } + + if (obj.canceled) { + if (doc.cm) { doc.cm.curOp.updateInput = 2; } + return null + } + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin} + } + + // Apply a change to a document, and add it to the document's + // history, and propagating it to all linked documents. + function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) } + if (doc.cm.state.suppressEdits) { return } + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true); + if (!change) { return } + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); + if (split) { + for (var i = split.length - 1; i >= 0; --i) + { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); } + } else { + makeChangeInner(doc, change); + } + } + + function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return } + var selAfter = computeSelAfterChange(doc, change); + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); + var rebased = []; + + linkedDocs(doc, function (doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); + }); + } + + // Revert a change stored in a document's history. + function makeChangeFromHistory(doc, type, allowSelectionOnly) { + var suppress = doc.cm && doc.cm.state.suppressEdits; + if (suppress && !allowSelectionOnly) { return } + + var hist = doc.history, event, selAfter = doc.sel; + var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + var i = 0; + for (; i < source.length; i++) { + event = source[i]; + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) + { break } + } + if (i == source.length) { return } + hist.lastOrigin = hist.lastSelOrigin = null; + + for (;;) { + event = source.pop(); + if (event.ranges) { + pushSelectionToHistory(event, dest); + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, {clearRedo: false}); + return + } + selAfter = event; + } else if (suppress) { + source.push(event); + return + } else { break } + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + var antiChanges = []; + pushSelectionToHistory(selAfter, dest); + dest.push({changes: antiChanges, generation: hist.generation}); + hist.generation = event.generation || ++hist.maxGeneration; + + var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); + + var loop = function ( i ) { + var change = event.changes[i]; + change.origin = type; + if (filter && !filterChange(doc, change, false)) { + source.length = 0; + return {} + } + + antiChanges.push(historyChangeFromChange(doc, change)); + + var after = i ? computeSelAfterChange(doc, change) : lst(source); + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); + if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); } + var rebased = []; + + // Propagate to the linked documents + linkedDocs(doc, function (doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); + }); + }; + + for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) { + var returned = loop( i$1 ); + + if ( returned ) return returned.v; + } + } + + // Sub-views need their line numbers shifted when text is added + // above or below them in the parent document. + function shiftDoc(doc, distance) { + if (distance == 0) { return } + doc.first += distance; + doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range( + Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch) + ); }), doc.sel.primIndex); + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance); + for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) + { regLineChange(doc.cm, l, "gutter"); } + } + } + + // More lower-level change function, handling only a single document + // (not linked ones). + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) } + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); + return + } + if (change.from.line > doc.lastLine()) { return } + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line); + shiftDoc(doc, shift); + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin}; + } + var last = doc.lastLine(); + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin}; + } + + change.removed = getBetween(doc, change.from, change.to); + + if (!selAfter) { selAfter = computeSelAfterChange(doc, change); } + if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); } + else { updateDoc(doc, change, spans); } + setSelectionNoUndo(doc, selAfter, sel_dontScroll); + + if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0))) + { doc.cantEdit = false; } + } + + // Handle the interaction of a change to a document with the editor + // that this document is part of. + function makeChangeSingleDocInEditor(cm, change, spans) { + var doc = cm.doc, display = cm.display, from = change.from, to = change.to; + + var recomputeMaxLength = false, checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); + doc.iter(checkWidthStart, to.line + 1, function (line) { + if (line == display.maxLine) { + recomputeMaxLength = true; + return true + } + }); + } + + if (doc.sel.contains(change.from, change.to) > -1) + { signalCursorActivity(cm); } + + updateDoc(doc, change, spans, estimateHeight(cm)); + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function (line) { + var len = lineLength(line); + if (len > display.maxLineLength) { + display.maxLine = line; + display.maxLineLength = len; + display.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; } + } + + retreatFrontier(doc, from.line); + startWorker(cm, 400); + + var lendiff = change.text.length - (to.line - from.line) - 1; + // Remember that these lines changed, for updating the display + if (change.full) + { regChange(cm); } + else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) + { regLineChange(cm, from.line, "text"); } + else + { regChange(cm, from.line, to.line + 1, lendiff); } + + var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); + if (changeHandler || changesHandler) { + var obj = { + from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin + }; + if (changeHandler) { signalLater(cm, "change", cm, obj); } + if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); } + } + cm.display.selForContextMenu = null; + } + + function replaceRange(doc, code, from, to, origin) { + var assign; + + if (!to) { to = from; } + if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); } + if (typeof code == "string") { code = doc.splitLines(code); } + makeChange(doc, {from: from, to: to, text: code, origin: origin}); + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff; + } else if (from < pos.line) { + pos.line = from; + pos.ch = 0; + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], ok = true; + if (sub.ranges) { + if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } + for (var j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); + } + continue + } + for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) { + var cur = sub.changes[j$1]; + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch); + cur.to = Pos(cur.to.line + diff, cur.to.ch); + } else if (from <= cur.to.line) { + ok = false; + break + } + } + if (!ok) { + array.splice(0, i + 1); + i = 0; + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; + rebaseHistArray(hist.done, from, to, diff); + rebaseHistArray(hist.undone, from, to, diff); + } + + // Utility for applying a change to a line by handle or number, + // returning the number and optionally registering the line as + // changed. + function changeLine(doc, handle, changeType, op) { + var no = handle, line = handle; + if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); } + else { no = lineNo(handle); } + if (no == null) { return null } + if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); } + return line + } + + // The document is represented as a BTree consisting of leaves, with + // chunk of lines in them, and branches, with up to ten leaves or + // other branch nodes below them. The top node is always a branch + // node, and is the document object itself (meaning it has + // additional methods and properties). + // + // All nodes have parent links. The tree is used both to go from + // line numbers to line objects, and to go from objects to numbers. + // It also indexes by height, and is used to convert between height + // and line object, and to find the total height of the document. + // + // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + var height = 0; + for (var i = 0; i < lines.length; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function() { return this.lines.length }, + + // Remove the n lines at offset 'at'. + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(line, "delete"); + } + this.lines.splice(at, n); + }, + + // Helper used to collapse a small branch into a single leaf. + collapse: function(lines) { + lines.push.apply(lines, this.lines); + }, + + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner: function(at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; } + }, + + // Used to iterate over a part of the tree. + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) + { if (op(this.lines[at])) { return true } } + } + }; + + function BranchChunk(children) { + this.children = children; + var size = 0, height = 0; + for (var i = 0; i < children.length; ++i) { + var ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function() { return this.size }, + + removeInner: function(at, n) { + this.size -= n; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var rm = Math.min(n, sz - at), oldHeight = child.height; + child.removeInner(at, rm); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) { break } + at = 0; + } else { at -= sz; } + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if (this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { + var lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + + collapse: function(lines) { + for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); } + }, + + insertInner: function(at, lines, height) { + this.size += lines.length; + this.height += height; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at <= sz) { + child.insertInner(at, lines, height); + if (child.lines && child.lines.length > 50) { + // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced. + // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest. + var remaining = child.lines.length % 25 + 25; + for (var pos = remaining; pos < child.lines.length;) { + var leaf = new LeafChunk(child.lines.slice(pos, pos += 25)); + child.height -= leaf.height; + this.children.splice(++i, 0, leaf); + leaf.parent = this; + } + child.lines = child.lines.slice(0, remaining); + this.maybeSpill(); + } + break + } + at -= sz; + } + }, + + // When a node has grown, check whether it should be split. + maybeSpill: function() { + if (this.children.length <= 10) { return } + var me = this; + do { + var spilled = me.children.splice(me.children.length - 5, 5); + var sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + var copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + var myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10) + me.parent.maybeSpill(); + }, + + iterN: function(at, n, op) { + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) { return true } + if ((n -= used) == 0) { break } + at = 0; + } else { at -= sz; } + } + } + }; + + // Line widgets are block elements displayed above or below a line. + + var LineWidget = function(doc, node, options) { + if (options) { for (var opt in options) { if (options.hasOwnProperty(opt)) + { this[opt] = options[opt]; } } } + this.doc = doc; + this.node = node; + }; + + LineWidget.prototype.clear = function () { + var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); + if (no == null || !ws) { return } + for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } } + if (!ws.length) { line.widgets = null; } + var height = widgetHeight(this); + updateLineHeight(line, Math.max(0, line.height - height)); + if (cm) { + runInOp(cm, function () { + adjustScrollWhenAboveVisible(cm, line, -height); + regLineChange(cm, no, "widget"); + }); + signalLater(cm, "lineWidgetCleared", cm, this, no); + } + }; + + LineWidget.prototype.changed = function () { + var this$1 = this; + + var oldH = this.height, cm = this.doc.cm, line = this.line; + this.height = null; + var diff = widgetHeight(this) - oldH; + if (!diff) { return } + if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); } + if (cm) { + runInOp(cm, function () { + cm.curOp.forceUpdate = true; + adjustScrollWhenAboveVisible(cm, line, diff); + signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line)); + }); + } + }; + eventMixin(LineWidget); + + function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) + { addToScrollTop(cm, diff); } + } + + function addLineWidget(doc, handle, node, options) { + var widget = new LineWidget(doc, node, options); + var cm = doc.cm; + if (cm && widget.noHScroll) { cm.display.alignWidgets = true; } + changeLine(doc, handle, "widget", function (line) { + var widgets = line.widgets || (line.widgets = []); + if (widget.insertAt == null) { widgets.push(widget); } + else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); } + widget.line = line; + if (cm && !lineIsHidden(doc, line)) { + var aboveVisible = heightAtLine(line) < doc.scrollTop; + updateLineHeight(line, line.height + widgetHeight(widget)); + if (aboveVisible) { addToScrollTop(cm, widget.height); } + cm.curOp.forceUpdate = true; + } + return true + }); + if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); } + return widget + } + + // TEXTMARKERS + + // Created with markText and setBookmark methods. A TextMarker is a + // handle that can be used to clear or find a marked position in the + // document. Line objects hold arrays (markedSpans) containing + // {from, to, marker} object pointing to such marker objects, and + // indicating that such a marker is present on that line. Multiple + // lines may point to the same marker when it spans across lines. + // The spans will have null for their from/to properties when the + // marker continues beyond the start/end of the line. Markers have + // links back to the lines they currently touch. + + // Collapsed markers have unique ids, in order to be able to order + // them, which is needed for uniquely determining an outer marker + // when they overlap (they may nest, but not partially overlap). + var nextMarkerId = 0; + + var TextMarker = function(doc, type) { + this.lines = []; + this.type = type; + this.doc = doc; + this.id = ++nextMarkerId; + }; + + // Clear the marker. + TextMarker.prototype.clear = function () { + if (this.explicitlyCleared) { return } + var cm = this.doc.cm, withOp = cm && !cm.curOp; + if (withOp) { startOperation(cm); } + if (hasHandler(this, "clear")) { + var found = this.find(); + if (found) { signalLater(this, "clear", found.from, found.to); } + } + var min = null, max = null; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), "text"); } + else if (cm) { + if (span.to != null) { max = lineNo(line); } + if (span.from != null) { min = lineNo(line); } + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) + { updateLineHeight(line, textHeight(cm.display)); } + } + if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) { + var visual = visualLine(this.lines[i$1]), len = lineLength(visual); + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual; + cm.display.maxLineLength = len; + cm.display.maxLineChanged = true; + } + } } + + if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); } + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false; + if (cm) { reCheckSelection(cm.doc); } + } + if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); } + if (withOp) { endOperation(cm); } + if (this.parent) { this.parent.clear(); } + }; + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + TextMarker.prototype.find = function (side, lineObj) { + if (side == null && this.type == "bookmark") { side = 1; } + var from, to; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from); + if (side == -1) { return from } + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to); + if (side == 1) { return to } + } + } + return from && {from: from, to: to} + }; + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + TextMarker.prototype.changed = function () { + var this$1 = this; + + var pos = this.find(-1, true), widget = this, cm = this.doc.cm; + if (!pos || !cm) { return } + runInOp(cm, function () { + var line = pos.line, lineN = lineNo(pos.line); + var view = findViewForLine(cm, lineN); + if (view) { + clearLineMeasurementCacheFor(view); + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; + } + cm.curOp.updateMaxLine = true; + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + var oldHeight = widget.height; + widget.height = null; + var dHeight = widgetHeight(widget) - oldHeight; + if (dHeight) + { updateLineHeight(line, line.height + dHeight); } + } + signalLater(cm, "markerChanged", cm, this$1); + }); + }; + + TextMarker.prototype.attachLine = function (line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); } + } + this.lines.push(line); + }; + + TextMarker.prototype.detachLine = function (line) { + this.lines.splice(indexOf(this.lines, line), 1); + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp + ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); + } + }; + eventMixin(TextMarker); + + // Create a marker, wire it up to the right lines, and + function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) { return markTextShared(doc, from, to, options, type) } + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) } + + var marker = new TextMarker(doc, type), diff = cmp(from, to); + if (options) { copyObj(options, marker, false); } + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) + { return marker } + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true; + marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget"); + if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); } + if (options.insertLeft) { marker.widgetNode.insertLeft = true; } + } + if (marker.collapsed) { + if (conflictingCollapsedRange(doc, from.line, from, to, marker) || + from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + { throw new Error("Inserting collapsed marker partially overlapping an existing one") } + seeCollapsedSpans(); + } + + if (marker.addToHistory) + { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); } + + var curLine = from.line, cm = doc.cm, updateMaxLine; + doc.iter(curLine, to.line + 1, function (line) { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) + { updateMaxLine = true; } + if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); } + addMarkedSpan(line, new MarkedSpan(marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null)); + ++curLine; + }); + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) { + if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); } + }); } + + if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); } + + if (marker.readOnly) { + seeReadOnlySpans(); + if (doc.history.done.length || doc.history.undone.length) + { doc.clearHistory(); } + } + if (marker.collapsed) { + marker.id = ++nextMarkerId; + marker.atomic = true; + } + if (cm) { + // Sync editor state + if (updateMaxLine) { cm.curOp.updateMaxLine = true; } + if (marker.collapsed) + { regChange(cm, from.line, to.line + 1); } + else if (marker.className || marker.startStyle || marker.endStyle || marker.css || + marker.attributes || marker.title) + { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } } + if (marker.atomic) { reCheckSelection(cm.doc); } + signalLater(cm, "markerAdded", cm, marker); + } + return marker + } + + // SHARED TEXTMARKERS + + // A shared marker spans multiple linked documents. It is + // implemented as a meta-marker-object controlling multiple normal + // markers. + var SharedTextMarker = function(markers, primary) { + this.markers = markers; + this.primary = primary; + for (var i = 0; i < markers.length; ++i) + { markers[i].parent = this; } + }; + + SharedTextMarker.prototype.clear = function () { + if (this.explicitlyCleared) { return } + this.explicitlyCleared = true; + for (var i = 0; i < this.markers.length; ++i) + { this.markers[i].clear(); } + signalLater(this, "clear"); + }; + + SharedTextMarker.prototype.find = function (side, lineObj) { + return this.primary.find(side, lineObj) + }; + eventMixin(SharedTextMarker); + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options); + options.shared = false; + var markers = [markText(doc, from, to, options, type)], primary = markers[0]; + var widget = options.widgetNode; + linkedDocs(doc, function (doc) { + if (widget) { options.widgetNode = widget.cloneNode(true); } + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); + for (var i = 0; i < doc.linked.length; ++i) + { if (doc.linked[i].isParent) { return } } + primary = lst(markers); + }); + return new SharedTextMarker(markers, primary) + } + + function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; }) + } + + function copySharedMarkers(doc, markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], pos = marker.find(); + var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); + if (cmp(mFrom, mTo)) { + var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); + marker.markers.push(subMark); + subMark.parent = marker; + } + } + } + + function detachSharedMarkers(markers) { + var loop = function ( i ) { + var marker = markers[i], linked = [marker.primary.doc]; + linkedDocs(marker.primary.doc, function (d) { return linked.push(d); }); + for (var j = 0; j < marker.markers.length; j++) { + var subMarker = marker.markers[j]; + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null; + marker.markers.splice(j--, 1); + } + } + }; + + for (var i = 0; i < markers.length; i++) loop( i ); + } + + var nextDocId = 0; + var Doc = function(text, mode, firstLine, lineSep, direction) { + if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) } + if (firstLine == null) { firstLine = 0; } + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); + this.first = firstLine; + this.scrollTop = this.scrollLeft = 0; + this.cantEdit = false; + this.cleanGeneration = 1; + this.modeFrontier = this.highlightFrontier = firstLine; + var start = Pos(firstLine, 0); + this.sel = simpleSelection(start); + this.history = new History(null); + this.id = ++nextDocId; + this.modeOption = mode; + this.lineSep = lineSep; + this.direction = (direction == "rtl") ? "rtl" : "ltr"; + this.extend = false; + + if (typeof text == "string") { text = this.splitLines(text); } + updateDoc(this, {from: start, to: start, text: text}); + setSelection(this, simpleSelection(start), sel_dontScroll); + }; + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) { this.iterN(from - this.first, to - from, op); } + else { this.iterN(this.first, this.first + this.size, from); } + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + var height = 0; + for (var i = 0; i < lines.length; ++i) { height += lines[i].height; } + this.insertInner(at - this.first, lines, height); + }, + remove: function(at, n) { this.removeInner(at - this.first, n); }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep) { + var lines = getLines(this, this.first, this.first + this.size); + if (lineSep === false) { return lines } + return lines.join(lineSep || this.lineSeparator()) + }, + setValue: docMethodOp(function(code) { + var top = Pos(this.first, 0), last = this.first + this.size - 1; + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: this.splitLines(code), origin: "setValue", full: true}, true); + if (this.cm) { scrollToCoords(this.cm, 0, 0); } + setSelection(this, simpleSelection(top), sel_dontScroll); + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from); + to = to ? clipPos(this, to) : from; + replaceRange(this, code, from, to, origin); + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); + if (lineSep === false) { return lines } + return lines.join(lineSep || this.lineSeparator()) + }, + + getLine: function(line) {var l = this.getLineHandle(line); return l && l.text}, + + getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }}, + getLineNumber: function(line) {return lineNo(line)}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") { line = getLine(this, line); } + return visualLine(line) + }, + + lineCount: function() {return this.size}, + firstLine: function() {return this.first}, + lastLine: function() {return this.first + this.size - 1}, + + clipPos: function(pos) {return clipPos(this, pos)}, + + getCursor: function(start) { + var range = this.sel.primary(), pos; + if (start == null || start == "head") { pos = range.head; } + else if (start == "anchor") { pos = range.anchor; } + else if (start == "end" || start == "to" || start === false) { pos = range.to(); } + else { pos = range.from(); } + return pos + }, + listSelections: function() { return this.sel.ranges }, + somethingSelected: function() {return this.sel.somethingSelected()}, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads), options); + }), + extendSelectionsBy: docMethodOp(function(f, options) { + var heads = map(this.sel.ranges, f); + extendSelections(this, clipPosArray(this, heads), options); + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) { return } + var out = []; + for (var i = 0; i < ranges.length; i++) + { out[i] = new Range(clipPos(this, ranges[i].anchor), + clipPos(this, ranges[i].head)); } + if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); } + setSelection(this, normalizeSelection(this.cm, out, primary), options); + }), + addSelection: docMethodOp(function(anchor, head, options) { + var ranges = this.sel.ranges.slice(0); + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); + setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options); + }), + + getSelection: function(lineSep) { + var ranges = this.sel.ranges, lines; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + lines = lines ? lines.concat(sel) : sel; + } + if (lineSep === false) { return lines } + else { return lines.join(lineSep || this.lineSeparator()) } + }, + getSelections: function(lineSep) { + var parts = [], ranges = this.sel.ranges; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); } + parts[i] = sel; + } + return parts + }, + replaceSelection: function(code, collapse, origin) { + var dup = []; + for (var i = 0; i < this.sel.ranges.length; i++) + { dup[i] = code; } + this.replaceSelections(dup, collapse, origin || "+input"); + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + var changes = [], sel = this.sel; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin}; + } + var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); + for (var i$1 = changes.length - 1; i$1 >= 0; i$1--) + { makeChange(this, changes[i$1]); } + if (newSel) { setSelectionReplaceHistory(this, newSel); } + else if (this.cm) { ensureCursorVisible(this.cm); } + }), + undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), + redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), + undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), + redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), + + setExtending: function(val) {this.extend = val;}, + getExtending: function() {return this.extend}, + + historySize: function() { + var hist = this.history, done = 0, undone = 0; + for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } } + for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } } + return {undo: done, redo: undone} + }, + clearHistory: function() { + var this$1 = this; + + this.history = new History(this.history.maxGeneration); + linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true); + }, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true); + }, + changeGeneration: function(forceSplit) { + if (forceSplit) + { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; } + return this.history.generation + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration) + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)} + }, + setHistory: function(histData) { + var hist = this.history = new History(this.history.maxGeneration); + hist.done = copyHistoryArray(histData.done.slice(0), null, true); + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); + }, + + setGutterMarker: docMethodOp(function(line, gutterID, value) { + return changeLine(this, line, "gutter", function (line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) { line.gutterMarkers = null; } + return true + }) + }), + + clearGutter: docMethodOp(function(gutterID) { + var this$1 = this; + + this.iter(function (line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + changeLine(this$1, line, "gutter", function () { + line.gutterMarkers[gutterID] = null; + if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; } + return true + }); + } + }); + }), + + lineInfo: function(line) { + var n; + if (typeof line == "number") { + if (!isLine(this, line)) { return null } + n = line; + line = getLine(this, line); + if (!line) { return null } + } else { + n = lineNo(line); + if (n == null) { return null } + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets} + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + if (!line[prop]) { line[prop] = cls; } + else if (classTest(cls).test(line[prop])) { return false } + else { line[prop] += " " + cls; } + return true + }) + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + var cur = line[prop]; + if (!cur) { return false } + else if (cls == null) { line[prop] = null; } + else { + var found = cur.match(classTest(cls)); + if (!found) { return false } + var end = found.index + found[0].length; + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; + } + return true + }) + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options) + }), + removeLineWidget: function(widget) { widget.clear(); }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range") + }, + setBookmark: function(pos, options) { + var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents}; + pos = clipPos(this, pos); + return markText(this, pos, pos, realOpts, "bookmark") + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos); + var markers = [], spans = getLine(this, pos.line).markedSpans; + if (spans) { for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + { markers.push(span.marker.parent || span.marker); } + } } + return markers + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from); to = clipPos(this, to); + var found = [], lineNo = from.line; + this.iter(from.line, to.line + 1, function (line) { + var spans = line.markedSpans; + if (spans) { for (var i = 0; i < spans.length; i++) { + var span = spans[i]; + if (!(span.to != null && lineNo == from.line && from.ch >= span.to || + span.from == null && lineNo != from.line || + span.from != null && lineNo == to.line && span.from >= to.ch) && + (!filter || filter(span.marker))) + { found.push(span.marker.parent || span.marker); } + } } + ++lineNo; + }); + return found + }, + getAllMarks: function() { + var markers = []; + this.iter(function (line) { + var sps = line.markedSpans; + if (sps) { for (var i = 0; i < sps.length; ++i) + { if (sps[i].from != null) { markers.push(sps[i].marker); } } } + }); + return markers + }, + + posFromIndex: function(off) { + var ch, lineNo = this.first, sepSize = this.lineSeparator().length; + this.iter(function (line) { + var sz = line.text.length + sepSize; + if (sz > off) { ch = off; return true } + off -= sz; + ++lineNo; + }); + return clipPos(this, Pos(lineNo, ch)) + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords); + var index = coords.ch; + if (coords.line < this.first || coords.ch < 0) { return 0 } + var sepSize = this.lineSeparator().length; + this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value + index += line.text.length + sepSize; + }); + return index + }, + + copy: function(copyHistory) { + var doc = new Doc(getLines(this, this.first, this.first + this.size), + this.modeOption, this.first, this.lineSep, this.direction); + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; + doc.sel = this.sel; + doc.extend = false; + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth; + doc.setHistory(this.getHistory()); + } + return doc + }, + + linkedDoc: function(options) { + if (!options) { options = {}; } + var from = this.first, to = this.first + this.size; + if (options.from != null && options.from > from) { from = options.from; } + if (options.to != null && options.to < to) { to = options.to; } + var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction); + if (options.sharedHist) { copy.history = this.history + ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; + copySharedMarkers(copy, findSharedMarkers(this)); + return copy + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) { other = other.doc; } + if (this.linked) { for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i]; + if (link.doc != other) { continue } + this.linked.splice(i, 1); + other.unlinkDoc(this); + detachSharedMarkers(findSharedMarkers(this)); + break + } } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id]; + linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true); + other.history = new History(null); + other.history.done = copyHistoryArray(this.history.done, splitIds); + other.history.undone = copyHistoryArray(this.history.undone, splitIds); + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f);}, + + getMode: function() {return this.mode}, + getEditor: function() {return this.cm}, + + splitLines: function(str) { + if (this.lineSep) { return str.split(this.lineSep) } + return splitLinesAuto(str) + }, + lineSeparator: function() { return this.lineSep || "\n" }, + + setDirection: docMethodOp(function (dir) { + if (dir != "rtl") { dir = "ltr"; } + if (dir == this.direction) { return } + this.direction = dir; + this.iter(function (line) { return line.order = null; }); + if (this.cm) { directionChanged(this.cm); } + }) + }); + + // Public alias. + Doc.prototype.eachLine = Doc.prototype.iter; + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0; + + function onDrop(e) { + var cm = this; + clearDragCursor(cm); + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) + { return } + e_preventDefault(e); + if (ie) { lastDrop = +new Date; } + var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; + if (!pos || cm.isReadOnly()) { return } + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + var n = files.length, text = Array(n), read = 0; + var markAsReadAndPasteIfAllFilesAreRead = function () { + if (++read == n) { + operation(cm, function () { + pos = clipPos(cm.doc, pos); + var change = {from: pos, to: pos, + text: cm.doc.splitLines( + text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())), + origin: "paste"}; + makeChange(cm.doc, change); + setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change)))); + })(); + } + }; + var readTextFromFile = function (file, i) { + if (cm.options.allowDropFileTypes && + indexOf(cm.options.allowDropFileTypes, file.type) == -1) { + markAsReadAndPasteIfAllFilesAreRead(); + return + } + var reader = new FileReader; + reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); }; + reader.onload = function () { + var content = reader.result; + if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { + markAsReadAndPasteIfAllFilesAreRead(); + return + } + text[i] = content; + markAsReadAndPasteIfAllFilesAreRead(); + }; + reader.readAsText(file); + }; + for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); } + } else { // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e); + // Ensure the editor is re-focused + setTimeout(function () { return cm.display.input.focus(); }, 20); + return + } + try { + var text$1 = e.dataTransfer.getData("Text"); + if (text$1) { + var selected; + if (cm.state.draggingText && !cm.state.draggingText.copy) + { selected = cm.listSelections(); } + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); + if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1) + { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } } + cm.replaceSelection(text$1, "around", "paste"); + cm.display.input.focus(); + } + } + catch(e){} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return } + + e.dataTransfer.setData("Text", cm.getSelection()); + e.dataTransfer.effectAllowed = "copyMove"; + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (presto) { + img.width = img.height = 1; + cm.display.wrapper.appendChild(img); + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop; + } + e.dataTransfer.setDragImage(img, 0, 0); + if (presto) { img.parentNode.removeChild(img); } + } + } + + function onDragOver(cm, e) { + var pos = posFromMouse(cm, e); + if (!pos) { return } + var frag = document.createDocumentFragment(); + drawSelectionCursor(cm, pos, frag); + if (!cm.display.dragCursor) { + cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors"); + cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv); + } + removeChildrenAndAdd(cm.display.dragCursor, frag); + } + + function clearDragCursor(cm) { + if (cm.display.dragCursor) { + cm.display.lineSpace.removeChild(cm.display.dragCursor); + cm.display.dragCursor = null; + } + } + + // These must be handled carefully, because naively registering a + // handler for each editor will cause the editors to never be + // garbage collected. + + function forEachCodeMirror(f) { + if (!document.getElementsByClassName) { return } + var byClass = document.getElementsByClassName("CodeMirror"), editors = []; + for (var i = 0; i < byClass.length; i++) { + var cm = byClass[i].CodeMirror; + if (cm) { editors.push(cm); } + } + if (editors.length) { editors[0].operation(function () { + for (var i = 0; i < editors.length; i++) { f(editors[i]); } + }); } + } + + var globalsRegistered = false; + function ensureGlobalHandlers() { + if (globalsRegistered) { return } + registerGlobalHandlers(); + globalsRegistered = true; + } + function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + var resizeTimer; + on(window, "resize", function () { + if (resizeTimer == null) { resizeTimer = setTimeout(function () { + resizeTimer = null; + forEachCodeMirror(onResize); + }, 100); } + }); + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", function () { return forEachCodeMirror(onBlur); }); + } + // Called when the window resizes + function onResize(cm) { + var d = cm.display; + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + d.scrollbarsClipped = false; + cm.setSize(); + } + + var keyNames = { + 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", + 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock", + 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", + 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert" + }; + + // Number keys + for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); } + // Alphabetic keys + for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); } + // Function keys + for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; } + + var keyMap = {}; + + keyMap.basic = { + "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", + "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", + "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", + "Tab": "defaultTab", "Shift-Tab": "indentAuto", + "Enter": "newlineAndIndent", "Insert": "toggleOverwrite", + "Esc": "singleSelection" + }; + // Note that the save and find-related commands aren't defined by + // default. User code or addons can define them. Unknown commands + // are simply ignored. + keyMap.pcDefault = { + "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", + "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", + "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", + "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", + "fallthrough": "basic" + }; + // Very basic readline/emacs-style bindings, which are standard on Mac. + keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars", + "Ctrl-O": "openLine" + }; + keyMap.macDefault = { + "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", + "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", + "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", + "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", + "fallthrough": ["basic", "emacsy"] + }; + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; + + // KEYMAP DISPATCH + + function normalizeKeyName(name) { + var parts = name.split(/-(?!$)/); + name = parts[parts.length - 1]; + var alt, ctrl, shift, cmd; + for (var i = 0; i < parts.length - 1; i++) { + var mod = parts[i]; + if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; } + else if (/^a(lt)?$/i.test(mod)) { alt = true; } + else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; } + else if (/^s(hift)?$/i.test(mod)) { shift = true; } + else { throw new Error("Unrecognized modifier name: " + mod) } + } + if (alt) { name = "Alt-" + name; } + if (ctrl) { name = "Ctrl-" + name; } + if (cmd) { name = "Cmd-" + name; } + if (shift) { name = "Shift-" + name; } + return name + } + + // This is a kludge to keep keymaps mostly working as raw objects + // (backwards compatibility) while at the same time support features + // like normalization and multi-stroke key bindings. It compiles a + // new normalized keymap, and then updates the old object to reflect + // this. + function normalizeKeyMap(keymap) { + var copy = {}; + for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) { + var value = keymap[keyname]; + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue } + if (value == "...") { delete keymap[keyname]; continue } + + var keys = map(keyname.split(" "), normalizeKeyName); + for (var i = 0; i < keys.length; i++) { + var val = (void 0), name = (void 0); + if (i == keys.length - 1) { + name = keys.join(" "); + val = value; + } else { + name = keys.slice(0, i + 1).join(" "); + val = "..."; + } + var prev = copy[name]; + if (!prev) { copy[name] = val; } + else if (prev != val) { throw new Error("Inconsistent bindings for " + name) } + } + delete keymap[keyname]; + } } + for (var prop in copy) { keymap[prop] = copy[prop]; } + return keymap + } + + function lookupKey(key, map, handle, context) { + map = getKeyMap(map); + var found = map.call ? map.call(key, context) : map[key]; + if (found === false) { return "nothing" } + if (found === "...") { return "multi" } + if (found != null && handle(found)) { return "handled" } + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") + { return lookupKey(key, map.fallthrough, handle, context) } + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle, context); + if (result) { return result } + } + } + } + + // Modifier key presses don't count as 'real' key presses for the + // purpose of keymap fallthrough. + function isModifierKey(value) { + var name = typeof value == "string" ? value : keyNames[value.keyCode]; + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod" + } + + function addModifierNames(name, event, noShift) { + var base = name; + if (event.altKey && base != "Alt") { name = "Alt-" + name; } + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; } + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") { name = "Cmd-" + name; } + if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; } + return name + } + + // Look up the name of a key as indicated by an event object. + function keyName(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) { return false } + var name = keyNames[event.keyCode]; + if (name == null || event.altGraphKey) { return false } + // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause, + // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+) + if (event.keyCode == 3 && event.code) { name = event.code; } + return addModifierNames(name, event, noShift) + } + + function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val + } + + // Helper for deleting text near the selection(s), used to implement + // backspace, delete, and similar functionality. + function deleteNearSelection(cm, compute) { + var ranges = cm.doc.sel.ranges, kill = []; + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (var i = 0; i < ranges.length; i++) { + var toKill = compute(ranges[i]); + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + var replaced = kill.pop(); + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from; + break + } + } + kill.push(toKill); + } + // Next, remove those actual ranges. + runInOp(cm, function () { + for (var i = kill.length - 1; i >= 0; i--) + { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); } + ensureCursorVisible(cm); + }); + } + + function moveCharLogically(line, ch, dir) { + var target = skipExtendingChars(line.text, ch + dir, dir); + return target < 0 || target > line.text.length ? null : target + } + + function moveLogically(line, start, dir) { + var ch = moveCharLogically(line, start.ch, dir); + return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before") + } + + function endOfLine(visually, cm, lineObj, lineNo, dir) { + if (visually) { + if (cm.doc.direction == "rtl") { dir = -dir; } + var order = getOrder(lineObj, cm.doc.direction); + if (order) { + var part = dir < 0 ? lst(order) : order[0]; + var moveInStorageOrder = (dir < 0) == (part.level == 1); + var sticky = moveInStorageOrder ? "after" : "before"; + var ch; + // With a wrapped rtl chunk (possibly spanning multiple bidi parts), + // it could be that the last bidi part is not on the last visual line, + // since visual lines contain content order-consecutive chunks. + // Thus, in rtl, we are looking for the first (content-order) character + // in the rtl chunk that is on the last line (that is, the same line + // as the last (content-order) character). + if (part.level > 0 || cm.doc.direction == "rtl") { + var prep = prepareMeasureForLine(cm, lineObj); + ch = dir < 0 ? lineObj.text.length - 1 : 0; + var targetTop = measureCharPrepared(cm, prep, ch).top; + ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch); + if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); } + } else { ch = dir < 0 ? part.to : part.from; } + return new Pos(lineNo, ch, sticky) + } + } + return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after") + } + + function moveVisually(cm, line, start, dir) { + var bidi = getOrder(line, cm.doc.direction); + if (!bidi) { return moveLogically(line, start, dir) } + if (start.ch >= line.text.length) { + start.ch = line.text.length; + start.sticky = "before"; + } else if (start.ch <= 0) { + start.ch = 0; + start.sticky = "after"; + } + var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos]; + if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) { + // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines, + // nothing interesting happens. + return moveLogically(line, start, dir) + } + + var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); }; + var prep; + var getWrappedLineExtent = function (ch) { + if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} } + prep = prep || prepareMeasureForLine(cm, line); + return wrappedLineExtentChar(cm, line, prep, ch) + }; + var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch); + + if (cm.doc.direction == "rtl" || part.level == 1) { + var moveInStorageOrder = (part.level == 1) == (dir < 0); + var ch = mv(start, moveInStorageOrder ? 1 : -1); + if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) { + // Case 2: We move within an rtl part or in an rtl editor on the same visual line + var sticky = moveInStorageOrder ? "before" : "after"; + return new Pos(start.line, ch, sticky) + } + } + + // Case 3: Could not move within this bidi part in this visual line, so leave + // the current bidi part + + var searchInVisualLine = function (partPos, dir, wrappedLineExtent) { + var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder + ? new Pos(start.line, mv(ch, 1), "before") + : new Pos(start.line, ch, "after"); }; + + for (; partPos >= 0 && partPos < bidi.length; partPos += dir) { + var part = bidi[partPos]; + var moveInStorageOrder = (dir > 0) == (part.level != 1); + var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1); + if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) } + ch = moveInStorageOrder ? part.from : mv(part.to, -1); + if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) } + } + }; + + // Case 3a: Look for other bidi parts on the same visual line + var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent); + if (res) { return res } + + // Case 3b: Look for other bidi parts on the next visual line + var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1); + if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) { + res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh)); + if (res) { return res } + } + + // Case 4: Nowhere to move + return null + } + + // Commands are parameter-less actions that can be performed on an + // editor, mostly used for keybindings. + var commands = { + selectAll: selectAll, + singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); }, + killLine: function (cm) { return deleteNearSelection(cm, function (range) { + if (range.empty()) { + var len = getLine(cm.doc, range.head.line).text.length; + if (range.head.ch == len && range.head.line < cm.lastLine()) + { return {from: range.head, to: Pos(range.head.line + 1, 0)} } + else + { return {from: range.head, to: Pos(range.head.line, len)} } + } else { + return {from: range.from(), to: range.to()} + } + }); }, + deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({ + from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0)) + }); }); }, + delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({ + from: Pos(range.from().line, 0), to: range.from() + }); }); }, + delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { + var top = cm.charCoords(range.head, "div").top + 5; + var leftPos = cm.coordsChar({left: 0, top: top}, "div"); + return {from: leftPos, to: range.from()} + }); }, + delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) { + var top = cm.charCoords(range.head, "div").top + 5; + var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + return {from: range.from(), to: rightPos } + }); }, + undo: function (cm) { return cm.undo(); }, + redo: function (cm) { return cm.redo(); }, + undoSelection: function (cm) { return cm.undoSelection(); }, + redoSelection: function (cm) { return cm.redoSelection(); }, + goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); }, + goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); }, + goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); }, + {origin: "+move", bias: 1} + ); }, + goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); }, + {origin: "+move", bias: 1} + ); }, + goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); }, + {origin: "+move", bias: -1} + ); }, + goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) { + var top = cm.cursorCoords(range.head, "div").top + 5; + return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div") + }, sel_move); }, + goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) { + var top = cm.cursorCoords(range.head, "div").top + 5; + return cm.coordsChar({left: 0, top: top}, "div") + }, sel_move); }, + goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) { + var top = cm.cursorCoords(range.head, "div").top + 5; + var pos = cm.coordsChar({left: 0, top: top}, "div"); + if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) } + return pos + }, sel_move); }, + goLineUp: function (cm) { return cm.moveV(-1, "line"); }, + goLineDown: function (cm) { return cm.moveV(1, "line"); }, + goPageUp: function (cm) { return cm.moveV(-1, "page"); }, + goPageDown: function (cm) { return cm.moveV(1, "page"); }, + goCharLeft: function (cm) { return cm.moveH(-1, "char"); }, + goCharRight: function (cm) { return cm.moveH(1, "char"); }, + goColumnLeft: function (cm) { return cm.moveH(-1, "column"); }, + goColumnRight: function (cm) { return cm.moveH(1, "column"); }, + goWordLeft: function (cm) { return cm.moveH(-1, "word"); }, + goGroupRight: function (cm) { return cm.moveH(1, "group"); }, + goGroupLeft: function (cm) { return cm.moveH(-1, "group"); }, + goWordRight: function (cm) { return cm.moveH(1, "word"); }, + delCharBefore: function (cm) { return cm.deleteH(-1, "char"); }, + delCharAfter: function (cm) { return cm.deleteH(1, "char"); }, + delWordBefore: function (cm) { return cm.deleteH(-1, "word"); }, + delWordAfter: function (cm) { return cm.deleteH(1, "word"); }, + delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); }, + delGroupAfter: function (cm) { return cm.deleteH(1, "group"); }, + indentAuto: function (cm) { return cm.indentSelection("smart"); }, + indentMore: function (cm) { return cm.indentSelection("add"); }, + indentLess: function (cm) { return cm.indentSelection("subtract"); }, + insertTab: function (cm) { return cm.replaceSelection("\t"); }, + insertSoftTab: function (cm) { + var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; + for (var i = 0; i < ranges.length; i++) { + var pos = ranges[i].from(); + var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); + spaces.push(spaceStr(tabSize - col % tabSize)); + } + cm.replaceSelections(spaces); + }, + defaultTab: function (cm) { + if (cm.somethingSelected()) { cm.indentSelection("add"); } + else { cm.execCommand("insertTab"); } + }, + // Swap the two chars left and right of each selection's head. + // Move cursor behind the two swapped characters afterwards. + // + // Doesn't consider line feeds a character. + // Doesn't scan more than one line above to find a character. + // Doesn't do anything on an empty line. + // Doesn't do anything with non-empty selections. + transposeChars: function (cm) { return runInOp(cm, function () { + var ranges = cm.listSelections(), newSel = []; + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) { continue } + var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; + if (line) { + if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); } + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1); + cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), cur, "+transpose"); + } else if (cur.line > cm.doc.first) { + var prev = getLine(cm.doc, cur.line - 1).text; + if (prev) { + cur = new Pos(cur.line, 1); + cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), cur, "+transpose"); + } + } + } + newSel.push(new Range(cur, cur)); + } + cm.setSelections(newSel); + }); }, + newlineAndIndent: function (cm) { return runInOp(cm, function () { + var sels = cm.listSelections(); + for (var i = sels.length - 1; i >= 0; i--) + { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); } + sels = cm.listSelections(); + for (var i$1 = 0; i$1 < sels.length; i$1++) + { cm.indentLine(sels[i$1].from().line, null, true); } + ensureCursorVisible(cm); + }); }, + openLine: function (cm) { return cm.replaceSelection("\n", "start"); }, + toggleOverwrite: function (cm) { return cm.toggleOverwrite(); } + }; + + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLine(line); + if (visual != line) { lineN = lineNo(visual); } + return endOfLine(true, cm, visual, lineN, 1) + } + function lineEnd(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLineEnd(line); + if (visual != line) { lineN = lineNo(visual); } + return endOfLine(true, cm, line, lineN, -1) + } + function lineStartSmart(cm, pos) { + var start = lineStart(cm, pos.line); + var line = getLine(cm.doc, start.line); + var order = getOrder(line, cm.doc.direction); + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(start.ch, line.text.search(/\S/)); + var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; + return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky) + } + return start + } + + // Run a handler that was bound to a key. + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound]; + if (!bound) { return false } + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled(); + var prevShift = cm.display.shift, done = false; + try { + if (cm.isReadOnly()) { cm.state.suppressEdits = true; } + if (dropShift) { cm.display.shift = false; } + done = bound(cm) != Pass; + } finally { + cm.display.shift = prevShift; + cm.state.suppressEdits = false; + } + return done + } + + function lookupKeyForEditor(cm, name, handle) { + for (var i = 0; i < cm.state.keyMaps.length; i++) { + var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); + if (result) { return result } + } + return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) + || lookupKey(name, cm.options.keyMap, handle, cm) + } + + // Note that, despite the name, this function is also used to check + // for bound mouse clicks. + + var stopSeq = new Delayed; + + function dispatchKey(cm, name, e, handle) { + var seq = cm.state.keySeq; + if (seq) { + if (isModifierKey(name)) { return "handled" } + if (/\'$/.test(name)) + { cm.state.keySeq = null; } + else + { stopSeq.set(50, function () { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null; + cm.display.input.reset(); + } + }); } + if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true } + } + return dispatchKeyInner(cm, name, e, handle) + } + + function dispatchKeyInner(cm, name, e, handle) { + var result = lookupKeyForEditor(cm, name, handle); + + if (result == "multi") + { cm.state.keySeq = name; } + if (result == "handled") + { signalLater(cm, "keyHandled", cm, name, e); } + + if (result == "handled" || result == "multi") { + e_preventDefault(e); + restartBlink(cm); + } + + return !!result + } + + // Handle a key from the keydown event. + function handleKeyBinding(cm, e) { + var name = keyName(e, true); + if (!name) { return false } + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); }) + || dispatchKey(cm, name, e, function (b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + { return doHandleBinding(cm, b) } + }) + } else { + return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); }) + } + } + + // Handle a key from the keypress event + function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); }) + } + + var lastStoppedKey = null; + function onKeyDown(e) { + var cm = this; + cm.curOp.focus = activeElt(); + if (signalDOMEvent(cm, e)) { return } + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; } + var code = e.keyCode; + cm.display.shift = code == 16 || e.shiftKey; + var handled = handleKeyBinding(cm, e); + if (presto) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + { cm.replaceSelection("", null, "cut"); } + } + if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand) + { document.execCommand("cut"); } + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) + { showCrossHair(cm); } + } + + function showCrossHair(cm) { + var lineDiv = cm.display.lineDiv; + addClass(lineDiv, "CodeMirror-crosshair"); + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair"); + off(document, "keyup", up); + off(document, "mouseover", up); + } + } + on(document, "keyup", up); + on(document, "mouseover", up); + } + + function onKeyUp(e) { + if (e.keyCode == 16) { this.doc.sel.shift = false; } + signalDOMEvent(this, e); + } + + function onKeyPress(e) { + var cm = this; + if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return } + var keyCode = e.keyCode, charCode = e.charCode; + if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return} + if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return } + var ch = String.fromCharCode(charCode == null ? keyCode : charCode); + // Some browsers fire keypress events for backspace + if (ch == "\x08") { return } + if (handleCharBinding(cm, e, ch)) { return } + cm.display.input.onKeyPress(e); + } + + var DOUBLECLICK_DELAY = 400; + + var PastClick = function(time, pos, button) { + this.time = time; + this.pos = pos; + this.button = button; + }; + + PastClick.prototype.compare = function (time, pos, button) { + return this.time + DOUBLECLICK_DELAY > time && + cmp(pos, this.pos) == 0 && button == this.button + }; + + var lastClick, lastDoubleClick; + function clickRepeat(pos, button) { + var now = +new Date; + if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) { + lastClick = lastDoubleClick = null; + return "triple" + } else if (lastClick && lastClick.compare(now, pos, button)) { + lastDoubleClick = new PastClick(now, pos, button); + lastClick = null; + return "double" + } else { + lastClick = new PastClick(now, pos, button); + lastDoubleClick = null; + return "single" + } + } + + // A mouse down can be a single click, double click, triple click, + // start of selection drag, start of text drag, new cursor + // (ctrl-click), rectangle drag (alt-drag), or xwin + // middle-click-paste. Or it might be a click on something we should + // not interfere with, such as a scrollbar or widget. + function onMouseDown(e) { + var cm = this, display = cm.display; + if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return } + display.input.ensurePolled(); + display.shift = e.shiftKey; + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false; + setTimeout(function () { return display.scroller.draggable = true; }, 100); + } + return + } + if (clickInGutter(cm, e)) { return } + var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single"; + window.focus(); + + // #3261: make sure, that we're not starting a second selection + if (button == 1 && cm.state.selectingText) + { cm.state.selectingText(e); } + + if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return } + + if (button == 1) { + if (pos) { leftButtonDown(cm, pos, repeat, e); } + else if (e_target(e) == display.scroller) { e_preventDefault(e); } + } else if (button == 2) { + if (pos) { extendSelection(cm.doc, pos); } + setTimeout(function () { return display.input.focus(); }, 20); + } else if (button == 3) { + if (captureRightClick) { cm.display.input.onContextMenu(e); } + else { delayBlurEvent(cm); } + } + } + + function handleMappedButton(cm, button, pos, repeat, event) { + var name = "Click"; + if (repeat == "double") { name = "Double" + name; } + else if (repeat == "triple") { name = "Triple" + name; } + name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name; + + return dispatchKey(cm, addModifierNames(name, event), event, function (bound) { + if (typeof bound == "string") { bound = commands[bound]; } + if (!bound) { return false } + var done = false; + try { + if (cm.isReadOnly()) { cm.state.suppressEdits = true; } + done = bound(cm, pos) != Pass; + } finally { + cm.state.suppressEdits = false; + } + return done + }) + } + + function configureMouse(cm, repeat, event) { + var option = cm.getOption("configureMouse"); + var value = option ? option(cm, repeat, event) : {}; + if (value.unit == null) { + var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey; + value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line"; + } + if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; } + if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; } + if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); } + return value + } + + function leftButtonDown(cm, pos, repeat, event) { + if (ie) { setTimeout(bind(ensureFocus, cm), 0); } + else { cm.curOp.focus = activeElt(); } + + var behavior = configureMouse(cm, repeat, event); + + var sel = cm.doc.sel, contained; + if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && + repeat == "single" && (contained = sel.contains(pos)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && + (cmp(contained.to(), pos) > 0 || pos.xRel < 0)) + { leftButtonStartDrag(cm, event, pos, behavior); } + else + { leftButtonSelect(cm, event, pos, behavior); } + } + + // Start a text drag. When it ends, see if any dragging actually + // happen, and treat as a click if it didn't. + function leftButtonStartDrag(cm, event, pos, behavior) { + var display = cm.display, moved = false; + var dragEnd = operation(cm, function (e) { + if (webkit) { display.scroller.draggable = false; } + cm.state.draggingText = false; + off(display.wrapper.ownerDocument, "mouseup", dragEnd); + off(display.wrapper.ownerDocument, "mousemove", mouseMove); + off(display.scroller, "dragstart", dragStart); + off(display.scroller, "drop", dragEnd); + if (!moved) { + e_preventDefault(e); + if (!behavior.addNew) + { extendSelection(cm.doc, pos, null, null, behavior.extend); } + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if (webkit || ie && ie_version == 9) + { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); } + else + { display.input.focus(); } + } + }); + var mouseMove = function(e2) { + moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10; + }; + var dragStart = function () { return moved = true; }; + // Let the drag handler handle this. + if (webkit) { display.scroller.draggable = true; } + cm.state.draggingText = dragEnd; + dragEnd.copy = !behavior.moveOnDrag; + // IE's approach to draggable + if (display.scroller.dragDrop) { display.scroller.dragDrop(); } + on(display.wrapper.ownerDocument, "mouseup", dragEnd); + on(display.wrapper.ownerDocument, "mousemove", mouseMove); + on(display.scroller, "dragstart", dragStart); + on(display.scroller, "drop", dragEnd); + + delayBlurEvent(cm); + setTimeout(function () { return display.input.focus(); }, 20); + } + + function rangeForUnit(cm, pos, unit) { + if (unit == "char") { return new Range(pos, pos) } + if (unit == "word") { return cm.findWordAt(pos) } + if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) } + var result = unit(cm, pos); + return new Range(result.from, result.to) + } + + // Normal selection, as opposed to text dragging. + function leftButtonSelect(cm, event, start, behavior) { + var display = cm.display, doc = cm.doc; + e_preventDefault(event); + + var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; + if (behavior.addNew && !behavior.extend) { + ourIndex = doc.sel.contains(start); + if (ourIndex > -1) + { ourRange = ranges[ourIndex]; } + else + { ourRange = new Range(start, start); } + } else { + ourRange = doc.sel.primary(); + ourIndex = doc.sel.primIndex; + } + + if (behavior.unit == "rectangle") { + if (!behavior.addNew) { ourRange = new Range(start, start); } + start = posFromMouse(cm, event, true, true); + ourIndex = -1; + } else { + var range = rangeForUnit(cm, start, behavior.unit); + if (behavior.extend) + { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); } + else + { ourRange = range; } + } + + if (!behavior.addNew) { + ourIndex = 0; + setSelection(doc, new Selection([ourRange], 0), sel_mouse); + startSel = doc.sel; + } else if (ourIndex == -1) { + ourIndex = ranges.length; + setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), + {scroll: false, origin: "*mouse"}); + } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) { + setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), + {scroll: false, origin: "*mouse"}); + startSel = doc.sel; + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); + } + + var lastPos = start; + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) { return } + lastPos = pos; + + if (behavior.unit == "rectangle") { + var ranges = [], tabSize = cm.options.tabSize; + var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); + var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); + var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); + for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; line++) { + var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); + if (left == right) + { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); } + else if (text.length > leftPos) + { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); } + } + if (!ranges.length) { ranges.push(new Range(start, start)); } + setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), + {origin: "*mouse", scroll: false}); + cm.scrollIntoView(pos); + } else { + var oldRange = ourRange; + var range = rangeForUnit(cm, pos, behavior.unit); + var anchor = oldRange.anchor, head; + if (cmp(range.anchor, anchor) > 0) { + head = range.head; + anchor = minPos(oldRange.from(), range.anchor); + } else { + head = range.anchor; + anchor = maxPos(oldRange.to(), range.head); + } + var ranges$1 = startSel.ranges.slice(0); + ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head)); + setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse); + } + } + + var editorSize = display.wrapper.getBoundingClientRect(); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0; + + function extend(e) { + var curCount = ++counter; + var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle"); + if (!cur) { return } + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt(); + extendTo(cur); + var visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) + { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); } + } else { + var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) { setTimeout(operation(cm, function () { + if (counter != curCount) { return } + display.scroller.scrollTop += outside; + extend(e); + }), 50); } + } + } + + function done(e) { + cm.state.selectingText = false; + counter = Infinity; + // If e is null or undefined we interpret this as someone trying + // to explicitly cancel the selection rather than the user + // letting go of the mouse button. + if (e) { + e_preventDefault(e); + display.input.focus(); + } + off(display.wrapper.ownerDocument, "mousemove", move); + off(display.wrapper.ownerDocument, "mouseup", up); + doc.history.lastSelOrigin = null; + } + + var move = operation(cm, function (e) { + if (e.buttons === 0 || !e_button(e)) { done(e); } + else { extend(e); } + }); + var up = operation(cm, done); + cm.state.selectingText = up; + on(display.wrapper.ownerDocument, "mousemove", move); + on(display.wrapper.ownerDocument, "mouseup", up); + } + + // Used when mouse-selecting to adjust the anchor to the proper side + // of a bidi jump depending on the visual position of the head. + function bidiSimplify(cm, range) { + var anchor = range.anchor; + var head = range.head; + var anchorLine = getLine(cm.doc, anchor.line); + if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range } + var order = getOrder(anchorLine); + if (!order) { return range } + var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index]; + if (part.from != anchor.ch && part.to != anchor.ch) { return range } + var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1); + if (boundary == 0 || boundary == order.length) { return range } + + // Compute the relative visual position of the head compared to the + // anchor (<0 is to the left, >0 to the right) + var leftSide; + if (head.line != anchor.line) { + leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0; + } else { + var headIndex = getBidiPartAt(order, head.ch, head.sticky); + var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1); + if (headIndex == boundary - 1 || headIndex == boundary) + { leftSide = dir < 0; } + else + { leftSide = dir > 0; } + } + + var usePart = order[boundary + (leftSide ? -1 : 0)]; + var from = leftSide == (usePart.level == 1); + var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before"; + return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head) + } + + + // Determines whether an event happened in the gutter, and fires the + // handlers for the corresponding event. + function gutterEvent(cm, e, type, prevent) { + var mX, mY; + if (e.touches) { + mX = e.touches[0].clientX; + mY = e.touches[0].clientY; + } else { + try { mX = e.clientX; mY = e.clientY; } + catch(e) { return false } + } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false } + if (prevent) { e_preventDefault(e); } + + var display = cm.display; + var lineBox = display.lineDiv.getBoundingClientRect(); + + if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) } + mY -= lineBox.top - display.viewOffset; + + for (var i = 0; i < cm.display.gutterSpecs.length; ++i) { + var g = display.gutters.childNodes[i]; + if (g && g.getBoundingClientRect().right >= mX) { + var line = lineAtHeight(cm.doc, mY); + var gutter = cm.display.gutterSpecs[i]; + signal(cm, type, cm, line, gutter.className, e); + return e_defaultPrevented(e) + } + } + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true) + } + + // CONTEXT MENU HANDLING + + // To make the context menu work, we need to briefly unhide the + // textarea (making it as unobtrusive as possible) to let the + // right-click take effect on it. + function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return } + if (signalDOMEvent(cm, e, "contextmenu")) { return } + if (!captureRightClick) { cm.display.input.onContextMenu(e); } + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) { return false } + return gutterEvent(cm, e, "gutterContextMenu", false) + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); + clearCaches(cm); + } + + var Init = {toString: function(){return "CodeMirror.Init"}}; + + var defaults = {}; + var optionHandlers = {}; + + function defineOptions(CodeMirror) { + var optionHandlers = CodeMirror.optionHandlers; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) { optionHandlers[name] = + notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; } + } + + CodeMirror.defineOption = option; + + // Passed to option handlers when there is no old value. + CodeMirror.Init = Init; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", function (cm, val) { return cm.setValue(val); }, true); + option("mode", null, function (cm, val) { + cm.doc.modeOption = val; + loadMode(cm); + }, true); + + option("indentUnit", 2, loadMode, true); + option("indentWithTabs", false); + option("smartIndent", true); + option("tabSize", 4, function (cm) { + resetModeState(cm); + clearCaches(cm); + regChange(cm); + }, true); + + option("lineSeparator", null, function (cm, val) { + cm.doc.lineSep = val; + if (!val) { return } + var newBreaks = [], lineNo = cm.doc.first; + cm.doc.iter(function (line) { + for (var pos = 0;;) { + var found = line.text.indexOf(val, pos); + if (found == -1) { break } + pos = found + val.length; + newBreaks.push(Pos(lineNo, found)); + } + lineNo++; + }); + for (var i = newBreaks.length - 1; i >= 0; i--) + { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); } + }); + option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, function (cm, val, old) { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); + if (old != Init) { cm.refresh(); } + }); + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true); + option("electricChars", true); + option("inputStyle", mobile ? "contenteditable" : "textarea", function () { + throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME + }, true); + option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true); + option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true); + option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true); + option("rtlMoveVisually", !windows); + option("wholeLineUpdateBefore", true); + + option("theme", "default", function (cm) { + themeChanged(cm); + updateGutters(cm); + }, true); + option("keyMap", "default", function (cm, val, old) { + var next = getKeyMap(val); + var prev = old != Init && getKeyMap(old); + if (prev && prev.detach) { prev.detach(cm, next); } + if (next.attach) { next.attach(cm, prev || null); } + }); + option("extraKeys", null); + option("configureMouse", null); + + option("lineWrapping", false, wrappingChanged, true); + option("gutters", [], function (cm, val) { + cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers); + updateGutters(cm); + }, true); + option("fixedGutter", true, function (cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; + cm.refresh(); + }, true); + option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true); + option("scrollbarStyle", "native", function (cm) { + initScrollbars(cm); + updateScrollbars(cm); + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); + }, true); + option("lineNumbers", false, function (cm, val) { + cm.display.gutterSpecs = getGutters(cm.options.gutters, val); + updateGutters(cm); + }, true); + option("firstLineNumber", 1, updateGutters, true); + option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true); + option("showCursorWhenSelecting", false, updateSelection, true); + + option("resetSelectionOnContextMenu", true); + option("lineWiseCopyCut", true); + option("pasteLinesPerSelection", true); + option("selectionsMayTouch", false); + + option("readOnly", false, function (cm, val) { + if (val == "nocursor") { + onBlur(cm); + cm.display.input.blur(); + } + cm.display.input.readOnlyChanged(val); + }); + option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true); + option("dragDrop", true, dragDropChanged); + option("allowDropFileTypes", null); + + option("cursorBlinkRate", 530); + option("cursorScrollMargin", 0); + option("cursorHeight", 1, updateSelection, true); + option("singleCursorHeightPerLine", true, updateSelection, true); + option("workTime", 100); + option("workDelay", 100); + option("flattenSpans", true, resetModeState, true); + option("addModeClass", false, resetModeState, true); + option("pollInterval", 100); + option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; }); + option("historyEventDelay", 1250); + option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true); + option("maxHighlightLength", 10000, resetModeState, true); + option("moveInputWithCursor", true, function (cm, val) { + if (!val) { cm.display.input.resetPosition(); } + }); + + option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; }); + option("autofocus", null); + option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true); + option("phrases", null); + } + + function dragDropChanged(cm, value, old) { + var wasOn = old && old != Init; + if (!value != !wasOn) { + var funcs = cm.display.dragFunctions; + var toggle = value ? on : off; + toggle(cm.display.scroller, "dragstart", funcs.start); + toggle(cm.display.scroller, "dragenter", funcs.enter); + toggle(cm.display.scroller, "dragover", funcs.over); + toggle(cm.display.scroller, "dragleave", funcs.leave); + toggle(cm.display.scroller, "drop", funcs.drop); + } + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap"); + cm.display.sizer.style.minWidth = ""; + cm.display.sizerWidth = null; + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap"); + findMaxLine(cm); + } + estimateLineHeights(cm); + regChange(cm); + clearCaches(cm); + setTimeout(function () { return updateScrollbars(cm); }, 100); + } + + // A CodeMirror instance represents an editor. This is the object + // that user code is usually dealing with. + + function CodeMirror(place, options) { + var this$1 = this; + + if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) } + + this.options = options = options ? copyObj(options) : {}; + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false); + + var doc = options.value; + if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); } + else if (options.mode) { doc.modeOption = options.mode; } + this.doc = doc; + + var input = new CodeMirror.inputStyles[options.inputStyle](this); + var display = this.display = new Display(place, doc, input, options); + display.wrapper.CodeMirror = this; + themeChanged(this); + if (options.lineWrapping) + { this.display.wrapper.className += " CodeMirror-wrap"; } + initScrollbars(this); + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll + selectingText: false, + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + }; + + if (options.autofocus && !mobile) { display.input.focus(); } + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); } + + registerEventHandlers(this); + ensureGlobalHandlers(); + + startOperation(this); + this.curOp.forceUpdate = true; + attachDoc(this, doc); + + if ((options.autofocus && !mobile) || this.hasFocus()) + { setTimeout(bind(onFocus, this), 20); } + else + { onBlur(this); } + + for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt)) + { optionHandlers[opt](this, options[opt], Init); } } + maybeUpdateLineNumberWidth(this); + if (options.finishInit) { options.finishInit(this); } + for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); } + endOperation(this); + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if (webkit && options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") + { display.lineDiv.style.textRendering = "auto"; } + } + + // The default configuration options. + CodeMirror.defaults = defaults; + // Functions to run when options are changed. + CodeMirror.optionHandlers = optionHandlers; + + // Attach the necessary event handlers when initializing the editor + function registerEventHandlers(cm) { + var d = cm.display; + on(d.scroller, "mousedown", operation(cm, onMouseDown)); + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) + { on(d.scroller, "dblclick", operation(cm, function (e) { + if (signalDOMEvent(cm, e)) { return } + var pos = posFromMouse(cm, e); + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return } + e_preventDefault(e); + var word = cm.findWordAt(pos); + extendSelection(cm.doc, word.anchor, word.head); + })); } + else + { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); } + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); }); + on(d.input.getField(), "contextmenu", function (e) { + if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); } + }); + + // Used to suppress mouse event handling when a touch happens + var touchFinished, prevTouch = {end: 0}; + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000); + prevTouch = d.activeTouch; + prevTouch.end = +new Date; + } + } + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) { return false } + var touch = e.touches[0]; + return touch.radiusX <= 1 && touch.radiusY <= 1 + } + function farAway(touch, other) { + if (other.left == null) { return true } + var dx = other.left - touch.left, dy = other.top - touch.top; + return dx * dx + dy * dy > 20 * 20 + } + on(d.scroller, "touchstart", function (e) { + if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) { + d.input.ensurePolled(); + clearTimeout(touchFinished); + var now = +new Date; + d.activeTouch = {start: now, moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null}; + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX; + d.activeTouch.top = e.touches[0].pageY; + } + } + }); + on(d.scroller, "touchmove", function () { + if (d.activeTouch) { d.activeTouch.moved = true; } + }); + on(d.scroller, "touchend", function (e) { + var touch = d.activeTouch; + if (touch && !eventInWidget(d, e) && touch.left != null && + !touch.moved && new Date - touch.start < 300) { + var pos = cm.coordsChar(d.activeTouch, "page"), range; + if (!touch.prev || farAway(touch, touch.prev)) // Single tap + { range = new Range(pos, pos); } + else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap + { range = cm.findWordAt(pos); } + else // Triple tap + { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); } + cm.setSelection(range.anchor, range.head); + cm.focus(); + e_preventDefault(e); + } + finishTouch(); + }); + on(d.scroller, "touchcancel", finishTouch); + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", function () { + if (d.scroller.clientHeight) { + updateScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, "scroll", cm); + } + }); + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); }); + on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); }); + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + + d.dragFunctions = { + enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }}, + over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }}, + start: function (e) { return onDragStart(cm, e); }, + drop: operation(cm, onDrop), + leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }} + }; + + var inp = d.input.getField(); + on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); }); + on(inp, "keydown", operation(cm, onKeyDown)); + on(inp, "keypress", operation(cm, onKeyPress)); + on(inp, "focus", function (e) { return onFocus(cm, e); }); + on(inp, "blur", function (e) { return onBlur(cm, e); }); + } + + var initHooks = []; + CodeMirror.defineInitHook = function (f) { return initHooks.push(f); }; + + // Indent the given line. The how parameter can be "smart", + // "add"/null, "subtract", or "prev". When aggressive is false + // (typically set to true for forced single-line indents), empty + // lines are not indented, and places where the mode returns Pass + // are left alone. + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc, state; + if (how == null) { how = "add"; } + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) { how = "prev"; } + else { state = getContextBefore(cm, n).state; } + } + + var tabSize = cm.options.tabSize; + var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); + if (line.stateAfter) { line.stateAfter = null; } + var curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0; + how = "not"; + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass || indentation > 150) { + if (!aggressive) { return } + how = "prev"; + } + } + if (how == "prev") { + if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); } + else { indentation = 0; } + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit; + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit; + } else if (typeof how == "number") { + indentation = curSpace + how; + } + indentation = Math.max(0, indentation); + + var indentString = "", pos = 0; + if (cm.options.indentWithTabs) + { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} } + if (pos < indentation) { indentString += spaceStr(indentation - pos); } + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); + line.stateAfter = null; + return true + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) { + var range = doc.sel.ranges[i$1]; + if (range.head.line == n && range.head.ch < curSpaceString.length) { + var pos$1 = Pos(n, curSpaceString.length); + replaceOneSelection(doc, i$1, new Range(pos$1, pos$1)); + break + } + } + } + } + + // This will be set to a {lineWise: bool, text: [string]} object, so + // that, when pasting, we know what kind of selections the copied + // text was made out of. + var lastCopied = null; + + function setLastCopied(newLastCopied) { + lastCopied = newLastCopied; + } + + function applyTextInput(cm, inserted, deleted, sel, origin) { + var doc = cm.doc; + cm.display.shift = false; + if (!sel) { sel = doc.sel; } + + var recent = +new Date - 200; + var paste = origin == "paste" || cm.state.pasteIncoming > recent; + var textLines = splitLinesAuto(inserted), multiPaste = null; + // When pasting N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.text.join("\n") == inserted) { + if (sel.ranges.length % lastCopied.text.length == 0) { + multiPaste = []; + for (var i = 0; i < lastCopied.text.length; i++) + { multiPaste.push(doc.splitLines(lastCopied.text[i])); } + } + } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) { + multiPaste = map(textLines, function (l) { return [l]; }); + } + } + + var updateInput = cm.curOp.updateInput; + // Normal behavior is to insert the new text into every selection + for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) { + var range = sel.ranges[i$1]; + var from = range.from(), to = range.to(); + if (range.empty()) { + if (deleted && deleted > 0) // Handle deletion + { from = Pos(from.line, from.ch - deleted); } + else if (cm.state.overwrite && !paste) // Handle overwrite + { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); } + else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted) + { from = to = Pos(from.line, 0); } + } + var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines, + origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")}; + makeChange(cm.doc, changeEvent); + signalLater(cm, "inputRead", cm, changeEvent); + } + if (inserted && !paste) + { triggerElectric(cm, inserted); } + + ensureCursorVisible(cm); + if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; } + cm.curOp.typing = true; + cm.state.pasteIncoming = cm.state.cutIncoming = -1; + } + + function handlePaste(e, cm) { + var pasted = e.clipboardData && e.clipboardData.getData("Text"); + if (pasted) { + e.preventDefault(); + if (!cm.isReadOnly() && !cm.options.disableInput) + { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); } + return true + } + } + + function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) { return } + var sel = cm.doc.sel; + + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue } + var mode = cm.getModeAt(range.head); + var indented = false; + if (mode.electricChars) { + for (var j = 0; j < mode.electricChars.length; j++) + { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart"); + break + } } + } else if (mode.electricInput) { + if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) + { indented = indentLine(cm, range.head.line, "smart"); } + } + if (indented) { signalLater(cm, "electricInput", cm, range.head.line); } + } + } + + function copyableRanges(cm) { + var text = [], ranges = []; + for (var i = 0; i < cm.doc.sel.ranges.length; i++) { + var line = cm.doc.sel.ranges[i].head.line; + var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; + ranges.push(lineRange); + text.push(cm.getRange(lineRange.anchor, lineRange.head)); + } + return {text: text, ranges: ranges} + } + + function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) { + field.setAttribute("autocorrect", autocorrect ? "" : "off"); + field.setAttribute("autocapitalize", autocapitalize ? "" : "off"); + field.setAttribute("spellcheck", !!spellcheck); + } + + function hiddenTextarea() { + var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"); + var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) { te.style.width = "1000px"; } + else { te.setAttribute("wrap", "off"); } + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) { te.style.border = "1px solid black"; } + disableBrowserMagic(te); + return div + } + + // The publicly visible API. Note that methodOp(f) means + // 'wrap f in an operation, performed on its `this` parameter'. + + // This is not the complete set of editor methods. Most of the + // methods defined on the Doc type are also injected into + // CodeMirror.prototype, for backwards compatibility and + // convenience. + + function addEditorMethods(CodeMirror) { + var optionHandlers = CodeMirror.optionHandlers; + + var helpers = CodeMirror.helpers = {}; + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){window.focus(); this.display.input.focus();}, + + setOption: function(option, value) { + var options = this.options, old = options[option]; + if (options[option] == value && option != "mode") { return } + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) + { operation(this, optionHandlers[option])(this, value, old); } + signal(this, "optionChange", this, option); + }, + + getOption: function(option) {return this.options[option]}, + getDoc: function() {return this.doc}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps; + for (var i = 0; i < maps.length; ++i) + { if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1); + return true + } } + }, + + addOverlay: methodOp(function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); + if (mode.startState) { throw new Error("Overlays may not be stateful.") } + insertSorted(this.state.overlays, + {mode: mode, modeSpec: spec, opaque: options && options.opaque, + priority: (options && options.priority) || 0}, + function (overlay) { return overlay.priority; }); + this.state.modeGen++; + regChange(this); + }), + removeOverlay: methodOp(function(spec) { + var overlays = this.state.overlays; + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec; + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1); + this.state.modeGen++; + regChange(this); + return + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; } + else { dir = dir ? "add" : "subtract"; } + } + if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); } + }), + indentSelection: methodOp(function(how) { + var ranges = this.doc.sel.ranges, end = -1; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (!range.empty()) { + var from = range.from(), to = range.to(); + var start = Math.max(end, from.line); + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; + for (var j = start; j < end; ++j) + { indentLine(this, j, how); } + var newRanges = this.doc.sel.ranges; + if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) + { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); } + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true); + end = range.head.line; + if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); } + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise) + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true) + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos); + var styles = getLineStyles(this, getLine(this.doc, pos.line)); + var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; + var type; + if (ch == 0) { type = styles[2]; } + else { for (;;) { + var mid = (before + after) >> 1; + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; } + else if (styles[mid * 2 + 1] < ch) { before = mid + 1; } + else { type = styles[mid * 2 + 2]; break } + } } + var cut = type ? type.indexOf("overlay ") : -1; + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1) + }, + + getModeAt: function(pos) { + var mode = this.doc.mode; + if (!mode.innerMode) { return mode } + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0] + }, + + getHelpers: function(pos, type) { + var found = []; + if (!helpers.hasOwnProperty(type)) { return found } + var help = helpers[type], mode = this.getModeAt(pos); + if (typeof mode[type] == "string") { + if (help[mode[type]]) { found.push(help[mode[type]]); } + } else if (mode[type]) { + for (var i = 0; i < mode[type].length; i++) { + var val = help[mode[type][i]]; + if (val) { found.push(val); } + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]); + } else if (help[mode.name]) { + found.push(help[mode.name]); + } + for (var i$1 = 0; i$1 < help._global.length; i$1++) { + var cur = help._global[i$1]; + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) + { found.push(cur.val); } + } + return found + }, + + getStateAfter: function(line, precise) { + var doc = this.doc; + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); + return getContextBefore(this, line + 1, precise).state + }, + + cursorCoords: function(start, mode) { + var pos, range = this.doc.sel.primary(); + if (start == null) { pos = range.head; } + else if (typeof start == "object") { pos = clipPos(this.doc, start); } + else { pos = start ? range.from() : range.to(); } + return cursorCoords(this, pos, mode || "page") + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page") + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page"); + return coordsChar(this, coords.left, coords.top) + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; + return lineAtHeight(this.doc, height + this.display.viewOffset) + }, + heightAtLine: function(line, mode, includeWidgets) { + var end = false, lineObj; + if (typeof line == "number") { + var last = this.doc.first + this.doc.size - 1; + if (line < this.doc.first) { line = this.doc.first; } + else if (line > last) { line = last; end = true; } + lineObj = getLine(this.doc, line); + } else { + lineObj = line; + } + return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top + + (end ? this.doc.height - heightAtLine(lineObj) : 0) + }, + + defaultTextHeight: function() { return textHeight(this.display) }, + defaultCharWidth: function() { return charWidth(this.display) }, + + getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}}, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display; + pos = cursorCoords(this, clipPos(this.doc, pos)); + var top = pos.bottom, left = pos.left; + node.style.position = "absolute"; + node.setAttribute("cm-ignore-events", "true"); + this.display.input.setUneditable(node); + display.sizer.appendChild(node); + if (vert == "over") { + top = pos.top; + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + { top = pos.top - node.offsetHeight; } + else if (pos.bottom + node.offsetHeight <= vspace) + { top = pos.bottom; } + if (left + node.offsetWidth > hspace) + { left = hspace - node.offsetWidth; } + } + node.style.top = top + "px"; + node.style.left = node.style.right = ""; + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = "0px"; + } else { + if (horiz == "left") { left = 0; } + else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; } + node.style.left = left + "px"; + } + if (scroll) + { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); } + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + triggerOnMouseDown: methodOp(onMouseDown), + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) + { return commands[cmd].call(null, this) } + }, + + triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), + + findPosH: function(from, amount, unit, visually) { + var dir = 1; + if (amount < 0) { dir = -1; amount = -amount; } + var cur = clipPos(this.doc, from); + for (var i = 0; i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually); + if (cur.hitSide) { break } + } + return cur + }, + + moveH: methodOp(function(dir, unit) { + var this$1 = this; + + this.extendSelectionsBy(function (range) { + if (this$1.display.shift || this$1.doc.extend || range.empty()) + { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) } + else + { return dir < 0 ? range.from() : range.to() } + }, sel_move); + }), + + deleteH: methodOp(function(dir, unit) { + var sel = this.doc.sel, doc = this.doc; + if (sel.somethingSelected()) + { doc.replaceSelection("", null, "+delete"); } + else + { deleteNearSelection(this, function (range) { + var other = findPosH(doc, range.head, dir, unit, false); + return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other} + }); } + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, x = goalColumn; + if (amount < 0) { dir = -1; amount = -amount; } + var cur = clipPos(this.doc, from); + for (var i = 0; i < amount; ++i) { + var coords = cursorCoords(this, cur, "div"); + if (x == null) { x = coords.left; } + else { coords.left = x; } + cur = findPosV(this, coords, dir, unit); + if (cur.hitSide) { break } + } + return cur + }, + + moveV: methodOp(function(dir, unit) { + var this$1 = this; + + var doc = this.doc, goals = []; + var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected(); + doc.extendSelectionsBy(function (range) { + if (collapse) + { return dir < 0 ? range.from() : range.to() } + var headPos = cursorCoords(this$1, range.head, "div"); + if (range.goalColumn != null) { headPos.left = range.goalColumn; } + goals.push(headPos.left); + var pos = findPosV(this$1, headPos, dir, unit); + if (unit == "page" && range == doc.sel.primary()) + { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); } + return pos + }, sel_move); + if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++) + { doc.sel.ranges[i].goalColumn = goals[i]; } } + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + var doc = this.doc, line = getLine(doc, pos.line).text; + var start = pos.ch, end = pos.ch; + if (line) { + var helper = this.getHelper(pos, "wordChars"); + if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; } + var startChar = line.charAt(start); + var check = isWordChar(startChar, helper) + ? function (ch) { return isWordChar(ch, helper); } + : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); } + : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); }; + while (start > 0 && check(line.charAt(start - 1))) { --start; } + while (end < line.length && check(line.charAt(end))) { ++end; } + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)) + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) { return } + if (this.state.overwrite = !this.state.overwrite) + { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); } + else + { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); } + + signal(this, "overwriteToggle", this, this.state.overwrite); + }, + hasFocus: function() { return this.display.input.getField() == activeElt() }, + isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) }, + + scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }), + getScrollInfo: function() { + var scroller = this.display.scroller; + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), clientWidth: displayWidth(this)} + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = {from: this.doc.sel.primary().head, to: null}; + if (margin == null) { margin = this.options.cursorScrollMargin; } + } else if (typeof range == "number") { + range = {from: Pos(range, 0), to: null}; + } else if (range.from == null) { + range = {from: range, to: null}; + } + if (!range.to) { range.to = range.from; } + range.margin = margin || 0; + + if (range.from.line != null) { + scrollToRange(this, range); + } else { + scrollToCoordsRange(this, range.from, range.to, range.margin); + } + }), + + setSize: methodOp(function(width, height) { + var this$1 = this; + + var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; }; + if (width != null) { this.display.wrapper.style.width = interpret(width); } + if (height != null) { this.display.wrapper.style.height = interpret(height); } + if (this.options.lineWrapping) { clearLineMeasurementCache(this); } + var lineNo = this.display.viewFrom; + this.doc.iter(lineNo, this.display.viewTo, function (line) { + if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) + { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } } + ++lineNo; + }); + this.curOp.forceUpdate = true; + signal(this, "refresh", this); + }), + + operation: function(f){return runInOp(this, f)}, + startOperation: function(){return startOperation(this)}, + endOperation: function(){return endOperation(this)}, + + refresh: methodOp(function() { + var oldHeight = this.display.cachedTextHeight; + regChange(this); + this.curOp.forceUpdate = true; + clearCaches(this); + scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop); + updateGutterSpace(this.display); + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) + { estimateLineHeights(this); } + signal(this, "refresh", this); + }), + + swapDoc: methodOp(function(doc) { + var old = this.doc; + old.cm = null; + // Cancel the current text selection if any (#5821) + if (this.state.selectingText) { this.state.selectingText(); } + attachDoc(this, doc); + clearCaches(this); + this.display.input.reset(); + scrollToCoords(this, doc.scrollLeft, doc.scrollTop); + this.curOp.forceScroll = true; + signalLater(this, "swapDoc", this, old); + return old + }), + + phrase: function(phraseText) { + var phrases = this.options.phrases; + return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText + }, + + getInputField: function(){return this.display.input.getField()}, + getWrapperElement: function(){return this.display.wrapper}, + getScrollerElement: function(){return this.display.scroller}, + getGutterElement: function(){return this.display.gutters} + }; + eventMixin(CodeMirror); + + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; } + helpers[type][name] = value; + }; + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value); + helpers[type]._global.push({pred: predicate, val: value}); + }; + } + + // Used for horizontal relative motion. Dir is -1 or 1 (left or + // right), unit can be "char", "column" (like char, but doesn't + // cross line boundaries), "word" (across next word), or "group" (to + // the start of next group of word or non-word-non-whitespace + // chars). The visually param controls whether, in right-to-left + // text, direction 1 means to move towards the next index in the + // string, or towards the character to the right of the current + // position. The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosH(doc, pos, dir, unit, visually) { + var oldPos = pos; + var origDir = dir; + var lineObj = getLine(doc, pos.line); + var lineDir = visually && doc.direction == "rtl" ? -dir : dir; + function findNextLine() { + var l = pos.line + lineDir; + if (l < doc.first || l >= doc.first + doc.size) { return false } + pos = new Pos(l, pos.ch, pos.sticky); + return lineObj = getLine(doc, l) + } + function moveOnce(boundToLine) { + var next; + if (visually) { + next = moveVisually(doc.cm, lineObj, pos, dir); + } else { + next = moveLogically(lineObj, pos, dir); + } + if (next == null) { + if (!boundToLine && findNextLine()) + { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); } + else + { return false } + } else { + pos = next; + } + return true + } + + if (unit == "char") { + moveOnce(); + } else if (unit == "column") { + moveOnce(true); + } else if (unit == "word" || unit == "group") { + var sawType = null, group = unit == "group"; + var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); + for (var first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) { break } + var cur = lineObj.text.charAt(pos.ch) || "\n"; + var type = isWordChar(cur, helper) ? "w" + : group && cur == "\n" ? "n" + : !group || /\s/.test(cur) ? null + : "p"; + if (group && !first && !type) { type = "s"; } + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";} + break + } + + if (type) { sawType = type; } + if (dir > 0 && !moveOnce(!first)) { break } + } + } + var result = skipAtomic(doc, pos, oldPos, origDir, true); + if (equalCursorPos(oldPos, result)) { result.hitSide = true; } + return result + } + + // For relative vertical movement. Dir may be -1 or 1. Unit can be + // "page" or "line". The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, x = pos.left, y; + if (unit == "page") { + var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3); + y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount; + + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + var target; + for (;;) { + target = coordsChar(cm, x, y); + if (!target.outside) { break } + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break } + y += dir * 5; + } + return target + } + + // CONTENTEDITABLE INPUT STYLE + + var ContentEditableInput = function(cm) { + this.cm = cm; + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; + this.polling = new Delayed(); + this.composing = null; + this.gracePeriod = false; + this.readDOMTimeout = null; + }; + + ContentEditableInput.prototype.init = function (display) { + var this$1 = this; + + var input = this, cm = input.cm; + var div = input.div = display.lineDiv; + disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize); + + on(div, "paste", function (e) { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return } + // IE doesn't fire input events, so we schedule a read for the pasted content in this way + if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); } + }); + + on(div, "compositionstart", function (e) { + this$1.composing = {data: e.data, done: false}; + }); + on(div, "compositionupdate", function (e) { + if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; } + }); + on(div, "compositionend", function (e) { + if (this$1.composing) { + if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); } + this$1.composing.done = true; + } + }); + + on(div, "touchstart", function () { return input.forceCompositionEnd(); }); + + on(div, "input", function () { + if (!this$1.composing) { this$1.readFromDOMSoon(); } + }); + + function onCopyCut(e) { + if (signalDOMEvent(cm, e)) { return } + if (cm.somethingSelected()) { + setLastCopied({lineWise: false, text: cm.getSelections()}); + if (e.type == "cut") { cm.replaceSelection("", null, "cut"); } + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + var ranges = copyableRanges(cm); + setLastCopied({lineWise: true, text: ranges.text}); + if (e.type == "cut") { + cm.operation(function () { + cm.setSelections(ranges.ranges, 0, sel_dontScroll); + cm.replaceSelection("", null, "cut"); + }); + } + } + if (e.clipboardData) { + e.clipboardData.clearData(); + var content = lastCopied.text.join("\n"); + // iOS exposes the clipboard API, but seems to discard content inserted into it + e.clipboardData.setData("Text", content); + if (e.clipboardData.getData("Text") == content) { + e.preventDefault(); + return + } + } + // Old-fashioned briefly-focus-a-textarea hack + var kludge = hiddenTextarea(), te = kludge.firstChild; + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); + te.value = lastCopied.text.join("\n"); + var hadFocus = document.activeElement; + selectInput(te); + setTimeout(function () { + cm.display.lineSpace.removeChild(kludge); + hadFocus.focus(); + if (hadFocus == div) { input.showPrimarySelection(); } + }, 50); + } + on(div, "copy", onCopyCut); + on(div, "cut", onCopyCut); + }; + + ContentEditableInput.prototype.prepareSelection = function () { + var result = prepareSelection(this.cm, false); + result.focus = document.activeElement == this.div; + return result + }; + + ContentEditableInput.prototype.showSelection = function (info, takeFocus) { + if (!info || !this.cm.display.view.length) { return } + if (info.focus || takeFocus) { this.showPrimarySelection(); } + this.showMultipleSelections(info); + }; + + ContentEditableInput.prototype.getSelection = function () { + return this.cm.display.wrapper.ownerDocument.getSelection() + }; + + ContentEditableInput.prototype.showPrimarySelection = function () { + var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary(); + var from = prim.from(), to = prim.to(); + + if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) { + sel.removeAllRanges(); + return + } + + var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset); + if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && + cmp(minPos(curAnchor, curFocus), from) == 0 && + cmp(maxPos(curAnchor, curFocus), to) == 0) + { return } + + var view = cm.display.view; + var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) || + {node: view[0].measure.map[2], offset: 0}; + var end = to.line < cm.display.viewTo && posToDOM(cm, to); + if (!end) { + var measure = view[view.length - 1].measure; + var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; + end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; + } + + if (!start || !end) { + sel.removeAllRanges(); + return + } + + var old = sel.rangeCount && sel.getRangeAt(0), rng; + try { rng = range(start.node, start.offset, end.offset, end.node); } + catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + if (!gecko && cm.state.focused) { + sel.collapse(start.node, start.offset); + if (!rng.collapsed) { + sel.removeAllRanges(); + sel.addRange(rng); + } + } else { + sel.removeAllRanges(); + sel.addRange(rng); + } + if (old && sel.anchorNode == null) { sel.addRange(old); } + else if (gecko) { this.startGracePeriod(); } + } + this.rememberSelection(); + }; + + ContentEditableInput.prototype.startGracePeriod = function () { + var this$1 = this; + + clearTimeout(this.gracePeriod); + this.gracePeriod = setTimeout(function () { + this$1.gracePeriod = false; + if (this$1.selectionChanged()) + { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); } + }, 20); + }; + + ContentEditableInput.prototype.showMultipleSelections = function (info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); + }; + + ContentEditableInput.prototype.rememberSelection = function () { + var sel = this.getSelection(); + this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; + this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; + }; + + ContentEditableInput.prototype.selectionInEditor = function () { + var sel = this.getSelection(); + if (!sel.rangeCount) { return false } + var node = sel.getRangeAt(0).commonAncestorContainer; + return contains(this.div, node) + }; + + ContentEditableInput.prototype.focus = function () { + if (this.cm.options.readOnly != "nocursor") { + if (!this.selectionInEditor() || document.activeElement != this.div) + { this.showSelection(this.prepareSelection(), true); } + this.div.focus(); + } + }; + ContentEditableInput.prototype.blur = function () { this.div.blur(); }; + ContentEditableInput.prototype.getField = function () { return this.div }; + + ContentEditableInput.prototype.supportsTouch = function () { return true }; + + ContentEditableInput.prototype.receivedFocus = function () { + var input = this; + if (this.selectionInEditor()) + { this.pollSelection(); } + else + { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); } + + function poll() { + if (input.cm.state.focused) { + input.pollSelection(); + input.polling.set(input.cm.options.pollInterval, poll); + } + } + this.polling.set(this.cm.options.pollInterval, poll); + }; + + ContentEditableInput.prototype.selectionChanged = function () { + var sel = this.getSelection(); + return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset + }; + + ContentEditableInput.prototype.pollSelection = function () { + if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return } + var sel = this.getSelection(), cm = this.cm; + // On Android Chrome (version 56, at least), backspacing into an + // uneditable block element will put the cursor in that element, + // and then, because it's not editable, hide the virtual keyboard. + // Because Android doesn't allow us to actually detect backspace + // presses in a sane way, this code checks for when that happens + // and simulates a backspace press in this case. + if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) { + this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs}); + this.blur(); + this.focus(); + return + } + if (this.composing) { return } + this.rememberSelection(); + var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var head = domToPos(cm, sel.focusNode, sel.focusOffset); + if (anchor && head) { runInOp(cm, function () { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); + if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; } + }); } + }; + + ContentEditableInput.prototype.pollContent = function () { + if (this.readDOMTimeout != null) { + clearTimeout(this.readDOMTimeout); + this.readDOMTimeout = null; + } + + var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); + var from = sel.from(), to = sel.to(); + if (from.ch == 0 && from.line > cm.firstLine()) + { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); } + if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) + { to = Pos(to.line + 1, 0); } + if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false } + + var fromIndex, fromLine, fromNode; + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + fromLine = lineNo(display.view[0].line); + fromNode = display.view[0].node; + } else { + fromLine = lineNo(display.view[fromIndex].line); + fromNode = display.view[fromIndex - 1].node.nextSibling; + } + var toIndex = findViewIndex(cm, to.line); + var toLine, toNode; + if (toIndex == display.view.length - 1) { + toLine = display.viewTo - 1; + toNode = display.lineDiv.lastChild; + } else { + toLine = lineNo(display.view[toIndex + 1].line) - 1; + toNode = display.view[toIndex + 1].node.previousSibling; + } + + if (!fromNode) { return false } + var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); + var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } + else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } + else { break } + } + + var cutFront = 0, cutEnd = 0; + var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); + while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) + { ++cutFront; } + var newBot = lst(newText), oldBot = lst(oldText); + var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0)); + while (cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) + { ++cutEnd; } + // Try to move start of change to start of selection if ambiguous + if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) { + while (cutFront && cutFront > from.ch && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) { + cutFront--; + cutEnd++; + } + } + + newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, ""); + newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, ""); + + var chFrom = Pos(fromLine, cutFront); + var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input"); + return true + } + }; + + ContentEditableInput.prototype.ensurePolled = function () { + this.forceCompositionEnd(); + }; + ContentEditableInput.prototype.reset = function () { + this.forceCompositionEnd(); + }; + ContentEditableInput.prototype.forceCompositionEnd = function () { + if (!this.composing) { return } + clearTimeout(this.readDOMTimeout); + this.composing = null; + this.updateFromDOM(); + this.div.blur(); + this.div.focus(); + }; + ContentEditableInput.prototype.readFromDOMSoon = function () { + var this$1 = this; + + if (this.readDOMTimeout != null) { return } + this.readDOMTimeout = setTimeout(function () { + this$1.readDOMTimeout = null; + if (this$1.composing) { + if (this$1.composing.done) { this$1.composing = null; } + else { return } + } + this$1.updateFromDOM(); + }, 80); + }; + + ContentEditableInput.prototype.updateFromDOM = function () { + var this$1 = this; + + if (this.cm.isReadOnly() || !this.pollContent()) + { runInOp(this.cm, function () { return regChange(this$1.cm); }); } + }; + + ContentEditableInput.prototype.setUneditable = function (node) { + node.contentEditable = "false"; + }; + + ContentEditableInput.prototype.onKeyPress = function (e) { + if (e.charCode == 0 || this.composing) { return } + e.preventDefault(); + if (!this.cm.isReadOnly()) + { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); } + }; + + ContentEditableInput.prototype.readOnlyChanged = function (val) { + this.div.contentEditable = String(val != "nocursor"); + }; + + ContentEditableInput.prototype.onContextMenu = function () {}; + ContentEditableInput.prototype.resetPosition = function () {}; + + ContentEditableInput.prototype.needsContentAttribute = true; + + function posToDOM(cm, pos) { + var view = findViewForLine(cm, pos.line); + if (!view || view.hidden) { return null } + var line = getLine(cm.doc, pos.line); + var info = mapFromLineView(view, line, pos.line); + + var order = getOrder(line, cm.doc.direction), side = "left"; + if (order) { + var partPos = getBidiPartAt(order, pos.ch); + side = partPos % 2 ? "right" : "left"; + } + var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); + result.offset = result.collapse == "right" ? result.end : result.start; + return result + } + + function isInGutter(node) { + for (var scan = node; scan; scan = scan.parentNode) + { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } } + return false + } + + function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos } + + function domTextBetween(cm, from, to, fromLine, toLine) { + var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false; + function recognizeMarker(id) { return function (marker) { return marker.id == id; } } + function close() { + if (closing) { + text += lineSep; + if (extraLinebreak) { text += lineSep; } + closing = extraLinebreak = false; + } + } + function addText(str) { + if (str) { + close(); + text += str; + } + } + function walk(node) { + if (node.nodeType == 1) { + var cmText = node.getAttribute("cm-text"); + if (cmText) { + addText(cmText); + return + } + var markerID = node.getAttribute("cm-marker"), range; + if (markerID) { + var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); + if (found.length && (range = found[0].find(0))) + { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); } + return + } + if (node.getAttribute("contenteditable") == "false") { return } + var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName); + if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return } + + if (isBlock) { close(); } + for (var i = 0; i < node.childNodes.length; i++) + { walk(node.childNodes[i]); } + + if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; } + if (isBlock) { closing = true; } + } else if (node.nodeType == 3) { + addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " ")); + } + } + for (;;) { + walk(from); + if (from == to) { break } + from = from.nextSibling; + extraLinebreak = false; + } + return text + } + + function domToPos(cm, node, offset) { + var lineNode; + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset]; + if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) } + node = null; offset = 0; + } else { + for (lineNode = node;; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) { return null } + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break } + } + } + for (var i = 0; i < cm.display.view.length; i++) { + var lineView = cm.display.view[i]; + if (lineView.node == lineNode) + { return locateNodeInLineView(lineView, node, offset) } + } + } + + function locateNodeInLineView(lineView, node, offset) { + var wrapper = lineView.text.firstChild, bad = false; + if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) } + if (node == wrapper) { + bad = true; + node = wrapper.childNodes[offset]; + offset = 0; + if (!node) { + var line = lineView.rest ? lst(lineView.rest) : lineView.line; + return badPos(Pos(lineNo(line), line.text.length), bad) + } + } + + var textNode = node.nodeType == 3 ? node : null, topNode = node; + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild; + if (offset) { offset = textNode.nodeValue.length; } + } + while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; } + var measure = lineView.measure, maps = measure.maps; + + function find(textNode, topNode, offset) { + for (var i = -1; i < (maps ? maps.length : 0); i++) { + var map = i < 0 ? measure.map : maps[i]; + for (var j = 0; j < map.length; j += 3) { + var curNode = map[j + 2]; + if (curNode == textNode || curNode == topNode) { + var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); + var ch = map[j] + offset; + if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; } + return Pos(line, ch) + } + } + } + } + var found = find(textNode, topNode, offset); + if (found) { return badPos(found, bad) } + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { + found = find(after, after.firstChild, 0); + if (found) + { return badPos(Pos(found.line, found.ch - dist), bad) } + else + { dist += after.textContent.length; } + } + for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) { + found = find(before, before.firstChild, -1); + if (found) + { return badPos(Pos(found.line, found.ch + dist$1), bad) } + else + { dist$1 += before.textContent.length; } + } + } + + // TEXTAREA INPUT STYLE + + var TextareaInput = function(cm) { + this.cm = cm; + // See input.poll and input.reset + this.prevInput = ""; + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false; + // Self-resetting timeout for the poller + this.polling = new Delayed(); + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false; + this.composing = null; + }; + + TextareaInput.prototype.init = function (display) { + var this$1 = this; + + var input = this, cm = this.cm; + this.createField(display); + var te = this.textarea; + + display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild); + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) { te.style.width = "0px"; } + + on(te, "input", function () { + if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; } + input.poll(); + }); + + on(te, "paste", function (e) { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return } + + cm.state.pasteIncoming = +new Date; + input.fastPoll(); + }); + + function prepareCopyCut(e) { + if (signalDOMEvent(cm, e)) { return } + if (cm.somethingSelected()) { + setLastCopied({lineWise: false, text: cm.getSelections()}); + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + var ranges = copyableRanges(cm); + setLastCopied({lineWise: true, text: ranges.text}); + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll); + } else { + input.prevInput = ""; + te.value = ranges.text.join("\n"); + selectInput(te); + } + } + if (e.type == "cut") { cm.state.cutIncoming = +new Date; } + } + on(te, "cut", prepareCopyCut); + on(te, "copy", prepareCopyCut); + + on(display.scroller, "paste", function (e) { + if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return } + if (!te.dispatchEvent) { + cm.state.pasteIncoming = +new Date; + input.focus(); + return + } + + // Pass the `paste` event to the textarea so it's handled by its event listener. + var event = new Event("paste"); + event.clipboardData = e.clipboardData; + te.dispatchEvent(event); + }); + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", function (e) { + if (!eventInWidget(display, e)) { e_preventDefault(e); } + }); + + on(te, "compositionstart", function () { + var start = cm.getCursor("from"); + if (input.composing) { input.composing.range.clear(); } + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) + }; + }); + on(te, "compositionend", function () { + if (input.composing) { + input.poll(); + input.composing.range.clear(); + input.composing = null; + } + }); + }; + + TextareaInput.prototype.createField = function (_display) { + // Wraps and hides input textarea + this.wrapper = hiddenTextarea(); + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + this.textarea = this.wrapper.firstChild; + }; + + TextareaInput.prototype.prepareSelection = function () { + // Redraw the selection and/or cursor + var cm = this.cm, display = cm.display, doc = cm.doc; + var result = prepareSelection(cm); + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); + var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); + result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)); + result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)); + } + + return result + }; + + TextareaInput.prototype.showSelection = function (drawn) { + var cm = this.cm, display = cm.display; + removeChildrenAndAdd(display.cursorDiv, drawn.cursors); + removeChildrenAndAdd(display.selectionDiv, drawn.selection); + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px"; + this.wrapper.style.left = drawn.teLeft + "px"; + } + }; + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + TextareaInput.prototype.reset = function (typing) { + if (this.contextMenuPending || this.composing) { return } + var cm = this.cm; + if (cm.somethingSelected()) { + this.prevInput = ""; + var content = cm.getSelection(); + this.textarea.value = content; + if (cm.state.focused) { selectInput(this.textarea); } + if (ie && ie_version >= 9) { this.hasSelection = content; } + } else if (!typing) { + this.prevInput = this.textarea.value = ""; + if (ie && ie_version >= 9) { this.hasSelection = null; } + } + }; + + TextareaInput.prototype.getField = function () { return this.textarea }; + + TextareaInput.prototype.supportsTouch = function () { return false }; + + TextareaInput.prototype.focus = function () { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { + try { this.textarea.focus(); } + catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + }; + + TextareaInput.prototype.blur = function () { this.textarea.blur(); }; + + TextareaInput.prototype.resetPosition = function () { + this.wrapper.style.top = this.wrapper.style.left = 0; + }; + + TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); }; + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + TextareaInput.prototype.slowPoll = function () { + var this$1 = this; + + if (this.pollingFast) { return } + this.polling.set(this.cm.options.pollInterval, function () { + this$1.poll(); + if (this$1.cm.state.focused) { this$1.slowPoll(); } + }); + }; + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + TextareaInput.prototype.fastPoll = function () { + var missed = false, input = this; + input.pollingFast = true; + function p() { + var changed = input.poll(); + if (!changed && !missed) {missed = true; input.polling.set(60, p);} + else {input.pollingFast = false; input.slowPoll();} + } + input.polling.set(20, p); + }; + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + TextareaInput.prototype.poll = function () { + var this$1 = this; + + var cm = this.cm, input = this.textarea, prevInput = this.prevInput; + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if (this.contextMenuPending || !cm.state.focused || + (hasSelection(input) && !prevInput && !this.composing) || + cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) + { return false } + + var text = input.value; + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) { return false } + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if (ie && ie_version >= 9 && this.hasSelection === text || + mac && /[\uf700-\uf7ff]/.test(text)) { + cm.display.input.reset(); + return false + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + var first = text.charCodeAt(0); + if (first == 0x200b && !prevInput) { prevInput = "\u200b"; } + if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") } + } + // Find the part of the input that is actually new + var same = 0, l = Math.min(prevInput.length, text.length); + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; } + + runInOp(cm, function () { + applyTextInput(cm, text.slice(same), prevInput.length - same, + null, this$1.composing ? "*compose" : null); + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; } + else { this$1.prevInput = text; } + + if (this$1.composing) { + this$1.composing.range.clear(); + this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"), + {className: "CodeMirror-composing"}); + } + }); + return true + }; + + TextareaInput.prototype.ensurePolled = function () { + if (this.pollingFast && this.poll()) { this.pollingFast = false; } + }; + + TextareaInput.prototype.onKeyPress = function () { + if (ie && ie_version >= 9) { this.hasSelection = null; } + this.fastPoll(); + }; + + TextareaInput.prototype.onContextMenu = function (e) { + var input = this, cm = input.cm, display = cm.display, te = input.textarea; + if (input.contextMenuPending) { input.contextMenuPending(); } + var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; + if (!pos || presto) { return } // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu; + if (reset && cm.doc.sel.contains(pos) == -1) + { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); } + + var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText; + var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect(); + input.wrapper.style.cssText = "position: static"; + te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + var oldScrollY; + if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712) + display.input.focus(); + if (webkit) { window.scrollTo(null, oldScrollY); } + display.input.reset(); + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) { te.value = input.prevInput = " "; } + input.contextMenuPending = rehide; + display.selForContextMenu = cm.doc.sel; + clearTimeout(display.detectingSelectAll); + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + var selected = cm.somethingSelected(); + var extval = "\u200b" + (selected ? te.value : ""); + te.value = "\u21da"; // Used to catch context-menu undo + te.value = extval; + input.prevInput = selected ? "" : "\u200b"; + te.selectionStart = 1; te.selectionEnd = extval.length; + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel; + } + } + function rehide() { + if (input.contextMenuPending != rehide) { return } + input.contextMenuPending = false; + input.wrapper.style.cssText = oldWrapperCSS; + te.style.cssText = oldCSS; + if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); } + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); } + var i = 0, poll = function () { + if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && + te.selectionEnd > 0 && input.prevInput == "\u200b") { + operation(cm, selectAll)(cm); + } else if (i++ < 10) { + display.detectingSelectAll = setTimeout(poll, 500); + } else { + display.selForContextMenu = null; + display.input.reset(); + } + }; + display.detectingSelectAll = setTimeout(poll, 200); + } + } + + if (ie && ie_version >= 9) { prepareSelectAllHack(); } + if (captureRightClick) { + e_stop(e); + var mouseup = function () { + off(window, "mouseup", mouseup); + setTimeout(rehide, 20); + }; + on(window, "mouseup", mouseup); + } else { + setTimeout(rehide, 50); + } + }; + + TextareaInput.prototype.readOnlyChanged = function (val) { + if (!val) { this.reset(); } + this.textarea.disabled = val == "nocursor"; + }; + + TextareaInput.prototype.setUneditable = function () {}; + + TextareaInput.prototype.needsContentAttribute = false; + + function fromTextArea(textarea, options) { + options = options ? copyObj(options) : {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabIndex) + { options.tabindex = textarea.tabIndex; } + if (!options.placeholder && textarea.placeholder) + { options.placeholder = textarea.placeholder; } + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = activeElt(); + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body; + } + + function save() {textarea.value = cm.getValue();} + + var realSubmit; + if (textarea.form) { + on(textarea.form, "submit", save); + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form; + realSubmit = form.submit; + try { + var wrappedSubmit = form.submit = function () { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch(e) {} + } + } + + options.finishInit = function (cm) { + cm.save = save; + cm.getTextArea = function () { return textarea; }; + cm.toTextArea = function () { + cm.toTextArea = isNaN; // Prevent this from being ran twice + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + off(textarea.form, "submit", save); + if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function") + { textarea.form.submit = realSubmit; } + } + }; + }; + + textarea.style.display = "none"; + var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); }, + options); + return cm + } + + function addLegacyProps(CodeMirror) { + CodeMirror.off = off; + CodeMirror.on = on; + CodeMirror.wheelEventPixels = wheelEventPixels; + CodeMirror.Doc = Doc; + CodeMirror.splitLines = splitLinesAuto; + CodeMirror.countColumn = countColumn; + CodeMirror.findColumn = findColumn; + CodeMirror.isWordChar = isWordCharBasic; + CodeMirror.Pass = Pass; + CodeMirror.signal = signal; + CodeMirror.Line = Line; + CodeMirror.changeEnd = changeEnd; + CodeMirror.scrollbarModel = scrollbarModel; + CodeMirror.Pos = Pos; + CodeMirror.cmpPos = cmp; + CodeMirror.modes = modes; + CodeMirror.mimeModes = mimeModes; + CodeMirror.resolveMode = resolveMode; + CodeMirror.getMode = getMode; + CodeMirror.modeExtensions = modeExtensions; + CodeMirror.extendMode = extendMode; + CodeMirror.copyState = copyState; + CodeMirror.startState = startState; + CodeMirror.innerMode = innerMode; + CodeMirror.commands = commands; + CodeMirror.keyMap = keyMap; + CodeMirror.keyName = keyName; + CodeMirror.isModifierKey = isModifierKey; + CodeMirror.lookupKey = lookupKey; + CodeMirror.normalizeKeyMap = normalizeKeyMap; + CodeMirror.StringStream = StringStream; + CodeMirror.SharedTextMarker = SharedTextMarker; + CodeMirror.TextMarker = TextMarker; + CodeMirror.LineWidget = LineWidget; + CodeMirror.e_preventDefault = e_preventDefault; + CodeMirror.e_stopPropagation = e_stopPropagation; + CodeMirror.e_stop = e_stop; + CodeMirror.addClass = addClass; + CodeMirror.contains = contains; + CodeMirror.rmClass = rmClass; + CodeMirror.keyNames = keyNames; + } + + // EDITOR CONSTRUCTOR + + defineOptions(CodeMirror); + + addEditorMethods(CodeMirror); + + // Set up methods on CodeMirror's prototype to redirect to the editor's document. + var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); + for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + { CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments)} + })(Doc.prototype[prop]); } } + + eventMixin(Doc); + CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + CodeMirror.defineMode = function(name/*, mode, …*/) { + if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; } + defineMode.apply(this, arguments); + }; + + CodeMirror.defineMIME = defineMIME; + + // Minimal default mode. + CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); }); + CodeMirror.defineMIME("text/plain", "null"); + + // EXTENSIONS + + CodeMirror.defineExtension = function (name, func) { + CodeMirror.prototype[name] = func; + }; + CodeMirror.defineDocExtension = function (name, func) { + Doc.prototype[name] = func; + }; + + CodeMirror.fromTextArea = fromTextArea; + + addLegacyProps(CodeMirror); + + CodeMirror.version = "5.52.2"; + + return CodeMirror; + +}))); + + +/***/ }), + +/***/ 1913: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SelectionState + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Immutable = __webpack_require__(35); + +var Record = Immutable.Record; + + +var defaultRecord = { + anchorKey: '', + anchorOffset: 0, + focusKey: '', + focusOffset: 0, + isBackward: false, + hasFocus: false +}; + +var SelectionStateRecord = Record(defaultRecord); + +var SelectionState = function (_SelectionStateRecord) { + _inherits(SelectionState, _SelectionStateRecord); + + function SelectionState() { + _classCallCheck(this, SelectionState); + + return _possibleConstructorReturn(this, _SelectionStateRecord.apply(this, arguments)); + } + + SelectionState.prototype.serialize = function serialize() { + return 'Anchor: ' + this.getAnchorKey() + ':' + this.getAnchorOffset() + ', ' + 'Focus: ' + this.getFocusKey() + ':' + this.getFocusOffset() + ', ' + 'Is Backward: ' + String(this.getIsBackward()) + ', ' + 'Has Focus: ' + String(this.getHasFocus()); + }; + + SelectionState.prototype.getAnchorKey = function getAnchorKey() { + return this.get('anchorKey'); + }; + + SelectionState.prototype.getAnchorOffset = function getAnchorOffset() { + return this.get('anchorOffset'); + }; + + SelectionState.prototype.getFocusKey = function getFocusKey() { + return this.get('focusKey'); + }; + + SelectionState.prototype.getFocusOffset = function getFocusOffset() { + return this.get('focusOffset'); + }; + + SelectionState.prototype.getIsBackward = function getIsBackward() { + return this.get('isBackward'); + }; + + SelectionState.prototype.getHasFocus = function getHasFocus() { + return this.get('hasFocus'); + }; + + /** + * Return whether the specified range overlaps with an edge of the + * SelectionState. + */ + + + SelectionState.prototype.hasEdgeWithin = function hasEdgeWithin(blockKey, start, end) { + var anchorKey = this.getAnchorKey(); + var focusKey = this.getFocusKey(); + + if (anchorKey === focusKey && anchorKey === blockKey) { + var selectionStart = this.getStartOffset(); + var selectionEnd = this.getEndOffset(); + return start <= selectionEnd && selectionStart <= end; + } + + if (blockKey !== anchorKey && blockKey !== focusKey) { + return false; + } + + var offsetToCheck = blockKey === anchorKey ? this.getAnchorOffset() : this.getFocusOffset(); + + return start <= offsetToCheck && end >= offsetToCheck; + }; + + SelectionState.prototype.isCollapsed = function isCollapsed() { + return this.getAnchorKey() === this.getFocusKey() && this.getAnchorOffset() === this.getFocusOffset(); + }; + + SelectionState.prototype.getStartKey = function getStartKey() { + return this.getIsBackward() ? this.getFocusKey() : this.getAnchorKey(); + }; + + SelectionState.prototype.getStartOffset = function getStartOffset() { + return this.getIsBackward() ? this.getFocusOffset() : this.getAnchorOffset(); + }; + + SelectionState.prototype.getEndKey = function getEndKey() { + return this.getIsBackward() ? this.getAnchorKey() : this.getFocusKey(); + }; + + SelectionState.prototype.getEndOffset = function getEndOffset() { + return this.getIsBackward() ? this.getAnchorOffset() : this.getFocusOffset(); + }; + + SelectionState.createEmpty = function createEmpty(key) { + return new SelectionState({ + anchorKey: key, + anchorOffset: 0, + focusKey: key, + focusOffset: 0, + isBackward: false, + hasFocus: false + }); + }; + + return SelectionState; +}(SelectionStateRecord); + +module.exports = SelectionState; + +/***/ }), + +/***/ 1914: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + */ + +/** + * This function is used to mark string literals representing CSS class names + * so that they can be transformed statically. This allows for modularization + * and minification of CSS class names. + * + * In static_upstream, this function is actually implemented, but it should + * eventually be replaced with something more descriptive, and the transform + * that is used in the main stack should be ported for use elsewhere. + * + * @param string|object className to modularize, or an object of key/values. + * In the object case, the values are conditions that + * determine if the className keys should be included. + * @param [string ...] Variable list of classNames in the string case. + * @return string Renderable space-separated CSS className. + */ +function cx(classNames) { + if (typeof classNames == 'object') { + return Object.keys(classNames).filter(function (className) { + return classNames[className]; + }).map(replace).join(' '); + } + return Array.prototype.map.call(arguments, replace).join(' '); +} + +function replace(str) { + return str.replace(/\//g, '-'); +} + +module.exports = cx; + +/***/ }), + +/***/ 1916: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule BlockMapBuilder + * @format + * + */ + + + +var Immutable = __webpack_require__(35); + +var OrderedMap = Immutable.OrderedMap; + + +var BlockMapBuilder = { + createFromArray: function createFromArray(blocks) { + return OrderedMap(blocks.map(function (block) { + return [block.getKey(), block]; + })); + } +}; + +module.exports = BlockMapBuilder; + +/***/ }), + +/***/ 1917: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule findRangesImmutable + * @format + * + */ + + + +/** + * Search through an array to find contiguous stretches of elements that + * match a specified filter function. + * + * When ranges are found, execute a specified `found` function to supply + * the values to the caller. + */ +function findRangesImmutable(haystack, areEqualFn, filterFn, foundFn) { + if (!haystack.size) { + return; + } + + var cursor = 0; + + haystack.reduce(function (value, nextValue, nextIndex) { + if (!areEqualFn(value, nextValue)) { + if (filterFn(value)) { + foundFn(cursor, nextIndex); + } + cursor = nextIndex; + } + return nextValue; + }); + + filterFn(haystack.last()) && foundFn(cursor, haystack.count()); +} + +module.exports = findRangesImmutable; + +/***/ }), + +/***/ 1918: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isEventHandled + * @format + * + */ + + + +/** + * Utility method for determining whether or not the value returned + * from a handler indicates that it was handled. + */ +function isEventHandled(value) { + return value === 'handled' || value === true; +} + +module.exports = isEventHandled; + +/***/ }), + +/***/ 1919: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule removeTextWithStrategy + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); + +/** + * For a collapsed selection state, remove text based on the specified strategy. + * If the selection state is not collapsed, remove the entire selected range. + */ +function removeTextWithStrategy(editorState, strategy, direction) { + var selection = editorState.getSelection(); + var content = editorState.getCurrentContent(); + var target = selection; + if (selection.isCollapsed()) { + if (direction === 'forward') { + if (editorState.isSelectionAtEndOfContent()) { + return content; + } + } else if (editorState.isSelectionAtStartOfContent()) { + return content; + } + + target = strategy(editorState); + if (target === selection) { + return content; + } + } + return DraftModifier.removeRange(content, target, direction); +} + +module.exports = removeTextWithStrategy; + +/***/ }), + +/***/ 1924: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Draft + * @format + * + */ + + + +var AtomicBlockUtils = __webpack_require__(2083); +var BlockMapBuilder = __webpack_require__(1916); +var CharacterMetadata = __webpack_require__(1902); +var CompositeDraftDecorator = __webpack_require__(2099); +var ContentBlock = __webpack_require__(1910); +var ContentState = __webpack_require__(1941); +var DefaultDraftBlockRenderMap = __webpack_require__(1944); +var DefaultDraftInlineStyle = __webpack_require__(1979); +var DraftEditor = __webpack_require__(2100); +var DraftEditorBlock = __webpack_require__(1981); +var DraftEntity = __webpack_require__(1926); +var DraftModifier = __webpack_require__(1901); +var DraftEntityInstance = __webpack_require__(1977); +var EditorState = __webpack_require__(1900); +var KeyBindingUtil = __webpack_require__(1951); +var RichTextEditorUtil = __webpack_require__(1995); +var SelectionState = __webpack_require__(1913); + +var convertFromDraftStateToRaw = __webpack_require__(2160); +var convertFromHTMLToContentBlocks = __webpack_require__(1993); +var convertFromRawToDraftState = __webpack_require__(2163); +var generateRandomKey = __webpack_require__(1907); +var getDefaultKeyBinding = __webpack_require__(1996); +var getVisibleSelectionRect = __webpack_require__(2168); + +var DraftPublic = { + Editor: DraftEditor, + EditorBlock: DraftEditorBlock, + EditorState: EditorState, + + CompositeDecorator: CompositeDraftDecorator, + Entity: DraftEntity, + EntityInstance: DraftEntityInstance, + + BlockMapBuilder: BlockMapBuilder, + CharacterMetadata: CharacterMetadata, + ContentBlock: ContentBlock, + ContentState: ContentState, + SelectionState: SelectionState, + + AtomicBlockUtils: AtomicBlockUtils, + KeyBindingUtil: KeyBindingUtil, + Modifier: DraftModifier, + RichUtils: RichTextEditorUtil, + + DefaultDraftBlockRenderMap: DefaultDraftBlockRenderMap, + DefaultDraftInlineStyle: DefaultDraftInlineStyle, + + convertFromHTML: convertFromHTMLToContentBlocks, + convertFromRaw: convertFromRawToDraftState, + convertToRaw: convertFromDraftStateToRaw, + genKey: generateRandomKey, + getDefaultKeyBinding: getDefaultKeyBinding, + getVisibleSelectionRect: getVisibleSelectionRect +}; + +module.exports = DraftPublic; + +/***/ }), + +/***/ 1925: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getContentStateFragment + * @format + * + */ + + + +var randomizeBlockMapKeys = __webpack_require__(1972); +var removeEntitiesAtEdges = __webpack_require__(1973); + +var getContentStateFragment = function getContentStateFragment(contentState, selectionState) { + var startKey = selectionState.getStartKey(); + var startOffset = selectionState.getStartOffset(); + var endKey = selectionState.getEndKey(); + var endOffset = selectionState.getEndOffset(); + + // Edge entities should be stripped to ensure that we don't preserve + // invalid partial entities when the fragment is reused. We do, however, + // preserve entities that are entirely within the selection range. + var contentWithoutEdgeEntities = removeEntitiesAtEdges(contentState, selectionState); + + var blockMap = contentWithoutEdgeEntities.getBlockMap(); + var blockKeys = blockMap.keySeq(); + var startIndex = blockKeys.indexOf(startKey); + var endIndex = blockKeys.indexOf(endKey) + 1; + + return randomizeBlockMapKeys(blockMap.slice(startIndex, endIndex).map(function (block, blockKey) { + var text = block.getText(); + var chars = block.getCharacterList(); + + if (startKey === endKey) { + return block.merge({ + text: text.slice(startOffset, endOffset), + characterList: chars.slice(startOffset, endOffset) + }); + } + + if (blockKey === startKey) { + return block.merge({ + text: text.slice(startOffset), + characterList: chars.slice(startOffset) + }); + } + + if (blockKey === endKey) { + return block.merge({ + text: text.slice(0, endOffset), + characterList: chars.slice(0, endOffset) + }); + } + + return block; + })); +}; + +module.exports = getContentStateFragment; + +/***/ }), + +/***/ 1926: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEntity + * @format + * + */ + +var DraftEntityInstance = __webpack_require__(1977); +var Immutable = __webpack_require__(35); + +var invariant = __webpack_require__(641); + +var Map = Immutable.Map; + + +var instances = Map(); +var instanceKey = 0; + +/** + * Temporary utility for generating the warnings + */ +function logWarning(oldMethodCall, newMethodCall) { + console.warn('WARNING: ' + oldMethodCall + ' will be deprecated soon!\nPlease use "' + newMethodCall + '" instead.'); +} + +/** + * A "document entity" is an object containing metadata associated with a + * piece of text in a ContentBlock. + * + * For example, a `link` entity might include a `uri` property. When a + * ContentBlock is rendered in the browser, text that refers to that link + * entity may be rendered as an anchor, with the `uri` as the href value. + * + * In a ContentBlock, every position in the text may correspond to zero + * or one entities. This correspondence is tracked using a key string, + * generated via DraftEntity.create() and used to obtain entity metadata + * via DraftEntity.get(). + */ +var DraftEntity = { + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.getLastCreatedEntityKey' instead. + * --- + * Get the random key string from whatever entity was last created. + * We need this to support the new API, as part of transitioning to put Entity + * storage in contentState. + */ + getLastCreatedEntityKey: function getLastCreatedEntityKey() { + logWarning('DraftEntity.getLastCreatedEntityKey', 'contentState.getLastCreatedEntityKey'); + return DraftEntity.__getLastCreatedEntityKey(); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.createEntity' instead. + * --- + * Create a DraftEntityInstance and store it for later retrieval. + * + * A random key string will be generated and returned. This key may + * be used to track the entity's usage in a ContentBlock, and for + * retrieving data about the entity at render time. + */ + create: function create(type, mutability, data) { + logWarning('DraftEntity.create', 'contentState.createEntity'); + return DraftEntity.__create(type, mutability, data); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.addEntity' instead. + * --- + * Add an existing DraftEntityInstance to the DraftEntity map. This is + * useful when restoring instances from the server. + */ + add: function add(instance) { + logWarning('DraftEntity.add', 'contentState.addEntity'); + return DraftEntity.__add(instance); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.getEntity' instead. + * --- + * Retrieve the entity corresponding to the supplied key string. + */ + get: function get(key) { + logWarning('DraftEntity.get', 'contentState.getEntity'); + return DraftEntity.__get(key); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.mergeEntityData' instead. + * --- + * Entity instances are immutable. If you need to update the data for an + * instance, this method will merge your data updates and return a new + * instance. + */ + mergeData: function mergeData(key, toMerge) { + logWarning('DraftEntity.mergeData', 'contentState.mergeEntityData'); + return DraftEntity.__mergeData(key, toMerge); + }, + + /** + * WARNING: This method will be deprecated soon! + * Please use 'contentState.replaceEntityData' instead. + * --- + * Completely replace the data for a given instance. + */ + replaceData: function replaceData(key, newData) { + logWarning('DraftEntity.replaceData', 'contentState.replaceEntityData'); + return DraftEntity.__replaceData(key, newData); + }, + + // ***********************************WARNING****************************** + // --- the above public API will be deprecated in the next version of Draft! + // The methods below this line are private - don't call them directly. + + /** + * Get the random key string from whatever entity was last created. + * We need this to support the new API, as part of transitioning to put Entity + * storage in contentState. + */ + __getLastCreatedEntityKey: function __getLastCreatedEntityKey() { + return '' + instanceKey; + }, + + /** + * Create a DraftEntityInstance and store it for later retrieval. + * + * A random key string will be generated and returned. This key may + * be used to track the entity's usage in a ContentBlock, and for + * retrieving data about the entity at render time. + */ + __create: function __create(type, mutability, data) { + return DraftEntity.__add(new DraftEntityInstance({ type: type, mutability: mutability, data: data || {} })); + }, + + /** + * Add an existing DraftEntityInstance to the DraftEntity map. This is + * useful when restoring instances from the server. + */ + __add: function __add(instance) { + var key = '' + ++instanceKey; + instances = instances.set(key, instance); + return key; + }, + + /** + * Retrieve the entity corresponding to the supplied key string. + */ + __get: function __get(key) { + var instance = instances.get(key); + !!!instance ? false ? undefined : invariant(false) : void 0; + return instance; + }, + + /** + * Entity instances are immutable. If you need to update the data for an + * instance, this method will merge your data updates and return a new + * instance. + */ + __mergeData: function __mergeData(key, toMerge) { + var instance = DraftEntity.__get(key); + var newData = _extends({}, instance.getData(), toMerge); + var newInstance = instance.set('data', newData); + instances = instances.set(key, newInstance); + return newInstance; + }, + + /** + * Completely replace the data for a given instance. + */ + __replaceData: function __replaceData(key, newData) { + var instance = DraftEntity.__get(key); + var newInstance = instance.set('data', newData); + instances = instances.set(key, newInstance); + return newInstance; + } +}; + +module.exports = DraftEntity; + +/***/ }), + +/***/ 1927: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftOffsetKey + * @format + * + */ + + + +var KEY_DELIMITER = '-'; + +var DraftOffsetKey = { + encode: function encode(blockKey, decoratorKey, leafKey) { + return blockKey + KEY_DELIMITER + decoratorKey + KEY_DELIMITER + leafKey; + }, + + decode: function decode(offsetKey) { + var _offsetKey$split = offsetKey.split(KEY_DELIMITER), + blockKey = _offsetKey$split[0], + decoratorKey = _offsetKey$split[1], + leafKey = _offsetKey$split[2]; + + return { + blockKey: blockKey, + decoratorKey: parseInt(decoratorKey, 10), + leafKey: parseInt(leafKey, 10) + }; + } +}; + +module.exports = DraftOffsetKey; + +/***/ }), + +/***/ 1940: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * + */ + +function makeEmptyFunction(arg) { + return function () { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +var emptyFunction = function emptyFunction() {}; + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function () { + return this; +}; +emptyFunction.thatReturnsArgument = function (arg) { + return arg; +}; + +module.exports = emptyFunction; + +/***/ }), + +/***/ 1941: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ContentState + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var BlockMapBuilder = __webpack_require__(1916); +var CharacterMetadata = __webpack_require__(1902); +var ContentBlock = __webpack_require__(1910); +var ContentBlockNode = __webpack_require__(1903); +var DraftEntity = __webpack_require__(1926); +var DraftFeatureFlags = __webpack_require__(1909); +var Immutable = __webpack_require__(35); +var SelectionState = __webpack_require__(1913); + +var generateRandomKey = __webpack_require__(1907); +var sanitizeDraftText = __webpack_require__(1942); + +var List = Immutable.List, + Record = Immutable.Record, + Repeat = Immutable.Repeat; + + +var experimentalTreeDataSupport = DraftFeatureFlags.draft_tree_data_support; + +var defaultRecord = { + entityMap: null, + blockMap: null, + selectionBefore: null, + selectionAfter: null +}; + +var ContentBlockNodeRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock; + +var ContentStateRecord = Record(defaultRecord); + +var ContentState = function (_ContentStateRecord) { + _inherits(ContentState, _ContentStateRecord); + + function ContentState() { + _classCallCheck(this, ContentState); + + return _possibleConstructorReturn(this, _ContentStateRecord.apply(this, arguments)); + } + + ContentState.prototype.getEntityMap = function getEntityMap() { + // TODO: update this when we fully remove DraftEntity + return DraftEntity; + }; + + ContentState.prototype.getBlockMap = function getBlockMap() { + return this.get('blockMap'); + }; + + ContentState.prototype.getSelectionBefore = function getSelectionBefore() { + return this.get('selectionBefore'); + }; + + ContentState.prototype.getSelectionAfter = function getSelectionAfter() { + return this.get('selectionAfter'); + }; + + ContentState.prototype.getBlockForKey = function getBlockForKey(key) { + var block = this.getBlockMap().get(key); + return block; + }; + + ContentState.prototype.getKeyBefore = function getKeyBefore(key) { + return this.getBlockMap().reverse().keySeq().skipUntil(function (v) { + return v === key; + }).skip(1).first(); + }; + + ContentState.prototype.getKeyAfter = function getKeyAfter(key) { + return this.getBlockMap().keySeq().skipUntil(function (v) { + return v === key; + }).skip(1).first(); + }; + + ContentState.prototype.getBlockAfter = function getBlockAfter(key) { + return this.getBlockMap().skipUntil(function (_, k) { + return k === key; + }).skip(1).first(); + }; + + ContentState.prototype.getBlockBefore = function getBlockBefore(key) { + return this.getBlockMap().reverse().skipUntil(function (_, k) { + return k === key; + }).skip(1).first(); + }; + + ContentState.prototype.getBlocksAsArray = function getBlocksAsArray() { + return this.getBlockMap().toArray(); + }; + + ContentState.prototype.getFirstBlock = function getFirstBlock() { + return this.getBlockMap().first(); + }; + + ContentState.prototype.getLastBlock = function getLastBlock() { + return this.getBlockMap().last(); + }; + + ContentState.prototype.getPlainText = function getPlainText(delimiter) { + return this.getBlockMap().map(function (block) { + return block ? block.getText() : ''; + }).join(delimiter || '\n'); + }; + + ContentState.prototype.getLastCreatedEntityKey = function getLastCreatedEntityKey() { + // TODO: update this when we fully remove DraftEntity + return DraftEntity.__getLastCreatedEntityKey(); + }; + + ContentState.prototype.hasText = function hasText() { + var blockMap = this.getBlockMap(); + return blockMap.size > 1 || blockMap.first().getLength() > 0; + }; + + ContentState.prototype.createEntity = function createEntity(type, mutability, data) { + // TODO: update this when we fully remove DraftEntity + DraftEntity.__create(type, mutability, data); + return this; + }; + + ContentState.prototype.mergeEntityData = function mergeEntityData(key, toMerge) { + // TODO: update this when we fully remove DraftEntity + DraftEntity.__mergeData(key, toMerge); + return this; + }; + + ContentState.prototype.replaceEntityData = function replaceEntityData(key, newData) { + // TODO: update this when we fully remove DraftEntity + DraftEntity.__replaceData(key, newData); + return this; + }; + + ContentState.prototype.addEntity = function addEntity(instance) { + // TODO: update this when we fully remove DraftEntity + DraftEntity.__add(instance); + return this; + }; + + ContentState.prototype.getEntity = function getEntity(key) { + // TODO: update this when we fully remove DraftEntity + return DraftEntity.__get(key); + }; + + ContentState.createFromBlockArray = function createFromBlockArray( + // TODO: update flow type when we completely deprecate the old entity API + blocks, entityMap) { + // TODO: remove this when we completely deprecate the old entity API + var theBlocks = Array.isArray(blocks) ? blocks : blocks.contentBlocks; + var blockMap = BlockMapBuilder.createFromArray(theBlocks); + var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey()); + return new ContentState({ + blockMap: blockMap, + entityMap: entityMap || DraftEntity, + selectionBefore: selectionState, + selectionAfter: selectionState + }); + }; + + ContentState.createFromText = function createFromText(text) { + var delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : /\r\n?|\n/g; + + var strings = text.split(delimiter); + var blocks = strings.map(function (block) { + block = sanitizeDraftText(block); + return new ContentBlockNodeRecord({ + key: generateRandomKey(), + text: block, + type: 'unstyled', + characterList: List(Repeat(CharacterMetadata.EMPTY, block.length)) + }); + }); + return ContentState.createFromBlockArray(blocks); + }; + + return ContentState; +}(ContentStateRecord); + +module.exports = ContentState; + +/***/ }), + +/***/ 1942: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule sanitizeDraftText + * @format + * + */ + + + +var REGEX_BLOCK_DELIMITER = new RegExp('\r', 'g'); + +function sanitizeDraftText(input) { + return input.replace(REGEX_BLOCK_DELIMITER, ''); +} + +module.exports = sanitizeDraftText; + +/***/ }), + +/***/ 1943: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + * + */ + +/** + * Constants to represent text directionality + * + * Also defines a *global* direciton, to be used in bidi algorithms as a + * default fallback direciton, when no better direction is found or provided. + * + * NOTE: Use `setGlobalDir()`, or update `initGlobalDir()`, to set the initial + * global direction value based on the application. + * + * Part of the implementation of Unicode Bidirectional Algorithm (UBA) + * Unicode Standard Annex #9 (UAX9) + * http://www.unicode.org/reports/tr9/ + */ + + + +var invariant = __webpack_require__(641); + +var NEUTRAL = 'NEUTRAL'; // No strong direction +var LTR = 'LTR'; // Left-to-Right direction +var RTL = 'RTL'; // Right-to-Left direction + +var globalDir = null; + +// == Helpers == + +/** + * Check if a directionality value is a Strong one + */ +function isStrong(dir) { + return dir === LTR || dir === RTL; +} + +/** + * Get string value to be used for `dir` HTML attribute or `direction` CSS + * property. + */ +function getHTMLDir(dir) { + !isStrong(dir) ? false ? undefined : invariant(false) : void 0; + return dir === LTR ? 'ltr' : 'rtl'; +} + +/** + * Get string value to be used for `dir` HTML attribute or `direction` CSS + * property, but returns null if `dir` has same value as `otherDir`. + * `null`. + */ +function getHTMLDirIfDifferent(dir, otherDir) { + !isStrong(dir) ? false ? undefined : invariant(false) : void 0; + !isStrong(otherDir) ? false ? undefined : invariant(false) : void 0; + return dir === otherDir ? null : getHTMLDir(dir); +} + +// == Global Direction == + +/** + * Set the global direction. + */ +function setGlobalDir(dir) { + globalDir = dir; +} + +/** + * Initialize the global direction + */ +function initGlobalDir() { + setGlobalDir(LTR); +} + +/** + * Get the global direction + */ +function getGlobalDir() { + if (!globalDir) { + this.initGlobalDir(); + } + !globalDir ? false ? undefined : invariant(false) : void 0; + return globalDir; +} + +var UnicodeBidiDirection = { + // Values + NEUTRAL: NEUTRAL, + LTR: LTR, + RTL: RTL, + // Helpers + isStrong: isStrong, + getHTMLDir: getHTMLDir, + getHTMLDirIfDifferent: getHTMLDirIfDifferent, + // Global Direction + setGlobalDir: setGlobalDir, + initGlobalDir: initGlobalDir, + getGlobalDir: getGlobalDir +}; + +module.exports = UnicodeBidiDirection; + +/***/ }), + +/***/ 1944: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DefaultDraftBlockRenderMap + * @format + * + */ + + + +var _require = __webpack_require__(35), + Map = _require.Map; + +var React = __webpack_require__(1); + +var cx = __webpack_require__(1914); + +var UL_WRAP = React.createElement('ul', { className: cx('public/DraftStyleDefault/ul') }); +var OL_WRAP = React.createElement('ol', { className: cx('public/DraftStyleDefault/ol') }); +var PRE_WRAP = React.createElement('pre', { className: cx('public/DraftStyleDefault/pre') }); + +var DefaultDraftBlockRenderMap = Map({ + 'header-one': { + element: 'h1' + }, + 'header-two': { + element: 'h2' + }, + 'header-three': { + element: 'h3' + }, + 'header-four': { + element: 'h4' + }, + 'header-five': { + element: 'h5' + }, + 'header-six': { + element: 'h6' + }, + 'unordered-list-item': { + element: 'li', + wrapper: UL_WRAP + }, + 'ordered-list-item': { + element: 'li', + wrapper: OL_WRAP + }, + blockquote: { + element: 'blockquote' + }, + atomic: { + element: 'figure' + }, + 'code-block': { + element: 'pre', + wrapper: PRE_WRAP + }, + unstyled: { + element: 'div', + aliasedElements: ['p'] + } +}); + +module.exports = DefaultDraftBlockRenderMap; + +/***/ }), + +/***/ 1945: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + */ + +module.exports = { + BACKSPACE: 8, + TAB: 9, + RETURN: 13, + ALT: 18, + ESC: 27, + SPACE: 32, + PAGE_UP: 33, + PAGE_DOWN: 34, + END: 35, + HOME: 36, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + DELETE: 46, + COMMA: 188, + PERIOD: 190, + A: 65, + Z: 90, + ZERO: 48, + NUMPAD_0: 96, + NUMPAD_9: 105 +}; + +/***/ }), + +/***/ 1946: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEntityKeyForSelection + * @format + * + */ + + + +/** + * Return the entity key that should be used when inserting text for the + * specified target selection, only if the entity is `MUTABLE`. `IMMUTABLE` + * and `SEGMENTED` entities should not be used for insertion behavior. + */ +function getEntityKeyForSelection(contentState, targetSelection) { + var entityKey; + + if (targetSelection.isCollapsed()) { + var key = targetSelection.getAnchorKey(); + var offset = targetSelection.getAnchorOffset(); + if (offset > 0) { + entityKey = contentState.getBlockForKey(key).getEntityAt(offset - 1); + if (entityKey !== contentState.getBlockForKey(key).getEntityAt(offset)) { + return null; + } + return filterKey(contentState.getEntityMap(), entityKey); + } + return null; + } + + var startKey = targetSelection.getStartKey(); + var startOffset = targetSelection.getStartOffset(); + var startBlock = contentState.getBlockForKey(startKey); + + entityKey = startOffset === startBlock.getLength() ? null : startBlock.getEntityAt(startOffset); + + return filterKey(contentState.getEntityMap(), entityKey); +} + +/** + * Determine whether an entity key corresponds to a `MUTABLE` entity. If so, + * return it. If not, return null. + */ +function filterKey(entityMap, entityKey) { + if (entityKey) { + var entity = entityMap.__get(entityKey); + return entity.getMutability() === 'MUTABLE' ? entityKey : null; + } + return null; +} + +module.exports = getEntityKeyForSelection; + +/***/ }), + +/***/ 1947: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * + */ + +var isTextNode = __webpack_require__(2113); + +/*eslint-disable no-bitwise */ + +/** + * Checks if a given DOM node contains or is another DOM node. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if ('contains' in outerNode) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; + +/***/ }), + +/***/ 1948: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var getStyleProperty = __webpack_require__(2115); + +/** + * @param {DOMNode} element [description] + * @param {string} name Overflow style property name. + * @return {boolean} True if the supplied ndoe is scrollable. + */ +function _isNodeScrollable(element, name) { + var overflow = Style.get(element, name); + return overflow === 'auto' || overflow === 'scroll'; +} + +/** + * Utilities for querying and mutating style properties. + */ +var Style = { + /** + * Gets the style property for the supplied node. This will return either the + * computed style, if available, or the declared style. + * + * @param {DOMNode} node + * @param {string} name Style property name. + * @return {?string} Style property value. + */ + get: getStyleProperty, + + /** + * Determines the nearest ancestor of a node that is scrollable. + * + * NOTE: This can be expensive if used repeatedly or on a node nested deeply. + * + * @param {?DOMNode} node Node from which to start searching. + * @return {?DOMWindow|DOMElement} Scroll parent of the supplied node. + */ + getScrollParent: function getScrollParent(node) { + if (!node) { + return null; + } + var ownerDocument = node.ownerDocument; + while (node && node !== ownerDocument.body) { + if (_isNodeScrollable(node, 'overflow') || _isNodeScrollable(node, 'overflowY') || _isNodeScrollable(node, 'overflowX')) { + return node; + } + node = node.parentNode; + } + return ownerDocument.defaultView || ownerDocument.parentWindow; + } + +}; + +module.exports = Style; + +/***/ }), + +/***/ 1949: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + */ + + + +var getDocumentScrollElement = __webpack_require__(2120); +var getUnboundedScrollPosition = __webpack_require__(2121); + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are bounded. This means that if the scroll position is + * negative or exceeds the element boundaries (which is possible using inertial + * scrolling), you will get zero or the maximum scroll position, respectively. + * + * If you need the unbound scroll position, use `getUnboundedScrollPosition`. + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ +function getScrollPosition(scrollable) { + var documentScrollElement = getDocumentScrollElement(scrollable.ownerDocument || scrollable.document); + if (scrollable.Window && scrollable instanceof scrollable.Window) { + scrollable = documentScrollElement; + } + var scrollPosition = getUnboundedScrollPosition(scrollable); + + var viewport = scrollable === documentScrollElement ? scrollable.ownerDocument.documentElement : scrollable; + + var xMax = scrollable.scrollWidth - viewport.clientWidth; + var yMax = scrollable.scrollHeight - viewport.clientHeight; + + scrollPosition.x = Math.max(0, Math.min(scrollPosition.x, xMax)); + scrollPosition.y = Math.max(0, Math.min(scrollPosition.y, yMax)); + + return scrollPosition; +} + +module.exports = getScrollPosition; + +/***/ }), + +/***/ 1950: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule findAncestorOffsetKey + * @format + * + */ + + + +var getSelectionOffsetKeyForNode = __webpack_require__(1985); + +/** + * Get the key from the node's nearest offset-aware ancestor. + */ +function findAncestorOffsetKey(node) { + var searchNode = node; + while (searchNode && searchNode !== document.documentElement) { + var key = getSelectionOffsetKeyForNode(searchNode); + if (key != null) { + return key; + } + searchNode = searchNode.parentNode; + } + return null; +} + +module.exports = findAncestorOffsetKey; + +/***/ }), + +/***/ 1951: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule KeyBindingUtil + * @format + * + */ + + + +var UserAgent = __webpack_require__(1905); + +var isOSX = UserAgent.isPlatform('Mac OS X'); + +var KeyBindingUtil = { + /** + * Check whether the ctrlKey modifier is *not* being used in conjunction with + * the altKey modifier. If they are combined, the result is an `altGraph` + * key modifier, which should not be handled by this set of key bindings. + */ + isCtrlKeyCommand: function isCtrlKeyCommand(e) { + return !!e.ctrlKey && !e.altKey; + }, + + isOptionKeyCommand: function isOptionKeyCommand(e) { + return isOSX && e.altKey; + }, + + hasCommandModifier: function hasCommandModifier(e) { + return isOSX ? !!e.metaKey && !e.altKey : KeyBindingUtil.isCtrlKeyCommand(e); + } +}; + +module.exports = KeyBindingUtil; + +/***/ }), + +/***/ 1952: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule moveSelectionBackward + * @format + * + */ + + + +/** + * Given a collapsed selection, move the focus `maxDistance` backward within + * the selected block. If the selection will go beyond the start of the block, + * move focus to the end of the previous block, but no further. + * + * This function is not Unicode-aware, so surrogate pairs will be treated + * as having length 2. + */ +function moveSelectionBackward(editorState, maxDistance) { + var selection = editorState.getSelection(); + var content = editorState.getCurrentContent(); + var key = selection.getStartKey(); + var offset = selection.getStartOffset(); + + var focusKey = key; + var focusOffset = 0; + + if (maxDistance > offset) { + var keyBefore = content.getKeyBefore(key); + if (keyBefore == null) { + focusKey = key; + } else { + focusKey = keyBefore; + var blockBefore = content.getBlockForKey(keyBefore); + focusOffset = blockBefore.getText().length; + } + } else { + focusOffset = offset - maxDistance; + } + + return selection.merge({ + focusKey: focusKey, + focusOffset: focusOffset, + isBackward: true + }); +} + +module.exports = moveSelectionBackward; + +/***/ }), + +/***/ 1972: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule randomizeBlockMapKeys + * @format + * + */ + + + +var ContentBlockNode = __webpack_require__(1903); +var Immutable = __webpack_require__(35); + +var generateRandomKey = __webpack_require__(1907); + +var OrderedMap = Immutable.OrderedMap; + + +var randomizeContentBlockNodeKeys = function randomizeContentBlockNodeKeys(blockMap) { + var newKeysRef = {}; + + // we keep track of root blocks in order to update subsequent sibling links + var lastRootBlock = void 0; + + return OrderedMap(blockMap.withMutations(function (blockMapState) { + blockMapState.forEach(function (block, index) { + var oldKey = block.getKey(); + var nextKey = block.getNextSiblingKey(); + var prevKey = block.getPrevSiblingKey(); + var childrenKeys = block.getChildKeys(); + var parentKey = block.getParentKey(); + + // new key that we will use to build linking + var key = generateRandomKey(); + + // we will add it here to re-use it later + newKeysRef[oldKey] = key; + + if (nextKey) { + var nextBlock = blockMapState.get(nextKey); + if (nextBlock) { + blockMapState.setIn([nextKey, 'prevSibling'], key); + } else { + // this can happen when generating random keys for fragments + blockMapState.setIn([oldKey, 'nextSibling'], null); + } + } + + if (prevKey) { + var prevBlock = blockMapState.get(prevKey); + if (prevBlock) { + blockMapState.setIn([prevKey, 'nextSibling'], key); + } else { + // this can happen when generating random keys for fragments + blockMapState.setIn([oldKey, 'prevSibling'], null); + } + } + + if (parentKey && blockMapState.get(parentKey)) { + var parentBlock = blockMapState.get(parentKey); + var parentChildrenList = parentBlock.getChildKeys(); + blockMapState.setIn([parentKey, 'children'], parentChildrenList.set(parentChildrenList.indexOf(block.getKey()), key)); + } else { + // blocks will then be treated as root block nodes + blockMapState.setIn([oldKey, 'parent'], null); + + if (lastRootBlock) { + blockMapState.setIn([lastRootBlock.getKey(), 'nextSibling'], key); + blockMapState.setIn([oldKey, 'prevSibling'], newKeysRef[lastRootBlock.getKey()]); + } + + lastRootBlock = blockMapState.get(oldKey); + } + + childrenKeys.forEach(function (childKey) { + var childBlock = blockMapState.get(childKey); + if (childBlock) { + blockMapState.setIn([childKey, 'parent'], key); + } else { + blockMapState.setIn([oldKey, 'children'], block.getChildKeys().filter(function (child) { + return child !== childKey; + })); + } + }); + }); + }).toArray().map(function (block) { + return [newKeysRef[block.getKey()], block.set('key', newKeysRef[block.getKey()])]; + })); +}; + +var randomizeContentBlockKeys = function randomizeContentBlockKeys(blockMap) { + return OrderedMap(blockMap.toArray().map(function (block) { + var key = generateRandomKey(); + return [key, block.set('key', key)]; + })); +}; + +var randomizeBlockMapKeys = function randomizeBlockMapKeys(blockMap) { + var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode; + + if (!isTreeBasedBlockMap) { + return randomizeContentBlockKeys(blockMap); + } + + return randomizeContentBlockNodeKeys(blockMap); +}; + +module.exports = randomizeBlockMapKeys; + +/***/ }), + +/***/ 1973: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule removeEntitiesAtEdges + * @format + * + */ + + + +var CharacterMetadata = __webpack_require__(1902); + +var findRangesImmutable = __webpack_require__(1917); +var invariant = __webpack_require__(641); + +function removeEntitiesAtEdges(contentState, selectionState) { + var blockMap = contentState.getBlockMap(); + var entityMap = contentState.getEntityMap(); + + var updatedBlocks = {}; + + var startKey = selectionState.getStartKey(); + var startOffset = selectionState.getStartOffset(); + var startBlock = blockMap.get(startKey); + var updatedStart = removeForBlock(entityMap, startBlock, startOffset); + + if (updatedStart !== startBlock) { + updatedBlocks[startKey] = updatedStart; + } + + var endKey = selectionState.getEndKey(); + var endOffset = selectionState.getEndOffset(); + var endBlock = blockMap.get(endKey); + if (startKey === endKey) { + endBlock = updatedStart; + } + + var updatedEnd = removeForBlock(entityMap, endBlock, endOffset); + + if (updatedEnd !== endBlock) { + updatedBlocks[endKey] = updatedEnd; + } + + if (!Object.keys(updatedBlocks).length) { + return contentState.set('selectionAfter', selectionState); + } + + return contentState.merge({ + blockMap: blockMap.merge(updatedBlocks), + selectionAfter: selectionState + }); +} + +function getRemovalRange(characters, key, offset) { + var removalRange; + findRangesImmutable(characters, function (a, b) { + return a.getEntity() === b.getEntity(); + }, function (element) { + return element.getEntity() === key; + }, function (start, end) { + if (start <= offset && end >= offset) { + removalRange = { start: start, end: end }; + } + }); + !(typeof removalRange === 'object') ? false ? undefined : invariant(false) : void 0; + return removalRange; +} + +function removeForBlock(entityMap, block, offset) { + var chars = block.getCharacterList(); + var charBefore = offset > 0 ? chars.get(offset - 1) : undefined; + var charAfter = offset < chars.count() ? chars.get(offset) : undefined; + var entityBeforeCursor = charBefore ? charBefore.getEntity() : undefined; + var entityAfterCursor = charAfter ? charAfter.getEntity() : undefined; + + if (entityAfterCursor && entityAfterCursor === entityBeforeCursor) { + var entity = entityMap.__get(entityAfterCursor); + if (entity.getMutability() !== 'MUTABLE') { + var _getRemovalRange = getRemovalRange(chars, entityAfterCursor, offset), + start = _getRemovalRange.start, + end = _getRemovalRange.end; + + var current; + while (start < end) { + current = chars.get(start); + chars = chars.set(start, CharacterMetadata.applyEntity(current, null)); + start++; + } + return block.set('characterList', chars); + } + } + + return block; +} + +module.exports = removeEntitiesAtEdges; + +/***/ }), + +/***/ 1974: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule insertIntoList + * @format + * + */ + + + +/** + * Maintain persistence for target list when appending and prepending. + */ +function insertIntoList(targetList, toInsert, offset) { + if (offset === targetList.count()) { + toInsert.forEach(function (c) { + targetList = targetList.push(c); + }); + } else if (offset === 0) { + toInsert.reverse().forEach(function (c) { + targetList = targetList.unshift(c); + }); + } else { + var head = targetList.slice(0, offset); + var tail = targetList.slice(offset); + targetList = head.concat(toInsert, tail).toList(); + } + return targetList; +} + +module.exports = insertIntoList; + +/***/ }), + +/***/ 1975: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getNextDelimiterBlockKey + * @format + * + * + * This is unstable and not part of the public API and should not be used by + * production systems. This file may be update/removed without notice. + */ + +var ContentBlockNode = __webpack_require__(1903); + +var getNextDelimiterBlockKey = function getNextDelimiterBlockKey(block, blockMap) { + var isExperimentalTreeBlock = block instanceof ContentBlockNode; + + if (!isExperimentalTreeBlock) { + return null; + } + + var nextSiblingKey = block.getNextSiblingKey(); + + if (nextSiblingKey) { + return nextSiblingKey; + } + + var parent = block.getParentKey(); + + if (!parent) { + return null; + } + + var nextNonDescendantBlock = blockMap.get(parent); + while (nextNonDescendantBlock && !nextNonDescendantBlock.getNextSiblingKey()) { + var parentKey = nextNonDescendantBlock.getParentKey(); + nextNonDescendantBlock = parentKey ? blockMap.get(parentKey) : null; + } + + if (!nextNonDescendantBlock) { + return null; + } + + return nextNonDescendantBlock.getNextSiblingKey(); +}; + +module.exports = getNextDelimiterBlockKey; + +/***/ }), + +/***/ 1976: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule BlockTree + * @format + * + */ + + + +var Immutable = __webpack_require__(35); + +var emptyFunction = __webpack_require__(1940); +var findRangesImmutable = __webpack_require__(1917); + +var List = Immutable.List, + Repeat = Immutable.Repeat, + Record = Immutable.Record; + + +var returnTrue = emptyFunction.thatReturnsTrue; + +var FINGERPRINT_DELIMITER = '-'; + +var defaultLeafRange = { + start: null, + end: null +}; + +var LeafRange = Record(defaultLeafRange); + +var defaultDecoratorRange = { + start: null, + end: null, + decoratorKey: null, + leaves: null +}; + +var DecoratorRange = Record(defaultDecoratorRange); + +var BlockTree = { + /** + * Generate a block tree for a given ContentBlock/decorator pair. + */ + generate: function generate(contentState, block, decorator) { + var textLength = block.getLength(); + if (!textLength) { + return List.of(new DecoratorRange({ + start: 0, + end: 0, + decoratorKey: null, + leaves: List.of(new LeafRange({ start: 0, end: 0 })) + })); + } + + var leafSets = []; + var decorations = decorator ? decorator.getDecorations(block, contentState) : List(Repeat(null, textLength)); + + var chars = block.getCharacterList(); + + findRangesImmutable(decorations, areEqual, returnTrue, function (start, end) { + leafSets.push(new DecoratorRange({ + start: start, + end: end, + decoratorKey: decorations.get(start), + leaves: generateLeaves(chars.slice(start, end).toList(), start) + })); + }); + + return List(leafSets); + }, + + /** + * Create a string representation of the given tree map. This allows us + * to rapidly determine whether a tree has undergone a significant + * structural change. + */ + getFingerprint: function getFingerprint(tree) { + return tree.map(function (leafSet) { + var decoratorKey = leafSet.get('decoratorKey'); + var fingerprintString = decoratorKey !== null ? decoratorKey + '.' + (leafSet.get('end') - leafSet.get('start')) : ''; + return '' + fingerprintString + '.' + leafSet.get('leaves').size; + }).join(FINGERPRINT_DELIMITER); + } +}; + +/** + * Generate LeafRange records for a given character list. + */ +function generateLeaves(characters, offset) { + var leaves = []; + var inlineStyles = characters.map(function (c) { + return c.getStyle(); + }).toList(); + findRangesImmutable(inlineStyles, areEqual, returnTrue, function (start, end) { + leaves.push(new LeafRange({ + start: start + offset, + end: end + offset + })); + }); + return List(leaves); +} + +function areEqual(a, b) { + return a === b; +} + +module.exports = BlockTree; + +/***/ }), + +/***/ 1977: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEntityInstance + * @legacyServerCallableInstance + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Immutable = __webpack_require__(35); + +var Record = Immutable.Record; + + +var DraftEntityInstanceRecord = Record({ + type: 'TOKEN', + mutability: 'IMMUTABLE', + data: Object +}); + +/** + * An instance of a document entity, consisting of a `type` and relevant + * `data`, metadata about the entity. + * + * For instance, a "link" entity might provide a URI, and a "mention" + * entity might provide the mentioned user's ID. These pieces of data + * may be used when rendering the entity as part of a ContentBlock DOM + * representation. For a link, the data would be used as an href for + * the rendered anchor. For a mention, the ID could be used to retrieve + * a hovercard. + */ + +var DraftEntityInstance = function (_DraftEntityInstanceR) { + _inherits(DraftEntityInstance, _DraftEntityInstanceR); + + function DraftEntityInstance() { + _classCallCheck(this, DraftEntityInstance); + + return _possibleConstructorReturn(this, _DraftEntityInstanceR.apply(this, arguments)); + } + + DraftEntityInstance.prototype.getType = function getType() { + return this.get('type'); + }; + + DraftEntityInstance.prototype.getMutability = function getMutability() { + return this.get('mutability'); + }; + + DraftEntityInstance.prototype.getData = function getData() { + return this.get('data'); + }; + + return DraftEntityInstance; +}(DraftEntityInstanceRecord); + +module.exports = DraftEntityInstance; + +/***/ }), + +/***/ 1978: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + * + */ + +/** + * Basic (stateless) API for text direction detection + * + * Part of our implementation of Unicode Bidirectional Algorithm (UBA) + * Unicode Standard Annex #9 (UAX9) + * http://www.unicode.org/reports/tr9/ + */ + + + +var UnicodeBidiDirection = __webpack_require__(1943); + +var invariant = __webpack_require__(641); + +/** + * RegExp ranges of characters with a *Strong* Bidi_Class value. + * + * Data is based on DerivedBidiClass.txt in UCD version 7.0.0. + * + * NOTE: For performance reasons, we only support Unicode's + * Basic Multilingual Plane (BMP) for now. + */ +var RANGE_BY_BIDI_TYPE = { + + L: 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u01BA\u01BB' + '\u01BC-\u01BF\u01C0-\u01C3\u01C4-\u0293\u0294\u0295-\u02AF\u02B0-\u02B8' + '\u02BB-\u02C1\u02D0-\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376-\u0377' + '\u037A\u037B-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1' + '\u03A3-\u03F5\u03F7-\u0481\u0482\u048A-\u052F\u0531-\u0556\u0559' + '\u055A-\u055F\u0561-\u0587\u0589\u0903\u0904-\u0939\u093B\u093D' + '\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0950\u0958-\u0961\u0964-\u0965' + '\u0966-\u096F\u0970\u0971\u0972-\u0980\u0982-\u0983\u0985-\u098C' + '\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD' + '\u09BE-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u09CE\u09D7\u09DC-\u09DD' + '\u09DF-\u09E1\u09E6-\u09EF\u09F0-\u09F1\u09F4-\u09F9\u09FA\u0A03' + '\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33' + '\u0A35-\u0A36\u0A38-\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F' + '\u0A72-\u0A74\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0' + '\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0AD0' + '\u0AE0-\u0AE1\u0AE6-\u0AEF\u0AF0\u0B02-\u0B03\u0B05-\u0B0C\u0B0F-\u0B10' + '\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40' + '\u0B47-\u0B48\u0B4B-\u0B4C\u0B57\u0B5C-\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F' + '\u0B70\u0B71\u0B72-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95' + '\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9' + '\u0BBE-\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7' + '\u0BE6-\u0BEF\u0BF0-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10' + '\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C59\u0C60-\u0C61' + '\u0C66-\u0C6F\u0C7F\u0C82-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8' + '\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CBE\u0CBF\u0CC0-\u0CC4\u0CC6' + '\u0CC7-\u0CC8\u0CCA-\u0CCB\u0CD5-\u0CD6\u0CDE\u0CE0-\u0CE1\u0CE6-\u0CEF' + '\u0CF1-\u0CF2\u0D02-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D' + '\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D57\u0D60-\u0D61' + '\u0D66-\u0D6F\u0D70-\u0D75\u0D79\u0D7A-\u0D7F\u0D82-\u0D83\u0D85-\u0D96' + '\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF' + '\u0DE6-\u0DEF\u0DF2-\u0DF3\u0DF4\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45' + '\u0E46\u0E4F\u0E50-\u0E59\u0E5A-\u0E5B\u0E81-\u0E82\u0E84\u0E87-\u0E88' + '\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7' + '\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6' + '\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F01-\u0F03\u0F04-\u0F12\u0F13\u0F14' + '\u0F15-\u0F17\u0F1A-\u0F1F\u0F20-\u0F29\u0F2A-\u0F33\u0F34\u0F36\u0F38' + '\u0F3E-\u0F3F\u0F40-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C' + '\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FCF\u0FD0-\u0FD4\u0FD5-\u0FD8' + '\u0FD9-\u0FDA\u1000-\u102A\u102B-\u102C\u1031\u1038\u103B-\u103C\u103F' + '\u1040-\u1049\u104A-\u104F\u1050-\u1055\u1056-\u1057\u105A-\u105D\u1061' + '\u1062-\u1064\u1065-\u1066\u1067-\u106D\u106E-\u1070\u1075-\u1081' + '\u1083-\u1084\u1087-\u108C\u108E\u108F\u1090-\u1099\u109A-\u109C' + '\u109E-\u109F\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FB\u10FC' + '\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288' + '\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5' + '\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u1368' + '\u1369-\u137C\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166D-\u166E' + '\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EB-\u16ED\u16EE-\u16F0' + '\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1735-\u1736' + '\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5' + '\u17C7-\u17C8\u17D4-\u17D6\u17D7\u17D8-\u17DA\u17DC\u17E0-\u17E9' + '\u1810-\u1819\u1820-\u1842\u1843\u1844-\u1877\u1880-\u18A8\u18AA' + '\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930-\u1931' + '\u1933-\u1938\u1946-\u194F\u1950-\u196D\u1970-\u1974\u1980-\u19AB' + '\u19B0-\u19C0\u19C1-\u19C7\u19C8-\u19C9\u19D0-\u19D9\u19DA\u1A00-\u1A16' + '\u1A19-\u1A1A\u1A1E-\u1A1F\u1A20-\u1A54\u1A55\u1A57\u1A61\u1A63-\u1A64' + '\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AA6\u1AA7\u1AA8-\u1AAD' + '\u1B04\u1B05-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B45-\u1B4B' + '\u1B50-\u1B59\u1B5A-\u1B60\u1B61-\u1B6A\u1B74-\u1B7C\u1B82\u1B83-\u1BA0' + '\u1BA1\u1BA6-\u1BA7\u1BAA\u1BAE-\u1BAF\u1BB0-\u1BB9\u1BBA-\u1BE5\u1BE7' + '\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1BFC-\u1BFF\u1C00-\u1C23\u1C24-\u1C2B' + '\u1C34-\u1C35\u1C3B-\u1C3F\u1C40-\u1C49\u1C4D-\u1C4F\u1C50-\u1C59' + '\u1C5A-\u1C77\u1C78-\u1C7D\u1C7E-\u1C7F\u1CC0-\u1CC7\u1CD3\u1CE1' + '\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF2-\u1CF3\u1CF5-\u1CF6\u1D00-\u1D2B' + '\u1D2C-\u1D6A\u1D6B-\u1D77\u1D78\u1D79-\u1D9A\u1D9B-\u1DBF\u1E00-\u1F15' + '\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D' + '\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC' + '\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E' + '\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D' + '\u2124\u2126\u2128\u212A-\u212D\u212F-\u2134\u2135-\u2138\u2139' + '\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2182\u2183-\u2184' + '\u2185-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF' + '\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2C7B\u2C7C-\u2C7D\u2C7E-\u2CE4' + '\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F' + '\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE' + '\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005\u3006\u3007' + '\u3021-\u3029\u302E-\u302F\u3031-\u3035\u3038-\u303A\u303B\u303C' + '\u3041-\u3096\u309D-\u309E\u309F\u30A1-\u30FA\u30FC-\u30FE\u30FF' + '\u3105-\u312D\u3131-\u318E\u3190-\u3191\u3192-\u3195\u3196-\u319F' + '\u31A0-\u31BA\u31F0-\u31FF\u3200-\u321C\u3220-\u3229\u322A-\u3247' + '\u3248-\u324F\u3260-\u327B\u327F\u3280-\u3289\u328A-\u32B0\u32C0-\u32CB' + '\u32D0-\u32FE\u3300-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DB5' + '\u4E00-\u9FCC\uA000-\uA014\uA015\uA016-\uA48C\uA4D0-\uA4F7\uA4F8-\uA4FD' + '\uA4FE-\uA4FF\uA500-\uA60B\uA60C\uA610-\uA61F\uA620-\uA629\uA62A-\uA62B' + '\uA640-\uA66D\uA66E\uA680-\uA69B\uA69C-\uA69D\uA6A0-\uA6E5\uA6E6-\uA6EF' + '\uA6F2-\uA6F7\uA722-\uA76F\uA770\uA771-\uA787\uA789-\uA78A\uA78B-\uA78E' + '\uA790-\uA7AD\uA7B0-\uA7B1\uA7F7\uA7F8-\uA7F9\uA7FA\uA7FB-\uA801' + '\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA823-\uA824\uA827\uA830-\uA835' + '\uA836-\uA837\uA840-\uA873\uA880-\uA881\uA882-\uA8B3\uA8B4-\uA8C3' + '\uA8CE-\uA8CF\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8F8-\uA8FA\uA8FB\uA900-\uA909' + '\uA90A-\uA925\uA92E-\uA92F\uA930-\uA946\uA952-\uA953\uA95F\uA960-\uA97C' + '\uA983\uA984-\uA9B2\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uA9C0\uA9C1-\uA9CD' + '\uA9CF\uA9D0-\uA9D9\uA9DE-\uA9DF\uA9E0-\uA9E4\uA9E6\uA9E7-\uA9EF' + '\uA9F0-\uA9F9\uA9FA-\uA9FE\uAA00-\uAA28\uAA2F-\uAA30\uAA33-\uAA34' + '\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA5F\uAA60-\uAA6F' + '\uAA70\uAA71-\uAA76\uAA77-\uAA79\uAA7A\uAA7B\uAA7D\uAA7E-\uAAAF\uAAB1' + '\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAADD\uAADE-\uAADF' + '\uAAE0-\uAAEA\uAAEB\uAAEE-\uAAEF\uAAF0-\uAAF1\uAAF2\uAAF3-\uAAF4\uAAF5' + '\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E' + '\uAB30-\uAB5A\uAB5B\uAB5C-\uAB5F\uAB64-\uAB65\uABC0-\uABE2\uABE3-\uABE4' + '\uABE6-\uABE7\uABE9-\uABEA\uABEB\uABEC\uABF0-\uABF9\uAC00-\uD7A3' + '\uD7B0-\uD7C6\uD7CB-\uD7FB\uE000-\uF8FF\uF900-\uFA6D\uFA70-\uFAD9' + '\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFF6F\uFF70' + '\uFF71-\uFF9D\uFF9E-\uFF9F\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF' + '\uFFD2-\uFFD7\uFFDA-\uFFDC', + + R: '\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05D0-\u05EA\u05EB-\u05EF' + '\u05F0-\u05F2\u05F3-\u05F4\u05F5-\u05FF\u07C0-\u07C9\u07CA-\u07EA' + '\u07F4-\u07F5\u07FA\u07FB-\u07FF\u0800-\u0815\u081A\u0824\u0828' + '\u082E-\u082F\u0830-\u083E\u083F\u0840-\u0858\u085C-\u085D\u085E' + '\u085F-\u089F\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB37\uFB38-\uFB3C' + '\uFB3D\uFB3E\uFB3F\uFB40-\uFB41\uFB42\uFB43-\uFB44\uFB45\uFB46-\uFB4F', + + AL: '\u0608\u060B\u060D\u061B\u061C\u061D\u061E-\u061F\u0620-\u063F\u0640' + '\u0641-\u064A\u066D\u066E-\u066F\u0671-\u06D3\u06D4\u06D5\u06E5-\u06E6' + '\u06EE-\u06EF\u06FA-\u06FC\u06FD-\u06FE\u06FF\u0700-\u070D\u070E\u070F' + '\u0710\u0712-\u072F\u074B-\u074C\u074D-\u07A5\u07B1\u07B2-\u07BF' + '\u08A0-\u08B2\u08B3-\u08E3\uFB50-\uFBB1\uFBB2-\uFBC1\uFBC2-\uFBD2' + '\uFBD3-\uFD3D\uFD40-\uFD4F\uFD50-\uFD8F\uFD90-\uFD91\uFD92-\uFDC7' + '\uFDC8-\uFDCF\uFDF0-\uFDFB\uFDFC\uFDFE-\uFDFF\uFE70-\uFE74\uFE75' + '\uFE76-\uFEFC\uFEFD-\uFEFE' + +}; + +var REGEX_STRONG = new RegExp('[' + RANGE_BY_BIDI_TYPE.L + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']'); + +var REGEX_RTL = new RegExp('[' + RANGE_BY_BIDI_TYPE.R + RANGE_BY_BIDI_TYPE.AL + ']'); + +/** + * Returns the first strong character (has Bidi_Class value of L, R, or AL). + * + * @param str A text block; e.g. paragraph, table cell, tag + * @return A character with strong bidi direction, or null if not found + */ +function firstStrongChar(str) { + var match = REGEX_STRONG.exec(str); + return match == null ? null : match[0]; +} + +/** + * Returns the direction of a block of text, based on the direction of its + * first strong character (has Bidi_Class value of L, R, or AL). + * + * @param str A text block; e.g. paragraph, table cell, tag + * @return The resolved direction + */ +function firstStrongCharDir(str) { + var strongChar = firstStrongChar(str); + if (strongChar == null) { + return UnicodeBidiDirection.NEUTRAL; + } + return REGEX_RTL.exec(strongChar) ? UnicodeBidiDirection.RTL : UnicodeBidiDirection.LTR; +} + +/** + * Returns the direction of a block of text, based on the direction of its + * first strong character (has Bidi_Class value of L, R, or AL), or a fallback + * direction, if no strong character is found. + * + * This function is supposed to be used in respect to Higher-Level Protocol + * rule HL1. (http://www.unicode.org/reports/tr9/#HL1) + * + * @param str A text block; e.g. paragraph, table cell, tag + * @param fallback Fallback direction, used if no strong direction detected + * for the block (default = NEUTRAL) + * @return The resolved direction + */ +function resolveBlockDir(str, fallback) { + fallback = fallback || UnicodeBidiDirection.NEUTRAL; + if (!str.length) { + return fallback; + } + var blockDir = firstStrongCharDir(str); + return blockDir === UnicodeBidiDirection.NEUTRAL ? fallback : blockDir; +} + +/** + * Returns the direction of a block of text, based on the direction of its + * first strong character (has Bidi_Class value of L, R, or AL), or a fallback + * direction, if no strong character is found. + * + * NOTE: This function is similar to resolveBlockDir(), but uses the global + * direction as the fallback, so it *always* returns a Strong direction, + * making it useful for integration in places that you need to make the final + * decision, like setting some CSS class. + * + * This function is supposed to be used in respect to Higher-Level Protocol + * rule HL1. (http://www.unicode.org/reports/tr9/#HL1) + * + * @param str A text block; e.g. paragraph, table cell + * @param strongFallback Fallback direction, used if no strong direction + * detected for the block (default = global direction) + * @return The resolved Strong direction + */ +function getDirection(str, strongFallback) { + if (!strongFallback) { + strongFallback = UnicodeBidiDirection.getGlobalDir(); + } + !UnicodeBidiDirection.isStrong(strongFallback) ? false ? undefined : invariant(false) : void 0; + return resolveBlockDir(str, strongFallback); +} + +/** + * Returns true if getDirection(arguments...) returns LTR. + * + * @param str A text block; e.g. paragraph, table cell + * @param strongFallback Fallback direction, used if no strong direction + * detected for the block (default = global direction) + * @return True if the resolved direction is LTR + */ +function isDirectionLTR(str, strongFallback) { + return getDirection(str, strongFallback) === UnicodeBidiDirection.LTR; +} + +/** + * Returns true if getDirection(arguments...) returns RTL. + * + * @param str A text block; e.g. paragraph, table cell + * @param strongFallback Fallback direction, used if no strong direction + * detected for the block (default = global direction) + * @return True if the resolved direction is RTL + */ +function isDirectionRTL(str, strongFallback) { + return getDirection(str, strongFallback) === UnicodeBidiDirection.RTL; +} + +var UnicodeBidi = { + firstStrongChar: firstStrongChar, + firstStrongCharDir: firstStrongCharDir, + resolveBlockDir: resolveBlockDir, + getDirection: getDirection, + isDirectionLTR: isDirectionLTR, + isDirectionRTL: isDirectionRTL +}; + +module.exports = UnicodeBidi; + +/***/ }), + +/***/ 1979: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DefaultDraftInlineStyle + * @format + * + */ + + + +module.exports = { + BOLD: { + fontWeight: 'bold' + }, + + CODE: { + fontFamily: 'monospace', + wordWrap: 'break-word' + }, + + ITALIC: { + fontStyle: 'italic' + }, + + STRIKETHROUGH: { + textDecoration: 'line-through' + }, + + UNDERLINE: { + textDecoration: 'underline' + } +}; + +/***/ }), + +/***/ 1980: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isSelectionAtLeafStart + * @format + * + */ + + + +function isSelectionAtLeafStart(editorState) { + var selection = editorState.getSelection(); + var anchorKey = selection.getAnchorKey(); + var blockTree = editorState.getBlockTree(anchorKey); + var offset = selection.getStartOffset(); + + var isAtStart = false; + + blockTree.some(function (leafSet) { + if (offset === leafSet.get('start')) { + isAtStart = true; + return true; + } + + if (offset < leafSet.get('end')) { + return leafSet.get('leaves').some(function (leaf) { + var leafStart = leaf.get('start'); + if (offset === leafStart) { + isAtStart = true; + return true; + } + + return false; + }); + } + + return false; + }); + + return isAtStart; +} + +module.exports = isSelectionAtLeafStart; + +/***/ }), + +/***/ 1981: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorBlock.react + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var DraftEditorLeaf = __webpack_require__(2104); +var DraftOffsetKey = __webpack_require__(1927); +var React = __webpack_require__(1); +var ReactDOM = __webpack_require__(32); +var Scroll = __webpack_require__(1983); +var Style = __webpack_require__(1948); +var UnicodeBidi = __webpack_require__(1978); +var UnicodeBidiDirection = __webpack_require__(1943); + +var cx = __webpack_require__(1914); +var getElementPosition = __webpack_require__(2118); +var getScrollPosition = __webpack_require__(1949); +var getViewportDimensions = __webpack_require__(2122); +var invariant = __webpack_require__(641); +var nullthrows = __webpack_require__(1904); + +var SCROLL_BUFFER = 10; + +/** + * Return whether a block overlaps with either edge of the `SelectionState`. + */ +var isBlockOnSelectionEdge = function isBlockOnSelectionEdge(selection, key) { + return selection.getAnchorKey() === key || selection.getFocusKey() === key; +}; + +/** + * The default block renderer for a `DraftEditor` component. + * + * A `DraftEditorBlock` is able to render a given `ContentBlock` to its + * appropriate decorator and inline style components. + */ + +var DraftEditorBlock = function (_React$Component) { + _inherits(DraftEditorBlock, _React$Component); + + function DraftEditorBlock() { + _classCallCheck(this, DraftEditorBlock); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + DraftEditorBlock.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return this.props.block !== nextProps.block || this.props.tree !== nextProps.tree || this.props.direction !== nextProps.direction || isBlockOnSelectionEdge(nextProps.selection, nextProps.block.getKey()) && nextProps.forceSelection; + }; + + /** + * When a block is mounted and overlaps the selection state, we need to make + * sure that the cursor is visible to match native behavior. This may not + * be the case if the user has pressed `RETURN` or pasted some content, since + * programatically creating these new blocks and setting the DOM selection + * will miss out on the browser natively scrolling to that position. + * + * To replicate native behavior, if the block overlaps the selection state + * on mount, force the scroll position. Check the scroll state of the scroll + * parent, and adjust it to align the entire block to the bottom of the + * scroll parent. + */ + + + DraftEditorBlock.prototype.componentDidMount = function componentDidMount() { + var selection = this.props.selection; + var endKey = selection.getEndKey(); + if (!selection.getHasFocus() || endKey !== this.props.block.getKey()) { + return; + } + + var blockNode = ReactDOM.findDOMNode(this); + var scrollParent = Style.getScrollParent(blockNode); + var scrollPosition = getScrollPosition(scrollParent); + var scrollDelta = void 0; + + if (scrollParent === window) { + var nodePosition = getElementPosition(blockNode); + var nodeBottom = nodePosition.y + nodePosition.height; + var viewportHeight = getViewportDimensions().height; + scrollDelta = nodeBottom - viewportHeight; + if (scrollDelta > 0) { + window.scrollTo(scrollPosition.x, scrollPosition.y + scrollDelta + SCROLL_BUFFER); + } + } else { + !(blockNode instanceof HTMLElement) ? false ? undefined : invariant(false) : void 0; + var blockBottom = blockNode.offsetHeight + blockNode.offsetTop; + var scrollBottom = scrollParent.offsetHeight + scrollPosition.y; + scrollDelta = blockBottom - scrollBottom; + if (scrollDelta > 0) { + Scroll.setTop(scrollParent, Scroll.getTop(scrollParent) + scrollDelta + SCROLL_BUFFER); + } + } + }; + + DraftEditorBlock.prototype._renderChildren = function _renderChildren() { + var _this2 = this; + + var block = this.props.block; + var blockKey = block.getKey(); + var text = block.getText(); + var lastLeafSet = this.props.tree.size - 1; + var hasSelection = isBlockOnSelectionEdge(this.props.selection, blockKey); + + return this.props.tree.map(function (leafSet, ii) { + var leavesForLeafSet = leafSet.get('leaves'); + var lastLeaf = leavesForLeafSet.size - 1; + var leaves = leavesForLeafSet.map(function (leaf, jj) { + var offsetKey = DraftOffsetKey.encode(blockKey, ii, jj); + var start = leaf.get('start'); + var end = leaf.get('end'); + return React.createElement(DraftEditorLeaf, { + key: offsetKey, + offsetKey: offsetKey, + block: block, + start: start, + selection: hasSelection ? _this2.props.selection : null, + forceSelection: _this2.props.forceSelection, + text: text.slice(start, end), + styleSet: block.getInlineStyleAt(start), + customStyleMap: _this2.props.customStyleMap, + customStyleFn: _this2.props.customStyleFn, + isLast: ii === lastLeafSet && jj === lastLeaf + }); + }).toArray(); + + var decoratorKey = leafSet.get('decoratorKey'); + if (decoratorKey == null) { + return leaves; + } + + if (!_this2.props.decorator) { + return leaves; + } + + var decorator = nullthrows(_this2.props.decorator); + + var DecoratorComponent = decorator.getComponentForKey(decoratorKey); + if (!DecoratorComponent) { + return leaves; + } + + var decoratorProps = decorator.getPropsForKey(decoratorKey); + var decoratorOffsetKey = DraftOffsetKey.encode(blockKey, ii, 0); + var decoratedText = text.slice(leavesForLeafSet.first().get('start'), leavesForLeafSet.last().get('end')); + + // Resetting dir to the same value on a child node makes Chrome/Firefox + // confused on cursor movement. See http://jsfiddle.net/d157kLck/3/ + var dir = UnicodeBidiDirection.getHTMLDirIfDifferent(UnicodeBidi.getDirection(decoratedText), _this2.props.direction); + + return React.createElement( + DecoratorComponent, + _extends({}, decoratorProps, { + contentState: _this2.props.contentState, + decoratedText: decoratedText, + dir: dir, + key: decoratorOffsetKey, + entityKey: block.getEntityAt(leafSet.get('start')), + offsetKey: decoratorOffsetKey }), + leaves + ); + }).toArray(); + }; + + DraftEditorBlock.prototype.render = function render() { + var _props = this.props, + direction = _props.direction, + offsetKey = _props.offsetKey; + + var className = cx({ + 'public/DraftStyleDefault/block': true, + 'public/DraftStyleDefault/ltr': direction === 'LTR', + 'public/DraftStyleDefault/rtl': direction === 'RTL' + }); + + return React.createElement( + 'div', + { 'data-offset-key': offsetKey, className: className }, + this._renderChildren() + ); + }; + + return DraftEditorBlock; +}(React.Component); + +module.exports = DraftEditorBlock; + +/***/ }), + +/***/ 1982: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +/* eslint-disable fb-www/typeof-undefined */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document or document body is not + * yet defined. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ +function getActiveElement(doc) /*?DOMElement*/{ + doc = doc || (typeof document !== 'undefined' ? document : undefined); + if (typeof doc === 'undefined') { + return null; + } + try { + return doc.activeElement || doc.body; + } catch (e) { + return doc.body; + } +} + +module.exports = getActiveElement; + +/***/ }), + +/***/ 1983: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + */ + +/** + * @param {DOMElement} element + * @param {DOMDocument} doc + * @return {boolean} + */ +function _isViewportScrollElement(element, doc) { + return !!doc && (element === doc.documentElement || element === doc.body); +} + +/** + * Scroll Module. This class contains 4 simple static functions + * to be used to access Element.scrollTop/scrollLeft properties. + * To solve the inconsistencies between browsers when either + * document.body or document.documentElement is supplied, + * below logic will be used to alleviate the issue: + * + * 1. If 'element' is either 'document.body' or 'document.documentElement, + * get whichever element's 'scroll{Top,Left}' is larger. + * 2. If 'element' is either 'document.body' or 'document.documentElement', + * set the 'scroll{Top,Left}' on both elements. + */ + +var Scroll = { + /** + * @param {DOMElement} element + * @return {number} + */ + getTop: function getTop(element) { + var doc = element.ownerDocument; + return _isViewportScrollElement(element, doc) ? + // In practice, they will either both have the same value, + // or one will be zero and the other will be the scroll position + // of the viewport. So we can use `X || Y` instead of `Math.max(X, Y)` + doc.body.scrollTop || doc.documentElement.scrollTop : element.scrollTop; + }, + + /** + * @param {DOMElement} element + * @param {number} newTop + */ + setTop: function setTop(element, newTop) { + var doc = element.ownerDocument; + if (_isViewportScrollElement(element, doc)) { + doc.body.scrollTop = doc.documentElement.scrollTop = newTop; + } else { + element.scrollTop = newTop; + } + }, + + /** + * @param {DOMElement} element + * @return {number} + */ + getLeft: function getLeft(element) { + var doc = element.ownerDocument; + return _isViewportScrollElement(element, doc) ? doc.body.scrollLeft || doc.documentElement.scrollLeft : element.scrollLeft; + }, + + /** + * @param {DOMElement} element + * @param {number} newLeft + */ + setLeft: function setLeft(element, newLeft) { + var doc = element.ownerDocument; + if (_isViewportScrollElement(element, doc)) { + doc.body.scrollLeft = doc.documentElement.scrollLeft = newLeft; + } else { + element.scrollLeft = newLeft; + } + } +}; + +module.exports = Scroll; + +/***/ }), + +/***/ 1984: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * 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. + * + * @typechecks + */ + +var PhotosMimeType = __webpack_require__(2125); + +var createArrayFromMixed = __webpack_require__(2126); +var emptyFunction = __webpack_require__(1940); + +var CR_LF_REGEX = new RegExp('\r\n', 'g'); +var LF_ONLY = '\n'; + +var RICH_TEXT_TYPES = { + 'text/rtf': 1, + 'text/html': 1 +}; + +/** + * If DataTransferItem is a file then return the Blob of data. + * + * @param {object} item + * @return {?blob} + */ +function getFileFromDataTransfer(item) { + if (item.kind == 'file') { + return item.getAsFile(); + } +} + +var DataTransfer = function () { + /** + * @param {object} data + */ + function DataTransfer(data) { + _classCallCheck(this, DataTransfer); + + this.data = data; + + // Types could be DOMStringList or array + this.types = data.types ? createArrayFromMixed(data.types) : []; + } + + /** + * Is this likely to be a rich text data transfer? + * + * @return {boolean} + */ + + + DataTransfer.prototype.isRichText = function isRichText() { + // If HTML is available, treat this data as rich text. This way, we avoid + // using a pasted image if it is packaged with HTML -- this may occur with + // pastes from MS Word, for example. However this is only rich text if + // there's accompanying text. + if (this.getHTML() && this.getText()) { + return true; + } + + // When an image is copied from a preview window, you end up with two + // DataTransferItems one of which is a file's metadata as text. Skip those. + if (this.isImage()) { + return false; + } + + return this.types.some(function (type) { + return RICH_TEXT_TYPES[type]; + }); + }; + + /** + * Get raw text. + * + * @return {?string} + */ + + + DataTransfer.prototype.getText = function getText() { + var text; + if (this.data.getData) { + if (!this.types.length) { + text = this.data.getData('Text'); + } else if (this.types.indexOf('text/plain') != -1) { + text = this.data.getData('text/plain'); + } + } + return text ? text.replace(CR_LF_REGEX, LF_ONLY) : null; + }; + + /** + * Get HTML paste data + * + * @return {?string} + */ + + + DataTransfer.prototype.getHTML = function getHTML() { + if (this.data.getData) { + if (!this.types.length) { + return this.data.getData('Text'); + } else if (this.types.indexOf('text/html') != -1) { + return this.data.getData('text/html'); + } + } + }; + + /** + * Is this a link data transfer? + * + * @return {boolean} + */ + + + DataTransfer.prototype.isLink = function isLink() { + return this.types.some(function (type) { + return type.indexOf('Url') != -1 || type.indexOf('text/uri-list') != -1 || type.indexOf('text/x-moz-url'); + }); + }; + + /** + * Get a link url. + * + * @return {?string} + */ + + + DataTransfer.prototype.getLink = function getLink() { + if (this.data.getData) { + if (this.types.indexOf('text/x-moz-url') != -1) { + var url = this.data.getData('text/x-moz-url').split('\n'); + return url[0]; + } + return this.types.indexOf('text/uri-list') != -1 ? this.data.getData('text/uri-list') : this.data.getData('url'); + } + + return null; + }; + + /** + * Is this an image data transfer? + * + * @return {boolean} + */ + + + DataTransfer.prototype.isImage = function isImage() { + var isImage = this.types.some(function (type) { + // Firefox will have a type of application/x-moz-file for images during + // dragging + return type.indexOf('application/x-moz-file') != -1; + }); + + if (isImage) { + return true; + } + + var items = this.getFiles(); + for (var i = 0; i < items.length; i++) { + var type = items[i].type; + if (!PhotosMimeType.isImage(type)) { + return false; + } + } + + return true; + }; + + DataTransfer.prototype.getCount = function getCount() { + if (this.data.hasOwnProperty('items')) { + return this.data.items.length; + } else if (this.data.hasOwnProperty('mozItemCount')) { + return this.data.mozItemCount; + } else if (this.data.files) { + return this.data.files.length; + } + return null; + }; + + /** + * Get files. + * + * @return {array} + */ + + + DataTransfer.prototype.getFiles = function getFiles() { + if (this.data.items) { + // createArrayFromMixed doesn't properly handle DataTransferItemLists. + return Array.prototype.slice.call(this.data.items).map(getFileFromDataTransfer).filter(emptyFunction.thatReturnsArgument); + } else if (this.data.files) { + return Array.prototype.slice.call(this.data.files); + } else { + return []; + } + }; + + /** + * Are there any files to fetch? + * + * @return {boolean} + */ + + + DataTransfer.prototype.hasFiles = function hasFiles() { + return this.getFiles().length > 0; + }; + + return DataTransfer; +}(); + +module.exports = DataTransfer; + +/***/ }), + +/***/ 1985: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getSelectionOffsetKeyForNode + * @format + * + */ + + + +/** + * Get offset key from a node or it's child nodes. Return the first offset key + * found on the DOM tree of given node. + */ + +function getSelectionOffsetKeyForNode(node) { + if (node instanceof Element) { + var offsetKey = node.getAttribute('data-offset-key'); + if (offsetKey) { + return offsetKey; + } + for (var ii = 0; ii < node.childNodes.length; ii++) { + var childOffsetKey = getSelectionOffsetKeyForNode(node.childNodes[ii]); + if (childOffsetKey) { + return childOffsetKey; + } + } + } + return null; +} + +module.exports = getSelectionOffsetKeyForNode; + +/***/ }), + +/***/ 1986: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getTextContentFromFiles + * @format + * + */ + + + +var invariant = __webpack_require__(641); + +var TEXT_CLIPPING_REGEX = /\.textClipping$/; + +var TEXT_TYPES = { + 'text/plain': true, + 'text/html': true, + 'text/rtf': true +}; + +// Somewhat arbitrary upper bound on text size. Let's not lock up the browser. +var TEXT_SIZE_UPPER_BOUND = 5000; + +/** + * Extract the text content from a file list. + */ +function getTextContentFromFiles(files, callback) { + var readCount = 0; + var results = []; + files.forEach(function ( /*blob*/file) { + readFile(file, function ( /*string*/text) { + readCount++; + text && results.push(text.slice(0, TEXT_SIZE_UPPER_BOUND)); + if (readCount == files.length) { + callback(results.join('\r')); + } + }); + }); +} + +/** + * todo isaac: Do work to turn html/rtf into a content fragment. + */ +function readFile(file, callback) { + if (!global.FileReader || file.type && !(file.type in TEXT_TYPES)) { + callback(''); + return; + } + + if (file.type === '') { + var contents = ''; + // Special-case text clippings, which have an empty type but include + // `.textClipping` in the file name. `readAsText` results in an empty + // string for text clippings, so we force the file name to serve + // as the text value for the file. + if (TEXT_CLIPPING_REGEX.test(file.name)) { + contents = file.name.replace(TEXT_CLIPPING_REGEX, ''); + } + callback(contents); + return; + } + + var reader = new FileReader(); + reader.onload = function () { + var result = reader.result; + !(typeof result === 'string') ? false ? undefined : invariant(false) : void 0; + callback(result); + }; + reader.onerror = function () { + callback(''); + }; + reader.readAsText(file); +} + +module.exports = getTextContentFromFiles; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 1987: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getUpdatedSelectionState + * @format + * + */ + + + +var DraftOffsetKey = __webpack_require__(1927); + +var nullthrows = __webpack_require__(1904); + +function getUpdatedSelectionState(editorState, anchorKey, anchorOffset, focusKey, focusOffset) { + var selection = nullthrows(editorState.getSelection()); + if (false) {} + + var anchorPath = DraftOffsetKey.decode(anchorKey); + var anchorBlockKey = anchorPath.blockKey; + var anchorLeaf = editorState.getBlockTree(anchorBlockKey).getIn([anchorPath.decoratorKey, 'leaves', anchorPath.leafKey]); + + var focusPath = DraftOffsetKey.decode(focusKey); + var focusBlockKey = focusPath.blockKey; + var focusLeaf = editorState.getBlockTree(focusBlockKey).getIn([focusPath.decoratorKey, 'leaves', focusPath.leafKey]); + + var anchorLeafStart = anchorLeaf.get('start'); + var focusLeafStart = focusLeaf.get('start'); + + var anchorBlockOffset = anchorLeaf ? anchorLeafStart + anchorOffset : null; + var focusBlockOffset = focusLeaf ? focusLeafStart + focusOffset : null; + + var areEqual = selection.getAnchorKey() === anchorBlockKey && selection.getAnchorOffset() === anchorBlockOffset && selection.getFocusKey() === focusBlockKey && selection.getFocusOffset() === focusBlockOffset; + + if (areEqual) { + return selection; + } + + var isBackward = false; + if (anchorBlockKey === focusBlockKey) { + var anchorLeafEnd = anchorLeaf.get('end'); + var focusLeafEnd = focusLeaf.get('end'); + if (focusLeafStart === anchorLeafStart && focusLeafEnd === anchorLeafEnd) { + isBackward = focusOffset < anchorOffset; + } else { + isBackward = focusLeafStart < anchorLeafStart; + } + } else { + var startKey = editorState.getCurrentContent().getBlockMap().keySeq().skipUntil(function (v) { + return v === anchorBlockKey || v === focusBlockKey; + }).first(); + isBackward = startKey === focusBlockKey; + } + + return selection.merge({ + anchorKey: anchorBlockKey, + anchorOffset: anchorBlockOffset, + focusKey: focusBlockKey, + focusOffset: focusBlockOffset, + isBackward: isBackward + }); +} + +module.exports = getUpdatedSelectionState; + +/***/ }), + +/***/ 1988: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getFragmentFromSelection + * @format + * + */ + + + +var getContentStateFragment = __webpack_require__(1925); + +function getFragmentFromSelection(editorState) { + var selectionState = editorState.getSelection(); + + if (selectionState.isCollapsed()) { + return null; + } + + return getContentStateFragment(editorState.getCurrentContent(), selectionState); +} + +module.exports = getFragmentFromSelection; + +/***/ }), + +/***/ 1989: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getRangeClientRects + * @format + * + */ + + + +var UserAgent = __webpack_require__(1905); + +var invariant = __webpack_require__(641); + +var isChrome = UserAgent.isBrowser('Chrome'); + +// In Chrome, the client rects will include the entire bounds of all nodes that +// begin (have a start tag) within the selection, even if the selection does +// not overlap the entire node. To resolve this, we split the range at each +// start tag and join the client rects together. +// https://code.google.com/p/chromium/issues/detail?id=324437 +/* eslint-disable consistent-return */ +function getRangeClientRectsChrome(range) { + var tempRange = range.cloneRange(); + var clientRects = []; + + for (var ancestor = range.endContainer; ancestor != null; ancestor = ancestor.parentNode) { + // If we've climbed up to the common ancestor, we can now use the + // original start point and stop climbing the tree. + var atCommonAncestor = ancestor === range.commonAncestorContainer; + if (atCommonAncestor) { + tempRange.setStart(range.startContainer, range.startOffset); + } else { + tempRange.setStart(tempRange.endContainer, 0); + } + var rects = Array.from(tempRange.getClientRects()); + clientRects.push(rects); + if (atCommonAncestor) { + var _ref; + + clientRects.reverse(); + return (_ref = []).concat.apply(_ref, clientRects); + } + tempRange.setEndBefore(ancestor); + } + + true ? false ? undefined : invariant(false) : undefined; +} +/* eslint-enable consistent-return */ + +/** + * Like range.getClientRects() but normalizes for browser bugs. + */ +var getRangeClientRects = isChrome ? getRangeClientRectsChrome : function (range) { + return Array.from(range.getClientRects()); +}; + +module.exports = getRangeClientRects; + +/***/ }), + +/***/ 1990: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getDraftEditorSelectionWithNodes + * @format + * + */ + + + +var findAncestorOffsetKey = __webpack_require__(1950); +var getSelectionOffsetKeyForNode = __webpack_require__(1985); +var getUpdatedSelectionState = __webpack_require__(1987); +var invariant = __webpack_require__(641); +var nullthrows = __webpack_require__(1904); + +/** + * Convert the current selection range to an anchor/focus pair of offset keys + * and values that can be interpreted by components. + */ +function getDraftEditorSelectionWithNodes(editorState, root, anchorNode, anchorOffset, focusNode, focusOffset) { + var anchorIsTextNode = anchorNode.nodeType === Node.TEXT_NODE; + var focusIsTextNode = focusNode.nodeType === Node.TEXT_NODE; + + // If the selection range lies only on text nodes, the task is simple. + // Find the nearest offset-aware elements and use the + // offset values supplied by the selection range. + if (anchorIsTextNode && focusIsTextNode) { + return { + selectionState: getUpdatedSelectionState(editorState, nullthrows(findAncestorOffsetKey(anchorNode)), anchorOffset, nullthrows(findAncestorOffsetKey(focusNode)), focusOffset), + needsRecovery: false + }; + } + + var anchorPoint = null; + var focusPoint = null; + var needsRecovery = true; + + // An element is selected. Convert this selection range into leaf offset + // keys and offset values for consumption at the component level. This + // is common in Firefox, where select-all and triple click behavior leads + // to entire elements being selected. + // + // Note that we use the `needsRecovery` parameter in the callback here. This + // is because when certain elements are selected, the behavior for subsequent + // cursor movement (e.g. via arrow keys) is uncertain and may not match + // expectations at the component level. For example, if an entire
is + // selected and the user presses the right arrow, Firefox keeps the selection + // on the
. If we allow subsequent keypresses to insert characters + // natively, they will be inserted into a browser-created text node to the + // right of that
. This is obviously undesirable. + // + // With the `needsRecovery` flag, we inform the caller that it is responsible + // for manually setting the selection state on the rendered document to + // ensure proper selection state maintenance. + + if (anchorIsTextNode) { + anchorPoint = { + key: nullthrows(findAncestorOffsetKey(anchorNode)), + offset: anchorOffset + }; + focusPoint = getPointForNonTextNode(root, focusNode, focusOffset); + } else if (focusIsTextNode) { + focusPoint = { + key: nullthrows(findAncestorOffsetKey(focusNode)), + offset: focusOffset + }; + anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset); + } else { + anchorPoint = getPointForNonTextNode(root, anchorNode, anchorOffset); + focusPoint = getPointForNonTextNode(root, focusNode, focusOffset); + + // If the selection is collapsed on an empty block, don't force recovery. + // This way, on arrow key selection changes, the browser can move the + // cursor from a non-zero offset on one block, through empty blocks, + // to a matching non-zero offset on other text blocks. + if (anchorNode === focusNode && anchorOffset === focusOffset) { + needsRecovery = !!anchorNode.firstChild && anchorNode.firstChild.nodeName !== 'BR'; + } + } + + return { + selectionState: getUpdatedSelectionState(editorState, anchorPoint.key, anchorPoint.offset, focusPoint.key, focusPoint.offset), + needsRecovery: needsRecovery + }; +} + +/** + * Identify the first leaf descendant for the given node. + */ +function getFirstLeaf(node) { + while (node.firstChild && ( + // data-blocks has no offset + node.firstChild instanceof Element && node.firstChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.firstChild))) { + node = node.firstChild; + } + return node; +} + +/** + * Identify the last leaf descendant for the given node. + */ +function getLastLeaf(node) { + while (node.lastChild && ( + // data-blocks has no offset + node.lastChild instanceof Element && node.lastChild.getAttribute('data-blocks') === 'true' || getSelectionOffsetKeyForNode(node.lastChild))) { + node = node.lastChild; + } + return node; +} + +function getPointForNonTextNode(editorRoot, startNode, childOffset) { + var node = startNode; + var offsetKey = findAncestorOffsetKey(node); + + !(offsetKey != null || editorRoot && (editorRoot === node || editorRoot.firstChild === node)) ? false ? undefined : invariant(false) : void 0; + + // If the editorRoot is the selection, step downward into the content + // wrapper. + if (editorRoot === node) { + node = node.firstChild; + !(node instanceof Element && node.getAttribute('data-contents') === 'true') ? false ? undefined : invariant(false) : void 0; + if (childOffset > 0) { + childOffset = node.childNodes.length; + } + } + + // If the child offset is zero and we have an offset key, we're done. + // If there's no offset key because the entire editor is selected, + // find the leftmost ("first") leaf in the tree and use that as the offset + // key. + if (childOffset === 0) { + var key = null; + if (offsetKey != null) { + key = offsetKey; + } else { + var firstLeaf = getFirstLeaf(node); + key = nullthrows(getSelectionOffsetKeyForNode(firstLeaf)); + } + return { key: key, offset: 0 }; + } + + var nodeBeforeCursor = node.childNodes[childOffset - 1]; + var leafKey = null; + var textLength = null; + + if (!getSelectionOffsetKeyForNode(nodeBeforeCursor)) { + // Our target node may be a leaf or a text node, in which case we're + // already where we want to be and can just use the child's length as + // our offset. + leafKey = nullthrows(offsetKey); + textLength = getTextContentLength(nodeBeforeCursor); + } else { + // Otherwise, we'll look at the child to the left of the cursor and find + // the last leaf node in its subtree. + var lastLeaf = getLastLeaf(nodeBeforeCursor); + leafKey = nullthrows(getSelectionOffsetKeyForNode(lastLeaf)); + textLength = getTextContentLength(lastLeaf); + } + + return { + key: leafKey, + offset: textLength + }; +} + +/** + * Return the length of a node's textContent, regarding single newline + * characters as zero-length. This allows us to avoid problems with identifying + * the correct selection offset for empty blocks in IE, in which we + * render newlines instead of break tags. + */ +function getTextContentLength(node) { + var textContent = node.textContent; + return textContent === '\n' ? 0 : textContent.length; +} + +module.exports = getDraftEditorSelectionWithNodes; + +/***/ }), + +/***/ 1991: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftRemovableWord + * @format + * + */ + + + +var TokenizeUtil = __webpack_require__(2143); + +var punctuation = TokenizeUtil.getPunctuation(); + +// The apostrophe and curly single quotes behave in a curious way: when +// surrounded on both sides by word characters, they behave as word chars; when +// either neighbor is punctuation or an end of the string, they behave as +// punctuation. +var CHAMELEON_CHARS = '[\'\u2018\u2019]'; + +// Remove the underscore, which should count as part of the removable word. The +// "chameleon chars" also count as punctuation in this regex. +var WHITESPACE_AND_PUNCTUATION = '\\s|(?![_])' + punctuation; + +var DELETE_STRING = '^' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)'; +var DELETE_REGEX = new RegExp(DELETE_STRING); + +var BACKSPACE_STRING = '(?:(?!' + WHITESPACE_AND_PUNCTUATION + ').)' + '(?:' + CHAMELEON_CHARS + '|(?!' + WHITESPACE_AND_PUNCTUATION + ').)*' + '(?:' + WHITESPACE_AND_PUNCTUATION + ')*' + '$'; +var BACKSPACE_REGEX = new RegExp(BACKSPACE_STRING); + +function getRemovableWord(text, isBackward) { + var matches = isBackward ? BACKSPACE_REGEX.exec(text) : DELETE_REGEX.exec(text); + return matches ? matches[0] : text; +} + +var DraftRemovableWord = { + getBackward: function getBackward(text) { + return getRemovableWord(text, true); + }, + + getForward: function getForward(text) { + return getRemovableWord(text, false); + } +}; + +module.exports = DraftRemovableWord; + +/***/ }), + +/***/ 1992: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule moveSelectionForward + * @format + * + */ + + + +/** + * Given a collapsed selection, move the focus `maxDistance` forward within + * the selected block. If the selection will go beyond the end of the block, + * move focus to the start of the next block, but no further. + * + * This function is not Unicode-aware, so surrogate pairs will be treated + * as having length 2. + */ +function moveSelectionForward(editorState, maxDistance) { + var selection = editorState.getSelection(); + var key = selection.getStartKey(); + var offset = selection.getStartOffset(); + var content = editorState.getCurrentContent(); + + var focusKey = key; + var focusOffset; + + var block = content.getBlockForKey(key); + + if (maxDistance > block.getText().length - offset) { + focusKey = content.getKeyAfter(key); + focusOffset = 0; + } else { + focusOffset = offset + maxDistance; + } + + return selection.merge({ focusKey: focusKey, focusOffset: focusOffset }); +} + +module.exports = moveSelectionForward; + +/***/ }), + +/***/ 1993: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule convertFromHTMLToContentBlocks + * @format + * + */ + + + +var _extends = _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; }; + +var _knownListItemDepthCl, + _assign = __webpack_require__(145); + +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 CharacterMetadata = __webpack_require__(1902); +var ContentBlock = __webpack_require__(1910); +var ContentBlockNode = __webpack_require__(1903); +var DefaultDraftBlockRenderMap = __webpack_require__(1944); +var DraftEntity = __webpack_require__(1926); +var DraftFeatureFlags = __webpack_require__(1909); +var Immutable = __webpack_require__(35); + +var _require = __webpack_require__(35), + Set = _require.Set; + +var URI = __webpack_require__(2154); + +var cx = __webpack_require__(1914); +var generateRandomKey = __webpack_require__(1907); +var getSafeBodyFromHTML = __webpack_require__(1994); +var invariant = __webpack_require__(641); +var sanitizeDraftText = __webpack_require__(1942); + +var experimentalTreeDataSupport = DraftFeatureFlags.draft_tree_data_support; + +var List = Immutable.List, + OrderedSet = Immutable.OrderedSet; + + +var NBSP = ' '; +var SPACE = ' '; + +// Arbitrary max indent +var MAX_DEPTH = 4; + +// used for replacing characters in HTML +var REGEX_CR = new RegExp('\r', 'g'); +var REGEX_LF = new RegExp('\n', 'g'); +var REGEX_NBSP = new RegExp(NBSP, 'g'); +var REGEX_CARRIAGE = new RegExp(' ?', 'g'); +var REGEX_ZWS = new RegExp('​?', 'g'); + +// https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight +var boldValues = ['bold', 'bolder', '500', '600', '700', '800', '900']; +var notBoldValues = ['light', 'lighter', '100', '200', '300', '400']; + +// Block tag flow is different because LIs do not have +// a deterministic style ;_; +var inlineTags = { + b: 'BOLD', + code: 'CODE', + del: 'STRIKETHROUGH', + em: 'ITALIC', + i: 'ITALIC', + s: 'STRIKETHROUGH', + strike: 'STRIKETHROUGH', + strong: 'BOLD', + u: 'UNDERLINE' +}; + +var knownListItemDepthClasses = (_knownListItemDepthCl = {}, _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth0'), 0), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth1'), 1), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth2'), 2), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth3'), 3), _defineProperty(_knownListItemDepthCl, cx('public/DraftStyleDefault/depth4'), 4), _knownListItemDepthCl); + +var anchorAttr = ['className', 'href', 'rel', 'target', 'title']; + +var imgAttr = ['alt', 'className', 'height', 'src', 'width']; + +var lastBlock = void 0; + +var EMPTY_CHUNK = { + text: '', + inlines: [], + entities: [], + blocks: [] +}; + +var EMPTY_BLOCK = { + children: List(), + depth: 0, + key: '', + type: '' +}; + +var getListBlockType = function getListBlockType(tag, lastList) { + if (tag === 'li') { + return lastList === 'ol' ? 'ordered-list-item' : 'unordered-list-item'; + } + return null; +}; + +var getBlockMapSupportedTags = function getBlockMapSupportedTags(blockRenderMap) { + var unstyledElement = blockRenderMap.get('unstyled').element; + var tags = Set([]); + + blockRenderMap.forEach(function (draftBlock) { + if (draftBlock.aliasedElements) { + draftBlock.aliasedElements.forEach(function (tag) { + tags = tags.add(tag); + }); + } + + tags = tags.add(draftBlock.element); + }); + + return tags.filter(function (tag) { + return tag && tag !== unstyledElement; + }).toArray().sort(); +}; + +// custom element conversions +var getMultiMatchedType = function getMultiMatchedType(tag, lastList, multiMatchExtractor) { + for (var ii = 0; ii < multiMatchExtractor.length; ii++) { + var matchType = multiMatchExtractor[ii](tag, lastList); + if (matchType) { + return matchType; + } + } + return null; +}; + +var getBlockTypeForTag = function getBlockTypeForTag(tag, lastList, blockRenderMap) { + var matchedTypes = blockRenderMap.filter(function (draftBlock) { + return draftBlock.element === tag || draftBlock.wrapper === tag || draftBlock.aliasedElements && draftBlock.aliasedElements.some(function (alias) { + return alias === tag; + }); + }).keySeq().toSet().toArray().sort(); + + // if we dont have any matched type, return unstyled + // if we have one matched type return it + // if we have multi matched types use the multi-match function to gather type + switch (matchedTypes.length) { + case 0: + return 'unstyled'; + case 1: + return matchedTypes[0]; + default: + return getMultiMatchedType(tag, lastList, [getListBlockType]) || 'unstyled'; + } +}; + +var processInlineTag = function processInlineTag(tag, node, currentStyle) { + var styleToCheck = inlineTags[tag]; + if (styleToCheck) { + currentStyle = currentStyle.add(styleToCheck).toOrderedSet(); + } else if (node instanceof HTMLElement) { + var htmlElement = node; + currentStyle = currentStyle.withMutations(function (style) { + var fontWeight = htmlElement.style.fontWeight; + var fontStyle = htmlElement.style.fontStyle; + var textDecoration = htmlElement.style.textDecoration; + + if (boldValues.indexOf(fontWeight) >= 0) { + style.add('BOLD'); + } else if (notBoldValues.indexOf(fontWeight) >= 0) { + style.remove('BOLD'); + } + + if (fontStyle === 'italic') { + style.add('ITALIC'); + } else if (fontStyle === 'normal') { + style.remove('ITALIC'); + } + + if (textDecoration === 'underline') { + style.add('UNDERLINE'); + } + if (textDecoration === 'line-through') { + style.add('STRIKETHROUGH'); + } + if (textDecoration === 'none') { + style.remove('UNDERLINE'); + style.remove('STRIKETHROUGH'); + } + }).toOrderedSet(); + } + return currentStyle; +}; + +var joinChunks = function joinChunks(A, B, experimentalHasNestedBlocks) { + // Sometimes two blocks will touch in the DOM and we need to strip the + // extra delimiter to preserve niceness. + var lastInA = A.text.slice(-1); + var firstInB = B.text.slice(0, 1); + + if (lastInA === '\r' && firstInB === '\r' && !experimentalHasNestedBlocks) { + A.text = A.text.slice(0, -1); + A.inlines.pop(); + A.entities.pop(); + A.blocks.pop(); + } + + // Kill whitespace after blocks + if (lastInA === '\r') { + if (B.text === SPACE || B.text === '\n') { + return A; + } else if (firstInB === SPACE || firstInB === '\n') { + B.text = B.text.slice(1); + B.inlines.shift(); + B.entities.shift(); + } + } + + return { + text: A.text + B.text, + inlines: A.inlines.concat(B.inlines), + entities: A.entities.concat(B.entities), + blocks: A.blocks.concat(B.blocks) + }; +}; + +/** + * Check to see if we have anything like

... to create + * block tags from. If we do, we can use those and ignore
tags. If we + * don't, we can treat
tags as meaningful (unstyled) blocks. + */ +var containsSemanticBlockMarkup = function containsSemanticBlockMarkup(html, blockTags) { + return blockTags.some(function (tag) { + return html.indexOf('<' + tag) !== -1; + }); +}; + +var hasValidLinkText = function hasValidLinkText(link) { + !(link instanceof HTMLAnchorElement) ? false ? undefined : invariant(false) : void 0; + var protocol = link.protocol; + return protocol === 'http:' || protocol === 'https:' || protocol === 'mailto:'; +}; + +var getWhitespaceChunk = function getWhitespaceChunk(inEntity) { + var entities = new Array(1); + if (inEntity) { + entities[0] = inEntity; + } + return _extends({}, EMPTY_CHUNK, { + text: SPACE, + inlines: [OrderedSet()], + entities: entities + }); +}; + +var getSoftNewlineChunk = function getSoftNewlineChunk() { + return _extends({}, EMPTY_CHUNK, { + text: '\n', + inlines: [OrderedSet()], + entities: new Array(1) + }); +}; + +var getChunkedBlock = function getChunkedBlock() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + return _extends({}, EMPTY_BLOCK, props); +}; + +var getBlockDividerChunk = function getBlockDividerChunk(block, depth) { + var parentKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + return { + text: '\r', + inlines: [OrderedSet()], + entities: new Array(1), + blocks: [getChunkedBlock({ + parent: parentKey, + key: generateRandomKey(), + type: block, + depth: Math.max(0, Math.min(MAX_DEPTH, depth)) + })] + }; +}; + +/** + * If we're pasting from one DraftEditor to another we can check to see if + * existing list item depth classes are being used and preserve this style + */ +var getListItemDepth = function getListItemDepth(node) { + var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + + Object.keys(knownListItemDepthClasses).some(function (depthClass) { + if (node.classList.contains(depthClass)) { + depth = knownListItemDepthClasses[depthClass]; + } + }); + return depth; +}; + +var genFragment = function genFragment(entityMap, node, inlineStyle, lastList, inBlock, blockTags, depth, blockRenderMap, inEntity, parentKey) { + var lastLastBlock = lastBlock; + var nodeName = node.nodeName.toLowerCase(); + var newEntityMap = entityMap; + var nextBlockType = 'unstyled'; + var newBlock = false; + var inBlockType = inBlock && getBlockTypeForTag(inBlock, lastList, blockRenderMap); + var chunk = _extends({}, EMPTY_CHUNK); + var newChunk = null; + var blockKey = void 0; + + // Base Case + if (nodeName === '#text') { + var _text = node.textContent; + var nodeTextContent = _text.trim(); + + // We should not create blocks for leading spaces that are + // existing around ol/ul and their children list items + if (lastList && nodeTextContent === '' && node.parentElement) { + var parentNodeName = node.parentElement.nodeName.toLowerCase(); + if (parentNodeName === 'ol' || parentNodeName === 'ul') { + return { chunk: _extends({}, EMPTY_CHUNK), entityMap: entityMap }; + } + } + + if (nodeTextContent === '' && inBlock !== 'pre') { + return { chunk: getWhitespaceChunk(inEntity), entityMap: entityMap }; + } + if (inBlock !== 'pre') { + // Can't use empty string because MSWord + _text = _text.replace(REGEX_LF, SPACE); + } + + // save the last block so we can use it later + lastBlock = nodeName; + + return { + chunk: { + text: _text, + inlines: Array(_text.length).fill(inlineStyle), + entities: Array(_text.length).fill(inEntity), + blocks: [] + }, + entityMap: entityMap + }; + } + + // save the last block so we can use it later + lastBlock = nodeName; + + // BR tags + if (nodeName === 'br') { + if (lastLastBlock === 'br' && (!inBlock || inBlockType === 'unstyled')) { + return { + chunk: getBlockDividerChunk('unstyled', depth, parentKey), + entityMap: entityMap + }; + } + return { chunk: getSoftNewlineChunk(), entityMap: entityMap }; + } + + // IMG tags + if (nodeName === 'img' && node instanceof HTMLImageElement && node.attributes.getNamedItem('src') && node.attributes.getNamedItem('src').value) { + var image = node; + var entityConfig = {}; + + imgAttr.forEach(function (attr) { + var imageAttribute = image.getAttribute(attr); + if (imageAttribute) { + entityConfig[attr] = imageAttribute; + } + }); + // Forcing this node to have children because otherwise no entity will be + // created for this node. + // The child text node cannot just have a space or return as content - + // we strip those out. + // See https://github.com/facebook/draft-js/issues/231 for some context. + node.textContent = '\uD83D\uDCF7'; + + // TODO: update this when we remove DraftEntity entirely + inEntity = DraftEntity.__create('IMAGE', 'MUTABLE', entityConfig || {}); + } + + // Inline tags + inlineStyle = processInlineTag(nodeName, node, inlineStyle); + + // Handle lists + if (nodeName === 'ul' || nodeName === 'ol') { + if (lastList) { + depth += 1; + } + lastList = nodeName; + } + + if (!experimentalTreeDataSupport && nodeName === 'li' && node instanceof HTMLElement) { + depth = getListItemDepth(node, depth); + } + + var blockType = getBlockTypeForTag(nodeName, lastList, blockRenderMap); + var inListBlock = lastList && inBlock === 'li' && nodeName === 'li'; + var inBlockOrHasNestedBlocks = (!inBlock || experimentalTreeDataSupport) && blockTags.indexOf(nodeName) !== -1; + + // Block Tags + if (inListBlock || inBlockOrHasNestedBlocks) { + chunk = getBlockDividerChunk(blockType, depth, parentKey); + blockKey = chunk.blocks[0].key; + inBlock = nodeName; + newBlock = !experimentalTreeDataSupport; + } + + // this is required so that we can handle 'ul' and 'ol' + if (inListBlock) { + nextBlockType = lastList === 'ul' ? 'unordered-list-item' : 'ordered-list-item'; + } + + // Recurse through children + var child = node.firstChild; + if (child != null) { + nodeName = child.nodeName.toLowerCase(); + } + + var entityId = null; + + while (child) { + if (child instanceof HTMLAnchorElement && child.href && hasValidLinkText(child)) { + (function () { + var anchor = child; + var entityConfig = {}; + + anchorAttr.forEach(function (attr) { + var anchorAttribute = anchor.getAttribute(attr); + if (anchorAttribute) { + entityConfig[attr] = anchorAttribute; + } + }); + + entityConfig.url = new URI(anchor.href).toString(); + // TODO: update this when we remove DraftEntity completely + entityId = DraftEntity.__create('LINK', 'MUTABLE', entityConfig || {}); + })(); + } else { + entityId = undefined; + } + + var _genFragment = genFragment(newEntityMap, child, inlineStyle, lastList, inBlock, blockTags, depth, blockRenderMap, entityId || inEntity, experimentalTreeDataSupport ? blockKey : null), + generatedChunk = _genFragment.chunk, + maybeUpdatedEntityMap = _genFragment.entityMap; + + newChunk = generatedChunk; + newEntityMap = maybeUpdatedEntityMap; + + chunk = joinChunks(chunk, newChunk, experimentalTreeDataSupport); + var sibling = child.nextSibling; + + // Put in a newline to break up blocks inside blocks + if (!parentKey && sibling && blockTags.indexOf(nodeName) >= 0 && inBlock) { + chunk = joinChunks(chunk, getSoftNewlineChunk()); + } + if (sibling) { + nodeName = sibling.nodeName.toLowerCase(); + } + child = sibling; + } + + if (newBlock) { + chunk = joinChunks(chunk, getBlockDividerChunk(nextBlockType, depth, parentKey)); + } + + return { chunk: chunk, entityMap: newEntityMap }; +}; + +var getChunkForHTML = function getChunkForHTML(html, DOMBuilder, blockRenderMap, entityMap) { + html = html.trim().replace(REGEX_CR, '').replace(REGEX_NBSP, SPACE).replace(REGEX_CARRIAGE, '').replace(REGEX_ZWS, ''); + + var supportedBlockTags = getBlockMapSupportedTags(blockRenderMap); + + var safeBody = DOMBuilder(html); + if (!safeBody) { + return null; + } + lastBlock = null; + + // Sometimes we aren't dealing with content that contains nice semantic + // tags. In this case, use divs to separate everything out into paragraphs + // and hope for the best. + var workingBlocks = containsSemanticBlockMarkup(html, supportedBlockTags) ? supportedBlockTags : ['div']; + + // Start with -1 block depth to offset the fact that we are passing in a fake + // UL block to start with. + var fragment = genFragment(entityMap, safeBody, OrderedSet(), 'ul', null, workingBlocks, -1, blockRenderMap); + + var chunk = fragment.chunk; + var newEntityMap = fragment.entityMap; + + // join with previous block to prevent weirdness on paste + if (chunk.text.indexOf('\r') === 0) { + chunk = { + text: chunk.text.slice(1), + inlines: chunk.inlines.slice(1), + entities: chunk.entities.slice(1), + blocks: chunk.blocks + }; + } + + // Kill block delimiter at the end + if (chunk.text.slice(-1) === '\r') { + chunk.text = chunk.text.slice(0, -1); + chunk.inlines = chunk.inlines.slice(0, -1); + chunk.entities = chunk.entities.slice(0, -1); + chunk.blocks.pop(); + } + + // If we saw no block tags, put an unstyled one in + if (chunk.blocks.length === 0) { + chunk.blocks.push(_extends({}, EMPTY_CHUNK, { + type: 'unstyled', + depth: 0 + })); + } + + // Sometimes we start with text that isn't in a block, which is then + // followed by blocks. Need to fix up the blocks to add in + // an unstyled block for this content + if (chunk.text.split('\r').length === chunk.blocks.length + 1) { + chunk.blocks.unshift({ type: 'unstyled', depth: 0 }); + } + + return { chunk: chunk, entityMap: newEntityMap }; +}; + +var convertChunkToContentBlocks = function convertChunkToContentBlocks(chunk) { + if (!chunk || !chunk.text || !Array.isArray(chunk.blocks)) { + return null; + } + + var initialState = { + cacheRef: {}, + contentBlocks: [] + }; + + var start = 0; + + var rawBlocks = chunk.blocks, + rawInlines = chunk.inlines, + rawEntities = chunk.entities; + + + var BlockNodeRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock; + + return chunk.text.split('\r').reduce(function (acc, textBlock, index) { + // Make absolutely certain that our text is acceptable. + textBlock = sanitizeDraftText(textBlock); + + var block = rawBlocks[index]; + var end = start + textBlock.length; + var inlines = rawInlines.slice(start, end); + var entities = rawEntities.slice(start, end); + var characterList = List(inlines.map(function (style, index) { + var data = { style: style, entity: null }; + if (entities[index]) { + data.entity = entities[index]; + } + return CharacterMetadata.create(data); + })); + start = end + 1; + + var depth = block.depth, + type = block.type, + parent = block.parent; + + + var key = block.key || generateRandomKey(); + var parentTextNodeKey = null; // will be used to store container text nodes + + // childrens add themselves to their parents since we are iterating in order + if (parent) { + var parentIndex = acc.cacheRef[parent]; + var parentRecord = acc.contentBlocks[parentIndex]; + + // if parent has text we need to split it into a separate unstyled element + if (parentRecord.getChildKeys().isEmpty() && parentRecord.getText()) { + var parentCharacterList = parentRecord.getCharacterList(); + var parentText = parentRecord.getText(); + parentTextNodeKey = generateRandomKey(); + + var textNode = new ContentBlockNode({ + key: parentTextNodeKey, + text: parentText, + characterList: parentCharacterList, + parent: parent, + nextSibling: key + }); + + acc.contentBlocks.push(textNode); + + parentRecord = parentRecord.withMutations(function (block) { + block.set('characterList', List()).set('text', '').set('children', parentRecord.children.push(textNode.getKey())); + }); + } + + acc.contentBlocks[parentIndex] = parentRecord.set('children', parentRecord.children.push(key)); + } + + var blockNode = new BlockNodeRecord({ + key: key, + parent: parent, + type: type, + depth: depth, + text: textBlock, + characterList: characterList, + prevSibling: parentTextNodeKey || (index === 0 || rawBlocks[index - 1].parent !== parent ? null : rawBlocks[index - 1].key), + nextSibling: index === rawBlocks.length - 1 || rawBlocks[index + 1].parent !== parent ? null : rawBlocks[index + 1].key + }); + + // insert node + acc.contentBlocks.push(blockNode); + + // cache ref for building links + acc.cacheRef[blockNode.key] = index; + + return acc; + }, initialState).contentBlocks; +}; + +var convertFromHTMLtoContentBlocks = function convertFromHTMLtoContentBlocks(html) { + var DOMBuilder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getSafeBodyFromHTML; + var blockRenderMap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DefaultDraftBlockRenderMap; + + // Be ABSOLUTELY SURE that the dom builder you pass here won't execute + // arbitrary code in whatever environment you're running this in. For an + // example of how we try to do this in-browser, see getSafeBodyFromHTML. + + // TODO: replace DraftEntity with an OrderedMap here + var chunkData = getChunkForHTML(html, DOMBuilder, blockRenderMap, DraftEntity); + + if (chunkData == null) { + return null; + } + + var chunk = chunkData.chunk, + entityMap = chunkData.entityMap; + + var contentBlocks = convertChunkToContentBlocks(chunk); + + return { + contentBlocks: contentBlocks, + entityMap: entityMap + }; +}; + +module.exports = convertFromHTMLtoContentBlocks; + +/***/ }), + +/***/ 1994: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getSafeBodyFromHTML + * @format + * + */ + + + +var UserAgent = __webpack_require__(1905); + +var invariant = __webpack_require__(641); + +var isOldIE = UserAgent.isBrowser('IE <= 9'); + +// Provides a dom node that will not execute scripts +// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation.createHTMLDocument +// https://developer.mozilla.org/en-US/Add-ons/Code_snippets/HTML_to_DOM + +function getSafeBodyFromHTML(html) { + var doc; + var root = null; + // Provides a safe context + if (!isOldIE && document.implementation && document.implementation.createHTMLDocument) { + doc = document.implementation.createHTMLDocument('foo'); + !doc.documentElement ? false ? undefined : invariant(false) : void 0; + doc.documentElement.innerHTML = html; + root = doc.getElementsByTagName('body')[0]; + } + return root; +} + +module.exports = getSafeBodyFromHTML; + +/***/ }), + +/***/ 1995: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule RichTextEditorUtil + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); +var SelectionState = __webpack_require__(1913); + +var adjustBlockDepthForContentState = __webpack_require__(2155); +var nullthrows = __webpack_require__(1904); + +var RichTextEditorUtil = { + currentBlockContainsLink: function currentBlockContainsLink(editorState) { + var selection = editorState.getSelection(); + var contentState = editorState.getCurrentContent(); + var entityMap = contentState.getEntityMap(); + return contentState.getBlockForKey(selection.getAnchorKey()).getCharacterList().slice(selection.getStartOffset(), selection.getEndOffset()).some(function (v) { + var entity = v.getEntity(); + return !!entity && entityMap.__get(entity).getType() === 'LINK'; + }); + }, + + getCurrentBlockType: function getCurrentBlockType(editorState) { + var selection = editorState.getSelection(); + return editorState.getCurrentContent().getBlockForKey(selection.getStartKey()).getType(); + }, + + getDataObjectForLinkURL: function getDataObjectForLinkURL(uri) { + return { url: uri.toString() }; + }, + + handleKeyCommand: function handleKeyCommand(editorState, command) { + switch (command) { + case 'bold': + return RichTextEditorUtil.toggleInlineStyle(editorState, 'BOLD'); + case 'italic': + return RichTextEditorUtil.toggleInlineStyle(editorState, 'ITALIC'); + case 'underline': + return RichTextEditorUtil.toggleInlineStyle(editorState, 'UNDERLINE'); + case 'code': + return RichTextEditorUtil.toggleCode(editorState); + case 'backspace': + case 'backspace-word': + case 'backspace-to-start-of-line': + return RichTextEditorUtil.onBackspace(editorState); + case 'delete': + case 'delete-word': + case 'delete-to-end-of-block': + return RichTextEditorUtil.onDelete(editorState); + default: + // they may have custom editor commands; ignore those + return null; + } + }, + + insertSoftNewline: function insertSoftNewline(editorState) { + var contentState = DraftModifier.insertText(editorState.getCurrentContent(), editorState.getSelection(), '\n', editorState.getCurrentInlineStyle(), null); + + var newEditorState = EditorState.push(editorState, contentState, 'insert-characters'); + + return EditorState.forceSelection(newEditorState, contentState.getSelectionAfter()); + }, + + /** + * For collapsed selections at the start of styled blocks, backspace should + * just remove the existing style. + */ + onBackspace: function onBackspace(editorState) { + var selection = editorState.getSelection(); + if (!selection.isCollapsed() || selection.getAnchorOffset() || selection.getFocusOffset()) { + return null; + } + + // First, try to remove a preceding atomic block. + var content = editorState.getCurrentContent(); + var startKey = selection.getStartKey(); + var blockBefore = content.getBlockBefore(startKey); + + if (blockBefore && blockBefore.getType() === 'atomic') { + var blockMap = content.getBlockMap()['delete'](blockBefore.getKey()); + var withoutAtomicBlock = content.merge({ + blockMap: blockMap, + selectionAfter: selection + }); + if (withoutAtomicBlock !== content) { + return EditorState.push(editorState, withoutAtomicBlock, 'remove-range'); + } + } + + // If that doesn't succeed, try to remove the current block style. + var withoutBlockStyle = RichTextEditorUtil.tryToRemoveBlockStyle(editorState); + + if (withoutBlockStyle) { + return EditorState.push(editorState, withoutBlockStyle, 'change-block-type'); + } + + return null; + }, + + onDelete: function onDelete(editorState) { + var selection = editorState.getSelection(); + if (!selection.isCollapsed()) { + return null; + } + + var content = editorState.getCurrentContent(); + var startKey = selection.getStartKey(); + var block = content.getBlockForKey(startKey); + var length = block.getLength(); + + // The cursor is somewhere within the text. Behave normally. + if (selection.getStartOffset() < length) { + return null; + } + + var blockAfter = content.getBlockAfter(startKey); + + if (!blockAfter || blockAfter.getType() !== 'atomic') { + return null; + } + + var atomicBlockTarget = selection.merge({ + focusKey: blockAfter.getKey(), + focusOffset: blockAfter.getLength() + }); + + var withoutAtomicBlock = DraftModifier.removeRange(content, atomicBlockTarget, 'forward'); + + if (withoutAtomicBlock !== content) { + return EditorState.push(editorState, withoutAtomicBlock, 'remove-range'); + } + + return null; + }, + + onTab: function onTab(event, editorState, maxDepth) { + var selection = editorState.getSelection(); + var key = selection.getAnchorKey(); + if (key !== selection.getFocusKey()) { + return editorState; + } + + var content = editorState.getCurrentContent(); + var block = content.getBlockForKey(key); + var type = block.getType(); + if (type !== 'unordered-list-item' && type !== 'ordered-list-item') { + return editorState; + } + + event.preventDefault(); + + // Only allow indenting one level beyond the block above, and only if + // the block above is a list item as well. + var blockAbove = content.getBlockBefore(key); + if (!blockAbove) { + return editorState; + } + + var typeAbove = blockAbove.getType(); + if (typeAbove !== 'unordered-list-item' && typeAbove !== 'ordered-list-item') { + return editorState; + } + + var depth = block.getDepth(); + if (!event.shiftKey && depth === maxDepth) { + return editorState; + } + + maxDepth = Math.min(blockAbove.getDepth() + 1, maxDepth); + + var withAdjustment = adjustBlockDepthForContentState(content, selection, event.shiftKey ? -1 : 1, maxDepth); + + return EditorState.push(editorState, withAdjustment, 'adjust-depth'); + }, + + toggleBlockType: function toggleBlockType(editorState, blockType) { + var selection = editorState.getSelection(); + var startKey = selection.getStartKey(); + var endKey = selection.getEndKey(); + var content = editorState.getCurrentContent(); + var target = selection; + + // Triple-click can lead to a selection that includes offset 0 of the + // following block. The `SelectionState` for this case is accurate, but + // we should avoid toggling block type for the trailing block because it + // is a confusing interaction. + if (startKey !== endKey && selection.getEndOffset() === 0) { + var blockBefore = nullthrows(content.getBlockBefore(endKey)); + endKey = blockBefore.getKey(); + target = target.merge({ + anchorKey: startKey, + anchorOffset: selection.getStartOffset(), + focusKey: endKey, + focusOffset: blockBefore.getLength(), + isBackward: false + }); + } + + var hasAtomicBlock = content.getBlockMap().skipWhile(function (_, k) { + return k !== startKey; + }).reverse().skipWhile(function (_, k) { + return k !== endKey; + }).some(function (v) { + return v.getType() === 'atomic'; + }); + + if (hasAtomicBlock) { + return editorState; + } + + var typeToSet = content.getBlockForKey(startKey).getType() === blockType ? 'unstyled' : blockType; + + return EditorState.push(editorState, DraftModifier.setBlockType(content, target, typeToSet), 'change-block-type'); + }, + + toggleCode: function toggleCode(editorState) { + var selection = editorState.getSelection(); + var anchorKey = selection.getAnchorKey(); + var focusKey = selection.getFocusKey(); + + if (selection.isCollapsed() || anchorKey !== focusKey) { + return RichTextEditorUtil.toggleBlockType(editorState, 'code-block'); + } + + return RichTextEditorUtil.toggleInlineStyle(editorState, 'CODE'); + }, + + /** + * Toggle the specified inline style for the selection. If the + * user's selection is collapsed, apply or remove the style for the + * internal state. If it is not collapsed, apply the change directly + * to the document state. + */ + toggleInlineStyle: function toggleInlineStyle(editorState, inlineStyle) { + var selection = editorState.getSelection(); + var currentStyle = editorState.getCurrentInlineStyle(); + + // If the selection is collapsed, toggle the specified style on or off and + // set the result as the new inline style override. This will then be + // used as the inline style for the next character to be inserted. + if (selection.isCollapsed()) { + return EditorState.setInlineStyleOverride(editorState, currentStyle.has(inlineStyle) ? currentStyle.remove(inlineStyle) : currentStyle.add(inlineStyle)); + } + + // If characters are selected, immediately apply or remove the + // inline style on the document state itself. + var content = editorState.getCurrentContent(); + var newContent; + + // If the style is already present for the selection range, remove it. + // Otherwise, apply it. + if (currentStyle.has(inlineStyle)) { + newContent = DraftModifier.removeInlineStyle(content, selection, inlineStyle); + } else { + newContent = DraftModifier.applyInlineStyle(content, selection, inlineStyle); + } + + return EditorState.push(editorState, newContent, 'change-inline-style'); + }, + + toggleLink: function toggleLink(editorState, targetSelection, entityKey) { + var withoutLink = DraftModifier.applyEntity(editorState.getCurrentContent(), targetSelection, entityKey); + + return EditorState.push(editorState, withoutLink, 'apply-entity'); + }, + + /** + * When a collapsed cursor is at the start of the first styled block, or + * an empty styled block, changes block to 'unstyled'. Returns null if + * block or selection does not meet that criteria. + */ + tryToRemoveBlockStyle: function tryToRemoveBlockStyle(editorState) { + var selection = editorState.getSelection(); + var offset = selection.getAnchorOffset(); + if (selection.isCollapsed() && offset === 0) { + var key = selection.getAnchorKey(); + var content = editorState.getCurrentContent(); + var block = content.getBlockForKey(key); + + var firstBlock = content.getFirstBlock(); + if (block.getLength() > 0 && block !== firstBlock) { + return null; + } + + var type = block.getType(); + var blockBefore = content.getBlockBefore(key); + if (type === 'code-block' && blockBefore && blockBefore.getType() === 'code-block' && blockBefore.getLength() !== 0) { + return null; + } + + if (type !== 'unstyled') { + return DraftModifier.setBlockType(content, selection, 'unstyled'); + } + } + return null; + } +}; + +module.exports = RichTextEditorUtil; + +/***/ }), + +/***/ 1996: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getDefaultKeyBinding + * @format + * + */ + + + +var KeyBindingUtil = __webpack_require__(1951); +var Keys = __webpack_require__(1945); +var UserAgent = __webpack_require__(1905); + +var isOSX = UserAgent.isPlatform('Mac OS X'); +var isWindows = UserAgent.isPlatform('Windows'); + +// Firefox on OSX had a bug resulting in navigation instead of cursor movement. +// This bug was fixed in Firefox 29. Feature detection is virtually impossible +// so we just check the version number. See #342765. +var shouldFixFirefoxMovement = isOSX && UserAgent.isBrowser('Firefox < 29'); + +var hasCommandModifier = KeyBindingUtil.hasCommandModifier, + isCtrlKeyCommand = KeyBindingUtil.isCtrlKeyCommand; + + +function shouldRemoveWord(e) { + return isOSX && e.altKey || isCtrlKeyCommand(e); +} + +/** + * Get the appropriate undo/redo command for a Z key command. + */ +function getZCommand(e) { + if (!hasCommandModifier(e)) { + return null; + } + return e.shiftKey ? 'redo' : 'undo'; +} + +function getDeleteCommand(e) { + // Allow default "cut" behavior for Windows on Shift + Delete. + if (isWindows && e.shiftKey) { + return null; + } + return shouldRemoveWord(e) ? 'delete-word' : 'delete'; +} + +function getBackspaceCommand(e) { + if (hasCommandModifier(e) && isOSX) { + return 'backspace-to-start-of-line'; + } + return shouldRemoveWord(e) ? 'backspace-word' : 'backspace'; +} + +/** + * Retrieve a bound key command for the given event. + */ +function getDefaultKeyBinding(e) { + switch (e.keyCode) { + case 66: + // B + return hasCommandModifier(e) ? 'bold' : null; + case 68: + // D + return isCtrlKeyCommand(e) ? 'delete' : null; + case 72: + // H + return isCtrlKeyCommand(e) ? 'backspace' : null; + case 73: + // I + return hasCommandModifier(e) ? 'italic' : null; + case 74: + // J + return hasCommandModifier(e) ? 'code' : null; + case 75: + // K + return !isWindows && isCtrlKeyCommand(e) ? 'secondary-cut' : null; + case 77: + // M + return isCtrlKeyCommand(e) ? 'split-block' : null; + case 79: + // O + return isCtrlKeyCommand(e) ? 'split-block' : null; + case 84: + // T + return isOSX && isCtrlKeyCommand(e) ? 'transpose-characters' : null; + case 85: + // U + return hasCommandModifier(e) ? 'underline' : null; + case 87: + // W + return isOSX && isCtrlKeyCommand(e) ? 'backspace-word' : null; + case 89: + // Y + if (isCtrlKeyCommand(e)) { + return isWindows ? 'redo' : 'secondary-paste'; + } + return null; + case 90: + // Z + return getZCommand(e) || null; + case Keys.RETURN: + return 'split-block'; + case Keys.DELETE: + return getDeleteCommand(e); + case Keys.BACKSPACE: + return getBackspaceCommand(e); + // LEFT/RIGHT handlers serve as a workaround for a Firefox bug. + case Keys.LEFT: + return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-start-of-block' : null; + case Keys.RIGHT: + return shouldFixFirefoxMovement && hasCommandModifier(e) ? 'move-selection-to-end-of-block' : null; + default: + return null; + } +} + +module.exports = getDefaultKeyBinding; + +/***/ }), + +/***/ 1997: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftStringKey + * @format + * + */ + + + +var DraftStringKey = { + stringify: function stringify(key) { + return '_' + String(key); + }, + + unstringify: function unstringify(key) { + return key.slice(1); + } +}; + +module.exports = DraftStringKey; + +/***/ }), + +/***/ 2050: +/***/ (function(module, exports, __webpack_require__) { + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function(mod) { + if (true) // CommonJS + mod(__webpack_require__(1912)); + else {} +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("javascript", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var statementIndent = parserConfig.statementIndent; + var jsonldMode = parserConfig.jsonld; + var jsonMode = parserConfig.json || jsonldMode; + var isTS = parserConfig.typescript; + var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; + + // Tokenizer + + var keywords = function(){ + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}; + + return { + "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, + "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C, + "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"), + "function": kw("function"), "catch": kw("catch"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "typeof": operator, "instanceof": operator, + "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, + "this": kw("this"), "class": kw("class"), "super": kw("atom"), + "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, + "await": C + }; + }(); + + var isOperatorChar = /[+\-*&%=<>!?|~^@]/; + var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; + + function readRegexp(stream) { + var escaped = false, next, inSet = false; + while ((next = stream.next()) != null) { + if (!escaped) { + if (next == "/" && !inSet) return; + if (next == "[") inSet = true; + else if (inSet && next == "]") inSet = false; + } + escaped = !escaped && next == "\\"; + } + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) { + return ret("number", "number"); + } else if (ch == "." && stream.match("..")) { + return ret("spread", "meta"); + } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return ret(ch); + } else if (ch == "=" && stream.eat(">")) { + return ret("=>", "operator"); + } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) { + return ret("number", "number"); + } else if (/\d/.test(ch)) { + stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/); + return ret("number", "number"); + } else if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } else if (expressionAllowed(stream, state, 1)) { + readRegexp(stream); + stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/); + return ret("regexp", "string-2"); + } else { + stream.eat("="); + return ret("operator", "operator", stream.current()); + } + } else if (ch == "`") { + state.tokenize = tokenQuasi; + return tokenQuasi(stream, state); + } else if (ch == "#") { + stream.skipToEnd(); + return ret("error", "error"); + } else if (ch == "<" && stream.match("!--") || ch == "-" && stream.match("->")) { + stream.skipToEnd() + return ret("comment", "comment") + } else if (isOperatorChar.test(ch)) { + if (ch != ">" || !state.lexical || state.lexical.type != ">") { + if (stream.eat("=")) { + if (ch == "!" || ch == "=") stream.eat("=") + } else if (/[<>*+\-]/.test(ch)) { + stream.eat(ch) + if (ch == ">") stream.eat(ch) + } + } + return ret("operator", "operator", stream.current()); + } else if (wordRE.test(ch)) { + stream.eatWhile(wordRE); + var word = stream.current() + if (state.lastType != ".") { + if (keywords.propertyIsEnumerable(word)) { + var kw = keywords[word] + return ret(kw.type, kw.style, word) + } + if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false)) + return ret("async", "keyword", word) + } + return ret("variable", "variable", word) + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next; + if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){ + state.tokenize = tokenBase; + return ret("jsonld-keyword", "meta"); + } + while ((next = stream.next()) != null) { + if (next == quote && !escaped) break; + escaped = !escaped && next == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenQuasi(stream, state) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && next == "\\"; + } + return ret("quasi", "string-2", stream.current()); + } + + var brackets = "([{}])"; + // This is a crude lookahead trick to try and notice that we're + // parsing the argument patterns for a fat-arrow function before we + // actually hit the arrow token. It only works if the arrow is on + // the same line as the arguments and there's no strange noise + // (comments) in between. Fallback is to only notice when we hit the + // arrow, and not declare the arguments as locals for the arrow + // body. + function findFatArrow(stream, state) { + if (state.fatArrowAt) state.fatArrowAt = null; + var arrow = stream.string.indexOf("=>", stream.start); + if (arrow < 0) return; + + if (isTS) { // Try to skip TypeScript return type declarations after the arguments + var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow)) + if (m) arrow = m.index + } + + var depth = 0, sawSomething = false; + for (var pos = arrow - 1; pos >= 0; --pos) { + var ch = stream.string.charAt(pos); + var bracket = brackets.indexOf(ch); + if (bracket >= 0 && bracket < 3) { + if (!depth) { ++pos; break; } + if (--depth == 0) { if (ch == "(") sawSomething = true; break; } + } else if (bracket >= 3 && bracket < 6) { + ++depth; + } else if (wordRE.test(ch)) { + sawSomething = true; + } else if (/["'\/`]/.test(ch)) { + for (;; --pos) { + if (pos == 0) return + var next = stream.string.charAt(pos - 1) + if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break } + } + } else if (sawSomething && !depth) { + ++pos; + break; + } + } + if (sawSomething && !depth) state.fatArrowAt = pos; + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true}; + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + for (var cx = state.context; cx; cx = cx.prev) { + for (var v = cx.vars; v; v = v.next) + if (v.name == varname) return true; + } + } + + function parseJS(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + return style; + } + } + } + + // Combinator utils + + var cx = {state: null, column: null, marked: null, cc: null}; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function inList(name, list) { + for (var v = list; v; v = v.next) if (v.name == name) return true + return false; + } + function register(varname) { + var state = cx.state; + cx.marked = "def"; + if (state.context) { + if (state.lexical.info == "var" && state.context && state.context.block) { + // FIXME function decls are also not block scoped + var newContext = registerVarScoped(varname, state.context) + if (newContext != null) { + state.context = newContext + return + } + } else if (!inList(varname, state.localVars)) { + state.localVars = new Var(varname, state.localVars) + return + } + } + // Fall through means this is global + if (parserConfig.globalVars && !inList(varname, state.globalVars)) + state.globalVars = new Var(varname, state.globalVars) + } + function registerVarScoped(varname, context) { + if (!context) { + return null + } else if (context.block) { + var inner = registerVarScoped(varname, context.prev) + if (!inner) return null + if (inner == context.prev) return context + return new Context(inner, context.vars, true) + } else if (inList(varname, context.vars)) { + return context + } else { + return new Context(context.prev, new Var(varname, context.vars), false) + } + } + + function isModifier(name) { + return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly" + } + + // Combinators + + function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block } + function Var(name, next) { this.name = name; this.next = next } + + var defaultVars = new Var("this", new Var("arguments", null)) + function pushcontext() { + cx.state.context = new Context(cx.state.context, cx.state.localVars, false) + cx.state.localVars = defaultVars + } + function pushblockcontext() { + cx.state.context = new Context(cx.state.context, cx.state.localVars, true) + cx.state.localVars = null + } + function popcontext() { + cx.state.localVars = cx.state.context.vars + cx.state.context = cx.state.context.prev + } + popcontext.lex = true + function pushlex(type, info) { + var result = function() { + var state = cx.state, indent = state.indented; + if (state.lexical.type == "stat") indent = state.lexical.indented; + else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) + indent = outer.indented; + state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + function exp(type) { + if (type == wanted) return cont(); + else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass(); + else return cont(exp); + }; + return exp; + } + + function statement(type, value) { + if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex); + if (type == "debugger") return cont(expect(";")); + if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext); + if (type == ";") return cont(); + if (type == "if") { + if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) + cx.state.cc.pop()(); + return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse); + } + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), forspec, statement, poplex); + if (type == "class" || (isTS && value == "interface")) { + cx.marked = "keyword" + return cont(pushlex("form", type == "class" ? type : value), className, poplex) + } + if (type == "variable") { + if (isTS && value == "declare") { + cx.marked = "keyword" + return cont(statement) + } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) { + cx.marked = "keyword" + if (value == "enum") return cont(enumdef); + else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";")); + else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) + } else if (isTS && value == "namespace") { + cx.marked = "keyword" + return cont(pushlex("form"), expression, statement, poplex) + } else if (isTS && value == "abstract") { + cx.marked = "keyword" + return cont(statement) + } else { + return cont(pushlex("stat"), maybelabel); + } + } + if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, + block, poplex, poplex, popcontext); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext); + if (type == "export") return cont(pushlex("stat"), afterExport, poplex); + if (type == "import") return cont(pushlex("stat"), afterImport, poplex); + if (type == "async") return cont(statement) + if (value == "@") return cont(expression, statement) + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function maybeCatchBinding(type) { + if (type == "(") return cont(funarg, expect(")")) + } + function expression(type, value) { + return expressionInner(type, value, false); + } + function expressionNoComma(type, value) { + return expressionInner(type, value, true); + } + function parenExpr(type) { + if (type != "(") return pass() + return cont(pushlex(")"), maybeexpression, expect(")"), poplex) + } + function expressionInner(type, value, noComma) { + if (cx.state.fatArrowAt == cx.stream.start) { + var body = noComma ? arrowBodyNoComma : arrowBody; + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); + else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); + } + + var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; + if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); + if (type == "function") return cont(functiondef, maybeop); + if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); } + if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression); + if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); + if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); + if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop); + if (type == "{") return contCommasep(objprop, "}", null, maybeop); + if (type == "quasi") return pass(quasi, maybeop); + if (type == "new") return cont(maybeTarget(noComma)); + if (type == "import") return cont(expression); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + + function maybeoperatorComma(type, value) { + if (type == ",") return cont(maybeexpression); + return maybeoperatorNoComma(type, value, false); + } + function maybeoperatorNoComma(type, value, noComma) { + var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; + var expr = noComma == false ? expression : expressionNoComma; + if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); + if (type == "operator") { + if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me); + if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false)) + return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); + if (value == "?") return cont(expression, expect(":"), expr); + return cont(expr); + } + if (type == "quasi") { return pass(quasi, me); } + if (type == ";") return; + if (type == "(") return contCommasep(expressionNoComma, ")", "call", me); + if (type == ".") return cont(property, me); + if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); + if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) } + if (type == "regexp") { + cx.state.lastType = cx.marked = "operator" + cx.stream.backUp(cx.stream.pos - cx.stream.start - 1) + return cont(expr) + } + } + function quasi(type, value) { + if (type != "quasi") return pass(); + if (value.slice(value.length - 2) != "${") return cont(quasi); + return cont(expression, continueQuasi); + } + function continueQuasi(type) { + if (type == "}") { + cx.marked = "string-2"; + cx.state.tokenize = tokenQuasi; + return cont(quasi); + } + } + function arrowBody(type) { + findFatArrow(cx.stream, cx.state); + return pass(type == "{" ? statement : expression); + } + function arrowBodyNoComma(type) { + findFatArrow(cx.stream, cx.state); + return pass(type == "{" ? statement : expressionNoComma); + } + function maybeTarget(noComma) { + return function(type) { + if (type == ".") return cont(noComma ? targetNoComma : target); + else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma) + else return pass(noComma ? expressionNoComma : expression); + }; + } + function target(_, value) { + if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); } + } + function targetNoComma(_, value) { + if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); } + } + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperatorComma, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type, value) { + if (type == "async") { + cx.marked = "property"; + return cont(objprop); + } else if (type == "variable" || cx.style == "keyword") { + cx.marked = "property"; + if (value == "get" || value == "set") return cont(getterSetter); + var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params + if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) + cx.state.fatArrowAt = cx.stream.pos + m[0].length + return cont(afterprop); + } else if (type == "number" || type == "string") { + cx.marked = jsonldMode ? "property" : (cx.style + " property"); + return cont(afterprop); + } else if (type == "jsonld-keyword") { + return cont(afterprop); + } else if (isTS && isModifier(value)) { + cx.marked = "keyword" + return cont(objprop) + } else if (type == "[") { + return cont(expression, maybetype, expect("]"), afterprop); + } else if (type == "spread") { + return cont(expressionNoComma, afterprop); + } else if (value == "*") { + cx.marked = "keyword"; + return cont(objprop); + } else if (type == ":") { + return pass(afterprop) + } + } + function getterSetter(type) { + if (type != "variable") return pass(afterprop); + cx.marked = "property"; + return cont(functiondef); + } + function afterprop(type) { + if (type == ":") return cont(expressionNoComma); + if (type == "(") return pass(functiondef); + } + function commasep(what, end, sep) { + function proceed(type, value) { + if (sep ? sep.indexOf(type) > -1 : type == ",") { + var lex = cx.state.lexical; + if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; + return cont(function(type, value) { + if (type == end || value == end) return pass() + return pass(what) + }, proceed); + } + if (type == end || value == end) return cont(); + if (sep && sep.indexOf(";") > -1) return pass(what) + return cont(expect(end)); + } + return function(type, value) { + if (type == end || value == end) return cont(); + return pass(what, proceed); + }; + } + function contCommasep(what, end, info) { + for (var i = 3; i < arguments.length; i++) + cx.cc.push(arguments[i]); + return cont(pushlex(end, info), commasep(what, end), poplex); + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function maybetype(type, value) { + if (isTS) { + if (type == ":") return cont(typeexpr); + if (value == "?") return cont(maybetype); + } + } + function maybetypeOrIn(type, value) { + if (isTS && (type == ":" || value == "in")) return cont(typeexpr) + } + function mayberettype(type) { + if (isTS && type == ":") { + if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr) + else return cont(typeexpr) + } + } + function isKW(_, value) { + if (value == "is") { + cx.marked = "keyword" + return cont() + } + } + function typeexpr(type, value) { + if (value == "keyof" || value == "typeof" || value == "infer") { + cx.marked = "keyword" + return cont(value == "typeof" ? expressionNoComma : typeexpr) + } + if (type == "variable" || value == "void") { + cx.marked = "type" + return cont(afterType) + } + if (value == "|" || value == "&") return cont(typeexpr) + if (type == "string" || type == "number" || type == "atom") return cont(afterType); + if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType) + if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType) + if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType) + if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr) + } + function maybeReturnType(type) { + if (type == "=>") return cont(typeexpr) + } + function typeprop(type, value) { + if (type == "variable" || cx.style == "keyword") { + cx.marked = "property" + return cont(typeprop) + } else if (value == "?" || type == "number" || type == "string") { + return cont(typeprop) + } else if (type == ":") { + return cont(typeexpr) + } else if (type == "[") { + return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop) + } else if (type == "(") { + return pass(functiondecl, typeprop) + } + } + function typearg(type, value) { + if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg) + if (type == ":") return cont(typeexpr) + if (type == "spread") return cont(typearg) + return pass(typeexpr) + } + function afterType(type, value) { + if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) + if (value == "|" || type == "." || value == "&") return cont(typeexpr) + if (type == "[") return cont(typeexpr, expect("]"), afterType) + if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) } + if (value == "?") return cont(typeexpr, expect(":"), typeexpr) + } + function maybeTypeArgs(_, value) { + if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) + } + function typeparam() { + return pass(typeexpr, maybeTypeDefault) + } + function maybeTypeDefault(_, value) { + if (value == "=") return cont(typeexpr) + } + function vardef(_, value) { + if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)} + return pass(pattern, maybetype, maybeAssign, vardefCont); + } + function pattern(type, value) { + if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) } + if (type == "variable") { register(value); return cont(); } + if (type == "spread") return cont(pattern); + if (type == "[") return contCommasep(eltpattern, "]"); + if (type == "{") return contCommasep(proppattern, "}"); + } + function proppattern(type, value) { + if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { + register(value); + return cont(maybeAssign); + } + if (type == "variable") cx.marked = "property"; + if (type == "spread") return cont(pattern); + if (type == "}") return pass(); + if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern); + return cont(expect(":"), pattern, maybeAssign); + } + function eltpattern() { + return pass(pattern, maybeAssign) + } + function maybeAssign(_type, value) { + if (value == "=") return cont(expressionNoComma); + } + function vardefCont(type) { + if (type == ",") return cont(vardef); + } + function maybeelse(type, value) { + if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex); + } + function forspec(type, value) { + if (value == "await") return cont(forspec); + if (type == "(") return cont(pushlex(")"), forspec1, poplex); + } + function forspec1(type) { + if (type == "var") return cont(vardef, forspec2); + if (type == "variable") return cont(forspec2); + return pass(forspec2) + } + function forspec2(type, value) { + if (type == ")") return cont() + if (type == ";") return cont(forspec2) + if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) } + return pass(expression, forspec2) + } + function functiondef(type, value) { + if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} + if (type == "variable") {register(value); return cont(functiondef);} + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); + if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef) + } + function functiondecl(type, value) { + if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);} + if (type == "variable") {register(value); return cont(functiondecl);} + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext); + if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl) + } + function typename(type, value) { + if (type == "keyword" || type == "variable") { + cx.marked = "type" + return cont(typename) + } else if (value == "<") { + return cont(pushlex(">"), commasep(typeparam, ">"), poplex) + } + } + function funarg(type, value) { + if (value == "@") cont(expression, funarg) + if (type == "spread") return cont(funarg); + if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); } + if (isTS && type == "this") return cont(maybetype, maybeAssign) + return pass(pattern, maybetype, maybeAssign); + } + function classExpression(type, value) { + // Class expressions may have an optional name. + if (type == "variable") return className(type, value); + return classNameAfter(type, value); + } + function className(type, value) { + if (type == "variable") {register(value); return cont(classNameAfter);} + } + function classNameAfter(type, value) { + if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter) + if (value == "extends" || value == "implements" || (isTS && type == ",")) { + if (value == "implements") cx.marked = "keyword"; + return cont(isTS ? typeexpr : expression, classNameAfter); + } + if (type == "{") return cont(pushlex("}"), classBody, poplex); + } + function classBody(type, value) { + if (type == "async" || + (type == "variable" && + (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && + cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) { + cx.marked = "keyword"; + return cont(classBody); + } + if (type == "variable" || cx.style == "keyword") { + cx.marked = "property"; + return cont(isTS ? classfield : functiondef, classBody); + } + if (type == "number" || type == "string") return cont(isTS ? classfield : functiondef, classBody); + if (type == "[") + return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody) + if (value == "*") { + cx.marked = "keyword"; + return cont(classBody); + } + if (isTS && type == "(") return pass(functiondecl, classBody) + if (type == ";" || type == ",") return cont(classBody); + if (type == "}") return cont(); + if (value == "@") return cont(expression, classBody) + } + function classfield(type, value) { + if (value == "?") return cont(classfield) + if (type == ":") return cont(typeexpr, maybeAssign) + if (value == "=") return cont(expressionNoComma) + var context = cx.state.lexical.prev, isInterface = context && context.info == "interface" + return pass(isInterface ? functiondecl : functiondef) + } + function afterExport(type, value) { + if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } + if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } + if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";")); + return pass(statement); + } + function exportField(type, value) { + if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); } + if (type == "variable") return pass(expressionNoComma, exportField); + } + function afterImport(type) { + if (type == "string") return cont(); + if (type == "(") return pass(expression); + return pass(importSpec, maybeMoreImports, maybeFrom); + } + function importSpec(type, value) { + if (type == "{") return contCommasep(importSpec, "}"); + if (type == "variable") register(value); + if (value == "*") cx.marked = "keyword"; + return cont(maybeAs); + } + function maybeMoreImports(type) { + if (type == ",") return cont(importSpec, maybeMoreImports) + } + function maybeAs(_type, value) { + if (value == "as") { cx.marked = "keyword"; return cont(importSpec); } + } + function maybeFrom(_type, value) { + if (value == "from") { cx.marked = "keyword"; return cont(expression); } + } + function arrayLiteral(type) { + if (type == "]") return cont(); + return pass(commasep(expressionNoComma, "]")); + } + function enumdef() { + return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex) + } + function enummember() { + return pass(pattern, maybeAssign); + } + + function isContinuedStatement(state, textAfter) { + return state.lastType == "operator" || state.lastType == "," || + isOperatorChar.test(textAfter.charAt(0)) || + /[,.]/.test(textAfter.charAt(0)); + } + + function expressionAllowed(stream, state, backUp) { + return state.tokenize == tokenBase && + /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || + (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))) + } + + // Interface + + return { + startState: function(basecolumn) { + var state = { + tokenize: tokenBase, + lastType: "sof", + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + context: parserConfig.localVars && new Context(null, null, false), + indented: basecolumn || 0 + }; + if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") + state.globalVars = parserConfig.globalVars; + return state; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + findFatArrow(stream, state); + } + if (state.tokenize != tokenComment && stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; + return parseJS(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize == tokenComment) return CodeMirror.Pass; + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top + // Kludge to prevent 'maybelse' from blocking lexical scope pops + if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) { + var c = state.cc[i]; + if (c == poplex) lexical = lexical.prev; + else if (c != maybeelse) break; + } + while ((lexical.type == "stat" || lexical.type == "form") && + (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) && + (top == maybeoperatorComma || top == maybeoperatorNoComma) && + !/^[,\.=+\-*:?[\(]/.test(textAfter)))) + lexical = lexical.prev; + if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") + lexical = lexical.prev; + var type = lexical.type, closing = firstChar == type; + + if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0); + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "form") return lexical.indented + indentUnit; + else if (type == "stat") + return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); + else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, + blockCommentStart: jsonMode ? null : "/*", + blockCommentEnd: jsonMode ? null : "*/", + blockCommentContinue: jsonMode ? null : " * ", + lineComment: jsonMode ? null : "//", + fold: "brace", + closeBrackets: "()[]{}''\"\"``", + + helperType: jsonMode ? "json" : "javascript", + jsonldMode: jsonldMode, + jsonMode: jsonMode, + + expressionAllowed: expressionAllowed, + + skipExpression: function(state) { + var top = state.cc[state.cc.length - 1] + if (top == expression || top == expressionNoComma) state.cc.pop() + } + }; +}); + +CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); + +CodeMirror.defineMIME("text/javascript", "javascript"); +CodeMirror.defineMIME("text/ecmascript", "javascript"); +CodeMirror.defineMIME("application/javascript", "javascript"); +CodeMirror.defineMIME("application/x-javascript", "javascript"); +CodeMirror.defineMIME("application/ecmascript", "javascript"); +CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); +CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true}); +CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true}); +CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); +CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); + +}); + + +/***/ }), + +/***/ 2051: +/***/ (function(module, exports, __webpack_require__) { + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function(mod) { + if (true) // CommonJS + mod(__webpack_require__(1912)); + else {} +})(function(CodeMirror) { + "use strict"; + var GUTTER_ID = "CodeMirror-lint-markers"; + + function showTooltip(cm, e, content) { + var tt = document.createElement("div"); + tt.className = "CodeMirror-lint-tooltip cm-s-" + cm.options.theme; + tt.appendChild(content.cloneNode(true)); + if (cm.state.lint.options.selfContain) + cm.getWrapperElement().appendChild(tt); + else + document.body.appendChild(tt); + + function position(e) { + if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position); + tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px"; + tt.style.left = (e.clientX + 5) + "px"; + } + CodeMirror.on(document, "mousemove", position); + position(e); + if (tt.style.opacity != null) tt.style.opacity = 1; + return tt; + } + function rm(elt) { + if (elt.parentNode) elt.parentNode.removeChild(elt); + } + function hideTooltip(tt) { + if (!tt.parentNode) return; + if (tt.style.opacity == null) rm(tt); + tt.style.opacity = 0; + setTimeout(function() { rm(tt); }, 600); + } + + function showTooltipFor(cm, e, content, node) { + var tooltip = showTooltip(cm, e, content); + function hide() { + CodeMirror.off(node, "mouseout", hide); + if (tooltip) { hideTooltip(tooltip); tooltip = null; } + } + var poll = setInterval(function() { + if (tooltip) for (var n = node;; n = n.parentNode) { + if (n && n.nodeType == 11) n = n.host; + if (n == document.body) return; + if (!n) { hide(); break; } + } + if (!tooltip) return clearInterval(poll); + }, 400); + CodeMirror.on(node, "mouseout", hide); + } + + function LintState(cm, options, hasGutter) { + this.marked = []; + this.options = options; + this.timeout = null; + this.hasGutter = hasGutter; + this.onMouseOver = function(e) { onMouseOver(cm, e); }; + this.waitingFor = 0 + } + + function parseOptions(_cm, options) { + if (options instanceof Function) return {getAnnotations: options}; + if (!options || options === true) options = {}; + return options; + } + + function clearMarks(cm) { + var state = cm.state.lint; + if (state.hasGutter) cm.clearGutter(GUTTER_ID); + for (var i = 0; i < state.marked.length; ++i) + state.marked[i].clear(); + state.marked.length = 0; + } + + function makeMarker(cm, labels, severity, multiple, tooltips) { + var marker = document.createElement("div"), inner = marker; + marker.className = "CodeMirror-lint-marker-" + severity; + if (multiple) { + inner = marker.appendChild(document.createElement("div")); + inner.className = "CodeMirror-lint-marker-multiple"; + } + + if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) { + showTooltipFor(cm, e, labels, inner); + }); + + return marker; + } + + function getMaxSeverity(a, b) { + if (a == "error") return a; + else return b; + } + + function groupByLine(annotations) { + var lines = []; + for (var i = 0; i < annotations.length; ++i) { + var ann = annotations[i], line = ann.from.line; + (lines[line] || (lines[line] = [])).push(ann); + } + return lines; + } + + function annotationTooltip(ann) { + var severity = ann.severity; + if (!severity) severity = "error"; + var tip = document.createElement("div"); + tip.className = "CodeMirror-lint-message-" + severity; + if (typeof ann.messageHTML != 'undefined') { + tip.innerHTML = ann.messageHTML; + } else { + tip.appendChild(document.createTextNode(ann.message)); + } + return tip; + } + + function lintAsync(cm, getAnnotations, passOptions) { + var state = cm.state.lint + var id = ++state.waitingFor + function abort() { + id = -1 + cm.off("change", abort) + } + cm.on("change", abort) + getAnnotations(cm.getValue(), function(annotations, arg2) { + cm.off("change", abort) + if (state.waitingFor != id) return + if (arg2 && annotations instanceof CodeMirror) annotations = arg2 + cm.operation(function() {updateLinting(cm, annotations)}) + }, passOptions, cm); + } + + function startLinting(cm) { + var state = cm.state.lint, options = state.options; + /* + * Passing rules in `options` property prevents JSHint (and other linters) from complaining + * about unrecognized rules like `onUpdateLinting`, `delay`, `lintOnChange`, etc. + */ + var passOptions = options.options || options; + var getAnnotations = options.getAnnotations || cm.getHelper(CodeMirror.Pos(0, 0), "lint"); + if (!getAnnotations) return; + if (options.async || getAnnotations.async) { + lintAsync(cm, getAnnotations, passOptions) + } else { + var annotations = getAnnotations(cm.getValue(), passOptions, cm); + if (!annotations) return; + if (annotations.then) annotations.then(function(issues) { + cm.operation(function() {updateLinting(cm, issues)}) + }); + else cm.operation(function() {updateLinting(cm, annotations)}) + } + } + + function updateLinting(cm, annotationsNotSorted) { + clearMarks(cm); + var state = cm.state.lint, options = state.options; + + var annotations = groupByLine(annotationsNotSorted); + + for (var line = 0; line < annotations.length; ++line) { + var anns = annotations[line]; + if (!anns) continue; + + var maxSeverity = null; + var tipLabel = state.hasGutter && document.createDocumentFragment(); + + for (var i = 0; i < anns.length; ++i) { + var ann = anns[i]; + var severity = ann.severity; + if (!severity) severity = "error"; + maxSeverity = getMaxSeverity(maxSeverity, severity); + + if (options.formatAnnotation) ann = options.formatAnnotation(ann); + if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann)); + + if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, { + className: "CodeMirror-lint-mark-" + severity, + __annotation: ann + })); + } + + if (state.hasGutter) + cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity, anns.length > 1, + state.options.tooltips)); + } + if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm); + } + + function onChange(cm) { + var state = cm.state.lint; + if (!state) return; + clearTimeout(state.timeout); + state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500); + } + + function popupTooltips(cm, annotations, e) { + var target = e.target || e.srcElement; + var tooltip = document.createDocumentFragment(); + for (var i = 0; i < annotations.length; i++) { + var ann = annotations[i]; + tooltip.appendChild(annotationTooltip(ann)); + } + showTooltipFor(cm, e, tooltip, target); + } + + function onMouseOver(cm, e) { + var target = e.target || e.srcElement; + if (!/\bCodeMirror-lint-mark-/.test(target.className)) return; + var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2; + var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client")); + + var annotations = []; + for (var i = 0; i < spans.length; ++i) { + var ann = spans[i].__annotation; + if (ann) annotations.push(ann); + } + if (annotations.length) popupTooltips(cm, annotations, e); + } + + CodeMirror.defineOption("lint", false, function(cm, val, old) { + if (old && old != CodeMirror.Init) { + clearMarks(cm); + if (cm.state.lint.options.lintOnChange !== false) + cm.off("change", onChange); + CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver); + clearTimeout(cm.state.lint.timeout); + delete cm.state.lint; + } + + if (val) { + var gutters = cm.getOption("gutters"), hasLintGutter = false; + for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true; + var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter); + if (state.options.lintOnChange !== false) + cm.on("change", onChange); + if (state.options.tooltips != false && state.options.tooltips != "gutter") + CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver); + + startLinting(cm); + } + }); + + CodeMirror.defineExtension("performLint", function() { + if (this.state.lint) startLinting(this); + }); +}); + + +/***/ }), + +/***/ 2052: +/***/ (function(module, exports, __webpack_require__) { + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function(mod) { + if (true) // CommonJS + mod(__webpack_require__(1912)); + else {} +})(function(CodeMirror) { + "use strict"; + // declare global: JSHINT + + function validator(text, options) { + if (!window.JSHINT) { + if (window.console) { + window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."); + } + return []; + } + if (!options.indent) // JSHint error.character actually is a column index, this fixes underlining on lines using tabs for indentation + options.indent = 1; // JSHint default value is 4 + JSHINT(text, options, options.globals); + var errors = JSHINT.data().errors, result = []; + if (errors) parseErrors(errors, result); + return result; + } + + CodeMirror.registerHelper("lint", "javascript", validator); + + function parseErrors(errors, output) { + for ( var i = 0; i < errors.length; i++) { + var error = errors[i]; + if (error) { + if (error.line <= 0) { + if (window.console) { + window.console.warn("Cannot display JSHint error (invalid line " + error.line + ")", error); + } + continue; + } + + var start = error.character - 1, end = start + 1; + if (error.evidence) { + var index = error.evidence.substring(start).search(/.\b/); + if (index > -1) { + end += index; + } + } + + // Convert to format expected by validation service + var hint = { + message: error.reason, + severity: error.code ? (error.code.startsWith('W') ? "warning" : "error") : "error", + from: CodeMirror.Pos(error.line - 1, start), + to: CodeMirror.Pos(error.line - 1, end) + }; + + output.push(hint); + } + } + } +}); + + +/***/ }), + +/***/ 2053: +/***/ (function(module, exports, __webpack_require__) { + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +(function(mod) { + if (true) // CommonJS + mod(__webpack_require__(1912)); + else {} +})(function(CodeMirror) { + var defaults = { + pairs: "()[]{}''\"\"", + closeBefore: ")]}'\":;>", + triples: "", + explode: "[]{}" + }; + + var Pos = CodeMirror.Pos; + + CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) { + if (old && old != CodeMirror.Init) { + cm.removeKeyMap(keyMap); + cm.state.closeBrackets = null; + } + if (val) { + ensureBound(getOption(val, "pairs")) + cm.state.closeBrackets = val; + cm.addKeyMap(keyMap); + } + }); + + function getOption(conf, name) { + if (name == "pairs" && typeof conf == "string") return conf; + if (typeof conf == "object" && conf[name] != null) return conf[name]; + return defaults[name]; + } + + var keyMap = {Backspace: handleBackspace, Enter: handleEnter}; + function ensureBound(chars) { + for (var i = 0; i < chars.length; i++) { + var ch = chars.charAt(i), key = "'" + ch + "'" + if (!keyMap[key]) keyMap[key] = handler(ch) + } + } + ensureBound(defaults.pairs + "`") + + function handler(ch) { + return function(cm) { return handleChar(cm, ch); }; + } + + function getConfig(cm) { + var deflt = cm.state.closeBrackets; + if (!deflt || deflt.override) return deflt; + var mode = cm.getModeAt(cm.getCursor()); + return mode.closeBrackets || deflt; + } + + function handleBackspace(cm) { + var conf = getConfig(cm); + if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass; + + var pairs = getOption(conf, "pairs"); + var ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) return CodeMirror.Pass; + var around = charsAround(cm, ranges[i].head); + if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass; + } + for (var i = ranges.length - 1; i >= 0; i--) { + var cur = ranges[i].head; + cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete"); + } + } + + function handleEnter(cm) { + var conf = getConfig(cm); + var explode = conf && getOption(conf, "explode"); + if (!explode || cm.getOption("disableInput")) return CodeMirror.Pass; + + var ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) return CodeMirror.Pass; + var around = charsAround(cm, ranges[i].head); + if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass; + } + cm.operation(function() { + var linesep = cm.lineSeparator() || "\n"; + cm.replaceSelection(linesep + linesep, null); + cm.execCommand("goCharLeft"); + ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) { + var line = ranges[i].head.line; + cm.indentLine(line, null, true); + cm.indentLine(line + 1, null, true); + } + }); + } + + function contractSelection(sel) { + var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0; + return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)), + head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))}; + } + + function handleChar(cm, ch) { + var conf = getConfig(cm); + if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass; + + var pairs = getOption(conf, "pairs"); + var pos = pairs.indexOf(ch); + if (pos == -1) return CodeMirror.Pass; + + var closeBefore = getOption(conf,"closeBefore"); + + var triples = getOption(conf, "triples"); + + var identical = pairs.charAt(pos + 1) == ch; + var ranges = cm.listSelections(); + var opening = pos % 2 == 0; + + var type; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], cur = range.head, curType; + var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1)); + if (opening && !range.empty()) { + curType = "surround"; + } else if ((identical || !opening) && next == ch) { + if (identical && stringStartsAfter(cm, cur)) + curType = "both"; + else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch) + curType = "skipThree"; + else + curType = "skip"; + } else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 && + cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) { + if (cur.ch > 2 && /\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass; + curType = "addFour"; + } else if (identical) { + var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur) + if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both"; + else return CodeMirror.Pass; + } else if (opening && (next.length === 0 || /\s/.test(next) || closeBefore.indexOf(next) > -1)) { + curType = "both"; + } else { + return CodeMirror.Pass; + } + if (!type) type = curType; + else if (type != curType) return CodeMirror.Pass; + } + + var left = pos % 2 ? pairs.charAt(pos - 1) : ch; + var right = pos % 2 ? ch : pairs.charAt(pos + 1); + cm.operation(function() { + if (type == "skip") { + cm.execCommand("goCharRight"); + } else if (type == "skipThree") { + for (var i = 0; i < 3; i++) + cm.execCommand("goCharRight"); + } else if (type == "surround") { + var sels = cm.getSelections(); + for (var i = 0; i < sels.length; i++) + sels[i] = left + sels[i] + right; + cm.replaceSelections(sels, "around"); + sels = cm.listSelections().slice(); + for (var i = 0; i < sels.length; i++) + sels[i] = contractSelection(sels[i]); + cm.setSelections(sels); + } else if (type == "both") { + cm.replaceSelection(left + right, null); + cm.triggerElectric(left + right); + cm.execCommand("goCharLeft"); + } else if (type == "addFour") { + cm.replaceSelection(left + left + left + left, "before"); + cm.execCommand("goCharRight"); + } + }); + } + + function charsAround(cm, pos) { + var str = cm.getRange(Pos(pos.line, pos.ch - 1), + Pos(pos.line, pos.ch + 1)); + return str.length == 2 ? str : null; + } + + function stringStartsAfter(cm, pos) { + var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1)) + return /\bstring/.test(token.type) && token.start == pos.ch && + (pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos))) + } +}); + + +/***/ }), + +/***/ 2054: +/***/ (function(module, exports, __webpack_require__) { + +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// Because sometimes you need to mark the selected *text*. +// +// Adds an option 'styleSelectedText' which, when enabled, gives +// selected text the CSS class given as option value, or +// "CodeMirror-selectedtext" when the value is not a string. + +(function(mod) { + if (true) // CommonJS + mod(__webpack_require__(1912)); + else {} +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineOption("styleSelectedText", false, function(cm, val, old) { + var prev = old && old != CodeMirror.Init; + if (val && !prev) { + cm.state.markedSelection = []; + cm.state.markedSelectionStyle = typeof val == "string" ? val : "CodeMirror-selectedtext"; + reset(cm); + cm.on("cursorActivity", onCursorActivity); + cm.on("change", onChange); + } else if (!val && prev) { + cm.off("cursorActivity", onCursorActivity); + cm.off("change", onChange); + clear(cm); + cm.state.markedSelection = cm.state.markedSelectionStyle = null; + } + }); + + function onCursorActivity(cm) { + if (cm.state.markedSelection) + cm.operation(function() { update(cm); }); + } + + function onChange(cm) { + if (cm.state.markedSelection && cm.state.markedSelection.length) + cm.operation(function() { clear(cm); }); + } + + var CHUNK_SIZE = 8; + var Pos = CodeMirror.Pos; + var cmp = CodeMirror.cmpPos; + + function coverRange(cm, from, to, addAt) { + if (cmp(from, to) == 0) return; + var array = cm.state.markedSelection; + var cls = cm.state.markedSelectionStyle; + for (var line = from.line;;) { + var start = line == from.line ? from : Pos(line, 0); + var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line; + var end = atEnd ? to : Pos(endLine, 0); + var mark = cm.markText(start, end, {className: cls}); + if (addAt == null) array.push(mark); + else array.splice(addAt++, 0, mark); + if (atEnd) break; + line = endLine; + } + } + + function clear(cm) { + var array = cm.state.markedSelection; + for (var i = 0; i < array.length; ++i) array[i].clear(); + array.length = 0; + } + + function reset(cm) { + clear(cm); + var ranges = cm.listSelections(); + for (var i = 0; i < ranges.length; i++) + coverRange(cm, ranges[i].from(), ranges[i].to()); + } + + function update(cm) { + if (!cm.somethingSelected()) return clear(cm); + if (cm.listSelections().length > 1) return reset(cm); + + var from = cm.getCursor("start"), to = cm.getCursor("end"); + + var array = cm.state.markedSelection; + if (!array.length) return coverRange(cm, from, to); + + var coverStart = array[0].find(), coverEnd = array[array.length - 1].find(); + if (!coverStart || !coverEnd || to.line - from.line <= CHUNK_SIZE || + cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0) + return reset(cm); + + while (cmp(from, coverStart.from) > 0) { + array.shift().clear(); + coverStart = array[0].find(); + } + if (cmp(from, coverStart.from) < 0) { + if (coverStart.to.line - from.line < CHUNK_SIZE) { + array.shift().clear(); + coverRange(cm, from, coverStart.to, 0); + } else { + coverRange(cm, from, coverStart.from, 0); + } + } + + while (cmp(to, coverEnd.to) < 0) { + array.pop().clear(); + coverEnd = array[array.length - 1].find(); + } + if (cmp(to, coverEnd.to) > 0) { + if (to.line - coverEnd.from.line < CHUNK_SIZE) { + array.pop().clear(); + coverRange(cm, coverEnd.from, to); + } else { + coverRange(cm, coverEnd.to, to); + } + } + } +}); + + +/***/ }), + +/***/ 2055: +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__(2056); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__(118)(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + +/***/ 2056: +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(117)(false); +// Module +exports.push([module.i, "/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n.cm-fat-cursor-mark {\n background-color: rgba(20, 255, 20, 0.5);\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n}\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: 0;\n overflow: hidden;\n}\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 30px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -30px; margin-right: -30px;\n padding-bottom: 30px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 30px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -30px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background-color: #ffa;\n background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n", ""]); + + + +/***/ }), + +/***/ 2057: +/***/ (function(module, exports, __webpack_require__) { + + +var content = __webpack_require__(2058); + +if(typeof content === 'string') content = [[module.i, content, '']]; + +var transform; +var insertInto; + + + +var options = {"hmr":true} + +options.transform = transform +options.insertInto = undefined; + +var update = __webpack_require__(118)(content, options); + +if(content.locals) module.exports = content.locals; + +if(false) {} + +/***/ }), + +/***/ 2058: +/***/ (function(module, exports, __webpack_require__) { + +exports = module.exports = __webpack_require__(117)(false); +// Module +exports.push([module.i, "/*\n\n Name: 3024 night\n Author: Jan T. Sott (http://github.com/idleberg)\n\n CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)\n Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)\n\n*/\n\n.cm-s-3024-night.CodeMirror { background: #090300; color: #d6d5d4; }\n.cm-s-3024-night div.CodeMirror-selected { background: #3a3432; }\n.cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); }\n.cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); }\n.cm-s-3024-night .CodeMirror-gutters { background: #090300; border-right: 0px; }\n.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }\n.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }\n.cm-s-3024-night .CodeMirror-linenumber { color: #5c5855; }\n\n.cm-s-3024-night .CodeMirror-cursor { border-left: 1px solid #807d7c; }\n\n.cm-s-3024-night span.cm-comment { color: #cdab53; }\n.cm-s-3024-night span.cm-atom { color: #a16a94; }\n.cm-s-3024-night span.cm-number { color: #a16a94; }\n\n.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute { color: #01a252; }\n.cm-s-3024-night span.cm-keyword { color: #db2d20; }\n.cm-s-3024-night span.cm-string { color: #fded02; }\n\n.cm-s-3024-night span.cm-variable { color: #01a252; }\n.cm-s-3024-night span.cm-variable-2 { color: #01a0e4; }\n.cm-s-3024-night span.cm-def { color: #e8bbd0; }\n.cm-s-3024-night span.cm-bracket { color: #d6d5d4; }\n.cm-s-3024-night span.cm-tag { color: #db2d20; }\n.cm-s-3024-night span.cm-link { color: #a16a94; }\n.cm-s-3024-night span.cm-error { background: #db2d20; color: #807d7c; }\n\n.cm-s-3024-night .CodeMirror-activeline-background { background: #2F2F2F; }\n.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }\n", ""]); + + + +/***/ }), + +/***/ 2083: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule AtomicBlockUtils + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +var BlockMapBuilder = __webpack_require__(1916); +var CharacterMetadata = __webpack_require__(1902); +var ContentBlock = __webpack_require__(1910); +var ContentBlockNode = __webpack_require__(1903); +var DraftFeatureFlags = __webpack_require__(1909); +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); +var Immutable = __webpack_require__(35); +var SelectionState = __webpack_require__(1913); + +var generateRandomKey = __webpack_require__(1907); +var moveBlockInContentState = __webpack_require__(2098); + +var experimentalTreeDataSupport = DraftFeatureFlags.draft_tree_data_support; +var ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock; + +var List = Immutable.List, + Repeat = Immutable.Repeat; + + +var AtomicBlockUtils = { + insertAtomicBlock: function insertAtomicBlock(editorState, entityKey, character) { + var contentState = editorState.getCurrentContent(); + var selectionState = editorState.getSelection(); + + var afterRemoval = DraftModifier.removeRange(contentState, selectionState, 'backward'); + + var targetSelection = afterRemoval.getSelectionAfter(); + var afterSplit = DraftModifier.splitBlock(afterRemoval, targetSelection); + var insertionTarget = afterSplit.getSelectionAfter(); + + var asAtomicBlock = DraftModifier.setBlockType(afterSplit, insertionTarget, 'atomic'); + + var charData = CharacterMetadata.create({ entity: entityKey }); + + var atomicBlockConfig = { + key: generateRandomKey(), + type: 'atomic', + text: character, + characterList: List(Repeat(charData, character.length)) + }; + + var atomicDividerBlockConfig = { + key: generateRandomKey(), + type: 'unstyled' + }; + + if (experimentalTreeDataSupport) { + atomicBlockConfig = _extends({}, atomicBlockConfig, { + nextSibling: atomicDividerBlockConfig.key + }); + atomicDividerBlockConfig = _extends({}, atomicDividerBlockConfig, { + prevSibling: atomicBlockConfig.key + }); + } + + var fragmentArray = [new ContentBlockRecord(atomicBlockConfig), new ContentBlockRecord(atomicDividerBlockConfig)]; + + var fragment = BlockMapBuilder.createFromArray(fragmentArray); + + var withAtomicBlock = DraftModifier.replaceWithFragment(asAtomicBlock, insertionTarget, fragment); + + var newContent = withAtomicBlock.merge({ + selectionBefore: selectionState, + selectionAfter: withAtomicBlock.getSelectionAfter().set('hasFocus', true) + }); + + return EditorState.push(editorState, newContent, 'insert-fragment'); + }, + + moveAtomicBlock: function moveAtomicBlock(editorState, atomicBlock, targetRange, insertionMode) { + var contentState = editorState.getCurrentContent(); + var selectionState = editorState.getSelection(); + + var withMovedAtomicBlock = void 0; + + if (insertionMode === 'before' || insertionMode === 'after') { + var targetBlock = contentState.getBlockForKey(insertionMode === 'before' ? targetRange.getStartKey() : targetRange.getEndKey()); + + withMovedAtomicBlock = moveBlockInContentState(contentState, atomicBlock, targetBlock, insertionMode); + } else { + var afterRemoval = DraftModifier.removeRange(contentState, targetRange, 'backward'); + + var selectionAfterRemoval = afterRemoval.getSelectionAfter(); + var _targetBlock = afterRemoval.getBlockForKey(selectionAfterRemoval.getFocusKey()); + + if (selectionAfterRemoval.getStartOffset() === 0) { + withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'before'); + } else if (selectionAfterRemoval.getEndOffset() === _targetBlock.getLength()) { + withMovedAtomicBlock = moveBlockInContentState(afterRemoval, atomicBlock, _targetBlock, 'after'); + } else { + var afterSplit = DraftModifier.splitBlock(afterRemoval, selectionAfterRemoval); + + var selectionAfterSplit = afterSplit.getSelectionAfter(); + var _targetBlock2 = afterSplit.getBlockForKey(selectionAfterSplit.getFocusKey()); + + withMovedAtomicBlock = moveBlockInContentState(afterSplit, atomicBlock, _targetBlock2, 'before'); + } + } + + var newContent = withMovedAtomicBlock.merge({ + selectionBefore: selectionState, + selectionAfter: withMovedAtomicBlock.getSelectionAfter().set('hasFocus', true) + }); + + return EditorState.push(editorState, newContent, 'move-block'); + } +}; + +module.exports = AtomicBlockUtils; + +/***/ }), + +/***/ 2084: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftFeatureFlags-core + * @format + * + */ + + + +var DraftFeatureFlags = { + draft_killswitch_allow_nontextnodes: false, + draft_segmented_entities_behavior: false, + draft_handlebeforeinput_composed_text: false, + draft_tree_data_support: false +}; + +module.exports = DraftFeatureFlags; + +/***/ }), + +/***/ 2085: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ContentStateInlineStyle + * @format + * + */ + + + +var CharacterMetadata = __webpack_require__(1902); + +var _require = __webpack_require__(35), + Map = _require.Map; + +var ContentStateInlineStyle = { + add: function add(contentState, selectionState, inlineStyle) { + return modifyInlineStyle(contentState, selectionState, inlineStyle, true); + }, + + remove: function remove(contentState, selectionState, inlineStyle) { + return modifyInlineStyle(contentState, selectionState, inlineStyle, false); + } +}; + +function modifyInlineStyle(contentState, selectionState, inlineStyle, addOrRemove) { + var blockMap = contentState.getBlockMap(); + var startKey = selectionState.getStartKey(); + var startOffset = selectionState.getStartOffset(); + var endKey = selectionState.getEndKey(); + var endOffset = selectionState.getEndOffset(); + + var newBlocks = blockMap.skipUntil(function (_, k) { + return k === startKey; + }).takeUntil(function (_, k) { + return k === endKey; + }).concat(Map([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) { + var sliceStart; + var sliceEnd; + + if (startKey === endKey) { + sliceStart = startOffset; + sliceEnd = endOffset; + } else { + sliceStart = blockKey === startKey ? startOffset : 0; + sliceEnd = blockKey === endKey ? endOffset : block.getLength(); + } + + var chars = block.getCharacterList(); + var current; + while (sliceStart < sliceEnd) { + current = chars.get(sliceStart); + chars = chars.set(sliceStart, addOrRemove ? CharacterMetadata.applyStyle(current, inlineStyle) : CharacterMetadata.removeStyle(current, inlineStyle)); + sliceStart++; + } + + return block.set('characterList', chars); + }); + + return contentState.merge({ + blockMap: blockMap.merge(newBlocks), + selectionBefore: selectionState, + selectionAfter: selectionState + }); +} + +module.exports = ContentStateInlineStyle; + +/***/ }), + +/***/ 2086: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule applyEntityToContentState + * @format + * + */ + + + +var Immutable = __webpack_require__(35); + +var applyEntityToContentBlock = __webpack_require__(2087); + +function applyEntityToContentState(contentState, selectionState, entityKey) { + var blockMap = contentState.getBlockMap(); + var startKey = selectionState.getStartKey(); + var startOffset = selectionState.getStartOffset(); + var endKey = selectionState.getEndKey(); + var endOffset = selectionState.getEndOffset(); + + var newBlocks = blockMap.skipUntil(function (_, k) { + return k === startKey; + }).takeUntil(function (_, k) { + return k === endKey; + }).toOrderedMap().merge(Immutable.OrderedMap([[endKey, blockMap.get(endKey)]])).map(function (block, blockKey) { + var sliceStart = blockKey === startKey ? startOffset : 0; + var sliceEnd = blockKey === endKey ? endOffset : block.getLength(); + return applyEntityToContentBlock(block, sliceStart, sliceEnd, entityKey); + }); + + return contentState.merge({ + blockMap: blockMap.merge(newBlocks), + selectionBefore: selectionState, + selectionAfter: selectionState + }); +} + +module.exports = applyEntityToContentState; + +/***/ }), + +/***/ 2087: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule applyEntityToContentBlock + * @format + * + */ + + + +var CharacterMetadata = __webpack_require__(1902); + +function applyEntityToContentBlock(contentBlock, start, end, entityKey) { + var characterList = contentBlock.getCharacterList(); + while (start < end) { + characterList = characterList.set(start, CharacterMetadata.applyEntity(characterList.get(start), entityKey)); + start++; + } + return contentBlock.set('characterList', characterList); +} + +module.exports = applyEntityToContentBlock; + +/***/ }), + +/***/ 2088: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getCharacterRemovalRange + * @format + * + */ + + + +var DraftEntitySegments = __webpack_require__(2089); + +var getRangesForDraftEntity = __webpack_require__(2090); +var invariant = __webpack_require__(641); + +/** + * Given a SelectionState and a removal direction, determine the entire range + * that should be removed from a ContentState. This is based on any entities + * within the target, with their `mutability` values taken into account. + * + * For instance, if we are attempting to remove part of an "immutable" entity + * range, the entire entity must be removed. The returned `SelectionState` + * will be adjusted accordingly. + */ +function getCharacterRemovalRange(entityMap, startBlock, endBlock, selectionState, direction) { + var start = selectionState.getStartOffset(); + var end = selectionState.getEndOffset(); + var startEntityKey = startBlock.getEntityAt(start); + var endEntityKey = endBlock.getEntityAt(end - 1); + if (!startEntityKey && !endEntityKey) { + return selectionState; + } + var newSelectionState = selectionState; + if (startEntityKey && startEntityKey === endEntityKey) { + newSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, true, true); + } else if (startEntityKey && endEntityKey) { + var startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true); + var endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false); + newSelectionState = newSelectionState.merge({ + anchorOffset: startSelectionState.getAnchorOffset(), + focusOffset: endSelectionState.getFocusOffset(), + isBackward: false + }); + } else if (startEntityKey) { + var _startSelectionState = getEntityRemovalRange(entityMap, startBlock, newSelectionState, direction, startEntityKey, false, true); + newSelectionState = newSelectionState.merge({ + anchorOffset: _startSelectionState.getStartOffset(), + isBackward: false + }); + } else if (endEntityKey) { + var _endSelectionState = getEntityRemovalRange(entityMap, endBlock, newSelectionState, direction, endEntityKey, false, false); + newSelectionState = newSelectionState.merge({ + focusOffset: _endSelectionState.getEndOffset(), + isBackward: false + }); + } + return newSelectionState; +} + +function getEntityRemovalRange(entityMap, block, selectionState, direction, entityKey, isEntireSelectionWithinEntity, isEntityAtStart) { + var start = selectionState.getStartOffset(); + var end = selectionState.getEndOffset(); + var entity = entityMap.__get(entityKey); + var mutability = entity.getMutability(); + var sideToConsider = isEntityAtStart ? start : end; + + // `MUTABLE` entities can just have the specified range of text removed + // directly. No adjustments are needed. + if (mutability === 'MUTABLE') { + return selectionState; + } + + // Find the entity range that overlaps with our removal range. + var entityRanges = getRangesForDraftEntity(block, entityKey).filter(function (range) { + return sideToConsider <= range.end && sideToConsider >= range.start; + }); + + !(entityRanges.length == 1) ? false ? undefined : invariant(false) : void 0; + + var entityRange = entityRanges[0]; + + // For `IMMUTABLE` entity types, we will remove the entire entity range. + if (mutability === 'IMMUTABLE') { + return selectionState.merge({ + anchorOffset: entityRange.start, + focusOffset: entityRange.end, + isBackward: false + }); + } + + // For `SEGMENTED` entity types, determine the appropriate segment to + // remove. + if (!isEntireSelectionWithinEntity) { + if (isEntityAtStart) { + end = entityRange.end; + } else { + start = entityRange.start; + } + } + + var removalRange = DraftEntitySegments.getRemovalRange(start, end, block.getText().slice(entityRange.start, entityRange.end), entityRange.start, direction); + + return selectionState.merge({ + anchorOffset: removalRange.start, + focusOffset: removalRange.end, + isBackward: false + }); +} + +module.exports = getCharacterRemovalRange; + +/***/ }), + +/***/ 2089: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEntitySegments + * @format + * + */ + + + +/** + * Identify the range to delete from a segmented entity. + * + * Rules: + * + * Example: 'John F. Kennedy' + * + * - Deletion from within any non-whitespace (i.e. ['John', 'F.', 'Kennedy']) + * will return the range of that text. + * + * 'John F. Kennedy' -> 'John F.' + * ^ + * + * - Forward deletion of whitespace will remove the following section: + * + * 'John F. Kennedy' -> 'John Kennedy' + * ^ + * + * - Backward deletion of whitespace will remove the previous section: + * + * 'John F. Kennedy' -> 'F. Kennedy' + * ^ + */ +var DraftEntitySegments = { + getRemovalRange: function getRemovalRange(selectionStart, selectionEnd, text, entityStart, direction) { + var segments = text.split(' '); + segments = segments.map(function ( /*string*/segment, /*number*/ii) { + if (direction === 'forward') { + if (ii > 0) { + return ' ' + segment; + } + } else if (ii < segments.length - 1) { + return segment + ' '; + } + return segment; + }); + + var segmentStart = entityStart; + var segmentEnd; + var segment; + var removalStart = null; + var removalEnd = null; + + for (var jj = 0; jj < segments.length; jj++) { + segment = segments[jj]; + segmentEnd = segmentStart + segment.length; + + // Our selection overlaps this segment. + if (selectionStart < segmentEnd && segmentStart < selectionEnd) { + if (removalStart !== null) { + removalEnd = segmentEnd; + } else { + removalStart = segmentStart; + removalEnd = segmentEnd; + } + } else if (removalStart !== null) { + break; + } + + segmentStart = segmentEnd; + } + + var entityEnd = entityStart + text.length; + var atStart = removalStart === entityStart; + var atEnd = removalEnd === entityEnd; + + if (!atStart && atEnd || atStart && !atEnd) { + if (direction === 'forward') { + if (removalEnd !== entityEnd) { + removalEnd++; + } + } else if (removalStart !== entityStart) { + removalStart--; + } + } + + return { + start: removalStart, + end: removalEnd + }; + } +}; + +module.exports = DraftEntitySegments; + +/***/ }), + +/***/ 2090: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getRangesForDraftEntity + * @format + * + */ + + + +var invariant = __webpack_require__(641); + +/** + * Obtain the start and end positions of the range that has the + * specified entity applied to it. + * + * Entity keys are applied only to contiguous stretches of text, so this + * method searches for the first instance of the entity key and returns + * the subsequent range. + */ +function getRangesForDraftEntity(block, key) { + var ranges = []; + block.findEntityRanges(function (c) { + return c.getEntity() === key; + }, function (start, end) { + ranges.push({ start: start, end: end }); + }); + + !!!ranges.length ? false ? undefined : invariant(false) : void 0; + + return ranges; +} + +module.exports = getRangesForDraftEntity; + +/***/ }), + +/***/ 2091: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule insertFragmentIntoContentState + * @format + * + */ + + + +var BlockMapBuilder = __webpack_require__(1916); +var ContentBlockNode = __webpack_require__(1903); +var Immutable = __webpack_require__(35); + +var insertIntoList = __webpack_require__(1974); +var invariant = __webpack_require__(641); +var randomizeBlockMapKeys = __webpack_require__(1972); + +var List = Immutable.List; + + +var updateExistingBlock = function updateExistingBlock(contentState, selectionState, blockMap, fragmentBlock, targetKey, targetOffset) { + var targetBlock = blockMap.get(targetKey); + var text = targetBlock.getText(); + var chars = targetBlock.getCharacterList(); + var finalKey = targetKey; + var finalOffset = targetOffset + fragmentBlock.getText().length; + + var newBlock = targetBlock.merge({ + text: text.slice(0, targetOffset) + fragmentBlock.getText() + text.slice(targetOffset), + characterList: insertIntoList(chars, fragmentBlock.getCharacterList(), targetOffset), + data: fragmentBlock.getData() + }); + + return contentState.merge({ + blockMap: blockMap.set(targetKey, newBlock), + selectionBefore: selectionState, + selectionAfter: selectionState.merge({ + anchorKey: finalKey, + anchorOffset: finalOffset, + focusKey: finalKey, + focusOffset: finalOffset, + isBackward: false + }) + }); +}; + +/** + * Appends text/characterList from the fragment first block to + * target block. + */ +var updateHead = function updateHead(block, targetOffset, fragment) { + var text = block.getText(); + var chars = block.getCharacterList(); + + // Modify head portion of block. + var headText = text.slice(0, targetOffset); + var headCharacters = chars.slice(0, targetOffset); + var appendToHead = fragment.first(); + + return block.merge({ + text: headText + appendToHead.getText(), + characterList: headCharacters.concat(appendToHead.getCharacterList()), + type: headText ? block.getType() : appendToHead.getType(), + data: appendToHead.getData() + }); +}; + +/** + * Appends offset text/characterList from the target block to the last + * fragment block. + */ +var updateTail = function updateTail(block, targetOffset, fragment) { + // Modify tail portion of block. + var text = block.getText(); + var chars = block.getCharacterList(); + + // Modify head portion of block. + var blockSize = text.length; + var tailText = text.slice(targetOffset, blockSize); + var tailCharacters = chars.slice(targetOffset, blockSize); + var prependToTail = fragment.last(); + + return prependToTail.merge({ + text: prependToTail.getText() + tailText, + characterList: prependToTail.getCharacterList().concat(tailCharacters), + data: prependToTail.getData() + }); +}; + +var getRootBlocks = function getRootBlocks(block, blockMap) { + var headKey = block.getKey(); + var rootBlock = block; + var rootBlocks = []; + + // sometimes the fragment head block will not be part of the blockMap itself this can happen when + // the fragment head is used to update the target block, however when this does not happen we need + // to make sure that we include it on the rootBlocks since the first block of a fragment is always a + // fragment root block + if (blockMap.get(headKey)) { + rootBlocks.push(headKey); + } + + while (rootBlock && rootBlock.getNextSiblingKey()) { + var lastSiblingKey = rootBlock.getNextSiblingKey(); + + if (!lastSiblingKey) { + break; + } + + rootBlocks.push(lastSiblingKey); + rootBlock = blockMap.get(lastSiblingKey); + } + + return rootBlocks; +}; + +var updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockMap, targetBlock, fragmentHeadBlock) { + return blockMap.withMutations(function (blockMapState) { + var targetKey = targetBlock.getKey(); + var headKey = fragmentHeadBlock.getKey(); + var targetNextKey = targetBlock.getNextSiblingKey(); + var targetParentKey = targetBlock.getParentKey(); + var fragmentRootBlocks = getRootBlocks(fragmentHeadBlock, blockMap); + var lastRootFragmentBlockKey = fragmentRootBlocks[fragmentRootBlocks.length - 1]; + + if (blockMapState.get(headKey)) { + // update the fragment head when it is part of the blockMap otherwise + blockMapState.setIn([targetKey, 'nextSibling'], headKey); + blockMapState.setIn([headKey, 'prevSibling'], targetKey); + } else { + // update the target block that had the fragment head contents merged into it + blockMapState.setIn([targetKey, 'nextSibling'], fragmentHeadBlock.getNextSiblingKey()); + blockMapState.setIn([fragmentHeadBlock.getNextSiblingKey(), 'prevSibling'], targetKey); + } + + // update the last root block fragment + blockMapState.setIn([lastRootFragmentBlockKey, 'nextSibling'], targetNextKey); + + // update the original target next block + if (targetNextKey) { + blockMapState.setIn([targetNextKey, 'prevSibling'], lastRootFragmentBlockKey); + } + + // update fragment parent links + fragmentRootBlocks.forEach(function (blockKey) { + return blockMapState.setIn([blockKey, 'parent'], targetParentKey); + }); + + // update targetBlock parent child links + if (targetParentKey) { + var targetParent = blockMap.get(targetParentKey); + var originalTargetParentChildKeys = targetParent.getChildKeys(); + + var targetBlockIndex = originalTargetParentChildKeys.indexOf(targetKey); + var insertionIndex = targetBlockIndex + 1; + + var newChildrenKeysArray = originalTargetParentChildKeys.toArray(); + + // insert fragment children + newChildrenKeysArray.splice.apply(newChildrenKeysArray, [insertionIndex, 0].concat(fragmentRootBlocks)); + + blockMapState.setIn([targetParentKey, 'children'], List(newChildrenKeysArray)); + } + }); +}; + +var insertFragment = function insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset) { + var isTreeBasedBlockMap = blockMap.first() instanceof ContentBlockNode; + var newBlockArr = []; + var fragmentSize = fragment.size; + var target = blockMap.get(targetKey); + var head = fragment.first(); + var tail = fragment.last(); + var finalOffset = tail.getLength(); + var finalKey = tail.getKey(); + var shouldNotUpdateFromFragmentBlock = isTreeBasedBlockMap && (!target.getChildKeys().isEmpty() || !head.getChildKeys().isEmpty()); + + blockMap.forEach(function (block, blockKey) { + if (blockKey !== targetKey) { + newBlockArr.push(block); + return; + } + + if (shouldNotUpdateFromFragmentBlock) { + newBlockArr.push(block); + } else { + newBlockArr.push(updateHead(block, targetOffset, fragment)); + } + + // Insert fragment blocks after the head and before the tail. + fragment + // when we are updating the target block with the head fragment block we skip the first fragment + // head since its contents have already been merged with the target block otherwise we include + // the whole fragment + .slice(shouldNotUpdateFromFragmentBlock ? 0 : 1, fragmentSize - 1).forEach(function (fragmentBlock) { + return newBlockArr.push(fragmentBlock); + }); + + // update tail + newBlockArr.push(updateTail(block, targetOffset, fragment)); + }); + + var updatedBlockMap = BlockMapBuilder.createFromArray(newBlockArr); + + if (isTreeBasedBlockMap) { + updatedBlockMap = updateBlockMapLinks(updatedBlockMap, blockMap, target, head); + } + + return contentState.merge({ + blockMap: updatedBlockMap, + selectionBefore: selectionState, + selectionAfter: selectionState.merge({ + anchorKey: finalKey, + anchorOffset: finalOffset, + focusKey: finalKey, + focusOffset: finalOffset, + isBackward: false + }) + }); +}; + +var insertFragmentIntoContentState = function insertFragmentIntoContentState(contentState, selectionState, fragmentBlockMap) { + !selectionState.isCollapsed() ? false ? undefined : invariant(false) : void 0; + + var blockMap = contentState.getBlockMap(); + var fragment = randomizeBlockMapKeys(fragmentBlockMap); + var targetKey = selectionState.getStartKey(); + var targetOffset = selectionState.getStartOffset(); + + var targetBlock = blockMap.get(targetKey); + + if (targetBlock instanceof ContentBlockNode) { + !targetBlock.getChildKeys().isEmpty() ? false ? undefined : invariant(false) : void 0; + } + + // When we insert a fragment with a single block we simply update the target block + // with the contents of the inserted fragment block + if (fragment.size === 1) { + return updateExistingBlock(contentState, selectionState, blockMap, fragment.first(), targetKey, targetOffset); + } + + return insertFragment(contentState, selectionState, blockMap, fragment, targetKey, targetOffset); +}; + +module.exports = insertFragmentIntoContentState; + +/***/ }), + +/***/ 2092: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule insertTextIntoContentState + * @format + * + */ + + + +var Immutable = __webpack_require__(35); + +var insertIntoList = __webpack_require__(1974); +var invariant = __webpack_require__(641); + +var Repeat = Immutable.Repeat; + + +function insertTextIntoContentState(contentState, selectionState, text, characterMetadata) { + !selectionState.isCollapsed() ? false ? undefined : invariant(false) : void 0; + + var len = text.length; + if (!len) { + return contentState; + } + + var blockMap = contentState.getBlockMap(); + var key = selectionState.getStartKey(); + var offset = selectionState.getStartOffset(); + var block = blockMap.get(key); + var blockText = block.getText(); + + var newBlock = block.merge({ + text: blockText.slice(0, offset) + text + blockText.slice(offset, block.getLength()), + characterList: insertIntoList(block.getCharacterList(), Repeat(characterMetadata, len).toList(), offset) + }); + + var newOffset = offset + len; + + return contentState.merge({ + blockMap: blockMap.set(key, newBlock), + selectionAfter: selectionState.merge({ + anchorOffset: newOffset, + focusOffset: newOffset + }) + }); +} + +module.exports = insertTextIntoContentState; + +/***/ }), + +/***/ 2093: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule modifyBlockForContentState + * @format + * + */ + + + +var Immutable = __webpack_require__(35); + +var Map = Immutable.Map; + + +function modifyBlockForContentState(contentState, selectionState, operation) { + var startKey = selectionState.getStartKey(); + var endKey = selectionState.getEndKey(); + var blockMap = contentState.getBlockMap(); + var newBlocks = blockMap.toSeq().skipUntil(function (_, k) { + return k === startKey; + }).takeUntil(function (_, k) { + return k === endKey; + }).concat(Map([[endKey, blockMap.get(endKey)]])).map(operation); + + return contentState.merge({ + blockMap: blockMap.merge(newBlocks), + selectionBefore: selectionState, + selectionAfter: selectionState + }); +} + +module.exports = modifyBlockForContentState; + +/***/ }), + +/***/ 2094: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule removeRangeFromContentState + * @format + * + */ + + + +var ContentBlockNode = __webpack_require__(1903); +var Immutable = __webpack_require__(35); + +var getNextDelimiterBlockKey = __webpack_require__(1975); + +var List = Immutable.List, + Map = Immutable.Map; + + +var transformBlock = function transformBlock(key, blockMap, func) { + if (!key) { + return; + } + + var block = blockMap.get(key); + + if (!block) { + return; + } + + blockMap.set(key, func(block)); +}; + +/** + * Ancestors needs to be preserved when there are non selected + * children to make sure we do not leave any orphans behind + */ +var getAncestorsKeys = function getAncestorsKeys(blockKey, blockMap) { + var parents = []; + + if (!blockKey) { + return parents; + } + + var blockNode = blockMap.get(blockKey); + while (blockNode && blockNode.getParentKey()) { + var parentKey = blockNode.getParentKey(); + if (parentKey) { + parents.push(parentKey); + } + blockNode = parentKey ? blockMap.get(parentKey) : null; + } + + return parents; +}; + +/** + * Get all next delimiter keys until we hit a root delimiter and return + * an array of key references + */ +var getNextDelimitersBlockKeys = function getNextDelimitersBlockKeys(block, blockMap) { + var nextDelimiters = []; + + if (!block) { + return nextDelimiters; + } + + var nextDelimiter = getNextDelimiterBlockKey(block, blockMap); + while (nextDelimiter && blockMap.get(nextDelimiter)) { + var _block = blockMap.get(nextDelimiter); + nextDelimiters.push(nextDelimiter); + + // we do not need to keep checking all root node siblings, just the first occurance + nextDelimiter = _block.getParentKey() ? getNextDelimiterBlockKey(_block, blockMap) : null; + } + + return nextDelimiters; +}; + +var getNextValidSibling = function getNextValidSibling(block, blockMap, originalBlockMap) { + if (!block) { + return null; + } + + // note that we need to make sure we refer to the original block since this + // function is called within a withMutations + var nextValidSiblingKey = originalBlockMap.get(block.getKey()).getNextSiblingKey(); + + while (nextValidSiblingKey && !blockMap.get(nextValidSiblingKey)) { + nextValidSiblingKey = originalBlockMap.get(nextValidSiblingKey).getNextSiblingKey() || null; + } + + return nextValidSiblingKey; +}; + +var getPrevValidSibling = function getPrevValidSibling(block, blockMap, originalBlockMap) { + if (!block) { + return null; + } + + // note that we need to make sure we refer to the original block since this + // function is called within a withMutations + var prevValidSiblingKey = originalBlockMap.get(block.getKey()).getPrevSiblingKey(); + + while (prevValidSiblingKey && !blockMap.get(prevValidSiblingKey)) { + prevValidSiblingKey = originalBlockMap.get(prevValidSiblingKey).getPrevSiblingKey() || null; + } + + return prevValidSiblingKey; +}; + +var updateBlockMapLinks = function updateBlockMapLinks(blockMap, startBlock, endBlock, originalBlockMap) { + return blockMap.withMutations(function (blocks) { + // update start block if its retained + transformBlock(startBlock.getKey(), blocks, function (block) { + return block.merge({ + nextSibling: getNextValidSibling(startBlock, blocks, originalBlockMap), + prevSibling: getPrevValidSibling(startBlock, blocks, originalBlockMap) + }); + }); + + // update endblock if its retained + transformBlock(endBlock.getKey(), blocks, function (block) { + return block.merge({ + nextSibling: getNextValidSibling(endBlock, blocks, originalBlockMap), + prevSibling: getPrevValidSibling(endBlock, blocks, originalBlockMap) + }); + }); + + // update start block parent ancestors + getAncestorsKeys(startBlock.getKey(), originalBlockMap).forEach(function (parentKey) { + return transformBlock(parentKey, blocks, function (block) { + return block.merge({ + children: block.getChildKeys().filter(function (key) { + return blocks.get(key); + }), + nextSibling: getNextValidSibling(block, blocks, originalBlockMap), + prevSibling: getPrevValidSibling(block, blocks, originalBlockMap) + }); + }); + }); + + // update start block next - can only happen if startBlock == endBlock + transformBlock(startBlock.getNextSiblingKey(), blocks, function (block) { + return block.merge({ + prevSibling: startBlock.getPrevSiblingKey() + }); + }); + + // update start block prev + transformBlock(startBlock.getPrevSiblingKey(), blocks, function (block) { + return block.merge({ + nextSibling: getNextValidSibling(startBlock, blocks, originalBlockMap) + }); + }); + + // update end block next + transformBlock(endBlock.getNextSiblingKey(), blocks, function (block) { + return block.merge({ + prevSibling: getPrevValidSibling(endBlock, blocks, originalBlockMap) + }); + }); + + // update end block prev + transformBlock(endBlock.getPrevSiblingKey(), blocks, function (block) { + return block.merge({ + nextSibling: endBlock.getNextSiblingKey() + }); + }); + + // update end block parent ancestors + getAncestorsKeys(endBlock.getKey(), originalBlockMap).forEach(function (parentKey) { + transformBlock(parentKey, blocks, function (block) { + return block.merge({ + children: block.getChildKeys().filter(function (key) { + return blocks.get(key); + }), + nextSibling: getNextValidSibling(block, blocks, originalBlockMap), + prevSibling: getPrevValidSibling(block, blocks, originalBlockMap) + }); + }); + }); + + // update next delimiters all the way to a root delimiter + getNextDelimitersBlockKeys(endBlock, originalBlockMap).forEach(function (delimiterKey) { + return transformBlock(delimiterKey, blocks, function (block) { + return block.merge({ + nextSibling: getNextValidSibling(block, blocks, originalBlockMap), + prevSibling: getPrevValidSibling(block, blocks, originalBlockMap) + }); + }); + }); + }); +}; + +var removeRangeFromContentState = function removeRangeFromContentState(contentState, selectionState) { + if (selectionState.isCollapsed()) { + return contentState; + } + + var blockMap = contentState.getBlockMap(); + var startKey = selectionState.getStartKey(); + var startOffset = selectionState.getStartOffset(); + var endKey = selectionState.getEndKey(); + var endOffset = selectionState.getEndOffset(); + + var startBlock = blockMap.get(startKey); + var endBlock = blockMap.get(endKey); + + // we assume that ContentBlockNode and ContentBlocks are not mixed together + var isExperimentalTreeBlock = startBlock instanceof ContentBlockNode; + + // used to retain blocks that should not be deleted to avoid orphan children + var parentAncestors = []; + + if (isExperimentalTreeBlock) { + var endBlockchildrenKeys = endBlock.getChildKeys(); + var endBlockAncestors = getAncestorsKeys(endKey, blockMap); + + // endBlock has unselected sibblings so we can not remove its ancestors parents + if (endBlock.getNextSiblingKey()) { + parentAncestors = parentAncestors.concat(endBlockAncestors); + } + + // endBlock has children so can not remove this block or any of its ancestors + if (!endBlockchildrenKeys.isEmpty()) { + parentAncestors = parentAncestors.concat(endBlockAncestors.concat([endKey])); + } + + // we need to retain all ancestors of the next delimiter block + parentAncestors = parentAncestors.concat(getAncestorsKeys(getNextDelimiterBlockKey(endBlock, blockMap), blockMap)); + } + + var characterList = void 0; + + if (startBlock === endBlock) { + characterList = removeFromList(startBlock.getCharacterList(), startOffset, endOffset); + } else { + characterList = startBlock.getCharacterList().slice(0, startOffset).concat(endBlock.getCharacterList().slice(endOffset)); + } + + var modifiedStart = startBlock.merge({ + text: startBlock.getText().slice(0, startOffset) + endBlock.getText().slice(endOffset), + characterList: characterList + }); + + var newBlocks = blockMap.toSeq().skipUntil(function (_, k) { + return k === startKey; + }).takeUntil(function (_, k) { + return k === endKey; + }).filter(function (_, k) { + return parentAncestors.indexOf(k) === -1; + }).concat(Map([[endKey, null]])).map(function (_, k) { + return k === startKey ? modifiedStart : null; + }); + + var updatedBlockMap = blockMap.merge(newBlocks).filter(function (block) { + return !!block; + }); + + if (isExperimentalTreeBlock) { + updatedBlockMap = updateBlockMapLinks(updatedBlockMap, startBlock, endBlock, blockMap); + } + + return contentState.merge({ + blockMap: updatedBlockMap, + selectionBefore: selectionState, + selectionAfter: selectionState.merge({ + anchorKey: startKey, + anchorOffset: startOffset, + focusKey: startKey, + focusOffset: startOffset, + isBackward: false + }) + }); +}; + +/** + * Maintain persistence for target list when removing characters on the + * head and tail of the character list. + */ +var removeFromList = function removeFromList(targetList, startOffset, endOffset) { + if (startOffset === 0) { + while (startOffset < endOffset) { + targetList = targetList.shift(); + startOffset++; + } + } else if (endOffset === targetList.count()) { + while (endOffset > startOffset) { + targetList = targetList.pop(); + endOffset--; + } + } else { + var head = targetList.slice(0, startOffset); + var tail = targetList.slice(endOffset); + targetList = head.concat(tail).toList(); + } + return targetList; +}; + +module.exports = removeRangeFromContentState; + +/***/ }), + +/***/ 2095: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule splitBlockInContentState + * @format + * + */ + + + +var ContentBlockNode = __webpack_require__(1903); +var Immutable = __webpack_require__(35); + +var generateRandomKey = __webpack_require__(1907); +var invariant = __webpack_require__(641); + +var List = Immutable.List, + Map = Immutable.Map; + + +var transformBlock = function transformBlock(key, blockMap, func) { + if (!key) { + return; + } + + var block = blockMap.get(key); + + if (!block) { + return; + } + + blockMap.set(key, func(block)); +}; + +var updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlock, belowBlock) { + return blockMap.withMutations(function (blocks) { + var originalBlockKey = originalBlock.getKey(); + var belowBlockKey = belowBlock.getKey(); + + // update block parent + transformBlock(originalBlock.getParentKey(), blocks, function (block) { + var parentChildrenList = block.getChildKeys(); + var insertionIndex = parentChildrenList.indexOf(originalBlockKey) + 1; + var newChildrenArray = parentChildrenList.toArray(); + + newChildrenArray.splice(insertionIndex, 0, belowBlockKey); + + return block.merge({ + children: List(newChildrenArray) + }); + }); + + // update original next block + transformBlock(originalBlock.getNextSiblingKey(), blocks, function (block) { + return block.merge({ + prevSibling: belowBlockKey + }); + }); + + // update original block + transformBlock(originalBlockKey, blocks, function (block) { + return block.merge({ + nextSibling: belowBlockKey + }); + }); + + // update below block + transformBlock(belowBlockKey, blocks, function (block) { + return block.merge({ + prevSibling: originalBlockKey + }); + }); + }); +}; + +var splitBlockInContentState = function splitBlockInContentState(contentState, selectionState) { + !selectionState.isCollapsed() ? false ? undefined : invariant(false) : void 0; + + var key = selectionState.getAnchorKey(); + var offset = selectionState.getAnchorOffset(); + var blockMap = contentState.getBlockMap(); + var blockToSplit = blockMap.get(key); + var text = blockToSplit.getText(); + var chars = blockToSplit.getCharacterList(); + var keyBelow = generateRandomKey(); + var isExperimentalTreeBlock = blockToSplit instanceof ContentBlockNode; + + var blockAbove = blockToSplit.merge({ + text: text.slice(0, offset), + characterList: chars.slice(0, offset) + }); + var blockBelow = blockAbove.merge({ + key: keyBelow, + text: text.slice(offset), + characterList: chars.slice(offset), + data: Map() + }); + + var blocksBefore = blockMap.toSeq().takeUntil(function (v) { + return v === blockToSplit; + }); + var blocksAfter = blockMap.toSeq().skipUntil(function (v) { + return v === blockToSplit; + }).rest(); + var newBlocks = blocksBefore.concat([[key, blockAbove], [keyBelow, blockBelow]], blocksAfter).toOrderedMap(); + + if (isExperimentalTreeBlock) { + !blockToSplit.getChildKeys().isEmpty() ? false ? undefined : invariant(false) : void 0; + + newBlocks = updateBlockMapLinks(newBlocks, blockAbove, blockBelow); + } + + return contentState.merge({ + blockMap: newBlocks, + selectionBefore: selectionState, + selectionAfter: selectionState.merge({ + anchorKey: keyBelow, + anchorOffset: 0, + focusKey: keyBelow, + focusOffset: 0, + isBackward: false + }) + }); +}; + +module.exports = splitBlockInContentState; + +/***/ }), + +/***/ 2096: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EditorBidiService + * @format + * + */ + + + +var Immutable = __webpack_require__(35); +var UnicodeBidiService = __webpack_require__(2097); + +var nullthrows = __webpack_require__(1904); + +var OrderedMap = Immutable.OrderedMap; + + +var bidiService; + +var EditorBidiService = { + getDirectionMap: function getDirectionMap(content, prevBidiMap) { + if (!bidiService) { + bidiService = new UnicodeBidiService(); + } else { + bidiService.reset(); + } + + var blockMap = content.getBlockMap(); + var nextBidi = blockMap.valueSeq().map(function (block) { + return nullthrows(bidiService).getDirection(block.getText()); + }); + var bidiMap = OrderedMap(blockMap.keySeq().zip(nextBidi)); + + if (prevBidiMap != null && Immutable.is(prevBidiMap, bidiMap)) { + return prevBidiMap; + } + + return bidiMap; + } +}; + +module.exports = EditorBidiService; + +/***/ }), + +/***/ 2097: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + * + */ + +/** + * Stateful API for text direction detection + * + * This class can be used in applications where you need to detect the + * direction of a sequence of text blocks, where each direction shall be used + * as the fallback direction for the next one. + * + * NOTE: A default direction, if not provided, is set based on the global + * direction, as defined by `UnicodeBidiDirection`. + * + * == Example == + * ``` + * var UnicodeBidiService = require('UnicodeBidiService'); + * + * var bidiService = new UnicodeBidiService(); + * + * ... + * + * bidiService.reset(); + * for (var para in paragraphs) { + * var dir = bidiService.getDirection(para); + * ... + * } + * ``` + * + * Part of our implementation of Unicode Bidirectional Algorithm (UBA) + * Unicode Standard Annex #9 (UAX9) + * http://www.unicode.org/reports/tr9/ + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var UnicodeBidi = __webpack_require__(1978); +var UnicodeBidiDirection = __webpack_require__(1943); + +var invariant = __webpack_require__(641); + +var UnicodeBidiService = function () { + + /** + * Stateful class for paragraph direction detection + * + * @param defaultDir Default direction of the service + */ + function UnicodeBidiService(defaultDir) { + _classCallCheck(this, UnicodeBidiService); + + if (!defaultDir) { + defaultDir = UnicodeBidiDirection.getGlobalDir(); + } else { + !UnicodeBidiDirection.isStrong(defaultDir) ? false ? undefined : invariant(false) : void 0; + } + this._defaultDir = defaultDir; + this.reset(); + } + + /** + * Reset the internal state + * + * Instead of creating a new instance, you can just reset() your instance + * everytime you start a new loop. + */ + + + UnicodeBidiService.prototype.reset = function reset() { + this._lastDir = this._defaultDir; + }; + + /** + * Returns the direction of a block of text, and remembers it as the + * fall-back direction for the next paragraph. + * + * @param str A text block, e.g. paragraph, table cell, tag + * @return The resolved direction + */ + + + UnicodeBidiService.prototype.getDirection = function getDirection(str) { + this._lastDir = UnicodeBidi.getDirection(str, this._lastDir); + return this._lastDir; + }; + + return UnicodeBidiService; +}(); + +module.exports = UnicodeBidiService; + +/***/ }), + +/***/ 2098: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule moveBlockInContentState + * @format + * + */ + + + +var ContentBlockNode = __webpack_require__(1903); +var Immutable = __webpack_require__(35); + +var getNextDelimiterBlockKey = __webpack_require__(1975); +var invariant = __webpack_require__(641); + +var OrderedMap = Immutable.OrderedMap, + List = Immutable.List; + + +var transformBlock = function transformBlock(key, blockMap, func) { + if (!key) { + return; + } + + var block = blockMap.get(key); + + if (!block) { + return; + } + + blockMap.set(key, func(block)); +}; + +var updateBlockMapLinks = function updateBlockMapLinks(blockMap, originalBlockToBeMoved, originalTargetBlock, insertionMode, isExperimentalTreeBlock) { + if (!isExperimentalTreeBlock) { + return blockMap; + } + // possible values of 'insertionMode' are: 'after', 'before' + var isInsertedAfterTarget = insertionMode === 'after'; + + var originalBlockKey = originalBlockToBeMoved.getKey(); + var originalTargetKey = originalTargetBlock.getKey(); + var originalParentKey = originalBlockToBeMoved.getParentKey(); + var originalNextSiblingKey = originalBlockToBeMoved.getNextSiblingKey(); + var originalPrevSiblingKey = originalBlockToBeMoved.getPrevSiblingKey(); + var newParentKey = originalTargetBlock.getParentKey(); + var newNextSiblingKey = isInsertedAfterTarget ? originalTargetBlock.getNextSiblingKey() : originalTargetKey; + var newPrevSiblingKey = isInsertedAfterTarget ? originalTargetKey : originalTargetBlock.getPrevSiblingKey(); + + return blockMap.withMutations(function (blocks) { + // update old parent + transformBlock(originalParentKey, blocks, function (block) { + var parentChildrenList = block.getChildKeys(); + return block.merge({ + children: parentChildrenList['delete'](parentChildrenList.indexOf(originalBlockKey)) + }); + }); + + // update old prev + transformBlock(originalPrevSiblingKey, blocks, function (block) { + return block.merge({ + nextSibling: originalNextSiblingKey + }); + }); + + // update old next + transformBlock(originalNextSiblingKey, blocks, function (block) { + return block.merge({ + prevSibling: originalPrevSiblingKey + }); + }); + + // update new next + transformBlock(newNextSiblingKey, blocks, function (block) { + return block.merge({ + prevSibling: originalBlockKey + }); + }); + + // update new prev + transformBlock(newPrevSiblingKey, blocks, function (block) { + return block.merge({ + nextSibling: originalBlockKey + }); + }); + + // update new parent + transformBlock(newParentKey, blocks, function (block) { + var newParentChildrenList = block.getChildKeys(); + var targetBlockIndex = newParentChildrenList.indexOf(originalTargetKey); + + var insertionIndex = isInsertedAfterTarget ? targetBlockIndex + 1 : targetBlockIndex !== 0 ? targetBlockIndex - 1 : 0; + + var newChildrenArray = newParentChildrenList.toArray(); + newChildrenArray.splice(insertionIndex, 0, originalBlockKey); + + return block.merge({ + children: List(newChildrenArray) + }); + }); + + // update block + transformBlock(originalBlockKey, blocks, function (block) { + return block.merge({ + nextSibling: newNextSiblingKey, + prevSibling: newPrevSiblingKey, + parent: newParentKey + }); + }); + }); +}; + +var moveBlockInContentState = function moveBlockInContentState(contentState, blockToBeMoved, targetBlock, insertionMode) { + !(insertionMode !== 'replace') ? false ? undefined : invariant(false) : void 0; + + var targetKey = targetBlock.getKey(); + var blockKey = blockToBeMoved.getKey(); + + !(blockKey !== targetKey) ? false ? undefined : invariant(false) : void 0; + + var blockMap = contentState.getBlockMap(); + var isExperimentalTreeBlock = blockToBeMoved instanceof ContentBlockNode; + + var blocksToBeMoved = [blockToBeMoved]; + var blockMapWithoutBlocksToBeMoved = blockMap['delete'](blockKey); + + if (isExperimentalTreeBlock) { + blocksToBeMoved = []; + blockMapWithoutBlocksToBeMoved = blockMap.withMutations(function (blocks) { + var nextSiblingKey = blockToBeMoved.getNextSiblingKey(); + var nextDelimiterBlockKey = getNextDelimiterBlockKey(blockToBeMoved, blocks); + + blocks.toSeq().skipUntil(function (block) { + return block.getKey() === blockKey; + }).takeWhile(function (block) { + var key = block.getKey(); + var isBlockToBeMoved = key === blockKey; + var hasNextSiblingAndIsNotNextSibling = nextSiblingKey && key !== nextSiblingKey; + var doesNotHaveNextSiblingAndIsNotDelimiter = !nextSiblingKey && block.getParentKey() && (!nextDelimiterBlockKey || key !== nextDelimiterBlockKey); + + return !!(isBlockToBeMoved || hasNextSiblingAndIsNotNextSibling || doesNotHaveNextSiblingAndIsNotDelimiter); + }).forEach(function (block) { + blocksToBeMoved.push(block); + blocks['delete'](block.getKey()); + }); + }); + } + + var blocksBefore = blockMapWithoutBlocksToBeMoved.toSeq().takeUntil(function (v) { + return v === targetBlock; + }); + + var blocksAfter = blockMapWithoutBlocksToBeMoved.toSeq().skipUntil(function (v) { + return v === targetBlock; + }).skip(1); + + var slicedBlocks = blocksToBeMoved.map(function (block) { + return [block.getKey(), block]; + }); + + var newBlocks = OrderedMap(); + + if (insertionMode === 'before') { + var blockBefore = contentState.getBlockBefore(targetKey); + + !(!blockBefore || blockBefore.getKey() !== blockToBeMoved.getKey()) ? false ? undefined : invariant(false) : void 0; + + newBlocks = blocksBefore.concat([].concat(slicedBlocks, [[targetKey, targetBlock]]), blocksAfter).toOrderedMap(); + } else if (insertionMode === 'after') { + var blockAfter = contentState.getBlockAfter(targetKey); + + !(!blockAfter || blockAfter.getKey() !== blockKey) ? false ? undefined : invariant(false) : void 0; + + newBlocks = blocksBefore.concat([[targetKey, targetBlock]].concat(slicedBlocks), blocksAfter).toOrderedMap(); + } + + return contentState.merge({ + blockMap: updateBlockMapLinks(newBlocks, blockToBeMoved, targetBlock, insertionMode, isExperimentalTreeBlock), + selectionBefore: contentState.getSelectionAfter(), + selectionAfter: contentState.getSelectionAfter().merge({ + anchorKey: blockKey, + focusKey: blockKey + }) + }); +}; + +module.exports = moveBlockInContentState; + +/***/ }), + +/***/ 2099: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CompositeDraftDecorator + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Immutable = __webpack_require__(35); + +var List = Immutable.List; + + +var DELIMITER = '.'; + +/** + * A CompositeDraftDecorator traverses through a list of DraftDecorator + * instances to identify sections of a ContentBlock that should be rendered + * in a "decorated" manner. For example, hashtags, mentions, and links may + * be intended to stand out visually, be rendered as anchors, etc. + * + * The list of decorators supplied to the constructor will be used in the + * order they are provided. This allows the caller to specify a priority for + * string matching, in case of match collisions among decorators. + * + * For instance, I may have a link with a `#` in its text. Though this section + * of text may match our hashtag decorator, it should not be treated as a + * hashtag. I should therefore list my link DraftDecorator + * before my hashtag DraftDecorator when constructing this composite + * decorator instance. + * + * Thus, when a collision like this is encountered, the earlier match is + * preserved and the new match is discarded. + */ + +var CompositeDraftDecorator = function () { + function CompositeDraftDecorator(decorators) { + _classCallCheck(this, CompositeDraftDecorator); + + // Copy the decorator array, since we use this array order to determine + // precedence of decoration matching. If the array is mutated externally, + // we don't want to be affected here. + this._decorators = decorators.slice(); + } + + CompositeDraftDecorator.prototype.getDecorations = function getDecorations(block, contentState) { + var decorations = Array(block.getText().length).fill(null); + + this._decorators.forEach(function ( /*object*/decorator, /*number*/ii) { + var counter = 0; + var strategy = decorator.strategy; + var callback = function callback( /*number*/start, /*number*/end) { + // Find out if any of our matching range is already occupied + // by another decorator. If so, discard the match. Otherwise, store + // the component key for rendering. + if (canOccupySlice(decorations, start, end)) { + occupySlice(decorations, start, end, ii + DELIMITER + counter); + counter++; + } + }; + strategy(block, callback, contentState); + }); + + return List(decorations); + }; + + CompositeDraftDecorator.prototype.getComponentForKey = function getComponentForKey(key) { + var componentKey = parseInt(key.split(DELIMITER)[0], 10); + return this._decorators[componentKey].component; + }; + + CompositeDraftDecorator.prototype.getPropsForKey = function getPropsForKey(key) { + var componentKey = parseInt(key.split(DELIMITER)[0], 10); + return this._decorators[componentKey].props; + }; + + return CompositeDraftDecorator; +}(); + +/** + * Determine whether we can occupy the specified slice of the decorations + * array. + */ + + +function canOccupySlice(decorations, start, end) { + for (var ii = start; ii < end; ii++) { + if (decorations[ii] != null) { + return false; + } + } + return true; +} + +/** + * Splice the specified component into our decoration array at the desired + * range. + */ +function occupySlice(targetArr, start, end, componentKey) { + for (var ii = start; ii < end; ii++) { + targetArr[ii] = componentKey; + } +} + +module.exports = CompositeDraftDecorator; + +/***/ }), + +/***/ 2100: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditor.react + * @format + * + * @preventMunge + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var DefaultDraftBlockRenderMap = __webpack_require__(1944); +var DefaultDraftInlineStyle = __webpack_require__(1979); +var DraftEditorCompositionHandler = __webpack_require__(2101); +var DraftEditorContents = __webpack_require__(2102); +var DraftEditorDragHandler = __webpack_require__(2124); +var DraftEditorEditHandler = __webpack_require__(2127); +var DraftEditorPlaceholder = __webpack_require__(2159); +var EditorState = __webpack_require__(1900); +var React = __webpack_require__(1); +var ReactDOM = __webpack_require__(32); +var Scroll = __webpack_require__(1983); +var Style = __webpack_require__(1948); +var UserAgent = __webpack_require__(1905); + +var cx = __webpack_require__(1914); +var emptyFunction = __webpack_require__(1940); +var generateRandomKey = __webpack_require__(1907); +var getDefaultKeyBinding = __webpack_require__(1996); +var getScrollPosition = __webpack_require__(1949); +var invariant = __webpack_require__(641); +var nullthrows = __webpack_require__(1904); + +var isIE = UserAgent.isBrowser('IE'); + +// IE does not support the `input` event on contentEditable, so we can't +// observe spellcheck behavior. +var allowSpellCheck = !isIE; + +// Define a set of handler objects to correspond to each possible `mode` +// of editor behavior. +var handlerMap = { + edit: DraftEditorEditHandler, + composite: DraftEditorCompositionHandler, + drag: DraftEditorDragHandler, + cut: null, + render: null +}; + +/** + * `DraftEditor` is the root editor component. It composes a `contentEditable` + * div, and provides a wide variety of useful function props for managing the + * state of the editor. See `DraftEditorProps` for details. + */ +var DraftEditor = function (_React$Component) { + _inherits(DraftEditor, _React$Component); + + function DraftEditor(props) { + _classCallCheck(this, DraftEditor); + + var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); + + _this.focus = function (scrollPosition) { + var editorState = _this.props.editorState; + + var alreadyHasFocus = editorState.getSelection().getHasFocus(); + var editorNode = ReactDOM.findDOMNode(_this.editor); + + if (!editorNode) { + // once in a while people call 'focus' in a setTimeout, and the node has + // been deleted, so it can be null in that case. + return; + } + + var scrollParent = Style.getScrollParent(editorNode); + + var _ref = scrollPosition || getScrollPosition(scrollParent), + x = _ref.x, + y = _ref.y; + + !(editorNode instanceof HTMLElement) ? false ? undefined : invariant(false) : void 0; + editorNode.focus(); + + // Restore scroll position + if (scrollParent === window) { + window.scrollTo(x, y); + } else { + Scroll.setTop(scrollParent, y); + } + + // On Chrome and Safari, calling focus on contenteditable focuses the + // cursor at the first character. This is something you don't expect when + // you're clicking on an input element but not directly on a character. + // Put the cursor back where it was before the blur. + if (!alreadyHasFocus) { + _this.update(EditorState.forceSelection(editorState, editorState.getSelection())); + } + }; + + _this.blur = function () { + var editorNode = ReactDOM.findDOMNode(_this.editor); + !(editorNode instanceof HTMLElement) ? false ? undefined : invariant(false) : void 0; + editorNode.blur(); + }; + + _this.setMode = function (mode) { + _this._handler = handlerMap[mode]; + }; + + _this.exitCurrentMode = function () { + _this.setMode('edit'); + }; + + _this.restoreEditorDOM = function (scrollPosition) { + _this.setState({ contentsKey: _this.state.contentsKey + 1 }, function () { + _this.focus(scrollPosition); + }); + }; + + _this.setClipboard = function (clipboard) { + _this._clipboard = clipboard; + }; + + _this.getClipboard = function () { + return _this._clipboard; + }; + + _this.update = function (editorState) { + _this._latestEditorState = editorState; + _this.props.onChange(editorState); + }; + + _this.onDragEnter = function () { + _this._dragCount++; + }; + + _this.onDragLeave = function () { + _this._dragCount--; + if (_this._dragCount === 0) { + _this.exitCurrentMode(); + } + }; + + _this._blockSelectEvents = false; + _this._clipboard = null; + _this._handler = null; + _this._dragCount = 0; + _this._editorKey = props.editorKey || generateRandomKey(); + _this._placeholderAccessibilityID = 'placeholder-' + _this._editorKey; + _this._latestEditorState = props.editorState; + _this._latestCommittedEditorState = props.editorState; + + _this._onBeforeInput = _this._buildHandler('onBeforeInput'); + _this._onBlur = _this._buildHandler('onBlur'); + _this._onCharacterData = _this._buildHandler('onCharacterData'); + _this._onCompositionEnd = _this._buildHandler('onCompositionEnd'); + _this._onCompositionStart = _this._buildHandler('onCompositionStart'); + _this._onCopy = _this._buildHandler('onCopy'); + _this._onCut = _this._buildHandler('onCut'); + _this._onDragEnd = _this._buildHandler('onDragEnd'); + _this._onDragOver = _this._buildHandler('onDragOver'); + _this._onDragStart = _this._buildHandler('onDragStart'); + _this._onDrop = _this._buildHandler('onDrop'); + _this._onInput = _this._buildHandler('onInput'); + _this._onFocus = _this._buildHandler('onFocus'); + _this._onKeyDown = _this._buildHandler('onKeyDown'); + _this._onKeyPress = _this._buildHandler('onKeyPress'); + _this._onKeyUp = _this._buildHandler('onKeyUp'); + _this._onMouseDown = _this._buildHandler('onMouseDown'); + _this._onMouseUp = _this._buildHandler('onMouseUp'); + _this._onPaste = _this._buildHandler('onPaste'); + _this._onSelect = _this._buildHandler('onSelect'); + + _this.getEditorKey = function () { + return _this._editorKey; + }; + + // See `restoreEditorDOM()`. + _this.state = { contentsKey: 0 }; + return _this; + } + + /** + * Build a method that will pass the event to the specified handler method. + * This allows us to look up the correct handler function for the current + * editor mode, if any has been specified. + */ + + + /** + * Define proxies that can route events to the current handler. + */ + + + DraftEditor.prototype._buildHandler = function _buildHandler(eventName) { + var _this2 = this; + + return function (e) { + if (!_this2.props.readOnly) { + var method = _this2._handler && _this2._handler[eventName]; + method && method(_this2, e); + } + }; + }; + + DraftEditor.prototype._showPlaceholder = function _showPlaceholder() { + return !!this.props.placeholder && !this.props.editorState.isInCompositionMode() && !this.props.editorState.getCurrentContent().hasText(); + }; + + DraftEditor.prototype._renderPlaceholder = function _renderPlaceholder() { + if (this._showPlaceholder()) { + var placeHolderProps = { + text: nullthrows(this.props.placeholder), + editorState: this.props.editorState, + textAlignment: this.props.textAlignment, + accessibilityID: this._placeholderAccessibilityID + }; + + return React.createElement(DraftEditorPlaceholder, placeHolderProps); + } + return null; + }; + + DraftEditor.prototype.render = function render() { + var _this3 = this; + + var _props = this.props, + blockRenderMap = _props.blockRenderMap, + blockRendererFn = _props.blockRendererFn, + blockStyleFn = _props.blockStyleFn, + customStyleFn = _props.customStyleFn, + customStyleMap = _props.customStyleMap, + editorState = _props.editorState, + readOnly = _props.readOnly, + textAlignment = _props.textAlignment, + textDirectionality = _props.textDirectionality; + + + var rootClass = cx({ + 'DraftEditor/root': true, + 'DraftEditor/alignLeft': textAlignment === 'left', + 'DraftEditor/alignRight': textAlignment === 'right', + 'DraftEditor/alignCenter': textAlignment === 'center' + }); + + var contentStyle = { + outline: 'none', + // fix parent-draggable Safari bug. #1326 + userSelect: 'text', + WebkitUserSelect: 'text', + whiteSpace: 'pre-wrap', + wordWrap: 'break-word' + }; + + // The aria-expanded and aria-haspopup properties should only be rendered + // for a combobox. + var ariaRole = this.props.role || 'textbox'; + var ariaExpanded = ariaRole === 'combobox' ? !!this.props.ariaExpanded : null; + + var editorContentsProps = { + blockRenderMap: blockRenderMap, + blockRendererFn: blockRendererFn, + blockStyleFn: blockStyleFn, + customStyleMap: _extends({}, DefaultDraftInlineStyle, customStyleMap), + customStyleFn: customStyleFn, + editorKey: this._editorKey, + editorState: editorState, + key: 'contents' + this.state.contentsKey, + textDirectionality: textDirectionality + }; + + return React.createElement( + 'div', + { className: rootClass }, + this._renderPlaceholder(), + React.createElement( + 'div', + { + className: cx('DraftEditor/editorContainer'), + ref: function ref(_ref3) { + return _this3.editorContainer = _ref3; + } }, + React.createElement( + 'div', + { + 'aria-activedescendant': readOnly ? null : this.props.ariaActiveDescendantID, + 'aria-autocomplete': readOnly ? null : this.props.ariaAutoComplete, + 'aria-controls': readOnly ? null : this.props.ariaControls, + 'aria-describedby': this.props.ariaDescribedBy || this._placeholderAccessibilityID, + 'aria-expanded': readOnly ? null : ariaExpanded, + 'aria-label': this.props.ariaLabel, + 'aria-labelledby': this.props.ariaLabelledBy, + 'aria-multiline': this.props.ariaMultiline, + autoCapitalize: this.props.autoCapitalize, + autoComplete: this.props.autoComplete, + autoCorrect: this.props.autoCorrect, + className: cx({ + // Chrome's built-in translation feature mutates the DOM in ways + // that Draft doesn't expect (ex: adding tags inside + // DraftEditorLeaf spans) and causes problems. We add notranslate + // here which makes its autotranslation skip over this subtree. + notranslate: !readOnly, + 'public/DraftEditor/content': true + }), + contentEditable: !readOnly, + 'data-testid': this.props.webDriverTestID, + onBeforeInput: this._onBeforeInput, + onBlur: this._onBlur, + onCompositionEnd: this._onCompositionEnd, + onCompositionStart: this._onCompositionStart, + onCopy: this._onCopy, + onCut: this._onCut, + onDragEnd: this._onDragEnd, + onDragEnter: this.onDragEnter, + onDragLeave: this.onDragLeave, + onDragOver: this._onDragOver, + onDragStart: this._onDragStart, + onDrop: this._onDrop, + onFocus: this._onFocus, + onInput: this._onInput, + onKeyDown: this._onKeyDown, + onKeyPress: this._onKeyPress, + onKeyUp: this._onKeyUp, + onMouseUp: this._onMouseUp, + onPaste: this._onPaste, + onSelect: this._onSelect, + ref: function ref(_ref2) { + return _this3.editor = _ref2; + }, + role: readOnly ? null : ariaRole, + spellCheck: allowSpellCheck && this.props.spellCheck, + style: contentStyle, + suppressContentEditableWarning: true, + tabIndex: this.props.tabIndex }, + React.createElement(DraftEditorContents, editorContentsProps) + ) + ) + ); + }; + + DraftEditor.prototype.componentDidMount = function componentDidMount() { + this.setMode('edit'); + + /** + * IE has a hardcoded "feature" that attempts to convert link text into + * anchors in contentEditable DOM. This breaks the editor's expectations of + * the DOM, and control is lost. Disable it to make IE behave. + * See: http://blogs.msdn.com/b/ieinternals/archive/2010/09/15/ + * ie9-beta-minor-change-list.aspx + */ + if (isIE) { + document.execCommand('AutoUrlDetect', false, false); + } + }; + + /** + * Prevent selection events from affecting the current editor state. This + * is mostly intended to defend against IE, which fires off `selectionchange` + * events regardless of whether the selection is set via the browser or + * programmatically. We only care about selection events that occur because + * of browser interaction, not re-renders and forced selections. + */ + + + DraftEditor.prototype.componentWillUpdate = function componentWillUpdate(nextProps) { + this._blockSelectEvents = true; + this._latestEditorState = nextProps.editorState; + }; + + DraftEditor.prototype.componentDidUpdate = function componentDidUpdate() { + this._blockSelectEvents = false; + this._latestCommittedEditorState = this.props.editorState; + }; + + /** + * Used via `this.focus()`. + * + * Force focus back onto the editor node. + * + * We attempt to preserve scroll position when focusing. You can also pass + * a specified scroll position (for cases like `cut` behavior where it should + * be restored to a known position). + */ + + + /** + * Used via `this.setMode(...)`. + * + * Set the behavior mode for the editor component. This switches the current + * handler module to ensure that DOM events are managed appropriately for + * the active mode. + */ + + + /** + * Used via `this.restoreEditorDOM()`. + * + * Force a complete re-render of the DraftEditorContents based on the current + * EditorState. This is useful when we know we are going to lose control of + * the DOM state (cut command, IME) and we want to make sure that + * reconciliation occurs on a version of the DOM that is synchronized with + * our EditorState. + */ + + + /** + * Used via `this.setClipboard(...)`. + * + * Set the clipboard state for a cut/copy event. + */ + + + /** + * Used via `this.getClipboard()`. + * + * Retrieve the clipboard state for a cut/copy event. + */ + + + /** + * Used via `this.update(...)`. + * + * Propagate a new `EditorState` object to higher-level components. This is + * the method by which event handlers inform the `DraftEditor` component of + * state changes. A component that composes a `DraftEditor` **must** provide + * an `onChange` prop to receive state updates passed along from this + * function. + */ + + + /** + * Used in conjunction with `onDragLeave()`, by counting the number of times + * a dragged element enters and leaves the editor (or any of its children), + * to determine when the dragged element absolutely leaves the editor. + */ + + + /** + * See `onDragEnter()`. + */ + + + return DraftEditor; +}(React.Component); + +DraftEditor.defaultProps = { + blockRenderMap: DefaultDraftBlockRenderMap, + blockRendererFn: emptyFunction.thatReturnsNull, + blockStyleFn: emptyFunction.thatReturns(''), + keyBindingFn: getDefaultKeyBinding, + readOnly: false, + spellCheck: false, + stripPastedStyles: false +}; + + +module.exports = DraftEditor; + +/***/ }), + +/***/ 2101: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorCompositionHandler + * @format + * + */ + + + +var DraftFeatureFlags = __webpack_require__(1909); +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); +var Keys = __webpack_require__(1945); + +var getEntityKeyForSelection = __webpack_require__(1946); +var isEventHandled = __webpack_require__(1918); +var isSelectionAtLeafStart = __webpack_require__(1980); + +/** + * Millisecond delay to allow `compositionstart` to fire again upon + * `compositionend`. + * + * This is used for Korean input to ensure that typing can continue without + * the editor trying to render too quickly. More specifically, Safari 7.1+ + * triggers `compositionstart` a little slower than Chrome/FF, which + * leads to composed characters being resolved and re-render occurring + * sooner than we want. + */ +var RESOLVE_DELAY = 20; + +/** + * A handful of variables used to track the current composition and its + * resolution status. These exist at the module level because it is not + * possible to have compositions occurring in multiple editors simultaneously, + * and it simplifies state management with respect to the DraftEditor component. + */ +var resolved = false; +var stillComposing = false; +var textInputData = ''; + +var DraftEditorCompositionHandler = { + onBeforeInput: function onBeforeInput(editor, e) { + textInputData = (textInputData || '') + e.data; + }, + + /** + * A `compositionstart` event has fired while we're still in composition + * mode. Continue the current composition session to prevent a re-render. + */ + onCompositionStart: function onCompositionStart(editor) { + stillComposing = true; + }, + + /** + * Attempt to end the current composition session. + * + * Defer handling because browser will still insert the chars into active + * element after `compositionend`. If a `compositionstart` event fires + * before `resolveComposition` executes, our composition session will + * continue. + * + * The `resolved` flag is useful because certain IME interfaces fire the + * `compositionend` event multiple times, thus queueing up multiple attempts + * at handling the composition. Since handling the same composition event + * twice could break the DOM, we only use the first event. Example: Arabic + * Google Input Tools on Windows 8.1 fires `compositionend` three times. + */ + onCompositionEnd: function onCompositionEnd(editor) { + resolved = false; + stillComposing = false; + setTimeout(function () { + if (!resolved) { + DraftEditorCompositionHandler.resolveComposition(editor); + } + }, RESOLVE_DELAY); + }, + + /** + * In Safari, keydown events may fire when committing compositions. If + * the arrow keys are used to commit, prevent default so that the cursor + * doesn't move, otherwise it will jump back noticeably on re-render. + */ + onKeyDown: function onKeyDown(editor, e) { + if (!stillComposing) { + // If a keydown event is received after compositionend but before the + // 20ms timer expires (ex: type option-E then backspace, or type A then + // backspace in 2-Set Korean), we should immediately resolve the + // composition and reinterpret the key press in edit mode. + DraftEditorCompositionHandler.resolveComposition(editor); + editor._onKeyDown(e); + return; + } + if (e.which === Keys.RIGHT || e.which === Keys.LEFT) { + e.preventDefault(); + } + }, + + /** + * Keypress events may fire when committing compositions. In Firefox, + * pressing RETURN commits the composition and inserts extra newline + * characters that we do not want. `preventDefault` allows the composition + * to be committed while preventing the extra characters. + */ + onKeyPress: function onKeyPress(editor, e) { + if (e.which === Keys.RETURN) { + e.preventDefault(); + } + }, + + /** + * Attempt to insert composed characters into the document. + * + * If we are still in a composition session, do nothing. Otherwise, insert + * the characters into the document and terminate the composition session. + * + * If no characters were composed -- for instance, the user + * deleted all composed characters and committed nothing new -- + * force a re-render. We also re-render when the composition occurs + * at the beginning of a leaf, to ensure that if the browser has + * created a new text node for the composition, we will discard it. + * + * Resetting innerHTML will move focus to the beginning of the editor, + * so we update to force it back to the correct place. + */ + resolveComposition: function resolveComposition(editor) { + if (stillComposing) { + return; + } + + resolved = true; + var composedChars = textInputData; + textInputData = ''; + + var editorState = EditorState.set(editor._latestEditorState, { + inCompositionMode: false + }); + + var currentStyle = editorState.getCurrentInlineStyle(); + var entityKey = getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()); + + var mustReset = !composedChars || isSelectionAtLeafStart(editorState) || currentStyle.size > 0 || entityKey !== null; + + if (mustReset) { + editor.restoreEditorDOM(); + } + + editor.exitCurrentMode(); + + if (composedChars) { + if (DraftFeatureFlags.draft_handlebeforeinput_composed_text && editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(composedChars, editorState))) { + return; + } + // If characters have been composed, re-rendering with the update + // is sufficient to reset the editor. + var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), composedChars, currentStyle, entityKey); + editor.update(EditorState.push(editorState, contentState, 'insert-characters')); + return; + } + + if (mustReset) { + editor.update(EditorState.set(editorState, { + nativelyRenderedContent: null, + forceSelection: true + })); + } + } +}; + +module.exports = DraftEditorCompositionHandler; + +/***/ }), + +/***/ 2102: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorContents.react + * @format + * + */ + + + +var DraftEditorContents = __webpack_require__(2103); + +module.exports = DraftEditorContents; + +/***/ }), + +/***/ 2103: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorContents-core.react + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var DraftEditorBlock = __webpack_require__(1981); +var DraftOffsetKey = __webpack_require__(1927); +var EditorState = __webpack_require__(1900); +var React = __webpack_require__(1); + +var cx = __webpack_require__(1914); +var joinClasses = __webpack_require__(2123); +var nullthrows = __webpack_require__(1904); + +/** + * Provide default styling for list items. This way, lists will be styled with + * proper counters and indentation even if the caller does not specify + * their own styling at all. If more than five levels of nesting are needed, + * the necessary CSS classes can be provided via `blockStyleFn` configuration. + */ +var getListItemClasses = function getListItemClasses(type, depth, shouldResetCount, direction) { + return cx({ + 'public/DraftStyleDefault/unorderedListItem': type === 'unordered-list-item', + 'public/DraftStyleDefault/orderedListItem': type === 'ordered-list-item', + 'public/DraftStyleDefault/reset': shouldResetCount, + 'public/DraftStyleDefault/depth0': depth === 0, + 'public/DraftStyleDefault/depth1': depth === 1, + 'public/DraftStyleDefault/depth2': depth === 2, + 'public/DraftStyleDefault/depth3': depth === 3, + 'public/DraftStyleDefault/depth4': depth === 4, + 'public/DraftStyleDefault/listLTR': direction === 'LTR', + 'public/DraftStyleDefault/listRTL': direction === 'RTL' + }); +}; + +/** + * `DraftEditorContents` is the container component for all block components + * rendered for a `DraftEditor`. It is optimized to aggressively avoid + * re-rendering blocks whenever possible. + * + * This component is separate from `DraftEditor` because certain props + * (for instance, ARIA props) must be allowed to update without affecting + * the contents of the editor. + */ + +var DraftEditorContents = function (_React$Component) { + _inherits(DraftEditorContents, _React$Component); + + function DraftEditorContents() { + _classCallCheck(this, DraftEditorContents); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + DraftEditorContents.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + var prevEditorState = this.props.editorState; + var nextEditorState = nextProps.editorState; + + var prevDirectionMap = prevEditorState.getDirectionMap(); + var nextDirectionMap = nextEditorState.getDirectionMap(); + + // Text direction has changed for one or more blocks. We must re-render. + if (prevDirectionMap !== nextDirectionMap) { + return true; + } + + var didHaveFocus = prevEditorState.getSelection().getHasFocus(); + var nowHasFocus = nextEditorState.getSelection().getHasFocus(); + + if (didHaveFocus !== nowHasFocus) { + return true; + } + + var nextNativeContent = nextEditorState.getNativelyRenderedContent(); + + var wasComposing = prevEditorState.isInCompositionMode(); + var nowComposing = nextEditorState.isInCompositionMode(); + + // If the state is unchanged or we're currently rendering a natively + // rendered state, there's nothing new to be done. + if (prevEditorState === nextEditorState || nextNativeContent !== null && nextEditorState.getCurrentContent() === nextNativeContent || wasComposing && nowComposing) { + return false; + } + + var prevContent = prevEditorState.getCurrentContent(); + var nextContent = nextEditorState.getCurrentContent(); + var prevDecorator = prevEditorState.getDecorator(); + var nextDecorator = nextEditorState.getDecorator(); + return wasComposing !== nowComposing || prevContent !== nextContent || prevDecorator !== nextDecorator || nextEditorState.mustForceSelection(); + }; + + DraftEditorContents.prototype.render = function render() { + var _props = this.props, + blockRenderMap = _props.blockRenderMap, + blockRendererFn = _props.blockRendererFn, + blockStyleFn = _props.blockStyleFn, + customStyleMap = _props.customStyleMap, + customStyleFn = _props.customStyleFn, + editorState = _props.editorState, + editorKey = _props.editorKey, + textDirectionality = _props.textDirectionality; + + + var content = editorState.getCurrentContent(); + var selection = editorState.getSelection(); + var forceSelection = editorState.mustForceSelection(); + var decorator = editorState.getDecorator(); + var directionMap = nullthrows(editorState.getDirectionMap()); + + var blocksAsArray = content.getBlocksAsArray(); + var processedBlocks = []; + + var currentDepth = null; + var lastWrapperTemplate = null; + + for (var ii = 0; ii < blocksAsArray.length; ii++) { + var _block = blocksAsArray[ii]; + var key = _block.getKey(); + var blockType = _block.getType(); + + var customRenderer = blockRendererFn(_block); + var CustomComponent = void 0, + customProps = void 0, + customEditable = void 0; + if (customRenderer) { + CustomComponent = customRenderer.component; + customProps = customRenderer.props; + customEditable = customRenderer.editable; + } + + var direction = textDirectionality ? textDirectionality : directionMap.get(key); + var offsetKey = DraftOffsetKey.encode(key, 0, 0); + var componentProps = { + contentState: content, + block: _block, + blockProps: customProps, + blockStyleFn: blockStyleFn, + customStyleMap: customStyleMap, + customStyleFn: customStyleFn, + decorator: decorator, + direction: direction, + forceSelection: forceSelection, + key: key, + offsetKey: offsetKey, + selection: selection, + tree: editorState.getBlockTree(key) + }; + + var configForType = blockRenderMap.get(blockType) || blockRenderMap.get('unstyled'); + var wrapperTemplate = configForType.wrapper; + + var Element = configForType.element || blockRenderMap.get('unstyled').element; + + var depth = _block.getDepth(); + var className = ''; + if (blockStyleFn) { + className = blockStyleFn(_block); + } + + // List items are special snowflakes, since we handle nesting and + // counters manually. + if (Element === 'li') { + var shouldResetCount = lastWrapperTemplate !== wrapperTemplate || currentDepth === null || depth > currentDepth; + className = joinClasses(className, getListItemClasses(blockType, depth, shouldResetCount, direction)); + } + + var Component = CustomComponent || DraftEditorBlock; + var childProps = { + className: className, + 'data-block': true, + 'data-editor': editorKey, + 'data-offset-key': offsetKey, + key: key + }; + if (customEditable !== undefined) { + childProps = _extends({}, childProps, { + contentEditable: customEditable, + suppressContentEditableWarning: true + }); + } + + var child = React.createElement(Element, childProps, React.createElement(Component, componentProps)); + + processedBlocks.push({ + block: child, + wrapperTemplate: wrapperTemplate, + key: key, + offsetKey: offsetKey + }); + + if (wrapperTemplate) { + currentDepth = _block.getDepth(); + } else { + currentDepth = null; + } + lastWrapperTemplate = wrapperTemplate; + } + + // Group contiguous runs of blocks that have the same wrapperTemplate + var outputBlocks = []; + for (var _ii = 0; _ii < processedBlocks.length;) { + var info = processedBlocks[_ii]; + if (info.wrapperTemplate) { + var blocks = []; + do { + blocks.push(processedBlocks[_ii].block); + _ii++; + } while (_ii < processedBlocks.length && processedBlocks[_ii].wrapperTemplate === info.wrapperTemplate); + var wrapperElement = React.cloneElement(info.wrapperTemplate, { + key: info.key + '-wrap', + 'data-offset-key': info.offsetKey + }, blocks); + outputBlocks.push(wrapperElement); + } else { + outputBlocks.push(info.block); + _ii++; + } + } + + return React.createElement( + 'div', + { 'data-contents': 'true' }, + outputBlocks + ); + }; + + return DraftEditorContents; +}(React.Component); + +module.exports = DraftEditorContents; + +/***/ }), + +/***/ 2104: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorLeaf.react + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var DraftEditorTextNode = __webpack_require__(2105); +var React = __webpack_require__(1); +var ReactDOM = __webpack_require__(32); + +var invariant = __webpack_require__(641); +var setDraftEditorSelection = __webpack_require__(2111); + +/** + * All leaf nodes in the editor are spans with single text nodes. Leaf + * elements are styled based on the merging of an optional custom style map + * and a default style map. + * + * `DraftEditorLeaf` also provides a wrapper for calling into the imperative + * DOM Selection API. In this way, top-level components can declaratively + * maintain the selection state. + */ +var DraftEditorLeaf = function (_React$Component) { + _inherits(DraftEditorLeaf, _React$Component); + + function DraftEditorLeaf() { + _classCallCheck(this, DraftEditorLeaf); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + DraftEditorLeaf.prototype._setSelection = function _setSelection() { + var selection = this.props.selection; + + // If selection state is irrelevant to the parent block, no-op. + + if (selection == null || !selection.getHasFocus()) { + return; + } + + var _props = this.props, + block = _props.block, + start = _props.start, + text = _props.text; + + var blockKey = block.getKey(); + var end = start + text.length; + if (!selection.hasEdgeWithin(blockKey, start, end)) { + return; + } + + // Determine the appropriate target node for selection. If the child + // is not a text node, it is a
spacer. In this case, use the + // itself as the selection target. + var node = ReactDOM.findDOMNode(this); + !node ? false ? undefined : invariant(false) : void 0; + var child = node.firstChild; + !child ? false ? undefined : invariant(false) : void 0; + var targetNode = void 0; + + if (child.nodeType === Node.TEXT_NODE) { + targetNode = child; + } else if (child.tagName === 'BR') { + targetNode = node; + } else { + targetNode = child.firstChild; + !targetNode ? false ? undefined : invariant(false) : void 0; + } + + setDraftEditorSelection(selection, targetNode, blockKey, start, end); + }; + /** + * By making individual leaf instances aware of their context within + * the text of the editor, we can set our selection range more + * easily than we could in the non-React world. + * + * Note that this depends on our maintaining tight control over the + * DOM structure of the DraftEditor component. If leaves had multiple + * text nodes, this would be harder. + */ + + DraftEditorLeaf.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + var leafNode = ReactDOM.findDOMNode(this.leaf); + !leafNode ? false ? undefined : invariant(false) : void 0; + return leafNode.textContent !== nextProps.text || nextProps.styleSet !== this.props.styleSet || nextProps.forceSelection; + }; + + DraftEditorLeaf.prototype.componentDidUpdate = function componentDidUpdate() { + this._setSelection(); + }; + + DraftEditorLeaf.prototype.componentDidMount = function componentDidMount() { + this._setSelection(); + }; + + DraftEditorLeaf.prototype.render = function render() { + var _this2 = this; + + var block = this.props.block; + var text = this.props.text; + + // If the leaf is at the end of its block and ends in a soft newline, append + // an extra line feed character. Browsers collapse trailing newline + // characters, which leaves the cursor in the wrong place after a + // shift+enter. The extra character repairs this. + + if (text.endsWith('\n') && this.props.isLast) { + text += '\n'; + } + + var _props2 = this.props, + customStyleMap = _props2.customStyleMap, + customStyleFn = _props2.customStyleFn, + offsetKey = _props2.offsetKey, + styleSet = _props2.styleSet; + + var styleObj = styleSet.reduce(function (map, styleName) { + var mergedStyles = {}; + var style = customStyleMap[styleName]; + + if (style !== undefined && map.textDecoration !== style.textDecoration) { + // .trim() is necessary for IE9/10/11 and Edge + mergedStyles.textDecoration = [map.textDecoration, style.textDecoration].join(' ').trim(); + } + + return _assign(map, style, mergedStyles); + }, {}); + + if (customStyleFn) { + var newStyles = customStyleFn(styleSet, block); + styleObj = _assign(styleObj, newStyles); + } + + return React.createElement( + 'span', + { + 'data-offset-key': offsetKey, + ref: function ref(_ref) { + return _this2.leaf = _ref; + }, + style: styleObj }, + React.createElement( + DraftEditorTextNode, + null, + text + ) + ); + }; + + return DraftEditorLeaf; +}(React.Component); + +module.exports = DraftEditorLeaf; + +/***/ }), + +/***/ 2105: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorTextNode.react + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var React = __webpack_require__(1); +var ReactDOM = __webpack_require__(32); +var UserAgent = __webpack_require__(1905); + +var invariant = __webpack_require__(641); + +// In IE, spans with
tags render as two newlines. By rendering a span +// with only a newline character, we can be sure to render a single line. +var useNewlineChar = UserAgent.isBrowser('IE <= 11'); + +/** + * Check whether the node should be considered a newline. + */ +function isNewline(node) { + return useNewlineChar ? node.textContent === '\n' : node.tagName === 'BR'; +} + +/** + * Placeholder elements for empty text content. + * + * What is this `data-text` attribute, anyway? It turns out that we need to + * put an attribute on the lowest-level text node in order to preserve correct + * spellcheck handling. If the is naked, Chrome and Safari may do + * bizarre things to do the DOM -- split text nodes, create extra spans, etc. + * If the has an attribute, this appears not to happen. + * See http://jsfiddle.net/9khdavod/ for the failure case, and + * http://jsfiddle.net/7pg143f7/ for the fixed case. + */ +var NEWLINE_A = useNewlineChar ? React.createElement( + 'span', + { key: 'A', 'data-text': 'true' }, + '\n' +) : React.createElement('br', { key: 'A', 'data-text': 'true' }); + +var NEWLINE_B = useNewlineChar ? React.createElement( + 'span', + { key: 'B', 'data-text': 'true' }, + '\n' +) : React.createElement('br', { key: 'B', 'data-text': 'true' }); + +/** + * The lowest-level component in a `DraftEditor`, the text node component + * replaces the default React text node implementation. This allows us to + * perform custom handling of newline behavior and avoid re-rendering text + * nodes with DOM state that already matches the expectations of our immutable + * editor state. + */ +var DraftEditorTextNode = function (_React$Component) { + _inherits(DraftEditorTextNode, _React$Component); + + function DraftEditorTextNode(props) { + _classCallCheck(this, DraftEditorTextNode); + + // By flipping this flag, we also keep flipping keys which forces + // React to remount this node every time it rerenders. + var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); + + _this._forceFlag = false; + return _this; + } + + DraftEditorTextNode.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + var node = ReactDOM.findDOMNode(this); + var shouldBeNewline = nextProps.children === ''; + !(node instanceof Element) ? false ? undefined : invariant(false) : void 0; + if (shouldBeNewline) { + return !isNewline(node); + } + return node.textContent !== nextProps.children; + }; + + DraftEditorTextNode.prototype.componentDidMount = function componentDidMount() { + this._forceFlag = !this._forceFlag; + }; + + DraftEditorTextNode.prototype.componentDidUpdate = function componentDidUpdate() { + this._forceFlag = !this._forceFlag; + }; + + DraftEditorTextNode.prototype.render = function render() { + if (this.props.children === '') { + return this._forceFlag ? NEWLINE_A : NEWLINE_B; + } + return React.createElement( + 'span', + { key: this._forceFlag ? 'A' : 'B', 'data-text': 'true' }, + this.props.children + ); + }; + + return DraftEditorTextNode; +}(React.Component); + +module.exports = DraftEditorTextNode; + +/***/ }), + +/***/ 2106: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + */ + +/** + * Usage note: + * This module makes a best effort to export the same data we would internally. + * At Facebook we use a server-generated module that does the parsing and + * exports the data for the client to use. We can't rely on a server-side + * implementation in open source so instead we make use of an open source + * library to do the heavy lifting and then make some adjustments as necessary. + * It's likely there will be some differences. Some we can smooth over. + * Others are going to be harder. + */ + + + +var UAParser = __webpack_require__(2107); + +var UNKNOWN = 'Unknown'; + +var PLATFORM_MAP = { + 'Mac OS': 'Mac OS X' +}; + +/** + * Convert from UAParser platform name to what we expect. + */ +function convertPlatformName(name) { + return PLATFORM_MAP[name] || name; +} + +/** + * Get the version number in parts. This is very naive. We actually get major + * version as a part of UAParser already, which is generally good enough, but + * let's get the minor just in case. + */ +function getBrowserVersion(version) { + if (!version) { + return { + major: '', + minor: '' + }; + } + var parts = version.split('.'); + return { + major: parts[0], + minor: parts[1] + }; +} + +/** + * Get the UA data fom UAParser and then convert it to the format we're + * expecting for our APIS. + */ +var parser = new UAParser(); +var results = parser.getResult(); + +// Do some conversion first. +var browserVersionData = getBrowserVersion(results.browser.version); +var uaData = { + browserArchitecture: results.cpu.architecture || UNKNOWN, + browserFullVersion: results.browser.version || UNKNOWN, + browserMinorVersion: browserVersionData.minor || UNKNOWN, + browserName: results.browser.name || UNKNOWN, + browserVersion: results.browser.major || UNKNOWN, + deviceName: results.device.model || UNKNOWN, + engineName: results.engine.name || UNKNOWN, + engineVersion: results.engine.version || UNKNOWN, + platformArchitecture: results.cpu.architecture || UNKNOWN, + platformName: convertPlatformName(results.os.name) || UNKNOWN, + platformVersion: results.os.version || UNKNOWN, + platformFullVersion: results.os.version || UNKNOWN +}; + +module.exports = uaData; + +/***/ }), + +/***/ 2107: +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/*! + * UAParser.js v0.7.21 + * Lightweight JavaScript-based User-Agent string parser + * https://github.com/faisalman/ua-parser-js + * + * Copyright © 2012-2019 Faisal Salman + * Licensed under MIT License + */ + +(function (window, undefined) { + + 'use strict'; + + ////////////// + // Constants + ///////////// + + + var LIBVERSION = '0.7.21', + EMPTY = '', + UNKNOWN = '?', + FUNC_TYPE = 'function', + UNDEF_TYPE = 'undefined', + OBJ_TYPE = 'object', + STR_TYPE = 'string', + MAJOR = 'major', // deprecated + MODEL = 'model', + NAME = 'name', + TYPE = 'type', + VENDOR = 'vendor', + VERSION = 'version', + ARCHITECTURE= 'architecture', + CONSOLE = 'console', + MOBILE = 'mobile', + TABLET = 'tablet', + SMARTTV = 'smarttv', + WEARABLE = 'wearable', + EMBEDDED = 'embedded'; + + + /////////// + // Helper + ////////// + + + var util = { + extend : function (regexes, extensions) { + var mergedRegexes = {}; + for (var i in regexes) { + if (extensions[i] && extensions[i].length % 2 === 0) { + mergedRegexes[i] = extensions[i].concat(regexes[i]); + } else { + mergedRegexes[i] = regexes[i]; + } + } + return mergedRegexes; + }, + has : function (str1, str2) { + if (typeof str1 === "string") { + return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; + } else { + return false; + } + }, + lowerize : function (str) { + return str.toLowerCase(); + }, + major : function (version) { + return typeof(version) === STR_TYPE ? version.replace(/[^\d\.]/g,'').split(".")[0] : undefined; + }, + trim : function (str) { + return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + } + }; + + + /////////////// + // Map helper + ////////////// + + + var mapper = { + + rgx : function (ua, arrays) { + + var i = 0, j, k, p, q, matches, match; + + // loop through all regexes maps + while (i < arrays.length && !matches) { + + var regex = arrays[i], // even sequence (0,2,4,..) + props = arrays[i + 1]; // odd sequence (1,3,5,..) + j = k = 0; + + // try matching uastring with regexes + while (j < regex.length && !matches) { + + matches = regex[j++].exec(ua); + + if (!!matches) { + for (p = 0; p < props.length; p++) { + match = matches[++k]; + q = props[p]; + // check if given property is actually array + if (typeof q === OBJ_TYPE && q.length > 0) { + if (q.length == 2) { + if (typeof q[1] == FUNC_TYPE) { + // assign modified match + this[q[0]] = q[1].call(this, match); + } else { + // assign given value, ignore regex match + this[q[0]] = q[1]; + } + } else if (q.length == 3) { + // check whether function or regex + if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) { + // call function (usually string mapper) + this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined; + } else { + // sanitize match using given regex + this[q[0]] = match ? match.replace(q[1], q[2]) : undefined; + } + } else if (q.length == 4) { + this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined; + } + } else { + this[q] = match ? match : undefined; + } + } + } + } + i += 2; + } + }, + + str : function (str, map) { + + for (var i in map) { + // check if array + if (typeof map[i] === OBJ_TYPE && map[i].length > 0) { + for (var j = 0; j < map[i].length; j++) { + if (util.has(map[i][j], str)) { + return (i === UNKNOWN) ? undefined : i; + } + } + } else if (util.has(map[i], str)) { + return (i === UNKNOWN) ? undefined : i; + } + } + return str; + } + }; + + + /////////////// + // String map + ////////////// + + + var maps = { + + browser : { + oldsafari : { + version : { + '1.0' : '/8', + '1.2' : '/1', + '1.3' : '/3', + '2.0' : '/412', + '2.0.2' : '/416', + '2.0.3' : '/417', + '2.0.4' : '/419', + '?' : '/' + } + } + }, + + device : { + amazon : { + model : { + 'Fire Phone' : ['SD', 'KF'] + } + }, + sprint : { + model : { + 'Evo Shift 4G' : '7373KT' + }, + vendor : { + 'HTC' : 'APA', + 'Sprint' : 'Sprint' + } + } + }, + + os : { + windows : { + version : { + 'ME' : '4.90', + 'NT 3.11' : 'NT3.51', + 'NT 4.0' : 'NT4.0', + '2000' : 'NT 5.0', + 'XP' : ['NT 5.1', 'NT 5.2'], + 'Vista' : 'NT 6.0', + '7' : 'NT 6.1', + '8' : 'NT 6.2', + '8.1' : 'NT 6.3', + '10' : ['NT 6.4', 'NT 10.0'], + 'RT' : 'ARM' + } + } + } + }; + + + ////////////// + // Regex map + ///////////// + + + var regexes = { + + browser : [[ + + // Presto based + /(opera\smini)\/([\w\.-]+)/i, // Opera Mini + /(opera\s[mobiletab]+).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet + /(opera).+version\/([\w\.]+)/i, // Opera > 9.80 + /(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80 + ], [NAME, VERSION], [ + + /(opios)[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0 + ], [[NAME, 'Opera Mini'], VERSION], [ + + /\s(opr)\/([\w\.]+)/i // Opera Webkit + ], [[NAME, 'Opera'], VERSION], [ + + // Mixed + /(kindle)\/([\w\.]+)/i, // Kindle + /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i, + // Lunascape/Maxthon/Netfront/Jasmine/Blazer + // Trident based + /(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i, + // Avant/IEMobile/SlimBrowser + /(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i, // Baidu Browser + /(?:ms|\()(ie)\s([\w\.]+)/i, // Internet Explorer + + // Webkit/KHTML based + /(rekonq)\/([\w\.]*)/i, // Rekonq + /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i + // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon + ], [NAME, VERSION], [ + + /(konqueror)\/([\w\.]+)/i // Konqueror + ], [[NAME, 'Konqueror'], VERSION], [ + + /(trident).+rv[:\s]([\w\.]+).+like\sgecko/i // IE11 + ], [[NAME, 'IE'], VERSION], [ + + /(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i // Microsoft Edge + ], [[NAME, 'Edge'], VERSION], [ + + /(yabrowser)\/([\w\.]+)/i // Yandex + ], [[NAME, 'Yandex'], VERSION], [ + + /(Avast)\/([\w\.]+)/i // Avast Secure Browser + ], [[NAME, 'Avast Secure Browser'], VERSION], [ + + /(AVG)\/([\w\.]+)/i // AVG Secure Browser + ], [[NAME, 'AVG Secure Browser'], VERSION], [ + + /(puffin)\/([\w\.]+)/i // Puffin + ], [[NAME, 'Puffin'], VERSION], [ + + /(focus)\/([\w\.]+)/i // Firefox Focus + ], [[NAME, 'Firefox Focus'], VERSION], [ + + /(opt)\/([\w\.]+)/i // Opera Touch + ], [[NAME, 'Opera Touch'], VERSION], [ + + /((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i // UCBrowser + ], [[NAME, 'UCBrowser'], VERSION], [ + + /(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon + ], [[NAME, /_/g, ' '], VERSION], [ + + /(windowswechat qbcore)\/([\w\.]+)/i // WeChat Desktop for Windows Built-in Browser + ], [[NAME, 'WeChat(Win) Desktop'], VERSION], [ + + /(micromessenger)\/([\w\.]+)/i // WeChat + ], [[NAME, 'WeChat'], VERSION], [ + + /(brave)\/([\w\.]+)/i // Brave browser + ], [[NAME, 'Brave'], VERSION], [ + + /(qqbrowserlite)\/([\w\.]+)/i // QQBrowserLite + ], [NAME, VERSION], [ + + /(QQ)\/([\d\.]+)/i // QQ, aka ShouQ + ], [NAME, VERSION], [ + + /m?(qqbrowser)[\/\s]?([\w\.]+)/i // QQBrowser + ], [NAME, VERSION], [ + + /(baiduboxapp)[\/\s]?([\w\.]+)/i // Baidu App + ], [NAME, VERSION], [ + + /(2345Explorer)[\/\s]?([\w\.]+)/i // 2345 Browser + ], [NAME, VERSION], [ + + /(MetaSr)[\/\s]?([\w\.]+)/i // SouGouBrowser + ], [NAME], [ + + /(LBBROWSER)/i // LieBao Browser + ], [NAME], [ + + /xiaomi\/miuibrowser\/([\w\.]+)/i // MIUI Browser + ], [VERSION, [NAME, 'MIUI Browser']], [ + + /;fbav\/([\w\.]+);/i // Facebook App for iOS & Android + ], [VERSION, [NAME, 'Facebook']], [ + + /safari\s(line)\/([\w\.]+)/i, // Line App for iOS + /android.+(line)\/([\w\.]+)\/iab/i // Line App for Android + ], [NAME, VERSION], [ + + /headlesschrome(?:\/([\w\.]+)|\s)/i // Chrome Headless + ], [VERSION, [NAME, 'Chrome Headless']], [ + + /\swv\).+(chrome)\/([\w\.]+)/i // Chrome WebView + ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [ + + /((?:oculus|samsung)browser)\/([\w\.]+)/i + ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser + + /android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i // Android Browser + ], [VERSION, [NAME, 'Android Browser']], [ + + /(sailfishbrowser)\/([\w\.]+)/i // Sailfish Browser + ], [[NAME, 'Sailfish Browser'], VERSION], [ + + /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i + // Chrome/OmniWeb/Arora/Tizen/Nokia + ], [NAME, VERSION], [ + + /(dolfin)\/([\w\.]+)/i // Dolphin + ], [[NAME, 'Dolphin'], VERSION], [ + + /(qihu|qhbrowser|qihoobrowser|360browser)/i // 360 + ], [[NAME, '360 Browser']], [ + + /((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS + ], [[NAME, 'Chrome'], VERSION], [ + + /(coast)\/([\w\.]+)/i // Opera Coast + ], [[NAME, 'Opera Coast'], VERSION], [ + + /fxios\/([\w\.-]+)/i // Firefox for iOS + ], [VERSION, [NAME, 'Firefox']], [ + + /version\/([\w\.]+).+?mobile\/\w+\s(safari)/i // Mobile Safari + ], [VERSION, [NAME, 'Mobile Safari']], [ + + /version\/([\w\.]+).+?(mobile\s?safari|safari)/i // Safari & Safari Mobile + ], [VERSION, NAME], [ + + /webkit.+?(gsa)\/([\w\.]+).+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Google Search Appliance on iOS + ], [[NAME, 'GSA'], VERSION], [ + + /webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Safari < 3.0 + ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [ + + /(webkit|khtml)\/([\w\.]+)/i + ], [NAME, VERSION], [ + + // Gecko based + /(navigator|netscape)\/([\w\.-]+)/i // Netscape + ], [[NAME, 'Netscape'], VERSION], [ + /(swiftfox)/i, // Swiftfox + /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i, + // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror + /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i, + + // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix + /(mozilla)\/([\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla + + // Other + /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i, + // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir + /(links)\s\(([\w\.]+)/i, // Links + /(gobrowser)\/?([\w\.]*)/i, // GoBrowser + /(ice\s?browser)\/v?([\w\._]+)/i, // ICE Browser + /(mosaic)[\/\s]([\w\.]+)/i // Mosaic + ], [NAME, VERSION] + ], + + cpu : [[ + + /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64 + ], [[ARCHITECTURE, 'amd64']], [ + + /(ia32(?=;))/i // IA32 (quicktime) + ], [[ARCHITECTURE, util.lowerize]], [ + + /((?:i[346]|x)86)[;\)]/i // IA32 + ], [[ARCHITECTURE, 'ia32']], [ + + // PocketPC mistakenly identified as PowerPC + /windows\s(ce|mobile);\sppc;/i + ], [[ARCHITECTURE, 'arm']], [ + + /((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i // PowerPC + ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [ + + /(sun4\w)[;\)]/i // SPARC + ], [[ARCHITECTURE, 'sparc']], [ + + /((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i + // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC + ], [[ARCHITECTURE, util.lowerize]] + ], + + device : [[ + + /\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i // iPad/PlayBook + ], [MODEL, VENDOR, [TYPE, TABLET]], [ + + /applecoremedia\/[\w\.]+ \((ipad)/ // iPad + ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [ + + /(apple\s{0,1}tv)/i // Apple TV + ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple'], [TYPE, SMARTTV]], [ + + /(archos)\s(gamepad2?)/i, // Archos + /(hp).+(touchpad)/i, // HP TouchPad + /(hp).+(tablet)/i, // HP Tablet + /(kindle)\/([\w\.]+)/i, // Kindle + /\s(nook)[\w\s]+build\/(\w+)/i, // Nook + /(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak + ], [VENDOR, MODEL, [TYPE, TABLET]], [ + + /(kf[A-z]+)\sbuild\/.+silk\//i // Kindle Fire HD + ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ + /(sd|kf)[0349hijorstuw]+\sbuild\/.+silk\//i // Fire Phone + ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [ + /android.+aft([bms])\sbuild/i // Fire TV + ], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [ + + /\((ip[honed|\s\w*]+);.+(apple)/i // iPod/iPhone + ], [MODEL, VENDOR, [TYPE, MOBILE]], [ + /\((ip[honed|\s\w*]+);/i // iPod/iPhone + ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [ + + /(blackberry)[\s-]?(\w+)/i, // BlackBerry + /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i, + // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron + /(hp)\s([\w\s]+\w)/i, // HP iPAQ + /(asus)-?(\w+)/i // Asus + ], [VENDOR, MODEL, [TYPE, MOBILE]], [ + /\(bb10;\s(\w+)/i // BlackBerry 10 + ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [ + // Asus Tablets + /android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i + ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [ + + /(sony)\s(tablet\s[ps])\sbuild\//i, // Sony + /(sony)?(?:sgp.+)\sbuild\//i + ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [ + /android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i + ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [ + + /\s(ouya)\s/i, // Ouya + /(nintendo)\s([wids3u]+)/i // Nintendo + ], [VENDOR, MODEL, [TYPE, CONSOLE]], [ + + /android.+;\s(shield)\sbuild/i // Nvidia + ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ + + /(playstation\s[34portablevi]+)/i // Playstation + ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [ + + /(sprint\s(\w+))/i // Sprint Phones + ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [ + + /(htc)[;_\s-]+([\w\s]+(?=\)|\sbuild)|\w+)/i, // HTC + /(zte)-(\w*)/i, // ZTE + /(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i + // Alcatel/GeeksPhone/Nexian/Panasonic/Sony + ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [ + + /(nexus\s9)/i // HTC Nexus 9 + ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [ + + /d\/huawei([\w\s-]+)[;\)]/i, + /(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i // Huawei + ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [ + + /android.+(bah2?-a?[lw]\d{2})/i // Huawei MediaPad + ], [MODEL, [VENDOR, 'Huawei'], [TYPE, TABLET]], [ + + /(microsoft);\s(lumia[\s\w]+)/i // Microsoft Lumia + ], [VENDOR, MODEL, [TYPE, MOBILE]], [ + + /[\s\(;](xbox(?:\sone)?)[\s\);]/i // Microsoft Xbox + ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [ + /(kin\.[onetw]{3})/i // Microsoft Kin + ], [[MODEL, /\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [ + + // Motorola + /\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i, + /mot[\s-]?(\w*)/i, + /(XT\d{3,4}) build\//i, + /(nexus\s6)/i + ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [ + /android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i + ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [ + + /hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices + ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [ + + /hbbtv.+maple;(\d+)/i + ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [ + + /\(dtv[\);].+(aquos)/i // Sharp + ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ + + /android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i, + /((SM-T\w+))/i + ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung + /smart-tv.+(samsung)/i + ], [VENDOR, [TYPE, SMARTTV], MODEL], [ + /((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i, + /(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i, + /sec-((sgh\w+))/i + ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [ + + /sie-(\w*)/i // Siemens + ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [ + + /(maemo|nokia).*(n900|lumia\s\d+)/i, // Nokia + /(nokia)[\s_-]?([\w-]*)/i + ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [ + + /android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i // Acer + ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [ + + /android.+([vl]k\-?\d{3})\s+build/i // LG Tablet + ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [ + /android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet + ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [ + /(lg) netcast\.tv/i // LG SmartTV + ], [VENDOR, MODEL, [TYPE, SMARTTV]], [ + /(nexus\s[45])/i, // LG + /lg[e;\s\/-]+(\w*)/i, + /android.+lg(\-?[\d\w]+)\s+build/i + ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [ + + /(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i // Lenovo tablets + ], [VENDOR, MODEL, [TYPE, TABLET]], [ + /android.+(ideatab[a-z0-9\-\s]+)/i // Lenovo + ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [ + /(lenovo)[_\s-]?([\w-]+)/i + ], [VENDOR, MODEL, [TYPE, MOBILE]], [ + + /linux;.+((jolla));/i // Jolla + ], [VENDOR, MODEL, [TYPE, MOBILE]], [ + + /((pebble))app\/[\d\.]+\s/i // Pebble + ], [VENDOR, MODEL, [TYPE, WEARABLE]], [ + + /android.+;\s(oppo)\s?([\w\s]+)\sbuild/i // OPPO + ], [VENDOR, MODEL, [TYPE, MOBILE]], [ + + /crkey/i // Google Chromecast + ], [[MODEL, 'Chromecast'], [VENDOR, 'Google'], [TYPE, SMARTTV]], [ + + /android.+;\s(glass)\s\d/i // Google Glass + ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [ + + /android.+;\s(pixel c)[\s)]/i // Google Pixel C + ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [ + + /android.+;\s(pixel( [23])?( xl)?)[\s)]/i // Google Pixel + ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [ + + /android.+;\s(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models + /android.+(hm[\s\-_]*note?[\s_]*(?:\d\w)?)\s+build/i, // Xiaomi Hongmi + /android.+(mi[\s\-_]*(?:a\d|one|one[\s_]plus|note lte)?[\s_]*(?:\d?\w?)[\s_]*(?:plus)?)\s+build/i, + // Xiaomi Mi + /android.+(redmi[\s\-_]*(?:note)?(?:[\s_]*[\w\s]+))\s+build/i // Redmi Phones + ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [ + /android.+(mi[\s\-_]*(?:pad)(?:[\s_]*[\w\s]+))\s+build/i // Mi Pad tablets + ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [ + /android.+;\s(m[1-5]\snote)\sbuild/i // Meizu + ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [ + /(mz)-([\w-]{2,})/i + ], [[VENDOR, 'Meizu'], MODEL, [TYPE, MOBILE]], [ + + /android.+a000(1)\s+build/i, // OnePlus + /android.+oneplus\s(a\d{4})[\s)]/i + ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [ + + /android.+[;\/]\s*(RCT[\d\w]+)\s+build/i // RCA Tablets + ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [ + + /android.+[;\/\s]+(Venue[\d\s]{2,7})\s+build/i // Dell Venue Tablets + ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i // Verizon Tablet + ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [ + + /android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i // Barnes & Noble Tablet + ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [ + + /android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i // Barnes & Noble Tablet + ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [ + + /android.+;\s(k88)\sbuild/i // ZTE K Series Tablet + ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*(gen\d{3})\s+build.*49h/i // Swiss GEN Mobile + ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [ + + /android.+[;\/]\s*(zur\d{3})\s+build/i // Swiss ZUR Tablet + ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i // Zeki Tablets + ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [ + + /(android).+[;\/]\s+([YR]\d{2})\s+build/i, + /android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i // Dragon Touch Tablet + ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [ + + /android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i // Insignia Tablets + ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i // NextBook Tablets + ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i + ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones + + /android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i // LvTel Phones + ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [ + + /android.+;\s(PH-1)\s/i + ], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [ // Essential PH-1 + + /android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i // Envizen Tablets + ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i // Le Pan Tablets + ], [VENDOR, MODEL, [TYPE, TABLET]], [ + + /android.+[;\/]\s*(Trio[\s\-]*.*)\s+build/i // MachSpeed Tablets + ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [ + + /android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i // Trinity Tablets + ], [VENDOR, MODEL, [TYPE, TABLET]], [ + + /android.+[;\/]\s*TU_(1491)\s+build/i // Rotor Tablets + ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [ + + /android.+(KS(.+))\s+build/i // Amazon Kindle Tablets + ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ + + /android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i // Gigaset Tablets + ], [VENDOR, MODEL, [TYPE, TABLET]], [ + + /\s(tablet|tab)[;\/]/i, // Unidentifiable Tablet + /\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile + ], [[TYPE, util.lowerize], VENDOR, MODEL], [ + + /[\s\/\(](smart-?tv)[;\)]/i // SmartTV + ], [[TYPE, SMARTTV]], [ + + /(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device + ], [MODEL, [VENDOR, 'Generic']] + ], + + engine : [[ + + /windows.+\sedge\/([\w\.]+)/i // EdgeHTML + ], [VERSION, [NAME, 'EdgeHTML']], [ + + /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i // Blink + ], [VERSION, [NAME, 'Blink']], [ + + /(presto)\/([\w\.]+)/i, // Presto + /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, + // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna + /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links + /(icab)[\/\s]([23]\.[\d\.]+)/i // iCab + ], [NAME, VERSION], [ + + /rv\:([\w\.]{1,9}).+(gecko)/i // Gecko + ], [VERSION, NAME] + ], + + os : [[ + + // Windows based + /microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes) + ], [NAME, VERSION], [ + /(windows)\snt\s6\.2;\s(arm)/i, // Windows RT + /(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i, // Windows Phone + /(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i + ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ + /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i + ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [ + + // Mobile/Embedded OS + /\((bb)(10);/i // BlackBerry 10 + ], [[NAME, 'BlackBerry'], VERSION], [ + /(blackberry)\w*\/?([\w\.]*)/i, // Blackberry + /(tizen|kaios)[\/\s]([\w\.]+)/i, // Tizen/KaiOS + /(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i + // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki/Sailfish OS + ], [NAME, VERSION], [ + /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i // Symbian + ], [[NAME, 'Symbian'], VERSION], [ + /\((series40);/i // Series 40 + ], [NAME], [ + /mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS + ], [[NAME, 'Firefox OS'], VERSION], [ + + // Console + /(nintendo|playstation)\s([wids34portablevu]+)/i, // Nintendo/Playstation + + // GNU/Linux based + /(mint)[\/\s\(]?(\w*)/i, // Mint + /(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux + /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i, + // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware + // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus + /(hurd|linux)\s?([\w\.]*)/i, // Hurd/Linux + /(gnu)\s?([\w\.]*)/i // GNU + ], [NAME, VERSION], [ + + /(cros)\s[\w]+\s([\w\.]+\w)/i // Chromium OS + ], [[NAME, 'Chromium OS'], VERSION],[ + + // Solaris + /(sunos)\s?([\w\.\d]*)/i // Solaris + ], [[NAME, 'Solaris'], VERSION], [ + + // BSD based + /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly + ], [NAME, VERSION],[ + + /(haiku)\s(\w+)/i // Haiku + ], [NAME, VERSION],[ + + /cfnetwork\/.+darwin/i, + /ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i // iOS + ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ + + /(mac\sos\sx)\s?([\w\s\.]*)/i, + /(macintosh|mac(?=_powerpc)\s)/i // Mac OS + ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [ + + // Other + /((?:open)?solaris)[\/\s-]?([\w\.]*)/i, // Solaris + /(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i, // AIX + /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i, + // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS/Fuchsia + /(unix)\s?([\w\.]*)/i // UNIX + ], [NAME, VERSION] + ] + }; + + + ///////////////// + // Constructor + //////////////// + var UAParser = function (uastring, extensions) { + + if (typeof uastring === 'object') { + extensions = uastring; + uastring = undefined; + } + + if (!(this instanceof UAParser)) { + return new UAParser(uastring, extensions).getResult(); + } + + var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); + var rgxmap = extensions ? util.extend(regexes, extensions) : regexes; + + this.getBrowser = function () { + var browser = { name: undefined, version: undefined }; + mapper.rgx.call(browser, ua, rgxmap.browser); + browser.major = util.major(browser.version); // deprecated + return browser; + }; + this.getCPU = function () { + var cpu = { architecture: undefined }; + mapper.rgx.call(cpu, ua, rgxmap.cpu); + return cpu; + }; + this.getDevice = function () { + var device = { vendor: undefined, model: undefined, type: undefined }; + mapper.rgx.call(device, ua, rgxmap.device); + return device; + }; + this.getEngine = function () { + var engine = { name: undefined, version: undefined }; + mapper.rgx.call(engine, ua, rgxmap.engine); + return engine; + }; + this.getOS = function () { + var os = { name: undefined, version: undefined }; + mapper.rgx.call(os, ua, rgxmap.os); + return os; + }; + this.getResult = function () { + return { + ua : this.getUA(), + browser : this.getBrowser(), + engine : this.getEngine(), + os : this.getOS(), + device : this.getDevice(), + cpu : this.getCPU() + }; + }; + this.getUA = function () { + return ua; + }; + this.setUA = function (uastring) { + ua = uastring; + return this; + }; + return this; + }; + + UAParser.VERSION = LIBVERSION; + UAParser.BROWSER = { + NAME : NAME, + MAJOR : MAJOR, // deprecated + VERSION : VERSION + }; + UAParser.CPU = { + ARCHITECTURE : ARCHITECTURE + }; + UAParser.DEVICE = { + MODEL : MODEL, + VENDOR : VENDOR, + TYPE : TYPE, + CONSOLE : CONSOLE, + MOBILE : MOBILE, + SMARTTV : SMARTTV, + TABLET : TABLET, + WEARABLE: WEARABLE, + EMBEDDED: EMBEDDED + }; + UAParser.ENGINE = { + NAME : NAME, + VERSION : VERSION + }; + UAParser.OS = { + NAME : NAME, + VERSION : VERSION + }; + + /////////// + // Export + ////////// + + + // check js environment + if (typeof(exports) !== UNDEF_TYPE) { + // nodejs env + if (typeof module !== UNDEF_TYPE && module.exports) { + exports = module.exports = UAParser; + } + exports.UAParser = UAParser; + } else { + // requirejs env (optional) + if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { + return UAParser; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else {} + } + + // jQuery/Zepto specific (optional) + // Note: + // In AMD env the global scope should be kept clean, but jQuery is an exception. + // jQuery always exports to global scope, unless jQuery.noConflict(true) is used, + // and we should catch that. + var $ = window && (window.jQuery || window.Zepto); + if ($ && !$.ua) { + var parser = new UAParser(); + $.ua = parser.getResult(); + $.ua.get = function () { + return parser.getUA(); + }; + $.ua.set = function (uastring) { + parser.setUA(uastring); + var result = parser.getResult(); + for (var prop in result) { + $.ua[prop] = result[prop]; + } + }; + } + +})(typeof window === 'object' ? window : this); + + +/***/ }), + +/***/ 2108: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + */ + + + +var invariant = __webpack_require__(641); + +var componentRegex = /\./; +var orRegex = /\|\|/; +var rangeRegex = /\s+\-\s+/; +var modifierRegex = /^(<=|<|=|>=|~>|~|>|)?\s*(.+)/; +var numericRegex = /^(\d*)(.*)/; + +/** + * Splits input `range` on "||" and returns true if any subrange matches + * `version`. + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkOrExpression(range, version) { + var expressions = range.split(orRegex); + + if (expressions.length > 1) { + return expressions.some(function (range) { + return VersionRange.contains(range, version); + }); + } else { + range = expressions[0].trim(); + return checkRangeExpression(range, version); + } +} + +/** + * Splits input `range` on " - " (the surrounding whitespace is required) and + * returns true if version falls between the two operands. + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkRangeExpression(range, version) { + var expressions = range.split(rangeRegex); + + !(expressions.length > 0 && expressions.length <= 2) ? false ? undefined : invariant(false) : void 0; + + if (expressions.length === 1) { + return checkSimpleExpression(expressions[0], version); + } else { + var startVersion = expressions[0], + endVersion = expressions[1]; + + !(isSimpleVersion(startVersion) && isSimpleVersion(endVersion)) ? false ? undefined : invariant(false) : void 0; + + return checkSimpleExpression('>=' + startVersion, version) && checkSimpleExpression('<=' + endVersion, version); + } +} + +/** + * Checks if `range` matches `version`. `range` should be a "simple" range (ie. + * not a compound range using the " - " or "||" operators). + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ +function checkSimpleExpression(range, version) { + range = range.trim(); + if (range === '') { + return true; + } + + var versionComponents = version.split(componentRegex); + + var _getModifierAndCompon = getModifierAndComponents(range), + modifier = _getModifierAndCompon.modifier, + rangeComponents = _getModifierAndCompon.rangeComponents; + + switch (modifier) { + case '<': + return checkLessThan(versionComponents, rangeComponents); + case '<=': + return checkLessThanOrEqual(versionComponents, rangeComponents); + case '>=': + return checkGreaterThanOrEqual(versionComponents, rangeComponents); + case '>': + return checkGreaterThan(versionComponents, rangeComponents); + case '~': + case '~>': + return checkApproximateVersion(versionComponents, rangeComponents); + default: + return checkEqual(versionComponents, rangeComponents); + } +} + +/** + * Checks whether `a` is less than `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkLessThan(a, b) { + return compareComponents(a, b) === -1; +} + +/** + * Checks whether `a` is less than or equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkLessThanOrEqual(a, b) { + var result = compareComponents(a, b); + return result === -1 || result === 0; +} + +/** + * Checks whether `a` is equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkEqual(a, b) { + return compareComponents(a, b) === 0; +} + +/** + * Checks whether `a` is greater than or equal to `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkGreaterThanOrEqual(a, b) { + var result = compareComponents(a, b); + return result === 1 || result === 0; +} + +/** + * Checks whether `a` is greater than `b`. + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkGreaterThan(a, b) { + return compareComponents(a, b) === 1; +} + +/** + * Checks whether `a` is "reasonably close" to `b` (as described in + * https://www.npmjs.org/doc/misc/semver.html). For example, if `b` is "1.3.1" + * then "reasonably close" is defined as ">= 1.3.1 and < 1.4". + * + * @param {array} a + * @param {array} b + * @returns {boolean} + */ +function checkApproximateVersion(a, b) { + var lowerBound = b.slice(); + var upperBound = b.slice(); + + if (upperBound.length > 1) { + upperBound.pop(); + } + var lastIndex = upperBound.length - 1; + var numeric = parseInt(upperBound[lastIndex], 10); + if (isNumber(numeric)) { + upperBound[lastIndex] = numeric + 1 + ''; + } + + return checkGreaterThanOrEqual(a, lowerBound) && checkLessThan(a, upperBound); +} + +/** + * Extracts the optional modifier (<, <=, =, >=, >, ~, ~>) and version + * components from `range`. + * + * For example, given `range` ">= 1.2.3" returns an object with a `modifier` of + * `">="` and `components` of `[1, 2, 3]`. + * + * @param {string} range + * @returns {object} + */ +function getModifierAndComponents(range) { + var rangeComponents = range.split(componentRegex); + var matches = rangeComponents[0].match(modifierRegex); + !matches ? false ? undefined : invariant(false) : void 0; + + return { + modifier: matches[1], + rangeComponents: [matches[2]].concat(rangeComponents.slice(1)) + }; +} + +/** + * Determines if `number` is a number. + * + * @param {mixed} number + * @returns {boolean} + */ +function isNumber(number) { + return !isNaN(number) && isFinite(number); +} + +/** + * Tests whether `range` is a "simple" version number without any modifiers + * (">", "~" etc). + * + * @param {string} range + * @returns {boolean} + */ +function isSimpleVersion(range) { + return !getModifierAndComponents(range).modifier; +} + +/** + * Zero-pads array `array` until it is at least `length` long. + * + * @param {array} array + * @param {number} length + */ +function zeroPad(array, length) { + for (var i = array.length; i < length; i++) { + array[i] = '0'; + } +} + +/** + * Normalizes `a` and `b` in preparation for comparison by doing the following: + * + * - zero-pads `a` and `b` + * - marks any "x", "X" or "*" component in `b` as equivalent by zero-ing it out + * in both `a` and `b` + * - marks any final "*" component in `b` as a greedy wildcard by zero-ing it + * and all of its successors in `a` + * + * @param {array} a + * @param {array} b + * @returns {array>} + */ +function normalizeVersions(a, b) { + a = a.slice(); + b = b.slice(); + + zeroPad(a, b.length); + + // mark "x" and "*" components as equal + for (var i = 0; i < b.length; i++) { + var matches = b[i].match(/^[x*]$/i); + if (matches) { + b[i] = a[i] = '0'; + + // final "*" greedily zeros all remaining components + if (matches[0] === '*' && i === b.length - 1) { + for (var j = i; j < a.length; j++) { + a[j] = '0'; + } + } + } + } + + zeroPad(b, a.length); + + return [a, b]; +} + +/** + * Returns the numerical -- not the lexicographical -- ordering of `a` and `b`. + * + * For example, `10-alpha` is greater than `2-beta`. + * + * @param {string} a + * @param {string} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compareNumeric(a, b) { + var aPrefix = a.match(numericRegex)[1]; + var bPrefix = b.match(numericRegex)[1]; + var aNumeric = parseInt(aPrefix, 10); + var bNumeric = parseInt(bPrefix, 10); + + if (isNumber(aNumeric) && isNumber(bNumeric) && aNumeric !== bNumeric) { + return compare(aNumeric, bNumeric); + } else { + return compare(a, b); + } +} + +/** + * Returns the ordering of `a` and `b`. + * + * @param {string|number} a + * @param {string|number} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compare(a, b) { + !(typeof a === typeof b) ? false ? undefined : invariant(false) : void 0; + + if (a > b) { + return 1; + } else if (a < b) { + return -1; + } else { + return 0; + } +} + +/** + * Compares arrays of version components. + * + * @param {array} a + * @param {array} b + * @returns {number} -1, 0 or 1 to indicate whether `a` is less than, equal to, + * or greater than `b`, respectively + */ +function compareComponents(a, b) { + var _normalizeVersions = normalizeVersions(a, b), + aNormalized = _normalizeVersions[0], + bNormalized = _normalizeVersions[1]; + + for (var i = 0; i < bNormalized.length; i++) { + var result = compareNumeric(aNormalized[i], bNormalized[i]); + if (result) { + return result; + } + } + + return 0; +} + +var VersionRange = { + /** + * Checks whether `version` satisfies the `range` specification. + * + * We support a subset of the expressions defined in + * https://www.npmjs.org/doc/misc/semver.html: + * + * version Must match version exactly + * =version Same as just version + * >version Must be greater than version + * >=version Must be greater than or equal to version + * = 1.2.3 and < 1.3" + * ~>version Equivalent to ~version + * 1.2.x Must match "1.2.x", where "x" is a wildcard that matches + * anything + * 1.2.* Similar to "1.2.x", but "*" in the trailing position is a + * "greedy" wildcard, so will match any number of additional + * components: + * "1.2.*" will match "1.2.1", "1.2.1.1", "1.2.1.1.1" etc + * * Any version + * "" (Empty string) Same as * + * v1 - v2 Equivalent to ">= v1 and <= v2" + * r1 || r2 Passes if either r1 or r2 are satisfied + * + * @param {string} range + * @param {string} version + * @returns {boolean} + */ + contains: function contains(range, version) { + return checkOrExpression(range.trim(), version.trim()); + } +}; + +module.exports = VersionRange; + +/***/ }), + +/***/ 2109: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + */ + + + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Executes the provided `callback` once for each enumerable own property in the + * object and constructs a new object from the results. The `callback` is + * invoked with three arguments: + * + * - the property value + * - the property name + * - the object being traversed + * + * Properties that are added after the call to `mapObject` will not be visited + * by `callback`. If the values of existing properties are changed, the value + * passed to `callback` will be the value at the time `mapObject` visits them. + * Properties that are deleted before being visited are not visited. + * + * @grep function objectMap() + * @grep function objMap() + * + * @param {?object} object + * @param {function} callback + * @param {*} context + * @return {?object} + */ +function mapObject(object, callback, context) { + if (!object) { + return null; + } + var result = {}; + for (var name in object) { + if (hasOwnProperty.call(object, name)) { + result[name] = callback.call(context, object[name], name, object); + } + } + return result; +} + +module.exports = mapObject; + +/***/ }), + +/***/ 2110: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * + * @typechecks static-only + */ + + + +/** + * Memoizes the return value of a function that accepts one string argument. + */ + +function memoizeStringOnly(callback) { + var cache = {}; + return function (string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; + +/***/ }), + +/***/ 2111: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule setDraftEditorSelection + * @format + * + */ + + + +var DraftJsDebugLogging = __webpack_require__(2112); + +var containsNode = __webpack_require__(1947); +var getActiveElement = __webpack_require__(1982); +var invariant = __webpack_require__(641); + +function getAnonymizedDOM(node, getNodeLabels) { + if (!node) { + return '[empty]'; + } + + var anonymized = anonymizeTextWithin(node, getNodeLabels); + if (anonymized.nodeType === Node.TEXT_NODE) { + return anonymized.textContent; + } + + !(anonymized instanceof Element) ? false ? undefined : invariant(false) : void 0; + return anonymized.outerHTML; +} + +function anonymizeTextWithin(node, getNodeLabels) { + var labels = getNodeLabels !== undefined ? getNodeLabels(node) : []; + + if (node.nodeType === Node.TEXT_NODE) { + var length = node.textContent.length; + return document.createTextNode('[text ' + length + (labels.length ? ' | ' + labels.join(', ') : '') + ']'); + } + + var clone = node.cloneNode(); + if (clone.nodeType === 1 && labels.length) { + clone.setAttribute('data-labels', labels.join(', ')); + } + var childNodes = node.childNodes; + for (var ii = 0; ii < childNodes.length; ii++) { + clone.appendChild(anonymizeTextWithin(childNodes[ii], getNodeLabels)); + } + + return clone; +} + +function getAnonymizedEditorDOM(node, getNodeLabels) { + // grabbing the DOM content of the Draft editor + var currentNode = node; + while (currentNode) { + if (currentNode instanceof Element && currentNode.hasAttribute('contenteditable')) { + // found the Draft editor container + return getAnonymizedDOM(currentNode, getNodeLabels); + } else { + currentNode = currentNode.parentNode; + } + } + return 'Could not find contentEditable parent of node'; +} + +function getNodeLength(node) { + return node.nodeValue === null ? node.childNodes.length : node.nodeValue.length; +} + +/** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + */ +function setDraftEditorSelection(selectionState, node, blockKey, nodeStart, nodeEnd) { + // It's possible that the editor has been removed from the DOM but + // our selection code doesn't know it yet. Forcing selection in + // this case may lead to errors, so just bail now. + if (!containsNode(document.documentElement, node)) { + return; + } + + var selection = global.getSelection(); + var anchorKey = selectionState.getAnchorKey(); + var anchorOffset = selectionState.getAnchorOffset(); + var focusKey = selectionState.getFocusKey(); + var focusOffset = selectionState.getFocusOffset(); + var isBackward = selectionState.getIsBackward(); + + // IE doesn't support backward selection. Swap key/offset pairs. + if (!selection.extend && isBackward) { + var tempKey = anchorKey; + var tempOffset = anchorOffset; + anchorKey = focusKey; + anchorOffset = focusOffset; + focusKey = tempKey; + focusOffset = tempOffset; + isBackward = false; + } + + var hasAnchor = anchorKey === blockKey && nodeStart <= anchorOffset && nodeEnd >= anchorOffset; + + var hasFocus = focusKey === blockKey && nodeStart <= focusOffset && nodeEnd >= focusOffset; + + // If the selection is entirely bound within this node, set the selection + // and be done. + if (hasAnchor && hasFocus) { + selection.removeAllRanges(); + addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState); + addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState); + return; + } + + if (!isBackward) { + // If the anchor is within this node, set the range start. + if (hasAnchor) { + selection.removeAllRanges(); + addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState); + } + + // If the focus is within this node, we can assume that we have + // already set the appropriate start range on the selection, and + // can simply extend the selection. + if (hasFocus) { + addFocusToSelection(selection, node, focusOffset - nodeStart, selectionState); + } + } else { + // If this node has the focus, set the selection range to be a + // collapsed range beginning here. Later, when we encounter the anchor, + // we'll use this information to extend the selection. + if (hasFocus) { + selection.removeAllRanges(); + addPointToSelection(selection, node, focusOffset - nodeStart, selectionState); + } + + // If this node has the anchor, we may assume that the correct + // focus information is already stored on the selection object. + // We keep track of it, reset the selection range, and extend it + // back to the focus point. + if (hasAnchor) { + var storedFocusNode = selection.focusNode; + var storedFocusOffset = selection.focusOffset; + + selection.removeAllRanges(); + addPointToSelection(selection, node, anchorOffset - nodeStart, selectionState); + addFocusToSelection(selection, storedFocusNode, storedFocusOffset, selectionState); + } + } +} + +/** + * Extend selection towards focus point. + */ +function addFocusToSelection(selection, node, offset, selectionState) { + var activeElement = getActiveElement(); + if (selection.extend && containsNode(activeElement, node)) { + // If `extend` is called while another element has focus, an error is + // thrown. We therefore disable `extend` if the active element is somewhere + // other than the node we are selecting. This should only occur in Firefox, + // since it is the only browser to support multiple selections. + // See https://bugzilla.mozilla.org/show_bug.cgi?id=921444. + + // logging to catch bug that is being reported in t16250795 + if (offset > getNodeLength(node)) { + // the call to 'selection.extend' is about to throw + DraftJsDebugLogging.logSelectionStateFailure({ + anonymizedDom: getAnonymizedEditorDOM(node), + extraParams: JSON.stringify({ offset: offset }), + selectionState: JSON.stringify(selectionState.toJS()) + }); + } + + // logging to catch bug that is being reported in t18110632 + var nodeWasFocus = node === selection.focusNode; + try { + selection.extend(node, offset); + } catch (e) { + DraftJsDebugLogging.logSelectionStateFailure({ + anonymizedDom: getAnonymizedEditorDOM(node, function (n) { + var labels = []; + if (n === activeElement) { + labels.push('active element'); + } + if (n === selection.anchorNode) { + labels.push('selection anchor node'); + } + if (n === selection.focusNode) { + labels.push('selection focus node'); + } + return labels; + }), + extraParams: JSON.stringify({ + activeElementName: activeElement ? activeElement.nodeName : null, + nodeIsFocus: node === selection.focusNode, + nodeWasFocus: nodeWasFocus, + selectionRangeCount: selection.rangeCount, + selectionAnchorNodeName: selection.anchorNode ? selection.anchorNode.nodeName : null, + selectionAnchorOffset: selection.anchorOffset, + selectionFocusNodeName: selection.focusNode ? selection.focusNode.nodeName : null, + selectionFocusOffset: selection.focusOffset, + message: e ? '' + e : null, + offset: offset + }, null, 2), + selectionState: JSON.stringify(selectionState.toJS(), null, 2) + }); + // allow the error to be thrown - + // better than continuing in a broken state + throw e; + } + } else { + // IE doesn't support extend. This will mean no backward selection. + // Extract the existing selection range and add focus to it. + // Additionally, clone the selection range. IE11 throws an + // InvalidStateError when attempting to access selection properties + // after the range is detached. + var range = selection.getRangeAt(0); + range.setEnd(node, offset); + selection.addRange(range.cloneRange()); + } +} + +function addPointToSelection(selection, node, offset, selectionState) { + var range = document.createRange(); + // logging to catch bug that is being reported in t16250795 + if (offset > getNodeLength(node)) { + // in this case we know that the call to 'range.setStart' is about to throw + DraftJsDebugLogging.logSelectionStateFailure({ + anonymizedDom: getAnonymizedEditorDOM(node), + extraParams: JSON.stringify({ offset: offset }), + selectionState: JSON.stringify(selectionState.toJS()) + }); + } + range.setStart(node, offset); + selection.addRange(range); +} + +module.exports = setDraftEditorSelection; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2112: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftJsDebugLogging + */ + + + +module.exports = { + logSelectionStateFailure: function logSelectionStateFailure() { + return null; + } +}; + +/***/ }), + +/***/ 2113: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var isNode = __webpack_require__(2114); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; + +/***/ }), + +/***/ 2114: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + var doc = object ? object.ownerDocument || object : document; + var defaultView = doc.defaultView || window; + return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string')); +} + +module.exports = isNode; + +/***/ }), + +/***/ 2115: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var camelize = __webpack_require__(2116); +var hyphenate = __webpack_require__(2117); + +function asString(value) /*?string*/{ + return value == null ? value : String(value); +} + +function getStyleProperty( /*DOMNode*/node, /*string*/name) /*?string*/{ + var computedStyle = void 0; + + // W3C Standard + if (window.getComputedStyle) { + // In certain cases such as within an iframe in FF3, this returns null. + computedStyle = window.getComputedStyle(node, null); + if (computedStyle) { + return asString(computedStyle.getPropertyValue(hyphenate(name))); + } + } + // Safari + if (document.defaultView && document.defaultView.getComputedStyle) { + computedStyle = document.defaultView.getComputedStyle(node, null); + // A Safari bug causes this to return null for `display: none` elements. + if (computedStyle) { + return asString(computedStyle.getPropertyValue(hyphenate(name))); + } + if (name === 'display') { + return 'none'; + } + } + // Internet Explorer + if (node.currentStyle) { + if (name === 'float') { + return asString(node.currentStyle.cssFloat || node.currentStyle.styleFloat); + } + return asString(node.currentStyle[camelize(name)]); + } + return asString(node.style && node.style[camelize(name)]); +} + +module.exports = getStyleProperty; + +/***/ }), + +/***/ 2116: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function (_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; + +/***/ }), + +/***/ 2117: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; + +/***/ }), + +/***/ 2118: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var getElementRect = __webpack_require__(2119); + +/** + * Gets an element's position in pixels relative to the viewport. The returned + * object represents the position of the element's top left corner. + * + * @param {DOMElement} element + * @return {object} + */ +function getElementPosition(element) { + var rect = getElementRect(element); + return { + x: rect.left, + y: rect.top, + width: rect.right - rect.left, + height: rect.bottom - rect.top + }; +} + +module.exports = getElementPosition; + +/***/ }), + +/***/ 2119: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var containsNode = __webpack_require__(1947); + +/** + * Gets an element's bounding rect in pixels relative to the viewport. + * + * @param {DOMElement} elem + * @return {object} + */ +function getElementRect(elem) { + var docElem = elem.ownerDocument.documentElement; + + // FF 2, Safari 3 and Opera 9.5- do not support getBoundingClientRect(). + // IE9- will throw if the element is not in the document. + if (!('getBoundingClientRect' in elem) || !containsNode(docElem, elem)) { + return { + left: 0, + right: 0, + top: 0, + bottom: 0 + }; + } + + // Subtracts clientTop/Left because IE8- added a 2px border to the + // element (see http://fburl.com/1493213). IE 7 in + // Quicksmode does not report clientLeft/clientTop so there + // will be an unaccounted offset of 2px when in quirksmode + var rect = elem.getBoundingClientRect(); + + return { + left: Math.round(rect.left) - docElem.clientLeft, + right: Math.round(rect.right) - docElem.clientLeft, + top: Math.round(rect.top) - docElem.clientTop, + bottom: Math.round(rect.bottom) - docElem.clientTop + }; +} + +module.exports = getElementRect; + +/***/ }), + +/***/ 2120: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + */ + + + +var isWebkit = typeof navigator !== 'undefined' && navigator.userAgent.indexOf('AppleWebKit') > -1; + +/** + * Gets the element with the document scroll properties such as `scrollLeft` and + * `scrollHeight`. This may differ across different browsers. + * + * NOTE: The return value can be null if the DOM is not yet ready. + * + * @param {?DOMDocument} doc Defaults to current document. + * @return {?DOMElement} + */ +function getDocumentScrollElement(doc) { + doc = doc || document; + if (doc.scrollingElement) { + return doc.scrollingElement; + } + return !isWebkit && doc.compatMode === 'CSS1Compat' ? doc.documentElement : doc.body; +} + +module.exports = getDocumentScrollElement; + +/***/ }), + +/***/ 2121: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + */ + + + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ + +function getUnboundedScrollPosition(scrollable) { + if (scrollable.Window && scrollable instanceof scrollable.Window) { + return { + x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft, + y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} + +module.exports = getUnboundedScrollPosition; + +/***/ }), + +/***/ 2122: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function getViewportWidth() { + var width = void 0; + if (document.documentElement) { + width = document.documentElement.clientWidth; + } + + if (!width && document.body) { + width = document.body.clientWidth; + } + + return width || 0; +} /** + * 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. + * + * + * @typechecks + */ + +function getViewportHeight() { + var height = void 0; + if (document.documentElement) { + height = document.documentElement.clientHeight; + } + + if (!height && document.body) { + height = document.body.clientHeight; + } + + return height || 0; +} + +/** + * Gets the viewport dimensions including any scrollbars. + */ +function getViewportDimensions() { + return { + width: window.innerWidth || getViewportWidth(), + height: window.innerHeight || getViewportHeight() + }; +} + +/** + * Gets the viewport dimensions excluding any scrollbars. + */ +getViewportDimensions.withoutScrollbars = function () { + return { + width: getViewportWidth(), + height: getViewportHeight() + }; +}; + +module.exports = getViewportDimensions; + +/***/ }), + +/***/ 2123: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks static-only + */ + + + +/** + * Combines multiple className strings into one. + * http://jsperf.com/joinclasses-args-vs-array + * + * @param {...?string} className + * @return {string} + */ + +function joinClasses(className /*, ... */) { + if (!className) { + className = ''; + } + var nextClass = void 0; + var argLength = arguments.length; + if (argLength > 1) { + for (var ii = 1; ii < argLength; ii++) { + nextClass = arguments[ii]; + if (nextClass) { + className = (className ? className + ' ' : '') + nextClass; + } + } + } + return className; +} + +module.exports = joinClasses; + +/***/ }), + +/***/ 2124: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorDragHandler + * @format + * + */ + + + +var DataTransfer = __webpack_require__(1984); +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); + +var findAncestorOffsetKey = __webpack_require__(1950); +var getTextContentFromFiles = __webpack_require__(1986); +var getUpdatedSelectionState = __webpack_require__(1987); +var isEventHandled = __webpack_require__(1918); +var nullthrows = __webpack_require__(1904); + +/** + * Get a SelectionState for the supplied mouse event. + */ +function getSelectionForEvent(event, editorState) { + var node = null; + var offset = null; + + if (typeof document.caretRangeFromPoint === 'function') { + var dropRange = document.caretRangeFromPoint(event.x, event.y); + node = dropRange.startContainer; + offset = dropRange.startOffset; + } else if (event.rangeParent) { + node = event.rangeParent; + offset = event.rangeOffset; + } else { + return null; + } + + node = nullthrows(node); + offset = nullthrows(offset); + var offsetKey = nullthrows(findAncestorOffsetKey(node)); + + return getUpdatedSelectionState(editorState, offsetKey, offset, offsetKey, offset); +} + +var DraftEditorDragHandler = { + /** + * Drag originating from input terminated. + */ + onDragEnd: function onDragEnd(editor) { + editor.exitCurrentMode(); + }, + + /** + * Handle data being dropped. + */ + onDrop: function onDrop(editor, e) { + var data = new DataTransfer(e.nativeEvent.dataTransfer); + + var editorState = editor._latestEditorState; + var dropSelection = getSelectionForEvent(e.nativeEvent, editorState); + + e.preventDefault(); + editor.exitCurrentMode(); + + if (dropSelection == null) { + return; + } + + var files = data.getFiles(); + if (files.length > 0) { + if (editor.props.handleDroppedFiles && isEventHandled(editor.props.handleDroppedFiles(dropSelection, files))) { + return; + } + + getTextContentFromFiles(files, function (fileText) { + fileText && editor.update(insertTextAtSelection(editorState, dropSelection, fileText)); + }); + return; + } + + var dragType = editor._internalDrag ? 'internal' : 'external'; + if (editor.props.handleDrop && isEventHandled(editor.props.handleDrop(dropSelection, data, dragType))) { + return; + } + + if (editor._internalDrag) { + editor.update(moveText(editorState, dropSelection)); + return; + } + + editor.update(insertTextAtSelection(editorState, dropSelection, data.getText())); + } +}; + +function moveText(editorState, targetSelection) { + var newContentState = DraftModifier.moveText(editorState.getCurrentContent(), editorState.getSelection(), targetSelection); + return EditorState.push(editorState, newContentState, 'insert-fragment'); +} + +/** + * Insert text at a specified selection. + */ +function insertTextAtSelection(editorState, selection, text) { + var newContentState = DraftModifier.insertText(editorState.getCurrentContent(), selection, text, editorState.getCurrentInlineStyle()); + return EditorState.push(editorState, newContentState, 'insert-fragment'); +} + +module.exports = DraftEditorDragHandler; + +/***/ }), + +/***/ 2125: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + */ +var PhotosMimeType = { + isImage: function isImage(mimeString) { + return getParts(mimeString)[0] === 'image'; + }, + isJpeg: function isJpeg(mimeString) { + var parts = getParts(mimeString); + return PhotosMimeType.isImage(mimeString) && ( + // see http://fburl.com/10972194 + parts[1] === 'jpeg' || parts[1] === 'pjpeg'); + } +}; + +function getParts(mimeString) { + return mimeString.split('/'); +} + +module.exports = PhotosMimeType; + +/***/ }), + +/***/ 2126: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * 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. + * + * @typechecks + */ + +var invariant = __webpack_require__(641); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browsers builtin objects can report typeof 'function' (e.g. NodeList + // in old versions of Safari). + !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? false ? undefined : invariant(false) : void 0; + + !(typeof length === 'number') ? false ? undefined : invariant(false) : void 0; + + !(length === 0 || length - 1 in obj) ? false ? undefined : invariant(false) : void 0; + + !(typeof obj.callee !== 'function') ? false ? undefined : invariant(false) : void 0; + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && ( + // arrays are objects, NodeLists are functions in Safari + typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + 'length' in obj && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + typeof obj.nodeType != 'number' && ( + // a real array + Array.isArray(obj) || + // arguments + 'callee' in obj || + // HTMLCollection/NodeList + 'item' in obj) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; + +/***/ }), + +/***/ 2127: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorEditHandler + * @format + * + */ + + + +var onBeforeInput = __webpack_require__(2128); +var onBlur = __webpack_require__(2130); +var onCompositionStart = __webpack_require__(2131); +var onCopy = __webpack_require__(2132); +var onCut = __webpack_require__(2133); +var onDragOver = __webpack_require__(2134); +var onDragStart = __webpack_require__(2135); +var onFocus = __webpack_require__(2136); +var onInput = __webpack_require__(2137); +var onKeyDown = __webpack_require__(2138); +var onPaste = __webpack_require__(2152); +var onSelect = __webpack_require__(2157); + +var DraftEditorEditHandler = { + onBeforeInput: onBeforeInput, + onBlur: onBlur, + onCompositionStart: onCompositionStart, + onCopy: onCopy, + onCut: onCut, + onDragOver: onDragOver, + onDragStart: onDragStart, + onFocus: onFocus, + onInput: onInput, + onKeyDown: onKeyDown, + onPaste: onPaste, + onSelect: onSelect +}; + +module.exports = DraftEditorEditHandler; + +/***/ }), + +/***/ 2128: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnBeforeInput + * @format + * + */ + + + +var BlockTree = __webpack_require__(1976); +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); +var UserAgent = __webpack_require__(1905); + +var getEntityKeyForSelection = __webpack_require__(1946); +var isEventHandled = __webpack_require__(1918); +var isSelectionAtLeafStart = __webpack_require__(1980); +var nullthrows = __webpack_require__(1904); +var setImmediate = __webpack_require__(2129); + +// When nothing is focused, Firefox regards two characters, `'` and `/`, as +// commands that should open and focus the "quickfind" search bar. This should +// *never* happen while a contenteditable is focused, but as of v28, it +// sometimes does, even when the keypress event target is the contenteditable. +// This breaks the input. Special case these characters to ensure that when +// they are typed, we prevent default on the event to make sure not to +// trigger quickfind. +var FF_QUICKFIND_CHAR = "'"; +var FF_QUICKFIND_LINK_CHAR = '/'; +var isFirefox = UserAgent.isBrowser('Firefox'); + +function mustPreventDefaultForCharacter(character) { + return isFirefox && (character == FF_QUICKFIND_CHAR || character == FF_QUICKFIND_LINK_CHAR); +} + +/** + * Replace the current selection with the specified text string, with the + * inline style and entity key applied to the newly inserted text. + */ +function replaceText(editorState, text, inlineStyle, entityKey) { + var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), text, inlineStyle, entityKey); + return EditorState.push(editorState, contentState, 'insert-characters'); +} + +/** + * When `onBeforeInput` executes, the browser is attempting to insert a + * character into the editor. Apply this character data to the document, + * allowing native insertion if possible. + * + * Native insertion is encouraged in order to limit re-rendering and to + * preserve spellcheck highlighting, which disappears or flashes if re-render + * occurs on the relevant text nodes. + */ +function editOnBeforeInput(editor, e) { + if (editor._pendingStateFromBeforeInput !== undefined) { + editor.update(editor._pendingStateFromBeforeInput); + editor._pendingStateFromBeforeInput = undefined; + } + + var editorState = editor._latestEditorState; + + var chars = e.data; + + // In some cases (ex: IE ideographic space insertion) no character data + // is provided. There's nothing to do when this happens. + if (!chars) { + return; + } + + // Allow the top-level component to handle the insertion manually. This is + // useful when triggering interesting behaviors for a character insertion, + // Simple examples: replacing a raw text ':)' with a smile emoji or image + // decorator, or setting a block to be a list item after typing '- ' at the + // start of the block. + if (editor.props.handleBeforeInput && isEventHandled(editor.props.handleBeforeInput(chars, editorState))) { + e.preventDefault(); + return; + } + + // If selection is collapsed, conditionally allow native behavior. This + // reduces re-renders and preserves spellcheck highlighting. If the selection + // is not collapsed, we will re-render. + var selection = editorState.getSelection(); + var selectionStart = selection.getStartOffset(); + var selectionEnd = selection.getEndOffset(); + var anchorKey = selection.getAnchorKey(); + + if (!selection.isCollapsed()) { + e.preventDefault(); + + // If the currently selected text matches what the user is trying to + // replace it with, let's just update the `SelectionState`. If not, update + // the `ContentState` with the new text. + var currentlySelectedChars = editorState.getCurrentContent().getPlainText().slice(selectionStart, selectionEnd); + if (chars === currentlySelectedChars) { + editor.update(EditorState.forceSelection(editorState, selection.merge({ + focusOffset: selectionEnd + }))); + } else { + editor.update(replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()))); + } + return; + } + + var newEditorState = replaceText(editorState, chars, editorState.getCurrentInlineStyle(), getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection())); + + // Bunch of different cases follow where we need to prevent native insertion. + var mustPreventNative = false; + if (!mustPreventNative) { + // Browsers tend to insert text in weird places in the DOM when typing at + // the start of a leaf, so we'll handle it ourselves. + mustPreventNative = isSelectionAtLeafStart(editor._latestCommittedEditorState); + } + if (!mustPreventNative) { + // Chrome will also split up a node into two pieces if it contains a Tab + // char, for no explicable reason. Seemingly caused by this commit: + // https://chromium.googlesource.com/chromium/src/+/013ac5eaf3%5E%21/ + var nativeSelection = global.getSelection(); + // Selection is necessarily collapsed at this point due to earlier check. + if (nativeSelection.anchorNode && nativeSelection.anchorNode.nodeType === Node.TEXT_NODE) { + // See isTabHTMLSpanElement in chromium EditingUtilities.cpp. + var parentNode = nativeSelection.anchorNode.parentNode; + mustPreventNative = parentNode.nodeName === 'SPAN' && parentNode.firstChild.nodeType === Node.TEXT_NODE && parentNode.firstChild.nodeValue.indexOf('\t') !== -1; + } + } + if (!mustPreventNative) { + // Check the old and new "fingerprints" of the current block to determine + // whether this insertion requires any addition or removal of text nodes, + // in which case we would prevent the native character insertion. + var originalFingerprint = BlockTree.getFingerprint(editorState.getBlockTree(anchorKey)); + var newFingerprint = BlockTree.getFingerprint(newEditorState.getBlockTree(anchorKey)); + mustPreventNative = originalFingerprint !== newFingerprint; + } + if (!mustPreventNative) { + mustPreventNative = mustPreventDefaultForCharacter(chars); + } + if (!mustPreventNative) { + mustPreventNative = nullthrows(newEditorState.getDirectionMap()).get(anchorKey) !== nullthrows(editorState.getDirectionMap()).get(anchorKey); + } + + if (mustPreventNative) { + e.preventDefault(); + editor.update(newEditorState); + return; + } + + // We made it all the way! Let the browser do its thing and insert the char. + newEditorState = EditorState.set(newEditorState, { + nativelyRenderedContent: newEditorState.getCurrentContent() + }); + // The native event is allowed to occur. To allow user onChange handlers to + // change the inserted text, we wait until the text is actually inserted + // before we actually update our state. That way when we rerender, the text + // we see in the DOM will already have been inserted properly. + editor._pendingStateFromBeforeInput = newEditorState; + setImmediate(function () { + if (editor._pendingStateFromBeforeInput !== undefined) { + editor.update(editor._pendingStateFromBeforeInput); + editor._pendingStateFromBeforeInput = undefined; + } + }); +} + +module.exports = editOnBeforeInput; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2129: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * 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. + * + */ + + + +// setimmediate adds setImmediate to the global. We want to make sure we export +// the actual function. + +__webpack_require__(650); +module.exports = global.setImmediate; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2130: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnBlur + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); + +var containsNode = __webpack_require__(1947); +var getActiveElement = __webpack_require__(1982); + +function editOnBlur(editor, e) { + // In a contentEditable element, when you select a range and then click + // another active element, this does trigger a `blur` event but will not + // remove the DOM selection from the contenteditable. + // This is consistent across all browsers, but we prefer that the editor + // behave like a textarea, where a `blur` event clears the DOM selection. + // We therefore force the issue to be certain, checking whether the active + // element is `body` to force it when blurring occurs within the window (as + // opposed to clicking to another tab or window). + if (getActiveElement() === document.body) { + var _selection = global.getSelection(); + var editorNode = editor.editor; + if (_selection.rangeCount === 1 && containsNode(editorNode, _selection.anchorNode) && containsNode(editorNode, _selection.focusNode)) { + _selection.removeAllRanges(); + } + } + + var editorState = editor._latestEditorState; + var currentSelection = editorState.getSelection(); + if (!currentSelection.getHasFocus()) { + return; + } + + var selection = currentSelection.set('hasFocus', false); + editor.props.onBlur && editor.props.onBlur(e); + editor.update(EditorState.acceptSelection(editorState, selection)); +} + +module.exports = editOnBlur; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2131: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnCompositionStart + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); + +/** + * The user has begun using an IME input system. Switching to `composite` mode + * allows handling composition input and disables other edit behavior. + */ +function editOnCompositionStart(editor, e) { + editor.setMode('composite'); + editor.update(EditorState.set(editor._latestEditorState, { inCompositionMode: true })); + // Allow composition handler to interpret the compositionstart event + editor._onCompositionStart(e); +} + +module.exports = editOnCompositionStart; + +/***/ }), + +/***/ 2132: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnCopy + * @format + * + */ + + + +var getFragmentFromSelection = __webpack_require__(1988); + +/** + * If we have a selection, create a ContentState fragment and store + * it in our internal clipboard. Subsequent paste events will use this + * fragment if no external clipboard data is supplied. + */ +function editOnCopy(editor, e) { + var editorState = editor._latestEditorState; + var selection = editorState.getSelection(); + + // No selection, so there's nothing to copy. + if (selection.isCollapsed()) { + e.preventDefault(); + return; + } + + editor.setClipboard(getFragmentFromSelection(editor._latestEditorState)); +} + +module.exports = editOnCopy; + +/***/ }), + +/***/ 2133: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnCut + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); +var Style = __webpack_require__(1948); + +var getFragmentFromSelection = __webpack_require__(1988); +var getScrollPosition = __webpack_require__(1949); + +/** + * On `cut` events, native behavior is allowed to occur so that the system + * clipboard is set properly. This means that we need to take steps to recover + * the editor DOM state after the `cut` has occurred in order to maintain + * control of the component. + * + * In addition, we can keep a copy of the removed fragment, including all + * styles and entities, for use as an internal paste. + */ +function editOnCut(editor, e) { + var editorState = editor._latestEditorState; + var selection = editorState.getSelection(); + var element = e.target; + var scrollPosition = void 0; + + // No selection, so there's nothing to cut. + if (selection.isCollapsed()) { + e.preventDefault(); + return; + } + + // Track the current scroll position so that it can be forced back in place + // after the editor regains control of the DOM. + if (element instanceof Node) { + scrollPosition = getScrollPosition(Style.getScrollParent(element)); + } + + var fragment = getFragmentFromSelection(editorState); + editor.setClipboard(fragment); + + // Set `cut` mode to disable all event handling temporarily. + editor.setMode('cut'); + + // Let native `cut` behavior occur, then recover control. + setTimeout(function () { + editor.restoreEditorDOM(scrollPosition); + editor.exitCurrentMode(); + editor.update(removeFragment(editorState)); + }, 0); +} + +function removeFragment(editorState) { + var newContent = DraftModifier.removeRange(editorState.getCurrentContent(), editorState.getSelection(), 'forward'); + return EditorState.push(editorState, newContent, 'remove-range'); +} + +module.exports = editOnCut; + +/***/ }), + +/***/ 2134: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnDragOver + * @format + * + */ + + + +/** + * Drag behavior has begun from outside the editor element. + */ +function editOnDragOver(editor, e) { + editor._internalDrag = false; + editor.setMode('drag'); + e.preventDefault(); +} + +module.exports = editOnDragOver; + +/***/ }), + +/***/ 2135: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnDragStart + * @format + * + */ + + + +/** + * A `dragstart` event has begun within the text editor component. + */ +function editOnDragStart(editor) { + editor._internalDrag = true; + editor.setMode('drag'); +} + +module.exports = editOnDragStart; + +/***/ }), + +/***/ 2136: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnFocus + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); +var UserAgent = __webpack_require__(1905); + +function editOnFocus(editor, e) { + var editorState = editor._latestEditorState; + var currentSelection = editorState.getSelection(); + if (currentSelection.getHasFocus()) { + return; + } + + var selection = currentSelection.set('hasFocus', true); + editor.props.onFocus && editor.props.onFocus(e); + + // When the tab containing this text editor is hidden and the user does a + // find-in-page in a _different_ tab, Chrome on Mac likes to forget what the + // selection was right after sending this focus event and (if you let it) + // moves the cursor back to the beginning of the editor, so we force the + // selection here instead of simply accepting it in order to preserve the + // old cursor position. See https://crbug.com/540004. + // But it looks like this is fixed in Chrome 60.0.3081.0. + // Other browsers also don't have this bug, so we prefer to acceptSelection + // when possible, to ensure that unfocusing and refocusing a Draft editor + // doesn't preserve the selection, matching how textareas work. + if (UserAgent.isBrowser('Chrome < 60.0.3081.0')) { + editor.update(EditorState.forceSelection(editorState, selection)); + } else { + editor.update(EditorState.acceptSelection(editorState, selection)); + } +} + +module.exports = editOnFocus; + +/***/ }), + +/***/ 2137: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnInput + * @format + * + */ + + + +var DraftFeatureFlags = __webpack_require__(1909); +var DraftModifier = __webpack_require__(1901); +var DraftOffsetKey = __webpack_require__(1927); +var EditorState = __webpack_require__(1900); +var UserAgent = __webpack_require__(1905); + +var findAncestorOffsetKey = __webpack_require__(1950); +var nullthrows = __webpack_require__(1904); + +var isGecko = UserAgent.isEngine('Gecko'); + +var DOUBLE_NEWLINE = '\n\n'; + +/** + * This function is intended to handle spellcheck and autocorrect changes, + * which occur in the DOM natively without any opportunity to observe or + * interpret the changes before they occur. + * + * The `input` event fires in contentEditable elements reliably for non-IE + * browsers, immediately after changes occur to the editor DOM. Since our other + * handlers override or otherwise handle cover other varieties of text input, + * the DOM state should match the model in all controlled input cases. Thus, + * when an `input` change leads to a DOM/model mismatch, the change should be + * due to a spellcheck change, and we can incorporate it into our model. + */ +function editOnInput(editor) { + if (editor._pendingStateFromBeforeInput !== undefined) { + editor.update(editor._pendingStateFromBeforeInput); + editor._pendingStateFromBeforeInput = undefined; + } + + var domSelection = global.getSelection(); + + var anchorNode = domSelection.anchorNode, + isCollapsed = domSelection.isCollapsed; + + var isNotTextNode = anchorNode.nodeType !== Node.TEXT_NODE; + var isNotTextOrElementNode = anchorNode.nodeType !== Node.TEXT_NODE && anchorNode.nodeType !== Node.ELEMENT_NODE; + + if (DraftFeatureFlags.draft_killswitch_allow_nontextnodes) { + if (isNotTextNode) { + return; + } + } else { + if (isNotTextOrElementNode) { + // TODO: (t16149272) figure out context for this change + return; + } + } + + if (anchorNode.nodeType === Node.TEXT_NODE && (anchorNode.previousSibling !== null || anchorNode.nextSibling !== null)) { + // When typing at the beginning of a visual line, Chrome splits the text + // nodes into two. Why? No one knows. This commit is suspicious: + // https://chromium.googlesource.com/chromium/src/+/a3b600981286b135632371477f902214c55a1724 + // To work around, we'll merge the sibling text nodes back into this one. + var span = anchorNode.parentNode; + anchorNode.nodeValue = span.textContent; + for (var child = span.firstChild; child !== null; child = child.nextSibling) { + if (child !== anchorNode) { + span.removeChild(child); + } + } + } + + var domText = anchorNode.textContent; + var editorState = editor._latestEditorState; + var offsetKey = nullthrows(findAncestorOffsetKey(anchorNode)); + + var _DraftOffsetKey$decod = DraftOffsetKey.decode(offsetKey), + blockKey = _DraftOffsetKey$decod.blockKey, + decoratorKey = _DraftOffsetKey$decod.decoratorKey, + leafKey = _DraftOffsetKey$decod.leafKey; + + var _editorState$getBlock = editorState.getBlockTree(blockKey).getIn([decoratorKey, 'leaves', leafKey]), + start = _editorState$getBlock.start, + end = _editorState$getBlock.end; + + var content = editorState.getCurrentContent(); + var block = content.getBlockForKey(blockKey); + var modelText = block.getText().slice(start, end); + + // Special-case soft newlines here. If the DOM text ends in a soft newline, + // we will have manually inserted an extra soft newline in DraftEditorLeaf. + // We want to remove this extra newline for the purpose of our comparison + // of DOM and model text. + if (domText.endsWith(DOUBLE_NEWLINE)) { + domText = domText.slice(0, -1); + } + + // No change -- the DOM is up to date. Nothing to do here. + if (domText === modelText) { + // This can be buggy for some Android keyboards because they don't fire + // standard onkeydown/pressed events and only fired editOnInput + // so domText is already changed by the browser and ends up being equal + // to modelText unexpectedly + return; + } + + var selection = editorState.getSelection(); + + // We'll replace the entire leaf with the text content of the target. + var targetRange = selection.merge({ + anchorOffset: start, + focusOffset: end, + isBackward: false + }); + + var entityKey = block.getEntityAt(start); + var entity = entityKey && content.getEntity(entityKey); + var entityType = entity && entity.getMutability(); + var preserveEntity = entityType === 'MUTABLE'; + + // Immutable or segmented entities cannot properly be handled by the + // default browser undo, so we have to use a different change type to + // force using our internal undo method instead of falling through to the + // native browser undo. + var changeType = preserveEntity ? 'spellcheck-change' : 'apply-entity'; + + var newContent = DraftModifier.replaceText(content, targetRange, domText, block.getInlineStyleAt(start), preserveEntity ? block.getEntityAt(start) : null); + + var anchorOffset, focusOffset, startOffset, endOffset; + + if (isGecko) { + // Firefox selection does not change while the context menu is open, so + // we preserve the anchor and focus values of the DOM selection. + anchorOffset = domSelection.anchorOffset; + focusOffset = domSelection.focusOffset; + startOffset = start + Math.min(anchorOffset, focusOffset); + endOffset = startOffset + Math.abs(anchorOffset - focusOffset); + anchorOffset = startOffset; + focusOffset = endOffset; + } else { + // Browsers other than Firefox may adjust DOM selection while the context + // menu is open, and Safari autocorrect is prone to providing an inaccurate + // DOM selection. Don't trust it. Instead, use our existing SelectionState + // and adjust it based on the number of characters changed during the + // mutation. + var charDelta = domText.length - modelText.length; + startOffset = selection.getStartOffset(); + endOffset = selection.getEndOffset(); + + anchorOffset = isCollapsed ? endOffset + charDelta : startOffset; + focusOffset = endOffset + charDelta; + } + + // Segmented entities are completely or partially removed when their + // text content changes. For this case we do not want any text to be selected + // after the change, so we are not merging the selection. + var contentWithAdjustedDOMSelection = newContent.merge({ + selectionBefore: content.getSelectionAfter(), + selectionAfter: selection.merge({ anchorOffset: anchorOffset, focusOffset: focusOffset }) + }); + + editor.update(EditorState.push(editorState, contentWithAdjustedDOMSelection, changeType)); +} + +module.exports = editOnInput; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2138: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnKeyDown + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); +var KeyBindingUtil = __webpack_require__(1951); +var Keys = __webpack_require__(1945); +var SecondaryClipboard = __webpack_require__(2139); +var UserAgent = __webpack_require__(1905); + +var isEventHandled = __webpack_require__(1918); +var keyCommandBackspaceToStartOfLine = __webpack_require__(2140); +var keyCommandBackspaceWord = __webpack_require__(2142); +var keyCommandDeleteWord = __webpack_require__(2144); +var keyCommandInsertNewline = __webpack_require__(2145); +var keyCommandMoveSelectionToEndOfBlock = __webpack_require__(2146); +var keyCommandMoveSelectionToStartOfBlock = __webpack_require__(2147); +var keyCommandPlainBackspace = __webpack_require__(2148); +var keyCommandPlainDelete = __webpack_require__(2149); +var keyCommandTransposeCharacters = __webpack_require__(2150); +var keyCommandUndo = __webpack_require__(2151); + +var isOptionKeyCommand = KeyBindingUtil.isOptionKeyCommand; + +var isChrome = UserAgent.isBrowser('Chrome'); + +/** + * Map a `DraftEditorCommand` command value to a corresponding function. + */ +function onKeyCommand(command, editorState) { + switch (command) { + case 'redo': + return EditorState.redo(editorState); + case 'delete': + return keyCommandPlainDelete(editorState); + case 'delete-word': + return keyCommandDeleteWord(editorState); + case 'backspace': + return keyCommandPlainBackspace(editorState); + case 'backspace-word': + return keyCommandBackspaceWord(editorState); + case 'backspace-to-start-of-line': + return keyCommandBackspaceToStartOfLine(editorState); + case 'split-block': + return keyCommandInsertNewline(editorState); + case 'transpose-characters': + return keyCommandTransposeCharacters(editorState); + case 'move-selection-to-start-of-block': + return keyCommandMoveSelectionToStartOfBlock(editorState); + case 'move-selection-to-end-of-block': + return keyCommandMoveSelectionToEndOfBlock(editorState); + case 'secondary-cut': + return SecondaryClipboard.cut(editorState); + case 'secondary-paste': + return SecondaryClipboard.paste(editorState); + default: + return editorState; + } +} + +/** + * Intercept keydown behavior to handle keys and commands manually, if desired. + * + * Keydown combinations may be mapped to `DraftCommand` values, which may + * correspond to command functions that modify the editor or its contents. + * + * See `getDefaultKeyBinding` for defaults. Alternatively, the top-level + * component may provide a custom mapping via the `keyBindingFn` prop. + */ +function editOnKeyDown(editor, e) { + var keyCode = e.which; + var editorState = editor._latestEditorState; + + switch (keyCode) { + case Keys.RETURN: + e.preventDefault(); + // The top-level component may manually handle newline insertion. If + // no special handling is performed, fall through to command handling. + if (editor.props.handleReturn && isEventHandled(editor.props.handleReturn(e, editorState))) { + return; + } + break; + case Keys.ESC: + e.preventDefault(); + editor.props.onEscape && editor.props.onEscape(e); + return; + case Keys.TAB: + editor.props.onTab && editor.props.onTab(e); + return; + case Keys.UP: + editor.props.onUpArrow && editor.props.onUpArrow(e); + return; + case Keys.RIGHT: + editor.props.onRightArrow && editor.props.onRightArrow(e); + return; + case Keys.DOWN: + editor.props.onDownArrow && editor.props.onDownArrow(e); + return; + case Keys.LEFT: + editor.props.onLeftArrow && editor.props.onLeftArrow(e); + return; + case Keys.SPACE: + // Handling for OSX where option + space scrolls. + if (isChrome && isOptionKeyCommand(e)) { + e.preventDefault(); + // Insert a nbsp into the editor. + var contentState = DraftModifier.replaceText(editorState.getCurrentContent(), editorState.getSelection(), '\xA0'); + editor.update(EditorState.push(editorState, contentState, 'insert-characters')); + return; + } + } + + var command = editor.props.keyBindingFn(e); + + // If no command is specified, allow keydown event to continue. + if (!command) { + return; + } + + if (command === 'undo') { + // Since undo requires some special updating behavior to keep the editor + // in sync, handle it separately. + keyCommandUndo(e, editorState, editor.update); + return; + } + + // At this point, we know that we're handling a command of some kind, so + // we don't want to insert a character following the keydown. + e.preventDefault(); + + // Allow components higher up the tree to handle the command first. + if (editor.props.handleKeyCommand && isEventHandled(editor.props.handleKeyCommand(command, editorState))) { + return; + } + + var newState = onKeyCommand(command, editorState); + if (newState !== editorState) { + editor.update(newState); + } +} + +module.exports = editOnKeyDown; + +/***/ }), + +/***/ 2139: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SecondaryClipboard + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); + +var getContentStateFragment = __webpack_require__(1925); +var nullthrows = __webpack_require__(1904); + +var clipboard = null; + +/** + * Some systems offer a "secondary" clipboard to allow quick internal cut + * and paste behavior. For instance, Ctrl+K (cut) and Ctrl+Y (paste). + */ +var SecondaryClipboard = { + cut: function cut(editorState) { + var content = editorState.getCurrentContent(); + var selection = editorState.getSelection(); + var targetRange = null; + + if (selection.isCollapsed()) { + var anchorKey = selection.getAnchorKey(); + var blockEnd = content.getBlockForKey(anchorKey).getLength(); + + if (blockEnd === selection.getAnchorOffset()) { + return editorState; + } + + targetRange = selection.set('focusOffset', blockEnd); + } else { + targetRange = selection; + } + + targetRange = nullthrows(targetRange); + clipboard = getContentStateFragment(content, targetRange); + + var afterRemoval = DraftModifier.removeRange(content, targetRange, 'forward'); + + if (afterRemoval === content) { + return editorState; + } + + return EditorState.push(editorState, afterRemoval, 'remove-range'); + }, + + paste: function paste(editorState) { + if (!clipboard) { + return editorState; + } + + var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), clipboard); + + return EditorState.push(editorState, newContent, 'insert-fragment'); + } +}; + +module.exports = SecondaryClipboard; + +/***/ }), + +/***/ 2140: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandBackspaceToStartOfLine + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); + +var expandRangeToStartOfLine = __webpack_require__(2141); +var getDraftEditorSelectionWithNodes = __webpack_require__(1990); +var moveSelectionBackward = __webpack_require__(1952); +var removeTextWithStrategy = __webpack_require__(1919); + +function keyCommandBackspaceToStartOfLine(editorState) { + var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) { + var selection = strategyState.getSelection(); + if (selection.isCollapsed() && selection.getAnchorOffset() === 0) { + return moveSelectionBackward(strategyState, 1); + } + + var domSelection = global.getSelection(); + var range = domSelection.getRangeAt(0); + range = expandRangeToStartOfLine(range); + + return getDraftEditorSelectionWithNodes(strategyState, null, range.endContainer, range.endOffset, range.startContainer, range.startOffset).selectionState; + }, 'backward'); + + if (afterRemoval === editorState.getCurrentContent()) { + return editorState; + } + + return EditorState.push(editorState, afterRemoval, 'remove-range'); +} + +module.exports = keyCommandBackspaceToStartOfLine; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2141: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule expandRangeToStartOfLine + * @format + * + */ + +var UnicodeUtils = __webpack_require__(1911); + +var getRangeClientRects = __webpack_require__(1989); +var invariant = __webpack_require__(641); + +/** + * Return the computed line height, in pixels, for the provided element. + */ +function getLineHeightPx(element) { + var computed = getComputedStyle(element); + var div = document.createElement('div'); + div.style.fontFamily = computed.fontFamily; + div.style.fontSize = computed.fontSize; + div.style.fontStyle = computed.fontStyle; + div.style.fontWeight = computed.fontWeight; + div.style.lineHeight = computed.lineHeight; + div.style.position = 'absolute'; + div.textContent = 'M'; + + var documentBody = document.body; + !documentBody ? false ? undefined : invariant(false) : void 0; + + // forced layout here + documentBody.appendChild(div); + var rect = div.getBoundingClientRect(); + documentBody.removeChild(div); + + return rect.height; +} + +/** + * Return whether every ClientRect in the provided list lies on the same line. + * + * We assume that the rects on the same line all contain the baseline, so the + * lowest top line needs to be above the highest bottom line (i.e., if you were + * to project the rects onto the y-axis, their intersection would be nonempty). + * + * In addition, we require that no two boxes are lineHeight (or more) apart at + * either top or bottom, which helps protect against false positives for fonts + * with extremely large glyph heights (e.g., with a font size of 17px, Zapfino + * produces rects of height 58px!). + */ +function areRectsOnOneLine(rects, lineHeight) { + var minTop = Infinity; + var minBottom = Infinity; + var maxTop = -Infinity; + var maxBottom = -Infinity; + + for (var ii = 0; ii < rects.length; ii++) { + var rect = rects[ii]; + if (rect.width === 0 || rect.width === 1) { + // When a range starts or ends a soft wrap, many browsers (Chrome, IE, + // Safari) include an empty rect on the previous or next line. When the + // text lies in a container whose position is not integral (e.g., from + // margin: auto), Safari makes these empty rects have width 1 (instead of + // 0). Having one-pixel-wide characters seems unlikely (and most browsers + // report widths in subpixel precision anyway) so it's relatively safe to + // skip over them. + continue; + } + minTop = Math.min(minTop, rect.top); + minBottom = Math.min(minBottom, rect.bottom); + maxTop = Math.max(maxTop, rect.top); + maxBottom = Math.max(maxBottom, rect.bottom); + } + + return maxTop <= minBottom && maxTop - minTop < lineHeight && maxBottom - minBottom < lineHeight; +} + +/** + * Return the length of a node, as used by Range offsets. + */ +function getNodeLength(node) { + // http://www.w3.org/TR/dom/#concept-node-length + switch (node.nodeType) { + case Node.DOCUMENT_TYPE_NODE: + return 0; + case Node.TEXT_NODE: + case Node.PROCESSING_INSTRUCTION_NODE: + case Node.COMMENT_NODE: + return node.length; + default: + return node.childNodes.length; + } +} + +/** + * Given a collapsed range, move the start position backwards as far as + * possible while the range still spans only a single line. + */ +function expandRangeToStartOfLine(range) { + !range.collapsed ? false ? undefined : invariant(false) : void 0; + range = range.cloneRange(); + + var containingElement = range.startContainer; + if (containingElement.nodeType !== 1) { + containingElement = containingElement.parentNode; + } + var lineHeight = getLineHeightPx(containingElement); + + // Imagine our text looks like: + //
once upon a time, there was a boy + // who lived under^ the + // stairs in a small closet.
+ // where the caret represents the cursor. First, we crawl up the tree until + // the range spans multiple lines (setting the start point to before + // "", then before "
"), then at each level we do a search to + // find the latest point which is still on a previous line. We'll find that + // the break point is inside the span, then inside the , then in its text + // node child, the actual break point before "who". + + var bestContainer = range.endContainer; + var bestOffset = range.endOffset; + range.setStart(range.startContainer, 0); + + while (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) { + bestContainer = range.startContainer; + bestOffset = range.startOffset; + !bestContainer.parentNode ? false ? undefined : invariant(false) : void 0; + range.setStartBefore(bestContainer); + if (bestContainer.nodeType === 1 && getComputedStyle(bestContainer).display !== 'inline') { + // The start of the line is never in a different block-level container. + break; + } + } + + // In the above example, range now spans from "
" to "under", + // bestContainer is
, and bestOffset is 1 (index of inside
)]. + // Picking out which child to recurse into here is a special case since we + // don't want to check past -- once we find that the final range starts + // in , we can look at all of its children (and all of their children) + // to find the break point. + + // At all times, (bestContainer, bestOffset) is the latest single-line start + // point that we know of. + var currentContainer = bestContainer; + var maxIndexToConsider = bestOffset - 1; + + do { + var nodeValue = currentContainer.nodeValue; + + for (var ii = maxIndexToConsider; ii >= 0; ii--) { + if (nodeValue != null && ii > 0 && UnicodeUtils.isSurrogatePair(nodeValue, ii - 1)) { + // We're in the middle of a surrogate pair -- skip over so we never + // return a range with an endpoint in the middle of a code point. + continue; + } + + range.setStart(currentContainer, ii); + if (areRectsOnOneLine(getRangeClientRects(range), lineHeight)) { + bestContainer = currentContainer; + bestOffset = ii; + } else { + break; + } + } + + if (ii === -1 || currentContainer.childNodes.length === 0) { + // If ii === -1, then (bestContainer, bestOffset), which is equal to + // (currentContainer, 0), was a single-line start point but a start + // point before currentContainer wasn't, so the line break seems to + // have occurred immediately after currentContainer's start tag + // + // If currentContainer.childNodes.length === 0, we're already at a + // terminal node (e.g., text node) and should return our current best. + break; + } + + currentContainer = currentContainer.childNodes[ii]; + maxIndexToConsider = getNodeLength(currentContainer); + } while (true); + + range.setStart(bestContainer, bestOffset); + return range; +} + +module.exports = expandRangeToStartOfLine; + +/***/ }), + +/***/ 2142: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandBackspaceWord + * @format + * + */ + + + +var DraftRemovableWord = __webpack_require__(1991); +var EditorState = __webpack_require__(1900); + +var moveSelectionBackward = __webpack_require__(1952); +var removeTextWithStrategy = __webpack_require__(1919); + +/** + * Delete the word that is left of the cursor, as well as any spaces or + * punctuation after the word. + */ +function keyCommandBackspaceWord(editorState) { + var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) { + var selection = strategyState.getSelection(); + var offset = selection.getStartOffset(); + // If there are no words before the cursor, remove the preceding newline. + if (offset === 0) { + return moveSelectionBackward(strategyState, 1); + } + var key = selection.getStartKey(); + var content = strategyState.getCurrentContent(); + var text = content.getBlockForKey(key).getText().slice(0, offset); + var toRemove = DraftRemovableWord.getBackward(text); + return moveSelectionBackward(strategyState, toRemove.length || 1); + }, 'backward'); + + if (afterRemoval === editorState.getCurrentContent()) { + return editorState; + } + + return EditorState.push(editorState, afterRemoval, 'remove-range'); +} + +module.exports = keyCommandBackspaceWord; + +/***/ }), + +/***/ 2143: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * @typechecks + * @stub + * + */ + + + +// \u00a1-\u00b1\u00b4-\u00b8\u00ba\u00bb\u00bf +// is latin supplement punctuation except fractions and superscript +// numbers +// \u2010-\u2027\u2030-\u205e +// is punctuation from the general punctuation block: +// weird quotes, commas, bullets, dashes, etc. +// \u30fb\u3001\u3002\u3008-\u3011\u3014-\u301f +// is CJK punctuation +// \uff1a-\uff1f\uff01-\uff0f\uff3b-\uff40\uff5b-\uff65 +// is some full-width/half-width punctuation +// \u2E2E\u061f\u066a-\u066c\u061b\u060c\u060d\uFD3e\uFD3F +// is some Arabic punctuation marks +// \u1801\u0964\u104a\u104b +// is misc. other language punctuation marks + +var PUNCTUATION = '[.,+*?$|#{}()\'\\^\\-\\[\\]\\\\\\/!@%"~=<>_:;' + '\u30FB\u3001\u3002\u3008-\u3011\u3014-\u301F\uFF1A-\uFF1F\uFF01-\uFF0F' + '\uFF3B-\uFF40\uFF5B-\uFF65\u2E2E\u061F\u066A-\u066C\u061B\u060C\u060D' + '\uFD3E\uFD3F\u1801\u0964\u104A\u104B\u2010-\u2027\u2030-\u205E' + '\xA1-\xB1\xB4-\xB8\xBA\xBB\xBF]'; + +module.exports = { + getPunctuation: function getPunctuation() { + return PUNCTUATION; + } +}; + +/***/ }), + +/***/ 2144: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandDeleteWord + * @format + * + */ + + + +var DraftRemovableWord = __webpack_require__(1991); +var EditorState = __webpack_require__(1900); + +var moveSelectionForward = __webpack_require__(1992); +var removeTextWithStrategy = __webpack_require__(1919); + +/** + * Delete the word that is right of the cursor, as well as any spaces or + * punctuation before the word. + */ +function keyCommandDeleteWord(editorState) { + var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) { + var selection = strategyState.getSelection(); + var offset = selection.getStartOffset(); + var key = selection.getStartKey(); + var content = strategyState.getCurrentContent(); + var text = content.getBlockForKey(key).getText().slice(offset); + var toRemove = DraftRemovableWord.getForward(text); + + // If there are no words in front of the cursor, remove the newline. + return moveSelectionForward(strategyState, toRemove.length || 1); + }, 'forward'); + + if (afterRemoval === editorState.getCurrentContent()) { + return editorState; + } + + return EditorState.push(editorState, afterRemoval, 'remove-range'); +} + +module.exports = keyCommandDeleteWord; + +/***/ }), + +/***/ 2145: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandInsertNewline + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); + +function keyCommandInsertNewline(editorState) { + var contentState = DraftModifier.splitBlock(editorState.getCurrentContent(), editorState.getSelection()); + return EditorState.push(editorState, contentState, 'split-block'); +} + +module.exports = keyCommandInsertNewline; + +/***/ }), + +/***/ 2146: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandMoveSelectionToEndOfBlock + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); + +/** + * See comment for `moveSelectionToStartOfBlock`. + */ +function keyCommandMoveSelectionToEndOfBlock(editorState) { + var selection = editorState.getSelection(); + var endKey = selection.getEndKey(); + var content = editorState.getCurrentContent(); + var textLength = content.getBlockForKey(endKey).getLength(); + return EditorState.set(editorState, { + selection: selection.merge({ + anchorKey: endKey, + anchorOffset: textLength, + focusKey: endKey, + focusOffset: textLength, + isBackward: false + }), + forceSelection: true + }); +} + +module.exports = keyCommandMoveSelectionToEndOfBlock; + +/***/ }), + +/***/ 2147: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandMoveSelectionToStartOfBlock + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); + +/** + * Collapse selection at the start of the first selected block. This is used + * for Firefox versions that attempt to navigate forward/backward instead of + * moving the cursor. Other browsers are able to move the cursor natively. + */ +function keyCommandMoveSelectionToStartOfBlock(editorState) { + var selection = editorState.getSelection(); + var startKey = selection.getStartKey(); + return EditorState.set(editorState, { + selection: selection.merge({ + anchorKey: startKey, + anchorOffset: 0, + focusKey: startKey, + focusOffset: 0, + isBackward: false + }), + forceSelection: true + }); +} + +module.exports = keyCommandMoveSelectionToStartOfBlock; + +/***/ }), + +/***/ 2148: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandPlainBackspace + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); +var UnicodeUtils = __webpack_require__(1911); + +var moveSelectionBackward = __webpack_require__(1952); +var removeTextWithStrategy = __webpack_require__(1919); + +/** + * Remove the selected range. If the cursor is collapsed, remove the preceding + * character. This operation is Unicode-aware, so removing a single character + * will remove a surrogate pair properly as well. + */ +function keyCommandPlainBackspace(editorState) { + var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) { + var selection = strategyState.getSelection(); + var content = strategyState.getCurrentContent(); + var key = selection.getAnchorKey(); + var offset = selection.getAnchorOffset(); + var charBehind = content.getBlockForKey(key).getText()[offset - 1]; + return moveSelectionBackward(strategyState, charBehind ? UnicodeUtils.getUTF16Length(charBehind, 0) : 1); + }, 'backward'); + + if (afterRemoval === editorState.getCurrentContent()) { + return editorState; + } + + var selection = editorState.getSelection(); + return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'backspace-character' : 'remove-range'); +} + +module.exports = keyCommandPlainBackspace; + +/***/ }), + +/***/ 2149: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandPlainDelete + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); +var UnicodeUtils = __webpack_require__(1911); + +var moveSelectionForward = __webpack_require__(1992); +var removeTextWithStrategy = __webpack_require__(1919); + +/** + * Remove the selected range. If the cursor is collapsed, remove the following + * character. This operation is Unicode-aware, so removing a single character + * will remove a surrogate pair properly as well. + */ +function keyCommandPlainDelete(editorState) { + var afterRemoval = removeTextWithStrategy(editorState, function (strategyState) { + var selection = strategyState.getSelection(); + var content = strategyState.getCurrentContent(); + var key = selection.getAnchorKey(); + var offset = selection.getAnchorOffset(); + var charAhead = content.getBlockForKey(key).getText()[offset]; + return moveSelectionForward(strategyState, charAhead ? UnicodeUtils.getUTF16Length(charAhead, 0) : 1); + }, 'forward'); + + if (afterRemoval === editorState.getCurrentContent()) { + return editorState; + } + + var selection = editorState.getSelection(); + + return EditorState.push(editorState, afterRemoval.set('selectionBefore', selection), selection.isCollapsed() ? 'delete-character' : 'remove-range'); +} + +module.exports = keyCommandPlainDelete; + +/***/ }), + +/***/ 2150: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandTransposeCharacters + * @format + * + */ + + + +var DraftModifier = __webpack_require__(1901); +var EditorState = __webpack_require__(1900); + +var getContentStateFragment = __webpack_require__(1925); + +/** + * Transpose the characters on either side of a collapsed cursor, or + * if the cursor is at the end of the block, transpose the last two + * characters. + */ +function keyCommandTransposeCharacters(editorState) { + var selection = editorState.getSelection(); + if (!selection.isCollapsed()) { + return editorState; + } + + var offset = selection.getAnchorOffset(); + if (offset === 0) { + return editorState; + } + + var blockKey = selection.getAnchorKey(); + var content = editorState.getCurrentContent(); + var block = content.getBlockForKey(blockKey); + var length = block.getLength(); + + // Nothing to transpose if there aren't two characters. + if (length <= 1) { + return editorState; + } + + var removalRange; + var finalSelection; + + if (offset === length) { + // The cursor is at the end of the block. Swap the last two characters. + removalRange = selection.set('anchorOffset', offset - 1); + finalSelection = selection; + } else { + removalRange = selection.set('focusOffset', offset + 1); + finalSelection = removalRange.set('anchorOffset', offset + 1); + } + + // Extract the character to move as a fragment. This preserves its + // styling and entity, if any. + var movedFragment = getContentStateFragment(content, removalRange); + var afterRemoval = DraftModifier.removeRange(content, removalRange, 'backward'); + + // After the removal, the insertion target is one character back. + var selectionAfter = afterRemoval.getSelectionAfter(); + var targetOffset = selectionAfter.getAnchorOffset() - 1; + var targetRange = selectionAfter.merge({ + anchorOffset: targetOffset, + focusOffset: targetOffset + }); + + var afterInsert = DraftModifier.replaceWithFragment(afterRemoval, targetRange, movedFragment); + + var newEditorState = EditorState.push(editorState, afterInsert, 'insert-fragment'); + + return EditorState.acceptSelection(newEditorState, finalSelection); +} + +module.exports = keyCommandTransposeCharacters; + +/***/ }), + +/***/ 2151: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyCommandUndo + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); + +function keyCommandUndo(e, editorState, updateFn) { + var undoneState = EditorState.undo(editorState); + + // If the last change to occur was a spellcheck change, allow the undo + // event to fall through to the browser. This allows the browser to record + // the unwanted change, which should soon lead it to learn not to suggest + // the correction again. + if (editorState.getLastChangeType() === 'spellcheck-change') { + var nativelyRenderedContent = undoneState.getCurrentContent(); + updateFn(EditorState.set(undoneState, { nativelyRenderedContent: nativelyRenderedContent })); + return; + } + + // Otheriwse, manage the undo behavior manually. + e.preventDefault(); + if (!editorState.getNativelyRenderedContent()) { + updateFn(undoneState); + return; + } + + // Trigger a re-render with the current content state to ensure that the + // component tree has up-to-date props for comparison. + updateFn(EditorState.set(editorState, { nativelyRenderedContent: null })); + + // Wait to ensure that the re-render has occurred before performing + // the undo action. + setTimeout(function () { + updateFn(undoneState); + }, 0); +} + +module.exports = keyCommandUndo; + +/***/ }), + +/***/ 2152: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnPaste + * @format + * + */ + + + +var BlockMapBuilder = __webpack_require__(1916); +var CharacterMetadata = __webpack_require__(1902); +var DataTransfer = __webpack_require__(1984); +var DraftModifier = __webpack_require__(1901); +var DraftPasteProcessor = __webpack_require__(2153); +var EditorState = __webpack_require__(1900); +var RichTextEditorUtil = __webpack_require__(1995); + +var getEntityKeyForSelection = __webpack_require__(1946); +var getTextContentFromFiles = __webpack_require__(1986); +var isEventHandled = __webpack_require__(1918); +var splitTextIntoTextBlocks = __webpack_require__(2156); + +/** + * Paste content. + */ +function editOnPaste(editor, e) { + e.preventDefault(); + var data = new DataTransfer(e.clipboardData); + + // Get files, unless this is likely to be a string the user wants inline. + if (!data.isRichText()) { + var files = data.getFiles(); + var defaultFileText = data.getText(); + if (files.length > 0) { + // Allow customized paste handling for images, etc. Otherwise, fall + // through to insert text contents into the editor. + if (editor.props.handlePastedFiles && isEventHandled(editor.props.handlePastedFiles(files))) { + return; + } + + getTextContentFromFiles(files, function ( /*string*/fileText) { + fileText = fileText || defaultFileText; + if (!fileText) { + return; + } + + var editorState = editor._latestEditorState; + var blocks = splitTextIntoTextBlocks(fileText); + var character = CharacterMetadata.create({ + style: editorState.getCurrentInlineStyle(), + entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()) + }); + var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState); + + var text = DraftPasteProcessor.processText(blocks, character, currentBlockType); + var fragment = BlockMapBuilder.createFromArray(text); + + var withInsertedText = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment); + + editor.update(EditorState.push(editorState, withInsertedText, 'insert-fragment')); + }); + + return; + } + } + + var textBlocks = []; + var text = data.getText(); + var html = data.getHTML(); + var editorState = editor._latestEditorState; + + if (editor.props.handlePastedText && isEventHandled(editor.props.handlePastedText(text, html, editorState))) { + return; + } + + if (text) { + textBlocks = splitTextIntoTextBlocks(text); + } + + if (!editor.props.stripPastedStyles) { + // If the text from the paste event is rich content that matches what we + // already have on the internal clipboard, assume that we should just use + // the clipboard fragment for the paste. This will allow us to preserve + // styling and entities, if any are present. Note that newlines are + // stripped during comparison -- this is because copy/paste within the + // editor in Firefox and IE will not include empty lines. The resulting + // paste will preserve the newlines correctly. + var internalClipboard = editor.getClipboard(); + if (data.isRichText() && internalClipboard) { + if ( + // If the editorKey is present in the pasted HTML, it should be safe to + // assume this is an internal paste. + html.indexOf(editor.getEditorKey()) !== -1 || + // The copy may have been made within a single block, in which case the + // editor key won't be part of the paste. In this case, just check + // whether the pasted text matches the internal clipboard. + textBlocks.length === 1 && internalClipboard.size === 1 && internalClipboard.first().getText() === text) { + editor.update(insertFragment(editor._latestEditorState, internalClipboard)); + return; + } + } else if (internalClipboard && data.types.includes('com.apple.webarchive') && !data.types.includes('text/html') && areTextBlocksAndClipboardEqual(textBlocks, internalClipboard)) { + // Safari does not properly store text/html in some cases. + // Use the internalClipboard if present and equal to what is on + // the clipboard. See https://bugs.webkit.org/show_bug.cgi?id=19893. + editor.update(insertFragment(editor._latestEditorState, internalClipboard)); + return; + } + + // If there is html paste data, try to parse that. + if (html) { + var htmlFragment = DraftPasteProcessor.processHTML(html, editor.props.blockRenderMap); + if (htmlFragment) { + var contentBlocks = htmlFragment.contentBlocks, + entityMap = htmlFragment.entityMap; + + if (contentBlocks) { + var htmlMap = BlockMapBuilder.createFromArray(contentBlocks); + editor.update(insertFragment(editor._latestEditorState, htmlMap, entityMap)); + return; + } + } + } + + // Otherwise, create a new fragment from our pasted text. Also + // empty the internal clipboard, since it's no longer valid. + editor.setClipboard(null); + } + + if (textBlocks.length) { + var character = CharacterMetadata.create({ + style: editorState.getCurrentInlineStyle(), + entity: getEntityKeyForSelection(editorState.getCurrentContent(), editorState.getSelection()) + }); + + var currentBlockType = RichTextEditorUtil.getCurrentBlockType(editorState); + + var textFragment = DraftPasteProcessor.processText(textBlocks, character, currentBlockType); + + var textMap = BlockMapBuilder.createFromArray(textFragment); + editor.update(insertFragment(editor._latestEditorState, textMap)); + } +} + +function insertFragment(editorState, fragment, entityMap) { + var newContent = DraftModifier.replaceWithFragment(editorState.getCurrentContent(), editorState.getSelection(), fragment); + // TODO: merge the entity map once we stop using DraftEntity + // like this: + // const mergedEntityMap = newContent.getEntityMap().merge(entityMap); + + return EditorState.push(editorState, newContent.set('entityMap', entityMap), 'insert-fragment'); +} + +function areTextBlocksAndClipboardEqual(textBlocks, blockMap) { + return textBlocks.length === blockMap.size && blockMap.valueSeq().every(function (block, ii) { + return block.getText() === textBlocks[ii]; + }); +} + +module.exports = editOnPaste; + +/***/ }), + +/***/ 2153: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftPasteProcessor + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +var CharacterMetadata = __webpack_require__(1902); +var ContentBlock = __webpack_require__(1910); +var ContentBlockNode = __webpack_require__(1903); +var DraftFeatureFlags = __webpack_require__(1909); +var Immutable = __webpack_require__(35); + +var convertFromHTMLtoContentBlocks = __webpack_require__(1993); +var generateRandomKey = __webpack_require__(1907); +var getSafeBodyFromHTML = __webpack_require__(1994); +var sanitizeDraftText = __webpack_require__(1942); + +var List = Immutable.List, + Repeat = Immutable.Repeat; + + +var experimentalTreeDataSupport = DraftFeatureFlags.draft_tree_data_support; +var ContentBlockRecord = experimentalTreeDataSupport ? ContentBlockNode : ContentBlock; + +var DraftPasteProcessor = { + processHTML: function processHTML(html, blockRenderMap) { + return convertFromHTMLtoContentBlocks(html, getSafeBodyFromHTML, blockRenderMap); + }, + processText: function processText(textBlocks, character, type) { + return textBlocks.reduce(function (acc, textLine, index) { + textLine = sanitizeDraftText(textLine); + var key = generateRandomKey(); + + var blockNodeConfig = { + key: key, + type: type, + text: textLine, + characterList: List(Repeat(character, textLine.length)) + }; + + // next block updates previous block + if (experimentalTreeDataSupport && index !== 0) { + var prevSiblingIndex = index - 1; + // update previous block + var previousBlock = acc[prevSiblingIndex] = acc[prevSiblingIndex].merge({ + nextSibling: key + }); + blockNodeConfig = _extends({}, blockNodeConfig, { + prevSibling: previousBlock.getKey() + }); + } + + acc.push(new ContentBlockRecord(blockNodeConfig)); + + return acc; + }, []); + } +}; + +module.exports = DraftPasteProcessor; + +/***/ }), + +/***/ 2154: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var URI = function () { + function URI(uri) { + _classCallCheck(this, URI); + + this._uri = uri; + } + + URI.prototype.toString = function toString() { + return this._uri; + }; + + return URI; +}(); + +module.exports = URI; + +/***/ }), + +/***/ 2155: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule adjustBlockDepthForContentState + * @format + * + */ + + + +function adjustBlockDepthForContentState(contentState, selectionState, adjustment, maxDepth) { + var startKey = selectionState.getStartKey(); + var endKey = selectionState.getEndKey(); + var blockMap = contentState.getBlockMap(); + var blocks = blockMap.toSeq().skipUntil(function (_, k) { + return k === startKey; + }).takeUntil(function (_, k) { + return k === endKey; + }).concat([[endKey, blockMap.get(endKey)]]).map(function (block) { + var depth = block.getDepth() + adjustment; + depth = Math.max(0, Math.min(depth, maxDepth)); + return block.set('depth', depth); + }); + + blockMap = blockMap.merge(blocks); + + return contentState.merge({ + blockMap: blockMap, + selectionBefore: selectionState, + selectionAfter: selectionState + }); +} + +module.exports = adjustBlockDepthForContentState; + +/***/ }), + +/***/ 2156: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule splitTextIntoTextBlocks + * @format + * + */ + + + +var NEWLINE_REGEX = /\r\n?|\n/g; + +function splitTextIntoTextBlocks(text) { + return text.split(NEWLINE_REGEX); +} + +module.exports = splitTextIntoTextBlocks; + +/***/ }), + +/***/ 2157: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule editOnSelect + * @format + * + */ + + + +var EditorState = __webpack_require__(1900); +var ReactDOM = __webpack_require__(32); + +var getDraftEditorSelection = __webpack_require__(2158); +var invariant = __webpack_require__(641); + +function editOnSelect(editor) { + if (editor._blockSelectEvents || editor._latestEditorState !== editor.props.editorState) { + return; + } + + var editorState = editor.props.editorState; + var editorNode = ReactDOM.findDOMNode(editor.editorContainer); + !editorNode ? false ? undefined : invariant(false) : void 0; + !(editorNode.firstChild instanceof HTMLElement) ? false ? undefined : invariant(false) : void 0; + var documentSelection = getDraftEditorSelection(editorState, editorNode.firstChild); + var updatedSelectionState = documentSelection.selectionState; + + if (updatedSelectionState !== editorState.getSelection()) { + if (documentSelection.needsRecovery) { + editorState = EditorState.forceSelection(editorState, updatedSelectionState); + } else { + editorState = EditorState.acceptSelection(editorState, updatedSelectionState); + } + editor.update(editorState); + } +} + +module.exports = editOnSelect; + +/***/ }), + +/***/ 2158: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getDraftEditorSelection + * @format + * + */ + + + +var getDraftEditorSelectionWithNodes = __webpack_require__(1990); + +/** + * Convert the current selection range to an anchor/focus pair of offset keys + * and values that can be interpreted by components. + */ +function getDraftEditorSelection(editorState, root) { + var selection = global.getSelection(); + + // No active selection. + if (selection.rangeCount === 0) { + return { + selectionState: editorState.getSelection().set('hasFocus', false), + needsRecovery: false + }; + } + + return getDraftEditorSelectionWithNodes(editorState, root, selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset); +} + +module.exports = getDraftEditorSelection; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), + +/***/ 2159: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftEditorPlaceholder.react + * @format + * + */ + + + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var React = __webpack_require__(1); + +var cx = __webpack_require__(1914); + +/** + * This component is responsible for rendering placeholder text for the + * `DraftEditor` component. + * + * Override placeholder style via CSS. + */ +var DraftEditorPlaceholder = function (_React$Component) { + _inherits(DraftEditorPlaceholder, _React$Component); + + function DraftEditorPlaceholder() { + _classCallCheck(this, DraftEditorPlaceholder); + + return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); + } + + DraftEditorPlaceholder.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { + return this.props.text !== nextProps.text || this.props.editorState.getSelection().getHasFocus() !== nextProps.editorState.getSelection().getHasFocus(); + }; + + DraftEditorPlaceholder.prototype.render = function render() { + var hasFocus = this.props.editorState.getSelection().getHasFocus(); + + var className = cx({ + 'public/DraftEditorPlaceholder/root': true, + 'public/DraftEditorPlaceholder/hasFocus': hasFocus + }); + + var contentStyle = { + whiteSpace: 'pre-wrap' + }; + + return React.createElement( + 'div', + { className: className }, + React.createElement( + 'div', + { + className: cx('public/DraftEditorPlaceholder/inner'), + id: this.props.accessibilityID, + style: contentStyle }, + this.props.text + ) + ); + }; + + return DraftEditorPlaceholder; +}(React.Component); + +module.exports = DraftEditorPlaceholder; + +/***/ }), + +/***/ 2160: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule convertFromDraftStateToRaw + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +var ContentBlock = __webpack_require__(1910); +var ContentBlockNode = __webpack_require__(1903); +var DraftStringKey = __webpack_require__(1997); + +var encodeEntityRanges = __webpack_require__(2161); +var encodeInlineStyleRanges = __webpack_require__(2162); +var invariant = __webpack_require__(641); + +var createRawBlock = function createRawBlock(block, entityStorageMap) { + return { + key: block.getKey(), + text: block.getText(), + type: block.getType(), + depth: block.getDepth(), + inlineStyleRanges: encodeInlineStyleRanges(block), + entityRanges: encodeEntityRanges(block, entityStorageMap), + data: block.getData().toObject() + }; +}; + +var insertRawBlock = function insertRawBlock(block, entityMap, rawBlocks, blockCacheRef) { + if (block instanceof ContentBlock) { + rawBlocks.push(createRawBlock(block, entityMap)); + return; + } + + !(block instanceof ContentBlockNode) ? false ? undefined : invariant(false) : void 0; + + var parentKey = block.getParentKey(); + var rawBlock = blockCacheRef[block.getKey()] = _extends({}, createRawBlock(block, entityMap), { + children: [] + }); + + if (parentKey) { + blockCacheRef[parentKey].children.push(rawBlock); + return; + } + + rawBlocks.push(rawBlock); +}; + +var encodeRawBlocks = function encodeRawBlocks(contentState, rawState) { + var entityMap = rawState.entityMap; + + + var rawBlocks = []; + + var blockCacheRef = {}; + var entityCacheRef = {}; + var entityStorageKey = 0; + + contentState.getBlockMap().forEach(function (block) { + block.findEntityRanges(function (character) { + return character.getEntity() !== null; + }, function (start) { + var entityKey = block.getEntityAt(start); + // Stringify to maintain order of otherwise numeric keys. + var stringifiedEntityKey = DraftStringKey.stringify(entityKey); + // This makes this function resilient to two entities + // erroneously having the same key + if (entityCacheRef[stringifiedEntityKey]) { + return; + } + entityCacheRef[stringifiedEntityKey] = entityKey; + // we need the `any` casting here since this is a temporary state + // where we will later on flip the entity map and populate it with + // real entity, at this stage we just need to map back the entity + // key used by the BlockNode + entityMap[stringifiedEntityKey] = '' + entityStorageKey; + entityStorageKey++; + }); + + insertRawBlock(block, entityMap, rawBlocks, blockCacheRef); + }); + + return { + blocks: rawBlocks, + entityMap: entityMap + }; +}; + +// Flip storage map so that our storage keys map to global +// DraftEntity keys. +var encodeRawEntityMap = function encodeRawEntityMap(contentState, rawState) { + var blocks = rawState.blocks, + entityMap = rawState.entityMap; + + + var rawEntityMap = {}; + + Object.keys(entityMap).forEach(function (key, index) { + var entity = contentState.getEntity(DraftStringKey.unstringify(key)); + rawEntityMap[index] = { + type: entity.getType(), + mutability: entity.getMutability(), + data: entity.getData() + }; + }); + + return { + blocks: blocks, + entityMap: rawEntityMap + }; +}; + +var convertFromDraftStateToRaw = function convertFromDraftStateToRaw(contentState) { + var rawDraftContentState = { + entityMap: {}, + blocks: [] + }; + + // add blocks + rawDraftContentState = encodeRawBlocks(contentState, rawDraftContentState); + + // add entities + rawDraftContentState = encodeRawEntityMap(contentState, rawDraftContentState); + + return rawDraftContentState; +}; + +module.exports = convertFromDraftStateToRaw; + +/***/ }), + +/***/ 2161: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule encodeEntityRanges + * @format + * + */ + + + +var DraftStringKey = __webpack_require__(1997); +var UnicodeUtils = __webpack_require__(1911); + +var strlen = UnicodeUtils.strlen; + +/** + * Convert to UTF-8 character counts for storage. + */ + +function encodeEntityRanges(block, storageMap) { + var encoded = []; + block.findEntityRanges(function (character) { + return !!character.getEntity(); + }, function ( /*number*/start, /*number*/end) { + var text = block.getText(); + var key = block.getEntityAt(start); + encoded.push({ + offset: strlen(text.slice(0, start)), + length: strlen(text.slice(start, end)), + // Encode the key as a number for range storage. + key: Number(storageMap[DraftStringKey.stringify(key)]) + }); + }); + return encoded; +} + +module.exports = encodeEntityRanges; + +/***/ }), + +/***/ 2162: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule encodeInlineStyleRanges + * @format + * + */ + + + +var UnicodeUtils = __webpack_require__(1911); + +var findRangesImmutable = __webpack_require__(1917); + +var areEqual = function areEqual(a, b) { + return a === b; +}; +var isTruthy = function isTruthy(a) { + return !!a; +}; +var EMPTY_ARRAY = []; + +/** + * Helper function for getting encoded styles for each inline style. Convert + * to UTF-8 character counts for storage. + */ +function getEncodedInlinesForType(block, styleList, styleToEncode) { + var ranges = []; + + // Obtain an array with ranges for only the specified style. + var filteredInlines = styleList.map(function (style) { + return style.has(styleToEncode); + }).toList(); + + findRangesImmutable(filteredInlines, areEqual, + // We only want to keep ranges with nonzero style values. + isTruthy, function (start, end) { + var text = block.getText(); + ranges.push({ + offset: UnicodeUtils.strlen(text.slice(0, start)), + length: UnicodeUtils.strlen(text.slice(start, end)), + style: styleToEncode + }); + }); + + return ranges; +} + +/* + * Retrieve the encoded arrays of inline styles, with each individual style + * treated separately. + */ +function encodeInlineStyleRanges(block) { + var styleList = block.getCharacterList().map(function (c) { + return c.getStyle(); + }).toList(); + var ranges = styleList.flatten().toSet().map(function (style) { + return getEncodedInlinesForType(block, styleList, style); + }); + + return Array.prototype.concat.apply(EMPTY_ARRAY, ranges.toJS()); +} + +module.exports = encodeInlineStyleRanges; + +/***/ }), + +/***/ 2163: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule convertFromRawToDraftState + * @format + * + */ + + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +var ContentBlock = __webpack_require__(1910); +var ContentBlockNode = __webpack_require__(1903); +var ContentState = __webpack_require__(1941); +var DraftEntity = __webpack_require__(1926); +var DraftFeatureFlags = __webpack_require__(1909); +var DraftTreeAdapter = __webpack_require__(2164); +var Immutable = __webpack_require__(35); +var SelectionState = __webpack_require__(1913); + +var createCharacterList = __webpack_require__(2165); +var decodeEntityRanges = __webpack_require__(2166); +var decodeInlineStyleRanges = __webpack_require__(2167); +var generateRandomKey = __webpack_require__(1907); +var invariant = __webpack_require__(641); + +var experimentalTreeDataSupport = DraftFeatureFlags.draft_tree_data_support; + +var List = Immutable.List, + Map = Immutable.Map, + OrderedMap = Immutable.OrderedMap; + + +var decodeBlockNodeConfig = function decodeBlockNodeConfig(block, entityMap) { + var key = block.key, + type = block.type, + data = block.data, + text = block.text, + depth = block.depth; + + + var blockNodeConfig = { + text: text, + depth: depth || 0, + type: type || 'unstyled', + key: key || generateRandomKey(), + data: Map(data), + characterList: decodeCharacterList(block, entityMap) + }; + + return blockNodeConfig; +}; + +var decodeCharacterList = function decodeCharacterList(block, entityMap) { + var text = block.text, + rawEntityRanges = block.entityRanges, + rawInlineStyleRanges = block.inlineStyleRanges; + + + var entityRanges = rawEntityRanges || []; + var inlineStyleRanges = rawInlineStyleRanges || []; + + // Translate entity range keys to the DraftEntity map. + return createCharacterList(decodeInlineStyleRanges(text, inlineStyleRanges), decodeEntityRanges(text, entityRanges.filter(function (range) { + return entityMap.hasOwnProperty(range.key); + }).map(function (range) { + return _extends({}, range, { key: entityMap[range.key] }); + }))); +}; + +var addKeyIfMissing = function addKeyIfMissing(block) { + return _extends({}, block, { + key: block.key || generateRandomKey() + }); +}; + +/** + * Node stack is responsible to ensure we traverse the tree only once + * in depth order, while also providing parent refs to inner nodes to + * construct their links. + */ +var updateNodeStack = function updateNodeStack(stack, nodes, parentRef) { + var nodesWithParentRef = nodes.map(function (block) { + return _extends({}, block, { + parentRef: parentRef + }); + }); + + // since we pop nodes from the stack we need to insert them in reverse + return stack.concat(nodesWithParentRef.reverse()); +}; + +/** + * This will build a tree draft content state by creating the node + * reference links into a single tree walk. Each node has a link + * reference to "parent", "children", "nextSibling" and "prevSibling" + * blockMap will be created using depth ordering. + */ +var decodeContentBlockNodes = function decodeContentBlockNodes(blocks, entityMap) { + return blocks + // ensure children have valid keys to enable sibling links + .map(addKeyIfMissing).reduce(function (blockMap, block, index) { + !Array.isArray(block.children) ? false ? undefined : invariant(false) : void 0; + + // ensure children have valid keys to enable sibling links + var children = block.children.map(addKeyIfMissing); + + // root level nodes + var contentBlockNode = new ContentBlockNode(_extends({}, decodeBlockNodeConfig(block, entityMap), { + prevSibling: index === 0 ? null : blocks[index - 1].key, + nextSibling: index === blocks.length - 1 ? null : blocks[index + 1].key, + children: List(children.map(function (child) { + return child.key; + })) + })); + + // push root node to blockMap + blockMap = blockMap.set(contentBlockNode.getKey(), contentBlockNode); + + // this stack is used to ensure we visit all nodes respecting depth ordering + var stack = updateNodeStack([], children, contentBlockNode); + + // start computing children nodes + while (stack.length > 0) { + // we pop from the stack and start processing this node + var node = stack.pop(); + + // parentRef already points to a converted ContentBlockNode + var parentRef = node.parentRef; + var siblings = parentRef.getChildKeys(); + var _index = siblings.indexOf(node.key); + var isValidBlock = Array.isArray(node.children); + + if (!isValidBlock) { + !isValidBlock ? false ? undefined : invariant(false) : void 0; + break; + } + + // ensure children have valid keys to enable sibling links + var _children = node.children.map(addKeyIfMissing); + + var _contentBlockNode = new ContentBlockNode(_extends({}, decodeBlockNodeConfig(node, entityMap), { + parent: parentRef.getKey(), + children: List(_children.map(function (child) { + return child.key; + })), + prevSibling: _index === 0 ? null : siblings.get(_index - 1), + nextSibling: _index === siblings.size - 1 ? null : siblings.get(_index + 1) + })); + + // push node to blockMap + blockMap = blockMap.set(_contentBlockNode.getKey(), _contentBlockNode); + + // this stack is used to ensure we visit all nodes respecting depth ordering + stack = updateNodeStack(stack, _children, _contentBlockNode); + } + + return blockMap; + }, OrderedMap()); +}; + +var decodeContentBlocks = function decodeContentBlocks(blocks, entityMap) { + return OrderedMap(blocks.map(function (block) { + var contentBlock = new ContentBlock(decodeBlockNodeConfig(block, entityMap)); + return [contentBlock.getKey(), contentBlock]; + })); +}; + +var decodeRawBlocks = function decodeRawBlocks(rawState, entityMap) { + var isTreeRawBlock = Array.isArray(rawState.blocks[0].children); + var rawBlocks = experimentalTreeDataSupport && !isTreeRawBlock ? DraftTreeAdapter.fromRawStateToRawTreeState(rawState).blocks : rawState.blocks; + + if (!experimentalTreeDataSupport) { + return decodeContentBlocks(isTreeRawBlock ? DraftTreeAdapter.fromRawTreeStateToRawState(rawState).blocks : rawBlocks, entityMap); + } + + return decodeContentBlockNodes(rawBlocks, entityMap); +}; + +var decodeRawEntityMap = function decodeRawEntityMap(rawState) { + var rawEntityMap = rawState.entityMap; + + var entityMap = {}; + + // TODO: Update this once we completely remove DraftEntity + Object.keys(rawEntityMap).forEach(function (rawEntityKey) { + var _rawEntityMap$rawEnti = rawEntityMap[rawEntityKey], + type = _rawEntityMap$rawEnti.type, + mutability = _rawEntityMap$rawEnti.mutability, + data = _rawEntityMap$rawEnti.data; + + // get the key reference to created entity + + entityMap[rawEntityKey] = DraftEntity.__create(type, mutability, data || {}); + }); + + return entityMap; +}; + +var convertFromRawToDraftState = function convertFromRawToDraftState(rawState) { + !Array.isArray(rawState.blocks) ? false ? undefined : invariant(false) : void 0; + + // decode entities + var entityMap = decodeRawEntityMap(rawState); + + // decode blockMap + var blockMap = decodeRawBlocks(rawState, entityMap); + + // create initial selection + var selectionState = blockMap.isEmpty() ? new SelectionState() : SelectionState.createEmpty(blockMap.first().getKey()); + + return new ContentState({ + blockMap: blockMap, + entityMap: entityMap, + selectionBefore: selectionState, + selectionAfter: selectionState + }); +}; + +module.exports = convertFromRawToDraftState; + +/***/ }), + +/***/ 2164: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _assign = __webpack_require__(145); + +var _extends = _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; }; + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DraftTreeAdapter + * @format + * + * + * This is unstable and not part of the public API and should not be used by + * production systems. This file may be update/removed without notice. + */ + +var invariant = __webpack_require__(641); + +var traverseInDepthOrder = function traverseInDepthOrder(blocks, fn) { + var stack = [].concat(blocks).reverse(); + while (stack.length) { + var _block = stack.pop(); + + fn(_block); + + var children = _block.children; + + !Array.isArray(children) ? false ? undefined : invariant(false) : void 0; + + stack = stack.concat([].concat(children.reverse())); + } +}; + +var isListBlock = function isListBlock(block) { + if (!(block && block.type)) { + return false; + } + var type = block.type; + + return type === 'unordered-list-item' || type === 'ordered-list-item'; +}; + +var addDepthToChildren = function addDepthToChildren(block) { + if (Array.isArray(block.children)) { + block.children = block.children.map(function (child) { + return child.type === block.type ? _extends({}, child, { depth: (block.depth || 0) + 1 }) : child; + }); + } +}; + +/** + * This adapter is intended to be be used as an adapter to draft tree data + * + * draft state <=====> draft tree state + */ +var DraftTreeAdapter = { + /** + * Converts from a tree raw state back to draft raw state + */ + fromRawTreeStateToRawState: function fromRawTreeStateToRawState(draftTreeState) { + var blocks = draftTreeState.blocks; + + var transformedBlocks = []; + + !Array.isArray(blocks) ? false ? undefined : invariant(false) : void 0; + + if (!Array.isArray(blocks) || !blocks.length) { + return draftTreeState; + } + + traverseInDepthOrder(blocks, function (block) { + var newBlock = _extends({}, block); + + if (isListBlock(block)) { + newBlock.depth = newBlock.depth || 0; + addDepthToChildren(block); + } + + delete newBlock.children; + + transformedBlocks.push(newBlock); + }); + + draftTreeState.blocks = transformedBlocks; + + return _extends({}, draftTreeState, { + blocks: transformedBlocks + }); + }, + + + /** + * Converts from draft raw state to tree draft state + */ + fromRawStateToRawTreeState: function fromRawStateToRawTreeState(draftState) { + var lastListDepthCacheRef = {}; + var transformedBlocks = []; + + draftState.blocks.forEach(function (block) { + var isList = isListBlock(block); + var depth = block.depth || 0; + var treeBlock = _extends({}, block, { + children: [] + }); + + if (!isList) { + // reset the cache path + lastListDepthCacheRef = {}; + transformedBlocks.push(treeBlock); + return; + } + + // update our depth cache reference path + lastListDepthCacheRef[depth] = treeBlock; + + // if we are greater than zero we must have seen a parent already + if (depth > 0) { + var parent = lastListDepthCacheRef[depth - 1]; + + !parent ? false ? undefined : invariant(false) : void 0; + + // push nested list blocks + parent.children.push(treeBlock); + return; + } + + // push root list blocks + transformedBlocks.push(treeBlock); + }); + + return _extends({}, draftState, { + blocks: transformedBlocks + }); + } +}; + +module.exports = DraftTreeAdapter; + +/***/ }), + +/***/ 2165: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createCharacterList + * @format + * + */ + + + +var CharacterMetadata = __webpack_require__(1902); +var Immutable = __webpack_require__(35); + +var List = Immutable.List; + + +function createCharacterList(inlineStyles, entities) { + var characterArray = inlineStyles.map(function (style, ii) { + var entity = entities[ii]; + return CharacterMetadata.create({ style: style, entity: entity }); + }); + return List(characterArray); +} + +module.exports = createCharacterList; + +/***/ }), + +/***/ 2166: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule decodeEntityRanges + * @format + * + */ + + + +var UnicodeUtils = __webpack_require__(1911); + +var substr = UnicodeUtils.substr; + +/** + * Convert to native JavaScript string lengths to determine ranges. + */ + +function decodeEntityRanges(text, ranges) { + var entities = Array(text.length).fill(null); + if (ranges) { + ranges.forEach(function (range) { + // Using Unicode-enabled substrings converted to JavaScript lengths, + // fill the output array with entity keys. + var start = substr(text, 0, range.offset).length; + var end = start + substr(text, range.offset, range.length).length; + for (var ii = start; ii < end; ii++) { + entities[ii] = range.key; + } + }); + } + return entities; +} + +module.exports = decodeEntityRanges; + +/***/ }), + +/***/ 2167: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule decodeInlineStyleRanges + * @format + * + */ + + + +var _require = __webpack_require__(35), + OrderedSet = _require.OrderedSet; + +var UnicodeUtils = __webpack_require__(1911); + +var substr = UnicodeUtils.substr; + + +var EMPTY_SET = OrderedSet(); + +/** + * Convert to native JavaScript string lengths to determine ranges. + */ +function decodeInlineStyleRanges(text, ranges) { + var styles = Array(text.length).fill(EMPTY_SET); + if (ranges) { + ranges.forEach(function ( /*object*/range) { + var cursor = substr(text, 0, range.offset).length; + var end = cursor + substr(text, range.offset, range.length).length; + while (cursor < end) { + styles[cursor] = styles[cursor].add(range.style); + cursor++; + } + }); + } + return styles; +} + +module.exports = decodeInlineStyleRanges; + +/***/ }), + +/***/ 2168: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getVisibleSelectionRect + * @format + * + */ + + + +var getRangeBoundingClientRect = __webpack_require__(2169); + +/** + * Return the bounding ClientRect for the visible DOM selection, if any. + * In cases where there are no selected ranges or the bounding rect is + * temporarily invalid, return null. + */ +function getVisibleSelectionRect(global) { + var selection = global.getSelection(); + if (!selection.rangeCount) { + return null; + } + + var range = selection.getRangeAt(0); + var boundingRect = getRangeBoundingClientRect(range); + var top = boundingRect.top, + right = boundingRect.right, + bottom = boundingRect.bottom, + left = boundingRect.left; + + // When a re-render leads to a node being removed, the DOM selection will + // temporarily be placed on an ancestor node, which leads to an invalid + // bounding rect. Discard this state. + + if (top === 0 && right === 0 && bottom === 0 && left === 0) { + return null; + } + + return boundingRect; +} + +module.exports = getVisibleSelectionRect; + +/***/ }), + +/***/ 2169: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getRangeBoundingClientRect + * @format + * + */ + + + +var getRangeClientRects = __webpack_require__(1989); + +/** + * Like range.getBoundingClientRect() but normalizes for browser bugs. + */ +function getRangeBoundingClientRect(range) { + // "Return a DOMRect object describing the smallest rectangle that includes + // the first rectangle in list and all of the remaining rectangles of which + // the height or width is not zero." + // http://www.w3.org/TR/cssom-view/#dom-range-getboundingclientrect + var rects = getRangeClientRects(range); + var top = 0; + var right = 0; + var bottom = 0; + var left = 0; + + if (rects.length) { + // If the first rectangle has 0 width, we use the second, this is needed + // because Chrome renders a 0 width rectangle when the selection contains + // a line break. + if (rects.length > 1 && rects[0].width === 0) { + var _rects$ = rects[1]; + top = _rects$.top; + right = _rects$.right; + bottom = _rects$.bottom; + left = _rects$.left; + } else { + var _rects$2 = rects[0]; + top = _rects$2.top; + right = _rects$2.right; + bottom = _rects$2.bottom; + left = _rects$2.left; + } + + for (var ii = 1; ii < rects.length; ii++) { + var rect = rects[ii]; + if (rect.height !== 0 && rect.width !== 0) { + top = Math.min(top, rect.top); + right = Math.max(right, rect.right); + bottom = Math.max(bottom, rect.bottom); + left = Math.min(left, rect.left); + } + } + } + + return { + top: top, + right: right, + bottom: bottom, + left: left, + width: right - left, + height: bottom - top + }; +} + +module.exports = getRangeBoundingClientRect; + +/***/ }), + +/***/ 2196: +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;;/*! showdown v 1.9.1 - 02-11-2019 */ +(function(){ +/** + * Created by Tivie on 13-07-2015. + */ + +function getDefaultOpts (simple) { + 'use strict'; + + var defaultOptions = { + omitExtraWLInCodeBlocks: { + defaultValue: false, + describe: 'Omit the default extra whiteline added to code blocks', + type: 'boolean' + }, + noHeaderId: { + defaultValue: false, + describe: 'Turn on/off generated header id', + type: 'boolean' + }, + prefixHeaderId: { + defaultValue: false, + describe: 'Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic \'section-\' prefix', + type: 'string' + }, + rawPrefixHeaderId: { + defaultValue: false, + describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)', + type: 'boolean' + }, + ghCompatibleHeaderId: { + defaultValue: false, + describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)', + type: 'boolean' + }, + rawHeaderId: { + defaultValue: false, + describe: 'Remove only spaces, \' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids', + type: 'boolean' + }, + headerLevelStart: { + defaultValue: false, + describe: 'The header blocks level start', + type: 'integer' + }, + parseImgDimensions: { + defaultValue: false, + describe: 'Turn on/off image dimension parsing', + type: 'boolean' + }, + simplifiedAutoLink: { + defaultValue: false, + describe: 'Turn on/off GFM autolink style', + type: 'boolean' + }, + excludeTrailingPunctuationFromURLs: { + defaultValue: false, + describe: 'Excludes trailing punctuation from links generated with autoLinking', + type: 'boolean' + }, + literalMidWordUnderscores: { + defaultValue: false, + describe: 'Parse midword underscores as literal underscores', + type: 'boolean' + }, + literalMidWordAsterisks: { + defaultValue: false, + describe: 'Parse midword asterisks as literal asterisks', + type: 'boolean' + }, + strikethrough: { + defaultValue: false, + describe: 'Turn on/off strikethrough support', + type: 'boolean' + }, + tables: { + defaultValue: false, + describe: 'Turn on/off tables support', + type: 'boolean' + }, + tablesHeaderId: { + defaultValue: false, + describe: 'Add an id to table headers', + type: 'boolean' + }, + ghCodeBlocks: { + defaultValue: true, + describe: 'Turn on/off GFM fenced code blocks support', + type: 'boolean' + }, + tasklists: { + defaultValue: false, + describe: 'Turn on/off GFM tasklist support', + type: 'boolean' + }, + smoothLivePreview: { + defaultValue: false, + describe: 'Prevents weird effects in live previews due to incomplete input', + type: 'boolean' + }, + smartIndentationFix: { + defaultValue: false, + description: 'Tries to smartly fix indentation in es6 strings', + type: 'boolean' + }, + disableForced4SpacesIndentedSublists: { + defaultValue: false, + description: 'Disables the requirement of indenting nested sublists by 4 spaces', + type: 'boolean' + }, + simpleLineBreaks: { + defaultValue: false, + description: 'Parses simple line breaks as
(GFM Style)', + type: 'boolean' + }, + requireSpaceBeforeHeadingText: { + defaultValue: false, + description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)', + type: 'boolean' + }, + ghMentions: { + defaultValue: false, + description: 'Enables github @mentions', + type: 'boolean' + }, + ghMentionsLink: { + defaultValue: 'https://github.com/{u}', + description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.', + type: 'string' + }, + encodeEmails: { + defaultValue: true, + description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities', + type: 'boolean' + }, + openLinksInNewWindow: { + defaultValue: false, + description: 'Open all links in new windows', + type: 'boolean' + }, + backslashEscapesHTMLTags: { + defaultValue: false, + description: 'Support for HTML Tag escaping. ex: \
foo\
', + type: 'boolean' + }, + emoji: { + defaultValue: false, + description: 'Enable emoji support. Ex: `this is a :smile: emoji`', + type: 'boolean' + }, + underline: { + defaultValue: false, + description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``', + type: 'boolean' + }, + completeHTMLDocument: { + defaultValue: false, + description: 'Outputs a complete html document, including ``, `` and `` tags', + type: 'boolean' + }, + metadata: { + defaultValue: false, + description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).', + type: 'boolean' + }, + splitAdjacentBlockquotes: { + defaultValue: false, + description: 'Split adjacent blockquote blocks', + type: 'boolean' + } + }; + if (simple === false) { + return JSON.parse(JSON.stringify(defaultOptions)); + } + var ret = {}; + for (var opt in defaultOptions) { + if (defaultOptions.hasOwnProperty(opt)) { + ret[opt] = defaultOptions[opt].defaultValue; + } + } + return ret; +} + +function allOptionsOn () { + 'use strict'; + var options = getDefaultOpts(true), + ret = {}; + for (var opt in options) { + if (options.hasOwnProperty(opt)) { + ret[opt] = true; + } + } + return ret; +} + +/** + * Created by Tivie on 06-01-2015. + */ + +// Private properties +var showdown = {}, + parsers = {}, + extensions = {}, + globalOptions = getDefaultOpts(true), + setFlavor = 'vanilla', + flavor = { + github: { + omitExtraWLInCodeBlocks: true, + simplifiedAutoLink: true, + excludeTrailingPunctuationFromURLs: true, + literalMidWordUnderscores: true, + strikethrough: true, + tables: true, + tablesHeaderId: true, + ghCodeBlocks: true, + tasklists: true, + disableForced4SpacesIndentedSublists: true, + simpleLineBreaks: true, + requireSpaceBeforeHeadingText: true, + ghCompatibleHeaderId: true, + ghMentions: true, + backslashEscapesHTMLTags: true, + emoji: true, + splitAdjacentBlockquotes: true + }, + original: { + noHeaderId: true, + ghCodeBlocks: false + }, + ghost: { + omitExtraWLInCodeBlocks: true, + parseImgDimensions: true, + simplifiedAutoLink: true, + excludeTrailingPunctuationFromURLs: true, + literalMidWordUnderscores: true, + strikethrough: true, + tables: true, + tablesHeaderId: true, + ghCodeBlocks: true, + tasklists: true, + smoothLivePreview: true, + simpleLineBreaks: true, + requireSpaceBeforeHeadingText: true, + ghMentions: false, + encodeEmails: true + }, + vanilla: getDefaultOpts(true), + allOn: allOptionsOn() + }; + +/** + * helper namespace + * @type {{}} + */ +showdown.helper = {}; + +/** + * TODO LEGACY SUPPORT CODE + * @type {{}} + */ +showdown.extensions = {}; + +/** + * Set a global option + * @static + * @param {string} key + * @param {*} value + * @returns {showdown} + */ +showdown.setOption = function (key, value) { + 'use strict'; + globalOptions[key] = value; + return this; +}; + +/** + * Get a global option + * @static + * @param {string} key + * @returns {*} + */ +showdown.getOption = function (key) { + 'use strict'; + return globalOptions[key]; +}; + +/** + * Get the global options + * @static + * @returns {{}} + */ +showdown.getOptions = function () { + 'use strict'; + return globalOptions; +}; + +/** + * Reset global options to the default values + * @static + */ +showdown.resetOptions = function () { + 'use strict'; + globalOptions = getDefaultOpts(true); +}; + +/** + * Set the flavor showdown should use as default + * @param {string} name + */ +showdown.setFlavor = function (name) { + 'use strict'; + if (!flavor.hasOwnProperty(name)) { + throw Error(name + ' flavor was not found'); + } + showdown.resetOptions(); + var preset = flavor[name]; + setFlavor = name; + for (var option in preset) { + if (preset.hasOwnProperty(option)) { + globalOptions[option] = preset[option]; + } + } +}; + +/** + * Get the currently set flavor + * @returns {string} + */ +showdown.getFlavor = function () { + 'use strict'; + return setFlavor; +}; + +/** + * Get the options of a specified flavor. Returns undefined if the flavor was not found + * @param {string} name Name of the flavor + * @returns {{}|undefined} + */ +showdown.getFlavorOptions = function (name) { + 'use strict'; + if (flavor.hasOwnProperty(name)) { + return flavor[name]; + } +}; + +/** + * Get the default options + * @static + * @param {boolean} [simple=true] + * @returns {{}} + */ +showdown.getDefaultOptions = function (simple) { + 'use strict'; + return getDefaultOpts(simple); +}; + +/** + * Get or set a subParser + * + * subParser(name) - Get a registered subParser + * subParser(name, func) - Register a subParser + * @static + * @param {string} name + * @param {function} [func] + * @returns {*} + */ +showdown.subParser = function (name, func) { + 'use strict'; + if (showdown.helper.isString(name)) { + if (typeof func !== 'undefined') { + parsers[name] = func; + } else { + if (parsers.hasOwnProperty(name)) { + return parsers[name]; + } else { + throw Error('SubParser named ' + name + ' not registered!'); + } + } + } +}; + +/** + * Gets or registers an extension + * @static + * @param {string} name + * @param {object|function=} ext + * @returns {*} + */ +showdown.extension = function (name, ext) { + 'use strict'; + + if (!showdown.helper.isString(name)) { + throw Error('Extension \'name\' must be a string'); + } + + name = showdown.helper.stdExtName(name); + + // Getter + if (showdown.helper.isUndefined(ext)) { + if (!extensions.hasOwnProperty(name)) { + throw Error('Extension named ' + name + ' is not registered!'); + } + return extensions[name]; + + // Setter + } else { + // Expand extension if it's wrapped in a function + if (typeof ext === 'function') { + ext = ext(); + } + + // Ensure extension is an array + if (!showdown.helper.isArray(ext)) { + ext = [ext]; + } + + var validExtension = validate(ext, name); + + if (validExtension.valid) { + extensions[name] = ext; + } else { + throw Error(validExtension.error); + } + } +}; + +/** + * Gets all extensions registered + * @returns {{}} + */ +showdown.getAllExtensions = function () { + 'use strict'; + return extensions; +}; + +/** + * Remove an extension + * @param {string} name + */ +showdown.removeExtension = function (name) { + 'use strict'; + delete extensions[name]; +}; + +/** + * Removes all extensions + */ +showdown.resetExtensions = function () { + 'use strict'; + extensions = {}; +}; + +/** + * Validate extension + * @param {array} extension + * @param {string} name + * @returns {{valid: boolean, error: string}} + */ +function validate (extension, name) { + 'use strict'; + + var errMsg = (name) ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension', + ret = { + valid: true, + error: '' + }; + + if (!showdown.helper.isArray(extension)) { + extension = [extension]; + } + + for (var i = 0; i < extension.length; ++i) { + var baseMsg = errMsg + ' sub-extension ' + i + ': ', + ext = extension[i]; + if (typeof ext !== 'object') { + ret.valid = false; + ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given'; + return ret; + } + + if (!showdown.helper.isString(ext.type)) { + ret.valid = false; + ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given'; + return ret; + } + + var type = ext.type = ext.type.toLowerCase(); + + // normalize extension type + if (type === 'language') { + type = ext.type = 'lang'; + } + + if (type === 'html') { + type = ext.type = 'output'; + } + + if (type !== 'lang' && type !== 'output' && type !== 'listener') { + ret.valid = false; + ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"'; + return ret; + } + + if (type === 'listener') { + if (showdown.helper.isUndefined(ext.listeners)) { + ret.valid = false; + ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"'; + return ret; + } + } else { + if (showdown.helper.isUndefined(ext.filter) && showdown.helper.isUndefined(ext.regex)) { + ret.valid = false; + ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method'; + return ret; + } + } + + if (ext.listeners) { + if (typeof ext.listeners !== 'object') { + ret.valid = false; + ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + ' given'; + return ret; + } + for (var ln in ext.listeners) { + if (ext.listeners.hasOwnProperty(ln)) { + if (typeof ext.listeners[ln] !== 'function') { + ret.valid = false; + ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln + + ' must be a function but ' + typeof ext.listeners[ln] + ' given'; + return ret; + } + } + } + } + + if (ext.filter) { + if (typeof ext.filter !== 'function') { + ret.valid = false; + ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + ' given'; + return ret; + } + } else if (ext.regex) { + if (showdown.helper.isString(ext.regex)) { + ext.regex = new RegExp(ext.regex, 'g'); + } + if (!(ext.regex instanceof RegExp)) { + ret.valid = false; + ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + ' given'; + return ret; + } + if (showdown.helper.isUndefined(ext.replace)) { + ret.valid = false; + ret.error = baseMsg + '"regex" extensions must implement a replace string or function'; + return ret; + } + } + } + return ret; +} + +/** + * Validate extension + * @param {object} ext + * @returns {boolean} + */ +showdown.validateExtension = function (ext) { + 'use strict'; + + var validateExtension = validate(ext, null); + if (!validateExtension.valid) { + console.warn(validateExtension.error); + return false; + } + return true; +}; + +/** + * showdownjs helper functions + */ + +if (!showdown.hasOwnProperty('helper')) { + showdown.helper = {}; +} + +/** + * Check if var is string + * @static + * @param {string} a + * @returns {boolean} + */ +showdown.helper.isString = function (a) { + 'use strict'; + return (typeof a === 'string' || a instanceof String); +}; + +/** + * Check if var is a function + * @static + * @param {*} a + * @returns {boolean} + */ +showdown.helper.isFunction = function (a) { + 'use strict'; + var getType = {}; + return a && getType.toString.call(a) === '[object Function]'; +}; + +/** + * isArray helper function + * @static + * @param {*} a + * @returns {boolean} + */ +showdown.helper.isArray = function (a) { + 'use strict'; + return Array.isArray(a); +}; + +/** + * Check if value is undefined + * @static + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + */ +showdown.helper.isUndefined = function (value) { + 'use strict'; + return typeof value === 'undefined'; +}; + +/** + * ForEach helper function + * Iterates over Arrays and Objects (own properties only) + * @static + * @param {*} obj + * @param {function} callback Accepts 3 params: 1. value, 2. key, 3. the original array/object + */ +showdown.helper.forEach = function (obj, callback) { + 'use strict'; + // check if obj is defined + if (showdown.helper.isUndefined(obj)) { + throw new Error('obj param is required'); + } + + if (showdown.helper.isUndefined(callback)) { + throw new Error('callback param is required'); + } + + if (!showdown.helper.isFunction(callback)) { + throw new Error('callback param must be a function/closure'); + } + + if (typeof obj.forEach === 'function') { + obj.forEach(callback); + } else if (showdown.helper.isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + callback(obj[i], i, obj); + } + } else if (typeof (obj) === 'object') { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + callback(obj[prop], prop, obj); + } + } + } else { + throw new Error('obj does not seem to be an array or an iterable object'); + } +}; + +/** + * Standardidize extension name + * @static + * @param {string} s extension name + * @returns {string} + */ +showdown.helper.stdExtName = function (s) { + 'use strict'; + return s.replace(/[_?*+\/\\.^-]/g, '').replace(/\s/g, '').toLowerCase(); +}; + +function escapeCharactersCallback (wholeMatch, m1) { + 'use strict'; + var charCodeToEscape = m1.charCodeAt(0); + return '¨E' + charCodeToEscape + 'E'; +} + +/** + * Callback used to escape characters when passing through String.replace + * @static + * @param {string} wholeMatch + * @param {string} m1 + * @returns {string} + */ +showdown.helper.escapeCharactersCallback = escapeCharactersCallback; + +/** + * Escape characters in a string + * @static + * @param {string} text + * @param {string} charsToEscape + * @param {boolean} afterBackslash + * @returns {XML|string|void|*} + */ +showdown.helper.escapeCharacters = function (text, charsToEscape, afterBackslash) { + 'use strict'; + // First we have to escape the escape characters so that + // we can build a character class out of them + var regexString = '([' + charsToEscape.replace(/([\[\]\\])/g, '\\$1') + '])'; + + if (afterBackslash) { + regexString = '\\\\' + regexString; + } + + var regex = new RegExp(regexString, 'g'); + text = text.replace(regex, escapeCharactersCallback); + + return text; +}; + +/** + * Unescape HTML entities + * @param txt + * @returns {string} + */ +showdown.helper.unescapeHTMLEntities = function (txt) { + 'use strict'; + + return txt + .replace(/"/g, '"') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/&/g, '&'); +}; + +var rgxFindMatchPos = function (str, left, right, flags) { + 'use strict'; + var f = flags || '', + g = f.indexOf('g') > -1, + x = new RegExp(left + '|' + right, 'g' + f.replace(/g/g, '')), + l = new RegExp(left, f.replace(/g/g, '')), + pos = [], + t, s, m, start, end; + + do { + t = 0; + while ((m = x.exec(str))) { + if (l.test(m[0])) { + if (!(t++)) { + s = x.lastIndex; + start = s - m[0].length; + } + } else if (t) { + if (!--t) { + end = m.index + m[0].length; + var obj = { + left: {start: start, end: s}, + match: {start: s, end: m.index}, + right: {start: m.index, end: end}, + wholeMatch: {start: start, end: end} + }; + pos.push(obj); + if (!g) { + return pos; + } + } + } + } + } while (t && (x.lastIndex = s)); + + return pos; +}; + +/** + * matchRecursiveRegExp + * + * (c) 2007 Steven Levithan + * MIT License + * + * Accepts a string to search, a left and right format delimiter + * as regex patterns, and optional regex flags. Returns an array + * of matches, allowing nested instances of left/right delimiters. + * Use the "g" flag to return all matches, otherwise only the + * first is returned. Be careful to ensure that the left and + * right format delimiters produce mutually exclusive matches. + * Backreferences are not supported within the right delimiter + * due to how it is internally combined with the left delimiter. + * When matching strings whose format delimiters are unbalanced + * to the left or right, the output is intentionally as a + * conventional regex library with recursion support would + * produce, e.g. "<" and ">" both produce ["x"] when using + * "<" and ">" as the delimiters (both strings contain a single, + * balanced instance of ""). + * + * examples: + * matchRecursiveRegExp("test", "\\(", "\\)") + * returns: [] + * matchRecursiveRegExp(">>t<>", "<", ">", "g") + * returns: ["t<>", ""] + * matchRecursiveRegExp("
test
", "]*>", "
", "gi") + * returns: ["test"] + */ +showdown.helper.matchRecursiveRegExp = function (str, left, right, flags) { + 'use strict'; + + var matchPos = rgxFindMatchPos (str, left, right, flags), + results = []; + + for (var i = 0; i < matchPos.length; ++i) { + results.push([ + str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), + str.slice(matchPos[i].match.start, matchPos[i].match.end), + str.slice(matchPos[i].left.start, matchPos[i].left.end), + str.slice(matchPos[i].right.start, matchPos[i].right.end) + ]); + } + return results; +}; + +/** + * + * @param {string} str + * @param {string|function} replacement + * @param {string} left + * @param {string} right + * @param {string} flags + * @returns {string} + */ +showdown.helper.replaceRecursiveRegExp = function (str, replacement, left, right, flags) { + 'use strict'; + + if (!showdown.helper.isFunction(replacement)) { + var repStr = replacement; + replacement = function () { + return repStr; + }; + } + + var matchPos = rgxFindMatchPos(str, left, right, flags), + finalStr = str, + lng = matchPos.length; + + if (lng > 0) { + var bits = []; + if (matchPos[0].wholeMatch.start !== 0) { + bits.push(str.slice(0, matchPos[0].wholeMatch.start)); + } + for (var i = 0; i < lng; ++i) { + bits.push( + replacement( + str.slice(matchPos[i].wholeMatch.start, matchPos[i].wholeMatch.end), + str.slice(matchPos[i].match.start, matchPos[i].match.end), + str.slice(matchPos[i].left.start, matchPos[i].left.end), + str.slice(matchPos[i].right.start, matchPos[i].right.end) + ) + ); + if (i < lng - 1) { + bits.push(str.slice(matchPos[i].wholeMatch.end, matchPos[i + 1].wholeMatch.start)); + } + } + if (matchPos[lng - 1].wholeMatch.end < str.length) { + bits.push(str.slice(matchPos[lng - 1].wholeMatch.end)); + } + finalStr = bits.join(''); + } + return finalStr; +}; + +/** + * Returns the index within the passed String object of the first occurrence of the specified regex, + * starting the search at fromIndex. Returns -1 if the value is not found. + * + * @param {string} str string to search + * @param {RegExp} regex Regular expression to search + * @param {int} [fromIndex = 0] Index to start the search + * @returns {Number} + * @throws InvalidArgumentError + */ +showdown.helper.regexIndexOf = function (str, regex, fromIndex) { + 'use strict'; + if (!showdown.helper.isString(str)) { + throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string'; + } + if (regex instanceof RegExp === false) { + throw 'InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp'; + } + var indexOf = str.substring(fromIndex || 0).search(regex); + return (indexOf >= 0) ? (indexOf + (fromIndex || 0)) : indexOf; +}; + +/** + * Splits the passed string object at the defined index, and returns an array composed of the two substrings + * @param {string} str string to split + * @param {int} index index to split string at + * @returns {[string,string]} + * @throws InvalidArgumentError + */ +showdown.helper.splitAtIndex = function (str, index) { + 'use strict'; + if (!showdown.helper.isString(str)) { + throw 'InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string'; + } + return [str.substring(0, index), str.substring(index)]; +}; + +/** + * Obfuscate an e-mail address through the use of Character Entities, + * transforming ASCII characters into their equivalent decimal or hex entities. + * + * Since it has a random component, subsequent calls to this function produce different results + * + * @param {string} mail + * @returns {string} + */ +showdown.helper.encodeEmailAddress = function (mail) { + 'use strict'; + var encode = [ + function (ch) { + return '&#' + ch.charCodeAt(0) + ';'; + }, + function (ch) { + return '&#x' + ch.charCodeAt(0).toString(16) + ';'; + }, + function (ch) { + return ch; + } + ]; + + mail = mail.replace(/./g, function (ch) { + if (ch === '@') { + // this *must* be encoded. I insist. + ch = encode[Math.floor(Math.random() * 2)](ch); + } else { + var r = Math.random(); + // roughly 10% raw, 45% hex, 45% dec + ch = ( + r > 0.9 ? encode[2](ch) : r > 0.45 ? encode[1](ch) : encode[0](ch) + ); + } + return ch; + }); + + return mail; +}; + +/** + * + * @param str + * @param targetLength + * @param padString + * @returns {string} + */ +showdown.helper.padEnd = function padEnd (str, targetLength, padString) { + 'use strict'; + /*jshint bitwise: false*/ + // eslint-disable-next-line space-infix-ops + targetLength = targetLength>>0; //floor if number or convert non-number to 0; + /*jshint bitwise: true*/ + padString = String(padString || ' '); + if (str.length > targetLength) { + return String(str); + } else { + targetLength = targetLength - str.length; + if (targetLength > padString.length) { + padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed + } + return String(str) + padString.slice(0,targetLength); + } +}; + +/** + * POLYFILLS + */ +// use this instead of builtin is undefined for IE8 compatibility +if (typeof console === 'undefined') { + console = { + warn: function (msg) { + 'use strict'; + alert(msg); + }, + log: function (msg) { + 'use strict'; + alert(msg); + }, + error: function (msg) { + 'use strict'; + throw msg; + } + }; +} + +/** + * Common regexes. + * We declare some common regexes to improve performance + */ +showdown.helper.regexes = { + asteriskDashAndColon: /([*_:~])/g +}; + +/** + * EMOJIS LIST + */ +showdown.helper.emojis = { + '+1':'\ud83d\udc4d', + '-1':'\ud83d\udc4e', + '100':'\ud83d\udcaf', + '1234':'\ud83d\udd22', + '1st_place_medal':'\ud83e\udd47', + '2nd_place_medal':'\ud83e\udd48', + '3rd_place_medal':'\ud83e\udd49', + '8ball':'\ud83c\udfb1', + 'a':'\ud83c\udd70\ufe0f', + 'ab':'\ud83c\udd8e', + 'abc':'\ud83d\udd24', + 'abcd':'\ud83d\udd21', + 'accept':'\ud83c\ude51', + 'aerial_tramway':'\ud83d\udea1', + 'airplane':'\u2708\ufe0f', + 'alarm_clock':'\u23f0', + 'alembic':'\u2697\ufe0f', + 'alien':'\ud83d\udc7d', + 'ambulance':'\ud83d\ude91', + 'amphora':'\ud83c\udffa', + 'anchor':'\u2693\ufe0f', + 'angel':'\ud83d\udc7c', + 'anger':'\ud83d\udca2', + 'angry':'\ud83d\ude20', + 'anguished':'\ud83d\ude27', + 'ant':'\ud83d\udc1c', + 'apple':'\ud83c\udf4e', + 'aquarius':'\u2652\ufe0f', + 'aries':'\u2648\ufe0f', + 'arrow_backward':'\u25c0\ufe0f', + 'arrow_double_down':'\u23ec', + 'arrow_double_up':'\u23eb', + 'arrow_down':'\u2b07\ufe0f', + 'arrow_down_small':'\ud83d\udd3d', + 'arrow_forward':'\u25b6\ufe0f', + 'arrow_heading_down':'\u2935\ufe0f', + 'arrow_heading_up':'\u2934\ufe0f', + 'arrow_left':'\u2b05\ufe0f', + 'arrow_lower_left':'\u2199\ufe0f', + 'arrow_lower_right':'\u2198\ufe0f', + 'arrow_right':'\u27a1\ufe0f', + 'arrow_right_hook':'\u21aa\ufe0f', + 'arrow_up':'\u2b06\ufe0f', + 'arrow_up_down':'\u2195\ufe0f', + 'arrow_up_small':'\ud83d\udd3c', + 'arrow_upper_left':'\u2196\ufe0f', + 'arrow_upper_right':'\u2197\ufe0f', + 'arrows_clockwise':'\ud83d\udd03', + 'arrows_counterclockwise':'\ud83d\udd04', + 'art':'\ud83c\udfa8', + 'articulated_lorry':'\ud83d\ude9b', + 'artificial_satellite':'\ud83d\udef0', + 'astonished':'\ud83d\ude32', + 'athletic_shoe':'\ud83d\udc5f', + 'atm':'\ud83c\udfe7', + 'atom_symbol':'\u269b\ufe0f', + 'avocado':'\ud83e\udd51', + 'b':'\ud83c\udd71\ufe0f', + 'baby':'\ud83d\udc76', + 'baby_bottle':'\ud83c\udf7c', + 'baby_chick':'\ud83d\udc24', + 'baby_symbol':'\ud83d\udebc', + 'back':'\ud83d\udd19', + 'bacon':'\ud83e\udd53', + 'badminton':'\ud83c\udff8', + 'baggage_claim':'\ud83d\udec4', + 'baguette_bread':'\ud83e\udd56', + 'balance_scale':'\u2696\ufe0f', + 'balloon':'\ud83c\udf88', + 'ballot_box':'\ud83d\uddf3', + 'ballot_box_with_check':'\u2611\ufe0f', + 'bamboo':'\ud83c\udf8d', + 'banana':'\ud83c\udf4c', + 'bangbang':'\u203c\ufe0f', + 'bank':'\ud83c\udfe6', + 'bar_chart':'\ud83d\udcca', + 'barber':'\ud83d\udc88', + 'baseball':'\u26be\ufe0f', + 'basketball':'\ud83c\udfc0', + 'basketball_man':'\u26f9\ufe0f', + 'basketball_woman':'\u26f9\ufe0f‍\u2640\ufe0f', + 'bat':'\ud83e\udd87', + 'bath':'\ud83d\udec0', + 'bathtub':'\ud83d\udec1', + 'battery':'\ud83d\udd0b', + 'beach_umbrella':'\ud83c\udfd6', + 'bear':'\ud83d\udc3b', + 'bed':'\ud83d\udecf', + 'bee':'\ud83d\udc1d', + 'beer':'\ud83c\udf7a', + 'beers':'\ud83c\udf7b', + 'beetle':'\ud83d\udc1e', + 'beginner':'\ud83d\udd30', + 'bell':'\ud83d\udd14', + 'bellhop_bell':'\ud83d\udece', + 'bento':'\ud83c\udf71', + 'biking_man':'\ud83d\udeb4', + 'bike':'\ud83d\udeb2', + 'biking_woman':'\ud83d\udeb4‍\u2640\ufe0f', + 'bikini':'\ud83d\udc59', + 'biohazard':'\u2623\ufe0f', + 'bird':'\ud83d\udc26', + 'birthday':'\ud83c\udf82', + 'black_circle':'\u26ab\ufe0f', + 'black_flag':'\ud83c\udff4', + 'black_heart':'\ud83d\udda4', + 'black_joker':'\ud83c\udccf', + 'black_large_square':'\u2b1b\ufe0f', + 'black_medium_small_square':'\u25fe\ufe0f', + 'black_medium_square':'\u25fc\ufe0f', + 'black_nib':'\u2712\ufe0f', + 'black_small_square':'\u25aa\ufe0f', + 'black_square_button':'\ud83d\udd32', + 'blonde_man':'\ud83d\udc71', + 'blonde_woman':'\ud83d\udc71‍\u2640\ufe0f', + 'blossom':'\ud83c\udf3c', + 'blowfish':'\ud83d\udc21', + 'blue_book':'\ud83d\udcd8', + 'blue_car':'\ud83d\ude99', + 'blue_heart':'\ud83d\udc99', + 'blush':'\ud83d\ude0a', + 'boar':'\ud83d\udc17', + 'boat':'\u26f5\ufe0f', + 'bomb':'\ud83d\udca3', + 'book':'\ud83d\udcd6', + 'bookmark':'\ud83d\udd16', + 'bookmark_tabs':'\ud83d\udcd1', + 'books':'\ud83d\udcda', + 'boom':'\ud83d\udca5', + 'boot':'\ud83d\udc62', + 'bouquet':'\ud83d\udc90', + 'bowing_man':'\ud83d\ude47', + 'bow_and_arrow':'\ud83c\udff9', + 'bowing_woman':'\ud83d\ude47‍\u2640\ufe0f', + 'bowling':'\ud83c\udfb3', + 'boxing_glove':'\ud83e\udd4a', + 'boy':'\ud83d\udc66', + 'bread':'\ud83c\udf5e', + 'bride_with_veil':'\ud83d\udc70', + 'bridge_at_night':'\ud83c\udf09', + 'briefcase':'\ud83d\udcbc', + 'broken_heart':'\ud83d\udc94', + 'bug':'\ud83d\udc1b', + 'building_construction':'\ud83c\udfd7', + 'bulb':'\ud83d\udca1', + 'bullettrain_front':'\ud83d\ude85', + 'bullettrain_side':'\ud83d\ude84', + 'burrito':'\ud83c\udf2f', + 'bus':'\ud83d\ude8c', + 'business_suit_levitating':'\ud83d\udd74', + 'busstop':'\ud83d\ude8f', + 'bust_in_silhouette':'\ud83d\udc64', + 'busts_in_silhouette':'\ud83d\udc65', + 'butterfly':'\ud83e\udd8b', + 'cactus':'\ud83c\udf35', + 'cake':'\ud83c\udf70', + 'calendar':'\ud83d\udcc6', + 'call_me_hand':'\ud83e\udd19', + 'calling':'\ud83d\udcf2', + 'camel':'\ud83d\udc2b', + 'camera':'\ud83d\udcf7', + 'camera_flash':'\ud83d\udcf8', + 'camping':'\ud83c\udfd5', + 'cancer':'\u264b\ufe0f', + 'candle':'\ud83d\udd6f', + 'candy':'\ud83c\udf6c', + 'canoe':'\ud83d\udef6', + 'capital_abcd':'\ud83d\udd20', + 'capricorn':'\u2651\ufe0f', + 'car':'\ud83d\ude97', + 'card_file_box':'\ud83d\uddc3', + 'card_index':'\ud83d\udcc7', + 'card_index_dividers':'\ud83d\uddc2', + 'carousel_horse':'\ud83c\udfa0', + 'carrot':'\ud83e\udd55', + 'cat':'\ud83d\udc31', + 'cat2':'\ud83d\udc08', + 'cd':'\ud83d\udcbf', + 'chains':'\u26d3', + 'champagne':'\ud83c\udf7e', + 'chart':'\ud83d\udcb9', + 'chart_with_downwards_trend':'\ud83d\udcc9', + 'chart_with_upwards_trend':'\ud83d\udcc8', + 'checkered_flag':'\ud83c\udfc1', + 'cheese':'\ud83e\uddc0', + 'cherries':'\ud83c\udf52', + 'cherry_blossom':'\ud83c\udf38', + 'chestnut':'\ud83c\udf30', + 'chicken':'\ud83d\udc14', + 'children_crossing':'\ud83d\udeb8', + 'chipmunk':'\ud83d\udc3f', + 'chocolate_bar':'\ud83c\udf6b', + 'christmas_tree':'\ud83c\udf84', + 'church':'\u26ea\ufe0f', + 'cinema':'\ud83c\udfa6', + 'circus_tent':'\ud83c\udfaa', + 'city_sunrise':'\ud83c\udf07', + 'city_sunset':'\ud83c\udf06', + 'cityscape':'\ud83c\udfd9', + 'cl':'\ud83c\udd91', + 'clamp':'\ud83d\udddc', + 'clap':'\ud83d\udc4f', + 'clapper':'\ud83c\udfac', + 'classical_building':'\ud83c\udfdb', + 'clinking_glasses':'\ud83e\udd42', + 'clipboard':'\ud83d\udccb', + 'clock1':'\ud83d\udd50', + 'clock10':'\ud83d\udd59', + 'clock1030':'\ud83d\udd65', + 'clock11':'\ud83d\udd5a', + 'clock1130':'\ud83d\udd66', + 'clock12':'\ud83d\udd5b', + 'clock1230':'\ud83d\udd67', + 'clock130':'\ud83d\udd5c', + 'clock2':'\ud83d\udd51', + 'clock230':'\ud83d\udd5d', + 'clock3':'\ud83d\udd52', + 'clock330':'\ud83d\udd5e', + 'clock4':'\ud83d\udd53', + 'clock430':'\ud83d\udd5f', + 'clock5':'\ud83d\udd54', + 'clock530':'\ud83d\udd60', + 'clock6':'\ud83d\udd55', + 'clock630':'\ud83d\udd61', + 'clock7':'\ud83d\udd56', + 'clock730':'\ud83d\udd62', + 'clock8':'\ud83d\udd57', + 'clock830':'\ud83d\udd63', + 'clock9':'\ud83d\udd58', + 'clock930':'\ud83d\udd64', + 'closed_book':'\ud83d\udcd5', + 'closed_lock_with_key':'\ud83d\udd10', + 'closed_umbrella':'\ud83c\udf02', + 'cloud':'\u2601\ufe0f', + 'cloud_with_lightning':'\ud83c\udf29', + 'cloud_with_lightning_and_rain':'\u26c8', + 'cloud_with_rain':'\ud83c\udf27', + 'cloud_with_snow':'\ud83c\udf28', + 'clown_face':'\ud83e\udd21', + 'clubs':'\u2663\ufe0f', + 'cocktail':'\ud83c\udf78', + 'coffee':'\u2615\ufe0f', + 'coffin':'\u26b0\ufe0f', + 'cold_sweat':'\ud83d\ude30', + 'comet':'\u2604\ufe0f', + 'computer':'\ud83d\udcbb', + 'computer_mouse':'\ud83d\uddb1', + 'confetti_ball':'\ud83c\udf8a', + 'confounded':'\ud83d\ude16', + 'confused':'\ud83d\ude15', + 'congratulations':'\u3297\ufe0f', + 'construction':'\ud83d\udea7', + 'construction_worker_man':'\ud83d\udc77', + 'construction_worker_woman':'\ud83d\udc77‍\u2640\ufe0f', + 'control_knobs':'\ud83c\udf9b', + 'convenience_store':'\ud83c\udfea', + 'cookie':'\ud83c\udf6a', + 'cool':'\ud83c\udd92', + 'policeman':'\ud83d\udc6e', + 'copyright':'\u00a9\ufe0f', + 'corn':'\ud83c\udf3d', + 'couch_and_lamp':'\ud83d\udecb', + 'couple':'\ud83d\udc6b', + 'couple_with_heart_woman_man':'\ud83d\udc91', + 'couple_with_heart_man_man':'\ud83d\udc68‍\u2764\ufe0f‍\ud83d\udc68', + 'couple_with_heart_woman_woman':'\ud83d\udc69‍\u2764\ufe0f‍\ud83d\udc69', + 'couplekiss_man_man':'\ud83d\udc68‍\u2764\ufe0f‍\ud83d\udc8b‍\ud83d\udc68', + 'couplekiss_man_woman':'\ud83d\udc8f', + 'couplekiss_woman_woman':'\ud83d\udc69‍\u2764\ufe0f‍\ud83d\udc8b‍\ud83d\udc69', + 'cow':'\ud83d\udc2e', + 'cow2':'\ud83d\udc04', + 'cowboy_hat_face':'\ud83e\udd20', + 'crab':'\ud83e\udd80', + 'crayon':'\ud83d\udd8d', + 'credit_card':'\ud83d\udcb3', + 'crescent_moon':'\ud83c\udf19', + 'cricket':'\ud83c\udfcf', + 'crocodile':'\ud83d\udc0a', + 'croissant':'\ud83e\udd50', + 'crossed_fingers':'\ud83e\udd1e', + 'crossed_flags':'\ud83c\udf8c', + 'crossed_swords':'\u2694\ufe0f', + 'crown':'\ud83d\udc51', + 'cry':'\ud83d\ude22', + 'crying_cat_face':'\ud83d\ude3f', + 'crystal_ball':'\ud83d\udd2e', + 'cucumber':'\ud83e\udd52', + 'cupid':'\ud83d\udc98', + 'curly_loop':'\u27b0', + 'currency_exchange':'\ud83d\udcb1', + 'curry':'\ud83c\udf5b', + 'custard':'\ud83c\udf6e', + 'customs':'\ud83d\udec3', + 'cyclone':'\ud83c\udf00', + 'dagger':'\ud83d\udde1', + 'dancer':'\ud83d\udc83', + 'dancing_women':'\ud83d\udc6f', + 'dancing_men':'\ud83d\udc6f‍\u2642\ufe0f', + 'dango':'\ud83c\udf61', + 'dark_sunglasses':'\ud83d\udd76', + 'dart':'\ud83c\udfaf', + 'dash':'\ud83d\udca8', + 'date':'\ud83d\udcc5', + 'deciduous_tree':'\ud83c\udf33', + 'deer':'\ud83e\udd8c', + 'department_store':'\ud83c\udfec', + 'derelict_house':'\ud83c\udfda', + 'desert':'\ud83c\udfdc', + 'desert_island':'\ud83c\udfdd', + 'desktop_computer':'\ud83d\udda5', + 'male_detective':'\ud83d\udd75\ufe0f', + 'diamond_shape_with_a_dot_inside':'\ud83d\udca0', + 'diamonds':'\u2666\ufe0f', + 'disappointed':'\ud83d\ude1e', + 'disappointed_relieved':'\ud83d\ude25', + 'dizzy':'\ud83d\udcab', + 'dizzy_face':'\ud83d\ude35', + 'do_not_litter':'\ud83d\udeaf', + 'dog':'\ud83d\udc36', + 'dog2':'\ud83d\udc15', + 'dollar':'\ud83d\udcb5', + 'dolls':'\ud83c\udf8e', + 'dolphin':'\ud83d\udc2c', + 'door':'\ud83d\udeaa', + 'doughnut':'\ud83c\udf69', + 'dove':'\ud83d\udd4a', + 'dragon':'\ud83d\udc09', + 'dragon_face':'\ud83d\udc32', + 'dress':'\ud83d\udc57', + 'dromedary_camel':'\ud83d\udc2a', + 'drooling_face':'\ud83e\udd24', + 'droplet':'\ud83d\udca7', + 'drum':'\ud83e\udd41', + 'duck':'\ud83e\udd86', + 'dvd':'\ud83d\udcc0', + 'e-mail':'\ud83d\udce7', + 'eagle':'\ud83e\udd85', + 'ear':'\ud83d\udc42', + 'ear_of_rice':'\ud83c\udf3e', + 'earth_africa':'\ud83c\udf0d', + 'earth_americas':'\ud83c\udf0e', + 'earth_asia':'\ud83c\udf0f', + 'egg':'\ud83e\udd5a', + 'eggplant':'\ud83c\udf46', + 'eight_pointed_black_star':'\u2734\ufe0f', + 'eight_spoked_asterisk':'\u2733\ufe0f', + 'electric_plug':'\ud83d\udd0c', + 'elephant':'\ud83d\udc18', + 'email':'\u2709\ufe0f', + 'end':'\ud83d\udd1a', + 'envelope_with_arrow':'\ud83d\udce9', + 'euro':'\ud83d\udcb6', + 'european_castle':'\ud83c\udff0', + 'european_post_office':'\ud83c\udfe4', + 'evergreen_tree':'\ud83c\udf32', + 'exclamation':'\u2757\ufe0f', + 'expressionless':'\ud83d\ude11', + 'eye':'\ud83d\udc41', + 'eye_speech_bubble':'\ud83d\udc41‍\ud83d\udde8', + 'eyeglasses':'\ud83d\udc53', + 'eyes':'\ud83d\udc40', + 'face_with_head_bandage':'\ud83e\udd15', + 'face_with_thermometer':'\ud83e\udd12', + 'fist_oncoming':'\ud83d\udc4a', + 'factory':'\ud83c\udfed', + 'fallen_leaf':'\ud83c\udf42', + 'family_man_woman_boy':'\ud83d\udc6a', + 'family_man_boy':'\ud83d\udc68‍\ud83d\udc66', + 'family_man_boy_boy':'\ud83d\udc68‍\ud83d\udc66‍\ud83d\udc66', + 'family_man_girl':'\ud83d\udc68‍\ud83d\udc67', + 'family_man_girl_boy':'\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc66', + 'family_man_girl_girl':'\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc67', + 'family_man_man_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc66', + 'family_man_man_boy_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc66‍\ud83d\udc66', + 'family_man_man_girl':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67', + 'family_man_man_girl_boy':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc66', + 'family_man_man_girl_girl':'\ud83d\udc68‍\ud83d\udc68‍\ud83d\udc67‍\ud83d\udc67', + 'family_man_woman_boy_boy':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', + 'family_man_woman_girl':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67', + 'family_man_woman_girl_boy':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', + 'family_man_woman_girl_girl':'\ud83d\udc68‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', + 'family_woman_boy':'\ud83d\udc69‍\ud83d\udc66', + 'family_woman_boy_boy':'\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', + 'family_woman_girl':'\ud83d\udc69‍\ud83d\udc67', + 'family_woman_girl_boy':'\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', + 'family_woman_girl_girl':'\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', + 'family_woman_woman_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc66', + 'family_woman_woman_boy_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc66‍\ud83d\udc66', + 'family_woman_woman_girl':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67', + 'family_woman_woman_girl_boy':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc66', + 'family_woman_woman_girl_girl':'\ud83d\udc69‍\ud83d\udc69‍\ud83d\udc67‍\ud83d\udc67', + 'fast_forward':'\u23e9', + 'fax':'\ud83d\udce0', + 'fearful':'\ud83d\ude28', + 'feet':'\ud83d\udc3e', + 'female_detective':'\ud83d\udd75\ufe0f‍\u2640\ufe0f', + 'ferris_wheel':'\ud83c\udfa1', + 'ferry':'\u26f4', + 'field_hockey':'\ud83c\udfd1', + 'file_cabinet':'\ud83d\uddc4', + 'file_folder':'\ud83d\udcc1', + 'film_projector':'\ud83d\udcfd', + 'film_strip':'\ud83c\udf9e', + 'fire':'\ud83d\udd25', + 'fire_engine':'\ud83d\ude92', + 'fireworks':'\ud83c\udf86', + 'first_quarter_moon':'\ud83c\udf13', + 'first_quarter_moon_with_face':'\ud83c\udf1b', + 'fish':'\ud83d\udc1f', + 'fish_cake':'\ud83c\udf65', + 'fishing_pole_and_fish':'\ud83c\udfa3', + 'fist_raised':'\u270a', + 'fist_left':'\ud83e\udd1b', + 'fist_right':'\ud83e\udd1c', + 'flags':'\ud83c\udf8f', + 'flashlight':'\ud83d\udd26', + 'fleur_de_lis':'\u269c\ufe0f', + 'flight_arrival':'\ud83d\udeec', + 'flight_departure':'\ud83d\udeeb', + 'floppy_disk':'\ud83d\udcbe', + 'flower_playing_cards':'\ud83c\udfb4', + 'flushed':'\ud83d\ude33', + 'fog':'\ud83c\udf2b', + 'foggy':'\ud83c\udf01', + 'football':'\ud83c\udfc8', + 'footprints':'\ud83d\udc63', + 'fork_and_knife':'\ud83c\udf74', + 'fountain':'\u26f2\ufe0f', + 'fountain_pen':'\ud83d\udd8b', + 'four_leaf_clover':'\ud83c\udf40', + 'fox_face':'\ud83e\udd8a', + 'framed_picture':'\ud83d\uddbc', + 'free':'\ud83c\udd93', + 'fried_egg':'\ud83c\udf73', + 'fried_shrimp':'\ud83c\udf64', + 'fries':'\ud83c\udf5f', + 'frog':'\ud83d\udc38', + 'frowning':'\ud83d\ude26', + 'frowning_face':'\u2639\ufe0f', + 'frowning_man':'\ud83d\ude4d‍\u2642\ufe0f', + 'frowning_woman':'\ud83d\ude4d', + 'middle_finger':'\ud83d\udd95', + 'fuelpump':'\u26fd\ufe0f', + 'full_moon':'\ud83c\udf15', + 'full_moon_with_face':'\ud83c\udf1d', + 'funeral_urn':'\u26b1\ufe0f', + 'game_die':'\ud83c\udfb2', + 'gear':'\u2699\ufe0f', + 'gem':'\ud83d\udc8e', + 'gemini':'\u264a\ufe0f', + 'ghost':'\ud83d\udc7b', + 'gift':'\ud83c\udf81', + 'gift_heart':'\ud83d\udc9d', + 'girl':'\ud83d\udc67', + 'globe_with_meridians':'\ud83c\udf10', + 'goal_net':'\ud83e\udd45', + 'goat':'\ud83d\udc10', + 'golf':'\u26f3\ufe0f', + 'golfing_man':'\ud83c\udfcc\ufe0f', + 'golfing_woman':'\ud83c\udfcc\ufe0f‍\u2640\ufe0f', + 'gorilla':'\ud83e\udd8d', + 'grapes':'\ud83c\udf47', + 'green_apple':'\ud83c\udf4f', + 'green_book':'\ud83d\udcd7', + 'green_heart':'\ud83d\udc9a', + 'green_salad':'\ud83e\udd57', + 'grey_exclamation':'\u2755', + 'grey_question':'\u2754', + 'grimacing':'\ud83d\ude2c', + 'grin':'\ud83d\ude01', + 'grinning':'\ud83d\ude00', + 'guardsman':'\ud83d\udc82', + 'guardswoman':'\ud83d\udc82‍\u2640\ufe0f', + 'guitar':'\ud83c\udfb8', + 'gun':'\ud83d\udd2b', + 'haircut_woman':'\ud83d\udc87', + 'haircut_man':'\ud83d\udc87‍\u2642\ufe0f', + 'hamburger':'\ud83c\udf54', + 'hammer':'\ud83d\udd28', + 'hammer_and_pick':'\u2692', + 'hammer_and_wrench':'\ud83d\udee0', + 'hamster':'\ud83d\udc39', + 'hand':'\u270b', + 'handbag':'\ud83d\udc5c', + 'handshake':'\ud83e\udd1d', + 'hankey':'\ud83d\udca9', + 'hatched_chick':'\ud83d\udc25', + 'hatching_chick':'\ud83d\udc23', + 'headphones':'\ud83c\udfa7', + 'hear_no_evil':'\ud83d\ude49', + 'heart':'\u2764\ufe0f', + 'heart_decoration':'\ud83d\udc9f', + 'heart_eyes':'\ud83d\ude0d', + 'heart_eyes_cat':'\ud83d\ude3b', + 'heartbeat':'\ud83d\udc93', + 'heartpulse':'\ud83d\udc97', + 'hearts':'\u2665\ufe0f', + 'heavy_check_mark':'\u2714\ufe0f', + 'heavy_division_sign':'\u2797', + 'heavy_dollar_sign':'\ud83d\udcb2', + 'heavy_heart_exclamation':'\u2763\ufe0f', + 'heavy_minus_sign':'\u2796', + 'heavy_multiplication_x':'\u2716\ufe0f', + 'heavy_plus_sign':'\u2795', + 'helicopter':'\ud83d\ude81', + 'herb':'\ud83c\udf3f', + 'hibiscus':'\ud83c\udf3a', + 'high_brightness':'\ud83d\udd06', + 'high_heel':'\ud83d\udc60', + 'hocho':'\ud83d\udd2a', + 'hole':'\ud83d\udd73', + 'honey_pot':'\ud83c\udf6f', + 'horse':'\ud83d\udc34', + 'horse_racing':'\ud83c\udfc7', + 'hospital':'\ud83c\udfe5', + 'hot_pepper':'\ud83c\udf36', + 'hotdog':'\ud83c\udf2d', + 'hotel':'\ud83c\udfe8', + 'hotsprings':'\u2668\ufe0f', + 'hourglass':'\u231b\ufe0f', + 'hourglass_flowing_sand':'\u23f3', + 'house':'\ud83c\udfe0', + 'house_with_garden':'\ud83c\udfe1', + 'houses':'\ud83c\udfd8', + 'hugs':'\ud83e\udd17', + 'hushed':'\ud83d\ude2f', + 'ice_cream':'\ud83c\udf68', + 'ice_hockey':'\ud83c\udfd2', + 'ice_skate':'\u26f8', + 'icecream':'\ud83c\udf66', + 'id':'\ud83c\udd94', + 'ideograph_advantage':'\ud83c\ude50', + 'imp':'\ud83d\udc7f', + 'inbox_tray':'\ud83d\udce5', + 'incoming_envelope':'\ud83d\udce8', + 'tipping_hand_woman':'\ud83d\udc81', + 'information_source':'\u2139\ufe0f', + 'innocent':'\ud83d\ude07', + 'interrobang':'\u2049\ufe0f', + 'iphone':'\ud83d\udcf1', + 'izakaya_lantern':'\ud83c\udfee', + 'jack_o_lantern':'\ud83c\udf83', + 'japan':'\ud83d\uddfe', + 'japanese_castle':'\ud83c\udfef', + 'japanese_goblin':'\ud83d\udc7a', + 'japanese_ogre':'\ud83d\udc79', + 'jeans':'\ud83d\udc56', + 'joy':'\ud83d\ude02', + 'joy_cat':'\ud83d\ude39', + 'joystick':'\ud83d\udd79', + 'kaaba':'\ud83d\udd4b', + 'key':'\ud83d\udd11', + 'keyboard':'\u2328\ufe0f', + 'keycap_ten':'\ud83d\udd1f', + 'kick_scooter':'\ud83d\udef4', + 'kimono':'\ud83d\udc58', + 'kiss':'\ud83d\udc8b', + 'kissing':'\ud83d\ude17', + 'kissing_cat':'\ud83d\ude3d', + 'kissing_closed_eyes':'\ud83d\ude1a', + 'kissing_heart':'\ud83d\ude18', + 'kissing_smiling_eyes':'\ud83d\ude19', + 'kiwi_fruit':'\ud83e\udd5d', + 'koala':'\ud83d\udc28', + 'koko':'\ud83c\ude01', + 'label':'\ud83c\udff7', + 'large_blue_circle':'\ud83d\udd35', + 'large_blue_diamond':'\ud83d\udd37', + 'large_orange_diamond':'\ud83d\udd36', + 'last_quarter_moon':'\ud83c\udf17', + 'last_quarter_moon_with_face':'\ud83c\udf1c', + 'latin_cross':'\u271d\ufe0f', + 'laughing':'\ud83d\ude06', + 'leaves':'\ud83c\udf43', + 'ledger':'\ud83d\udcd2', + 'left_luggage':'\ud83d\udec5', + 'left_right_arrow':'\u2194\ufe0f', + 'leftwards_arrow_with_hook':'\u21a9\ufe0f', + 'lemon':'\ud83c\udf4b', + 'leo':'\u264c\ufe0f', + 'leopard':'\ud83d\udc06', + 'level_slider':'\ud83c\udf9a', + 'libra':'\u264e\ufe0f', + 'light_rail':'\ud83d\ude88', + 'link':'\ud83d\udd17', + 'lion':'\ud83e\udd81', + 'lips':'\ud83d\udc44', + 'lipstick':'\ud83d\udc84', + 'lizard':'\ud83e\udd8e', + 'lock':'\ud83d\udd12', + 'lock_with_ink_pen':'\ud83d\udd0f', + 'lollipop':'\ud83c\udf6d', + 'loop':'\u27bf', + 'loud_sound':'\ud83d\udd0a', + 'loudspeaker':'\ud83d\udce2', + 'love_hotel':'\ud83c\udfe9', + 'love_letter':'\ud83d\udc8c', + 'low_brightness':'\ud83d\udd05', + 'lying_face':'\ud83e\udd25', + 'm':'\u24c2\ufe0f', + 'mag':'\ud83d\udd0d', + 'mag_right':'\ud83d\udd0e', + 'mahjong':'\ud83c\udc04\ufe0f', + 'mailbox':'\ud83d\udceb', + 'mailbox_closed':'\ud83d\udcea', + 'mailbox_with_mail':'\ud83d\udcec', + 'mailbox_with_no_mail':'\ud83d\udced', + 'man':'\ud83d\udc68', + 'man_artist':'\ud83d\udc68‍\ud83c\udfa8', + 'man_astronaut':'\ud83d\udc68‍\ud83d\ude80', + 'man_cartwheeling':'\ud83e\udd38‍\u2642\ufe0f', + 'man_cook':'\ud83d\udc68‍\ud83c\udf73', + 'man_dancing':'\ud83d\udd7a', + 'man_facepalming':'\ud83e\udd26‍\u2642\ufe0f', + 'man_factory_worker':'\ud83d\udc68‍\ud83c\udfed', + 'man_farmer':'\ud83d\udc68‍\ud83c\udf3e', + 'man_firefighter':'\ud83d\udc68‍\ud83d\ude92', + 'man_health_worker':'\ud83d\udc68‍\u2695\ufe0f', + 'man_in_tuxedo':'\ud83e\udd35', + 'man_judge':'\ud83d\udc68‍\u2696\ufe0f', + 'man_juggling':'\ud83e\udd39‍\u2642\ufe0f', + 'man_mechanic':'\ud83d\udc68‍\ud83d\udd27', + 'man_office_worker':'\ud83d\udc68‍\ud83d\udcbc', + 'man_pilot':'\ud83d\udc68‍\u2708\ufe0f', + 'man_playing_handball':'\ud83e\udd3e‍\u2642\ufe0f', + 'man_playing_water_polo':'\ud83e\udd3d‍\u2642\ufe0f', + 'man_scientist':'\ud83d\udc68‍\ud83d\udd2c', + 'man_shrugging':'\ud83e\udd37‍\u2642\ufe0f', + 'man_singer':'\ud83d\udc68‍\ud83c\udfa4', + 'man_student':'\ud83d\udc68‍\ud83c\udf93', + 'man_teacher':'\ud83d\udc68‍\ud83c\udfeb', + 'man_technologist':'\ud83d\udc68‍\ud83d\udcbb', + 'man_with_gua_pi_mao':'\ud83d\udc72', + 'man_with_turban':'\ud83d\udc73', + 'tangerine':'\ud83c\udf4a', + 'mans_shoe':'\ud83d\udc5e', + 'mantelpiece_clock':'\ud83d\udd70', + 'maple_leaf':'\ud83c\udf41', + 'martial_arts_uniform':'\ud83e\udd4b', + 'mask':'\ud83d\ude37', + 'massage_woman':'\ud83d\udc86', + 'massage_man':'\ud83d\udc86‍\u2642\ufe0f', + 'meat_on_bone':'\ud83c\udf56', + 'medal_military':'\ud83c\udf96', + 'medal_sports':'\ud83c\udfc5', + 'mega':'\ud83d\udce3', + 'melon':'\ud83c\udf48', + 'memo':'\ud83d\udcdd', + 'men_wrestling':'\ud83e\udd3c‍\u2642\ufe0f', + 'menorah':'\ud83d\udd4e', + 'mens':'\ud83d\udeb9', + 'metal':'\ud83e\udd18', + 'metro':'\ud83d\ude87', + 'microphone':'\ud83c\udfa4', + 'microscope':'\ud83d\udd2c', + 'milk_glass':'\ud83e\udd5b', + 'milky_way':'\ud83c\udf0c', + 'minibus':'\ud83d\ude90', + 'minidisc':'\ud83d\udcbd', + 'mobile_phone_off':'\ud83d\udcf4', + 'money_mouth_face':'\ud83e\udd11', + 'money_with_wings':'\ud83d\udcb8', + 'moneybag':'\ud83d\udcb0', + 'monkey':'\ud83d\udc12', + 'monkey_face':'\ud83d\udc35', + 'monorail':'\ud83d\ude9d', + 'moon':'\ud83c\udf14', + 'mortar_board':'\ud83c\udf93', + 'mosque':'\ud83d\udd4c', + 'motor_boat':'\ud83d\udee5', + 'motor_scooter':'\ud83d\udef5', + 'motorcycle':'\ud83c\udfcd', + 'motorway':'\ud83d\udee3', + 'mount_fuji':'\ud83d\uddfb', + 'mountain':'\u26f0', + 'mountain_biking_man':'\ud83d\udeb5', + 'mountain_biking_woman':'\ud83d\udeb5‍\u2640\ufe0f', + 'mountain_cableway':'\ud83d\udea0', + 'mountain_railway':'\ud83d\ude9e', + 'mountain_snow':'\ud83c\udfd4', + 'mouse':'\ud83d\udc2d', + 'mouse2':'\ud83d\udc01', + 'movie_camera':'\ud83c\udfa5', + 'moyai':'\ud83d\uddff', + 'mrs_claus':'\ud83e\udd36', + 'muscle':'\ud83d\udcaa', + 'mushroom':'\ud83c\udf44', + 'musical_keyboard':'\ud83c\udfb9', + 'musical_note':'\ud83c\udfb5', + 'musical_score':'\ud83c\udfbc', + 'mute':'\ud83d\udd07', + 'nail_care':'\ud83d\udc85', + 'name_badge':'\ud83d\udcdb', + 'national_park':'\ud83c\udfde', + 'nauseated_face':'\ud83e\udd22', + 'necktie':'\ud83d\udc54', + 'negative_squared_cross_mark':'\u274e', + 'nerd_face':'\ud83e\udd13', + 'neutral_face':'\ud83d\ude10', + 'new':'\ud83c\udd95', + 'new_moon':'\ud83c\udf11', + 'new_moon_with_face':'\ud83c\udf1a', + 'newspaper':'\ud83d\udcf0', + 'newspaper_roll':'\ud83d\uddde', + 'next_track_button':'\u23ed', + 'ng':'\ud83c\udd96', + 'no_good_man':'\ud83d\ude45‍\u2642\ufe0f', + 'no_good_woman':'\ud83d\ude45', + 'night_with_stars':'\ud83c\udf03', + 'no_bell':'\ud83d\udd15', + 'no_bicycles':'\ud83d\udeb3', + 'no_entry':'\u26d4\ufe0f', + 'no_entry_sign':'\ud83d\udeab', + 'no_mobile_phones':'\ud83d\udcf5', + 'no_mouth':'\ud83d\ude36', + 'no_pedestrians':'\ud83d\udeb7', + 'no_smoking':'\ud83d\udead', + 'non-potable_water':'\ud83d\udeb1', + 'nose':'\ud83d\udc43', + 'notebook':'\ud83d\udcd3', + 'notebook_with_decorative_cover':'\ud83d\udcd4', + 'notes':'\ud83c\udfb6', + 'nut_and_bolt':'\ud83d\udd29', + 'o':'\u2b55\ufe0f', + 'o2':'\ud83c\udd7e\ufe0f', + 'ocean':'\ud83c\udf0a', + 'octopus':'\ud83d\udc19', + 'oden':'\ud83c\udf62', + 'office':'\ud83c\udfe2', + 'oil_drum':'\ud83d\udee2', + 'ok':'\ud83c\udd97', + 'ok_hand':'\ud83d\udc4c', + 'ok_man':'\ud83d\ude46‍\u2642\ufe0f', + 'ok_woman':'\ud83d\ude46', + 'old_key':'\ud83d\udddd', + 'older_man':'\ud83d\udc74', + 'older_woman':'\ud83d\udc75', + 'om':'\ud83d\udd49', + 'on':'\ud83d\udd1b', + 'oncoming_automobile':'\ud83d\ude98', + 'oncoming_bus':'\ud83d\ude8d', + 'oncoming_police_car':'\ud83d\ude94', + 'oncoming_taxi':'\ud83d\ude96', + 'open_file_folder':'\ud83d\udcc2', + 'open_hands':'\ud83d\udc50', + 'open_mouth':'\ud83d\ude2e', + 'open_umbrella':'\u2602\ufe0f', + 'ophiuchus':'\u26ce', + 'orange_book':'\ud83d\udcd9', + 'orthodox_cross':'\u2626\ufe0f', + 'outbox_tray':'\ud83d\udce4', + 'owl':'\ud83e\udd89', + 'ox':'\ud83d\udc02', + 'package':'\ud83d\udce6', + 'page_facing_up':'\ud83d\udcc4', + 'page_with_curl':'\ud83d\udcc3', + 'pager':'\ud83d\udcdf', + 'paintbrush':'\ud83d\udd8c', + 'palm_tree':'\ud83c\udf34', + 'pancakes':'\ud83e\udd5e', + 'panda_face':'\ud83d\udc3c', + 'paperclip':'\ud83d\udcce', + 'paperclips':'\ud83d\udd87', + 'parasol_on_ground':'\u26f1', + 'parking':'\ud83c\udd7f\ufe0f', + 'part_alternation_mark':'\u303d\ufe0f', + 'partly_sunny':'\u26c5\ufe0f', + 'passenger_ship':'\ud83d\udef3', + 'passport_control':'\ud83d\udec2', + 'pause_button':'\u23f8', + 'peace_symbol':'\u262e\ufe0f', + 'peach':'\ud83c\udf51', + 'peanuts':'\ud83e\udd5c', + 'pear':'\ud83c\udf50', + 'pen':'\ud83d\udd8a', + 'pencil2':'\u270f\ufe0f', + 'penguin':'\ud83d\udc27', + 'pensive':'\ud83d\ude14', + 'performing_arts':'\ud83c\udfad', + 'persevere':'\ud83d\ude23', + 'person_fencing':'\ud83e\udd3a', + 'pouting_woman':'\ud83d\ude4e', + 'phone':'\u260e\ufe0f', + 'pick':'\u26cf', + 'pig':'\ud83d\udc37', + 'pig2':'\ud83d\udc16', + 'pig_nose':'\ud83d\udc3d', + 'pill':'\ud83d\udc8a', + 'pineapple':'\ud83c\udf4d', + 'ping_pong':'\ud83c\udfd3', + 'pisces':'\u2653\ufe0f', + 'pizza':'\ud83c\udf55', + 'place_of_worship':'\ud83d\uded0', + 'plate_with_cutlery':'\ud83c\udf7d', + 'play_or_pause_button':'\u23ef', + 'point_down':'\ud83d\udc47', + 'point_left':'\ud83d\udc48', + 'point_right':'\ud83d\udc49', + 'point_up':'\u261d\ufe0f', + 'point_up_2':'\ud83d\udc46', + 'police_car':'\ud83d\ude93', + 'policewoman':'\ud83d\udc6e‍\u2640\ufe0f', + 'poodle':'\ud83d\udc29', + 'popcorn':'\ud83c\udf7f', + 'post_office':'\ud83c\udfe3', + 'postal_horn':'\ud83d\udcef', + 'postbox':'\ud83d\udcee', + 'potable_water':'\ud83d\udeb0', + 'potato':'\ud83e\udd54', + 'pouch':'\ud83d\udc5d', + 'poultry_leg':'\ud83c\udf57', + 'pound':'\ud83d\udcb7', + 'rage':'\ud83d\ude21', + 'pouting_cat':'\ud83d\ude3e', + 'pouting_man':'\ud83d\ude4e‍\u2642\ufe0f', + 'pray':'\ud83d\ude4f', + 'prayer_beads':'\ud83d\udcff', + 'pregnant_woman':'\ud83e\udd30', + 'previous_track_button':'\u23ee', + 'prince':'\ud83e\udd34', + 'princess':'\ud83d\udc78', + 'printer':'\ud83d\udda8', + 'purple_heart':'\ud83d\udc9c', + 'purse':'\ud83d\udc5b', + 'pushpin':'\ud83d\udccc', + 'put_litter_in_its_place':'\ud83d\udeae', + 'question':'\u2753', + 'rabbit':'\ud83d\udc30', + 'rabbit2':'\ud83d\udc07', + 'racehorse':'\ud83d\udc0e', + 'racing_car':'\ud83c\udfce', + 'radio':'\ud83d\udcfb', + 'radio_button':'\ud83d\udd18', + 'radioactive':'\u2622\ufe0f', + 'railway_car':'\ud83d\ude83', + 'railway_track':'\ud83d\udee4', + 'rainbow':'\ud83c\udf08', + 'rainbow_flag':'\ud83c\udff3\ufe0f‍\ud83c\udf08', + 'raised_back_of_hand':'\ud83e\udd1a', + 'raised_hand_with_fingers_splayed':'\ud83d\udd90', + 'raised_hands':'\ud83d\ude4c', + 'raising_hand_woman':'\ud83d\ude4b', + 'raising_hand_man':'\ud83d\ude4b‍\u2642\ufe0f', + 'ram':'\ud83d\udc0f', + 'ramen':'\ud83c\udf5c', + 'rat':'\ud83d\udc00', + 'record_button':'\u23fa', + 'recycle':'\u267b\ufe0f', + 'red_circle':'\ud83d\udd34', + 'registered':'\u00ae\ufe0f', + 'relaxed':'\u263a\ufe0f', + 'relieved':'\ud83d\ude0c', + 'reminder_ribbon':'\ud83c\udf97', + 'repeat':'\ud83d\udd01', + 'repeat_one':'\ud83d\udd02', + 'rescue_worker_helmet':'\u26d1', + 'restroom':'\ud83d\udebb', + 'revolving_hearts':'\ud83d\udc9e', + 'rewind':'\u23ea', + 'rhinoceros':'\ud83e\udd8f', + 'ribbon':'\ud83c\udf80', + 'rice':'\ud83c\udf5a', + 'rice_ball':'\ud83c\udf59', + 'rice_cracker':'\ud83c\udf58', + 'rice_scene':'\ud83c\udf91', + 'right_anger_bubble':'\ud83d\uddef', + 'ring':'\ud83d\udc8d', + 'robot':'\ud83e\udd16', + 'rocket':'\ud83d\ude80', + 'rofl':'\ud83e\udd23', + 'roll_eyes':'\ud83d\ude44', + 'roller_coaster':'\ud83c\udfa2', + 'rooster':'\ud83d\udc13', + 'rose':'\ud83c\udf39', + 'rosette':'\ud83c\udff5', + 'rotating_light':'\ud83d\udea8', + 'round_pushpin':'\ud83d\udccd', + 'rowing_man':'\ud83d\udea3', + 'rowing_woman':'\ud83d\udea3‍\u2640\ufe0f', + 'rugby_football':'\ud83c\udfc9', + 'running_man':'\ud83c\udfc3', + 'running_shirt_with_sash':'\ud83c\udfbd', + 'running_woman':'\ud83c\udfc3‍\u2640\ufe0f', + 'sa':'\ud83c\ude02\ufe0f', + 'sagittarius':'\u2650\ufe0f', + 'sake':'\ud83c\udf76', + 'sandal':'\ud83d\udc61', + 'santa':'\ud83c\udf85', + 'satellite':'\ud83d\udce1', + 'saxophone':'\ud83c\udfb7', + 'school':'\ud83c\udfeb', + 'school_satchel':'\ud83c\udf92', + 'scissors':'\u2702\ufe0f', + 'scorpion':'\ud83e\udd82', + 'scorpius':'\u264f\ufe0f', + 'scream':'\ud83d\ude31', + 'scream_cat':'\ud83d\ude40', + 'scroll':'\ud83d\udcdc', + 'seat':'\ud83d\udcba', + 'secret':'\u3299\ufe0f', + 'see_no_evil':'\ud83d\ude48', + 'seedling':'\ud83c\udf31', + 'selfie':'\ud83e\udd33', + 'shallow_pan_of_food':'\ud83e\udd58', + 'shamrock':'\u2618\ufe0f', + 'shark':'\ud83e\udd88', + 'shaved_ice':'\ud83c\udf67', + 'sheep':'\ud83d\udc11', + 'shell':'\ud83d\udc1a', + 'shield':'\ud83d\udee1', + 'shinto_shrine':'\u26e9', + 'ship':'\ud83d\udea2', + 'shirt':'\ud83d\udc55', + 'shopping':'\ud83d\udecd', + 'shopping_cart':'\ud83d\uded2', + 'shower':'\ud83d\udebf', + 'shrimp':'\ud83e\udd90', + 'signal_strength':'\ud83d\udcf6', + 'six_pointed_star':'\ud83d\udd2f', + 'ski':'\ud83c\udfbf', + 'skier':'\u26f7', + 'skull':'\ud83d\udc80', + 'skull_and_crossbones':'\u2620\ufe0f', + 'sleeping':'\ud83d\ude34', + 'sleeping_bed':'\ud83d\udecc', + 'sleepy':'\ud83d\ude2a', + 'slightly_frowning_face':'\ud83d\ude41', + 'slightly_smiling_face':'\ud83d\ude42', + 'slot_machine':'\ud83c\udfb0', + 'small_airplane':'\ud83d\udee9', + 'small_blue_diamond':'\ud83d\udd39', + 'small_orange_diamond':'\ud83d\udd38', + 'small_red_triangle':'\ud83d\udd3a', + 'small_red_triangle_down':'\ud83d\udd3b', + 'smile':'\ud83d\ude04', + 'smile_cat':'\ud83d\ude38', + 'smiley':'\ud83d\ude03', + 'smiley_cat':'\ud83d\ude3a', + 'smiling_imp':'\ud83d\ude08', + 'smirk':'\ud83d\ude0f', + 'smirk_cat':'\ud83d\ude3c', + 'smoking':'\ud83d\udeac', + 'snail':'\ud83d\udc0c', + 'snake':'\ud83d\udc0d', + 'sneezing_face':'\ud83e\udd27', + 'snowboarder':'\ud83c\udfc2', + 'snowflake':'\u2744\ufe0f', + 'snowman':'\u26c4\ufe0f', + 'snowman_with_snow':'\u2603\ufe0f', + 'sob':'\ud83d\ude2d', + 'soccer':'\u26bd\ufe0f', + 'soon':'\ud83d\udd1c', + 'sos':'\ud83c\udd98', + 'sound':'\ud83d\udd09', + 'space_invader':'\ud83d\udc7e', + 'spades':'\u2660\ufe0f', + 'spaghetti':'\ud83c\udf5d', + 'sparkle':'\u2747\ufe0f', + 'sparkler':'\ud83c\udf87', + 'sparkles':'\u2728', + 'sparkling_heart':'\ud83d\udc96', + 'speak_no_evil':'\ud83d\ude4a', + 'speaker':'\ud83d\udd08', + 'speaking_head':'\ud83d\udde3', + 'speech_balloon':'\ud83d\udcac', + 'speedboat':'\ud83d\udea4', + 'spider':'\ud83d\udd77', + 'spider_web':'\ud83d\udd78', + 'spiral_calendar':'\ud83d\uddd3', + 'spiral_notepad':'\ud83d\uddd2', + 'spoon':'\ud83e\udd44', + 'squid':'\ud83e\udd91', + 'stadium':'\ud83c\udfdf', + 'star':'\u2b50\ufe0f', + 'star2':'\ud83c\udf1f', + 'star_and_crescent':'\u262a\ufe0f', + 'star_of_david':'\u2721\ufe0f', + 'stars':'\ud83c\udf20', + 'station':'\ud83d\ude89', + 'statue_of_liberty':'\ud83d\uddfd', + 'steam_locomotive':'\ud83d\ude82', + 'stew':'\ud83c\udf72', + 'stop_button':'\u23f9', + 'stop_sign':'\ud83d\uded1', + 'stopwatch':'\u23f1', + 'straight_ruler':'\ud83d\udccf', + 'strawberry':'\ud83c\udf53', + 'stuck_out_tongue':'\ud83d\ude1b', + 'stuck_out_tongue_closed_eyes':'\ud83d\ude1d', + 'stuck_out_tongue_winking_eye':'\ud83d\ude1c', + 'studio_microphone':'\ud83c\udf99', + 'stuffed_flatbread':'\ud83e\udd59', + 'sun_behind_large_cloud':'\ud83c\udf25', + 'sun_behind_rain_cloud':'\ud83c\udf26', + 'sun_behind_small_cloud':'\ud83c\udf24', + 'sun_with_face':'\ud83c\udf1e', + 'sunflower':'\ud83c\udf3b', + 'sunglasses':'\ud83d\ude0e', + 'sunny':'\u2600\ufe0f', + 'sunrise':'\ud83c\udf05', + 'sunrise_over_mountains':'\ud83c\udf04', + 'surfing_man':'\ud83c\udfc4', + 'surfing_woman':'\ud83c\udfc4‍\u2640\ufe0f', + 'sushi':'\ud83c\udf63', + 'suspension_railway':'\ud83d\ude9f', + 'sweat':'\ud83d\ude13', + 'sweat_drops':'\ud83d\udca6', + 'sweat_smile':'\ud83d\ude05', + 'sweet_potato':'\ud83c\udf60', + 'swimming_man':'\ud83c\udfca', + 'swimming_woman':'\ud83c\udfca‍\u2640\ufe0f', + 'symbols':'\ud83d\udd23', + 'synagogue':'\ud83d\udd4d', + 'syringe':'\ud83d\udc89', + 'taco':'\ud83c\udf2e', + 'tada':'\ud83c\udf89', + 'tanabata_tree':'\ud83c\udf8b', + 'taurus':'\u2649\ufe0f', + 'taxi':'\ud83d\ude95', + 'tea':'\ud83c\udf75', + 'telephone_receiver':'\ud83d\udcde', + 'telescope':'\ud83d\udd2d', + 'tennis':'\ud83c\udfbe', + 'tent':'\u26fa\ufe0f', + 'thermometer':'\ud83c\udf21', + 'thinking':'\ud83e\udd14', + 'thought_balloon':'\ud83d\udcad', + 'ticket':'\ud83c\udfab', + 'tickets':'\ud83c\udf9f', + 'tiger':'\ud83d\udc2f', + 'tiger2':'\ud83d\udc05', + 'timer_clock':'\u23f2', + 'tipping_hand_man':'\ud83d\udc81‍\u2642\ufe0f', + 'tired_face':'\ud83d\ude2b', + 'tm':'\u2122\ufe0f', + 'toilet':'\ud83d\udebd', + 'tokyo_tower':'\ud83d\uddfc', + 'tomato':'\ud83c\udf45', + 'tongue':'\ud83d\udc45', + 'top':'\ud83d\udd1d', + 'tophat':'\ud83c\udfa9', + 'tornado':'\ud83c\udf2a', + 'trackball':'\ud83d\uddb2', + 'tractor':'\ud83d\ude9c', + 'traffic_light':'\ud83d\udea5', + 'train':'\ud83d\ude8b', + 'train2':'\ud83d\ude86', + 'tram':'\ud83d\ude8a', + 'triangular_flag_on_post':'\ud83d\udea9', + 'triangular_ruler':'\ud83d\udcd0', + 'trident':'\ud83d\udd31', + 'triumph':'\ud83d\ude24', + 'trolleybus':'\ud83d\ude8e', + 'trophy':'\ud83c\udfc6', + 'tropical_drink':'\ud83c\udf79', + 'tropical_fish':'\ud83d\udc20', + 'truck':'\ud83d\ude9a', + 'trumpet':'\ud83c\udfba', + 'tulip':'\ud83c\udf37', + 'tumbler_glass':'\ud83e\udd43', + 'turkey':'\ud83e\udd83', + 'turtle':'\ud83d\udc22', + 'tv':'\ud83d\udcfa', + 'twisted_rightwards_arrows':'\ud83d\udd00', + 'two_hearts':'\ud83d\udc95', + 'two_men_holding_hands':'\ud83d\udc6c', + 'two_women_holding_hands':'\ud83d\udc6d', + 'u5272':'\ud83c\ude39', + 'u5408':'\ud83c\ude34', + 'u55b6':'\ud83c\ude3a', + 'u6307':'\ud83c\ude2f\ufe0f', + 'u6708':'\ud83c\ude37\ufe0f', + 'u6709':'\ud83c\ude36', + 'u6e80':'\ud83c\ude35', + 'u7121':'\ud83c\ude1a\ufe0f', + 'u7533':'\ud83c\ude38', + 'u7981':'\ud83c\ude32', + 'u7a7a':'\ud83c\ude33', + 'umbrella':'\u2614\ufe0f', + 'unamused':'\ud83d\ude12', + 'underage':'\ud83d\udd1e', + 'unicorn':'\ud83e\udd84', + 'unlock':'\ud83d\udd13', + 'up':'\ud83c\udd99', + 'upside_down_face':'\ud83d\ude43', + 'v':'\u270c\ufe0f', + 'vertical_traffic_light':'\ud83d\udea6', + 'vhs':'\ud83d\udcfc', + 'vibration_mode':'\ud83d\udcf3', + 'video_camera':'\ud83d\udcf9', + 'video_game':'\ud83c\udfae', + 'violin':'\ud83c\udfbb', + 'virgo':'\u264d\ufe0f', + 'volcano':'\ud83c\udf0b', + 'volleyball':'\ud83c\udfd0', + 'vs':'\ud83c\udd9a', + 'vulcan_salute':'\ud83d\udd96', + 'walking_man':'\ud83d\udeb6', + 'walking_woman':'\ud83d\udeb6‍\u2640\ufe0f', + 'waning_crescent_moon':'\ud83c\udf18', + 'waning_gibbous_moon':'\ud83c\udf16', + 'warning':'\u26a0\ufe0f', + 'wastebasket':'\ud83d\uddd1', + 'watch':'\u231a\ufe0f', + 'water_buffalo':'\ud83d\udc03', + 'watermelon':'\ud83c\udf49', + 'wave':'\ud83d\udc4b', + 'wavy_dash':'\u3030\ufe0f', + 'waxing_crescent_moon':'\ud83c\udf12', + 'wc':'\ud83d\udebe', + 'weary':'\ud83d\ude29', + 'wedding':'\ud83d\udc92', + 'weight_lifting_man':'\ud83c\udfcb\ufe0f', + 'weight_lifting_woman':'\ud83c\udfcb\ufe0f‍\u2640\ufe0f', + 'whale':'\ud83d\udc33', + 'whale2':'\ud83d\udc0b', + 'wheel_of_dharma':'\u2638\ufe0f', + 'wheelchair':'\u267f\ufe0f', + 'white_check_mark':'\u2705', + 'white_circle':'\u26aa\ufe0f', + 'white_flag':'\ud83c\udff3\ufe0f', + 'white_flower':'\ud83d\udcae', + 'white_large_square':'\u2b1c\ufe0f', + 'white_medium_small_square':'\u25fd\ufe0f', + 'white_medium_square':'\u25fb\ufe0f', + 'white_small_square':'\u25ab\ufe0f', + 'white_square_button':'\ud83d\udd33', + 'wilted_flower':'\ud83e\udd40', + 'wind_chime':'\ud83c\udf90', + 'wind_face':'\ud83c\udf2c', + 'wine_glass':'\ud83c\udf77', + 'wink':'\ud83d\ude09', + 'wolf':'\ud83d\udc3a', + 'woman':'\ud83d\udc69', + 'woman_artist':'\ud83d\udc69‍\ud83c\udfa8', + 'woman_astronaut':'\ud83d\udc69‍\ud83d\ude80', + 'woman_cartwheeling':'\ud83e\udd38‍\u2640\ufe0f', + 'woman_cook':'\ud83d\udc69‍\ud83c\udf73', + 'woman_facepalming':'\ud83e\udd26‍\u2640\ufe0f', + 'woman_factory_worker':'\ud83d\udc69‍\ud83c\udfed', + 'woman_farmer':'\ud83d\udc69‍\ud83c\udf3e', + 'woman_firefighter':'\ud83d\udc69‍\ud83d\ude92', + 'woman_health_worker':'\ud83d\udc69‍\u2695\ufe0f', + 'woman_judge':'\ud83d\udc69‍\u2696\ufe0f', + 'woman_juggling':'\ud83e\udd39‍\u2640\ufe0f', + 'woman_mechanic':'\ud83d\udc69‍\ud83d\udd27', + 'woman_office_worker':'\ud83d\udc69‍\ud83d\udcbc', + 'woman_pilot':'\ud83d\udc69‍\u2708\ufe0f', + 'woman_playing_handball':'\ud83e\udd3e‍\u2640\ufe0f', + 'woman_playing_water_polo':'\ud83e\udd3d‍\u2640\ufe0f', + 'woman_scientist':'\ud83d\udc69‍\ud83d\udd2c', + 'woman_shrugging':'\ud83e\udd37‍\u2640\ufe0f', + 'woman_singer':'\ud83d\udc69‍\ud83c\udfa4', + 'woman_student':'\ud83d\udc69‍\ud83c\udf93', + 'woman_teacher':'\ud83d\udc69‍\ud83c\udfeb', + 'woman_technologist':'\ud83d\udc69‍\ud83d\udcbb', + 'woman_with_turban':'\ud83d\udc73‍\u2640\ufe0f', + 'womans_clothes':'\ud83d\udc5a', + 'womans_hat':'\ud83d\udc52', + 'women_wrestling':'\ud83e\udd3c‍\u2640\ufe0f', + 'womens':'\ud83d\udeba', + 'world_map':'\ud83d\uddfa', + 'worried':'\ud83d\ude1f', + 'wrench':'\ud83d\udd27', + 'writing_hand':'\u270d\ufe0f', + 'x':'\u274c', + 'yellow_heart':'\ud83d\udc9b', + 'yen':'\ud83d\udcb4', + 'yin_yang':'\u262f\ufe0f', + 'yum':'\ud83d\ude0b', + 'zap':'\u26a1\ufe0f', + 'zipper_mouth_face':'\ud83e\udd10', + 'zzz':'\ud83d\udca4', + + /* special emojis :P */ + 'octocat': ':octocat:', + 'showdown': 'S' +}; + +/** + * Created by Estevao on 31-05-2015. + */ + +/** + * Showdown Converter class + * @class + * @param {object} [converterOptions] + * @returns {Converter} + */ +showdown.Converter = function (converterOptions) { + 'use strict'; + + var + /** + * Options used by this converter + * @private + * @type {{}} + */ + options = {}, + + /** + * Language extensions used by this converter + * @private + * @type {Array} + */ + langExtensions = [], + + /** + * Output modifiers extensions used by this converter + * @private + * @type {Array} + */ + outputModifiers = [], + + /** + * Event listeners + * @private + * @type {{}} + */ + listeners = {}, + + /** + * The flavor set in this converter + */ + setConvFlavor = setFlavor, + + /** + * Metadata of the document + * @type {{parsed: {}, raw: string, format: string}} + */ + metadata = { + parsed: {}, + raw: '', + format: '' + }; + + _constructor(); + + /** + * Converter constructor + * @private + */ + function _constructor () { + converterOptions = converterOptions || {}; + + for (var gOpt in globalOptions) { + if (globalOptions.hasOwnProperty(gOpt)) { + options[gOpt] = globalOptions[gOpt]; + } + } + + // Merge options + if (typeof converterOptions === 'object') { + for (var opt in converterOptions) { + if (converterOptions.hasOwnProperty(opt)) { + options[opt] = converterOptions[opt]; + } + } + } else { + throw Error('Converter expects the passed parameter to be an object, but ' + typeof converterOptions + + ' was passed instead.'); + } + + if (options.extensions) { + showdown.helper.forEach(options.extensions, _parseExtension); + } + } + + /** + * Parse extension + * @param {*} ext + * @param {string} [name=''] + * @private + */ + function _parseExtension (ext, name) { + + name = name || null; + // If it's a string, the extension was previously loaded + if (showdown.helper.isString(ext)) { + ext = showdown.helper.stdExtName(ext); + name = ext; + + // LEGACY_SUPPORT CODE + if (showdown.extensions[ext]) { + console.warn('DEPRECATION WARNING: ' + ext + ' is an old extension that uses a deprecated loading method.' + + 'Please inform the developer that the extension should be updated!'); + legacyExtensionLoading(showdown.extensions[ext], ext); + return; + // END LEGACY SUPPORT CODE + + } else if (!showdown.helper.isUndefined(extensions[ext])) { + ext = extensions[ext]; + + } else { + throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.'); + } + } + + if (typeof ext === 'function') { + ext = ext(); + } + + if (!showdown.helper.isArray(ext)) { + ext = [ext]; + } + + var validExt = validate(ext, name); + if (!validExt.valid) { + throw Error(validExt.error); + } + + for (var i = 0; i < ext.length; ++i) { + switch (ext[i].type) { + + case 'lang': + langExtensions.push(ext[i]); + break; + + case 'output': + outputModifiers.push(ext[i]); + break; + } + if (ext[i].hasOwnProperty('listeners')) { + for (var ln in ext[i].listeners) { + if (ext[i].listeners.hasOwnProperty(ln)) { + listen(ln, ext[i].listeners[ln]); + } + } + } + } + + } + + /** + * LEGACY_SUPPORT + * @param {*} ext + * @param {string} name + */ + function legacyExtensionLoading (ext, name) { + if (typeof ext === 'function') { + ext = ext(new showdown.Converter()); + } + if (!showdown.helper.isArray(ext)) { + ext = [ext]; + } + var valid = validate(ext, name); + + if (!valid.valid) { + throw Error(valid.error); + } + + for (var i = 0; i < ext.length; ++i) { + switch (ext[i].type) { + case 'lang': + langExtensions.push(ext[i]); + break; + case 'output': + outputModifiers.push(ext[i]); + break; + default:// should never reach here + throw Error('Extension loader error: Type unrecognized!!!'); + } + } + } + + /** + * Listen to an event + * @param {string} name + * @param {function} callback + */ + function listen (name, callback) { + if (!showdown.helper.isString(name)) { + throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given'); + } + + if (typeof callback !== 'function') { + throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given'); + } + + if (!listeners.hasOwnProperty(name)) { + listeners[name] = []; + } + listeners[name].push(callback); + } + + function rTrimInputText (text) { + var rsp = text.match(/^\s*/)[0].length, + rgx = new RegExp('^\\s{0,' + rsp + '}', 'gm'); + return text.replace(rgx, ''); + } + + /** + * Dispatch an event + * @private + * @param {string} evtName Event name + * @param {string} text Text + * @param {{}} options Converter Options + * @param {{}} globals + * @returns {string} + */ + this._dispatch = function dispatch (evtName, text, options, globals) { + if (listeners.hasOwnProperty(evtName)) { + for (var ei = 0; ei < listeners[evtName].length; ++ei) { + var nText = listeners[evtName][ei](evtName, text, this, options, globals); + if (nText && typeof nText !== 'undefined') { + text = nText; + } + } + } + return text; + }; + + /** + * Listen to an event + * @param {string} name + * @param {function} callback + * @returns {showdown.Converter} + */ + this.listen = function (name, callback) { + listen(name, callback); + return this; + }; + + /** + * Converts a markdown string into HTML + * @param {string} text + * @returns {*} + */ + this.makeHtml = function (text) { + //check if text is not falsy + if (!text) { + return text; + } + + var globals = { + gHtmlBlocks: [], + gHtmlMdBlocks: [], + gHtmlSpans: [], + gUrls: {}, + gTitles: {}, + gDimensions: {}, + gListLevel: 0, + hashLinkCounts: {}, + langExtensions: langExtensions, + outputModifiers: outputModifiers, + converter: this, + ghCodeBlocks: [], + metadata: { + parsed: {}, + raw: '', + format: '' + } + }; + + // This lets us use ¨ trema as an escape char to avoid md5 hashes + // The choice of character is arbitrary; anything that isn't + // magic in Markdown will work. + text = text.replace(/¨/g, '¨T'); + + // Replace $ with ¨D + // RegExp interprets $ as a special character + // when it's in a replacement string + text = text.replace(/\$/g, '¨D'); + + // Standardize line endings + text = text.replace(/\r\n/g, '\n'); // DOS to Unix + text = text.replace(/\r/g, '\n'); // Mac to Unix + + // Stardardize line spaces + text = text.replace(/\u00A0/g, ' '); + + if (options.smartIndentationFix) { + text = rTrimInputText(text); + } + + // Make sure text begins and ends with a couple of newlines: + text = '\n\n' + text + '\n\n'; + + // detab + text = showdown.subParser('detab')(text, options, globals); + + /** + * Strip any lines consisting only of spaces and tabs. + * This makes subsequent regexs easier to write, because we can + * match consecutive blank lines with /\n+/ instead of something + * contorted like /[ \t]*\n+/ + */ + text = text.replace(/^[ \t]+$/mg, ''); + + //run languageExtensions + showdown.helper.forEach(langExtensions, function (ext) { + text = showdown.subParser('runExtension')(ext, text, options, globals); + }); + + // run the sub parsers + text = showdown.subParser('metadata')(text, options, globals); + text = showdown.subParser('hashPreCodeTags')(text, options, globals); + text = showdown.subParser('githubCodeBlocks')(text, options, globals); + text = showdown.subParser('hashHTMLBlocks')(text, options, globals); + text = showdown.subParser('hashCodeTags')(text, options, globals); + text = showdown.subParser('stripLinkDefinitions')(text, options, globals); + text = showdown.subParser('blockGamut')(text, options, globals); + text = showdown.subParser('unhashHTMLSpans')(text, options, globals); + text = showdown.subParser('unescapeSpecialChars')(text, options, globals); + + // attacklab: Restore dollar signs + text = text.replace(/¨D/g, '$$'); + + // attacklab: Restore tremas + text = text.replace(/¨T/g, '¨'); + + // render a complete html document instead of a partial if the option is enabled + text = showdown.subParser('completeHTMLDocument')(text, options, globals); + + // Run output modifiers + showdown.helper.forEach(outputModifiers, function (ext) { + text = showdown.subParser('runExtension')(ext, text, options, globals); + }); + + // update metadata + metadata = globals.metadata; + return text; + }; + + /** + * Converts an HTML string into a markdown string + * @param src + * @param [HTMLParser] A WHATWG DOM and HTML parser, such as JSDOM. If none is supplied, window.document will be used. + * @returns {string} + */ + this.makeMarkdown = this.makeMd = function (src, HTMLParser) { + + // replace \r\n with \n + src = src.replace(/\r\n/g, '\n'); + src = src.replace(/\r/g, '\n'); // old macs + + // due to an edge case, we need to find this: > < + // to prevent removing of non silent white spaces + // ex: this is sparta + src = src.replace(/>[ \t]+¨NBSP;<'); + + if (!HTMLParser) { + if (window && window.document) { + HTMLParser = window.document; + } else { + throw new Error('HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM'); + } + } + + var doc = HTMLParser.createElement('div'); + doc.innerHTML = src; + + var globals = { + preList: substitutePreCodeTags(doc) + }; + + // remove all newlines and collapse spaces + clean(doc); + + // some stuff, like accidental reference links must now be escaped + // TODO + // doc.innerHTML = doc.innerHTML.replace(/\[[\S\t ]]/); + + var nodes = doc.childNodes, + mdDoc = ''; + + for (var i = 0; i < nodes.length; i++) { + mdDoc += showdown.subParser('makeMarkdown.node')(nodes[i], globals); + } + + function clean (node) { + for (var n = 0; n < node.childNodes.length; ++n) { + var child = node.childNodes[n]; + if (child.nodeType === 3) { + if (!/\S/.test(child.nodeValue)) { + node.removeChild(child); + --n; + } else { + child.nodeValue = child.nodeValue.split('\n').join(' '); + child.nodeValue = child.nodeValue.replace(/(\s)+/g, '$1'); + } + } else if (child.nodeType === 1) { + clean(child); + } + } + } + + // find all pre tags and replace contents with placeholder + // we need this so that we can remove all indentation from html + // to ease up parsing + function substitutePreCodeTags (doc) { + + var pres = doc.querySelectorAll('pre'), + presPH = []; + + for (var i = 0; i < pres.length; ++i) { + + if (pres[i].childElementCount === 1 && pres[i].firstChild.tagName.toLowerCase() === 'code') { + var content = pres[i].firstChild.innerHTML.trim(), + language = pres[i].firstChild.getAttribute('data-language') || ''; + + // if data-language attribute is not defined, then we look for class language-* + if (language === '') { + var classes = pres[i].firstChild.className.split(' '); + for (var c = 0; c < classes.length; ++c) { + var matches = classes[c].match(/^language-(.+)$/); + if (matches !== null) { + language = matches[1]; + break; + } + } + } + + // unescape html entities in content + content = showdown.helper.unescapeHTMLEntities(content); + + presPH.push(content); + pres[i].outerHTML = ''; + } else { + presPH.push(pres[i].innerHTML); + pres[i].innerHTML = ''; + pres[i].setAttribute('prenum', i.toString()); + } + } + return presPH; + } + + return mdDoc; + }; + + /** + * Set an option of this Converter instance + * @param {string} key + * @param {*} value + */ + this.setOption = function (key, value) { + options[key] = value; + }; + + /** + * Get the option of this Converter instance + * @param {string} key + * @returns {*} + */ + this.getOption = function (key) { + return options[key]; + }; + + /** + * Get the options of this Converter instance + * @returns {{}} + */ + this.getOptions = function () { + return options; + }; + + /** + * Add extension to THIS converter + * @param {{}} extension + * @param {string} [name=null] + */ + this.addExtension = function (extension, name) { + name = name || null; + _parseExtension(extension, name); + }; + + /** + * Use a global registered extension with THIS converter + * @param {string} extensionName Name of the previously registered extension + */ + this.useExtension = function (extensionName) { + _parseExtension(extensionName); + }; + + /** + * Set the flavor THIS converter should use + * @param {string} name + */ + this.setFlavor = function (name) { + if (!flavor.hasOwnProperty(name)) { + throw Error(name + ' flavor was not found'); + } + var preset = flavor[name]; + setConvFlavor = name; + for (var option in preset) { + if (preset.hasOwnProperty(option)) { + options[option] = preset[option]; + } + } + }; + + /** + * Get the currently set flavor of this converter + * @returns {string} + */ + this.getFlavor = function () { + return setConvFlavor; + }; + + /** + * Remove an extension from THIS converter. + * Note: This is a costly operation. It's better to initialize a new converter + * and specify the extensions you wish to use + * @param {Array} extension + */ + this.removeExtension = function (extension) { + if (!showdown.helper.isArray(extension)) { + extension = [extension]; + } + for (var a = 0; a < extension.length; ++a) { + var ext = extension[a]; + for (var i = 0; i < langExtensions.length; ++i) { + if (langExtensions[i] === ext) { + langExtensions[i].splice(i, 1); + } + } + for (var ii = 0; ii < outputModifiers.length; ++i) { + if (outputModifiers[ii] === ext) { + outputModifiers[ii].splice(i, 1); + } + } + } + }; + + /** + * Get all extension of THIS converter + * @returns {{language: Array, output: Array}} + */ + this.getAllExtensions = function () { + return { + language: langExtensions, + output: outputModifiers + }; + }; + + /** + * Get the metadata of the previously parsed document + * @param raw + * @returns {string|{}} + */ + this.getMetadata = function (raw) { + if (raw) { + return metadata.raw; + } else { + return metadata.parsed; + } + }; + + /** + * Get the metadata format of the previously parsed document + * @returns {string} + */ + this.getMetadataFormat = function () { + return metadata.format; + }; + + /** + * Private: set a single key, value metadata pair + * @param {string} key + * @param {string} value + */ + this._setMetadataPair = function (key, value) { + metadata.parsed[key] = value; + }; + + /** + * Private: set metadata format + * @param {string} format + */ + this._setMetadataFormat = function (format) { + metadata.format = format; + }; + + /** + * Private: set metadata raw text + * @param {string} raw + */ + this._setMetadataRaw = function (raw) { + metadata.raw = raw; + }; +}; + +/** + * Turn Markdown link shortcuts into XHTML tags. + */ +showdown.subParser('anchors', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('anchors.before', text, options, globals); + + var writeAnchorTag = function (wholeMatch, linkText, linkId, url, m5, m6, title) { + if (showdown.helper.isUndefined(title)) { + title = ''; + } + linkId = linkId.toLowerCase(); + + // Special case for explicit empty url + if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { + url = ''; + } else if (!url) { + if (!linkId) { + // lower-case and turn embedded newlines into spaces + linkId = linkText.toLowerCase().replace(/ ?\n/g, ' '); + } + url = '#' + linkId; + + if (!showdown.helper.isUndefined(globals.gUrls[linkId])) { + url = globals.gUrls[linkId]; + if (!showdown.helper.isUndefined(globals.gTitles[linkId])) { + title = globals.gTitles[linkId]; + } + } else { + return wholeMatch; + } + } + + //url = showdown.helper.escapeCharacters(url, '*_', false); // replaced line to improve performance + url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + + var result = ''; + + return result; + }; + + // First, handle reference-style links: [link text] [id] + text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag); + + // Next, inline-style links: [link text](url "optional title") + // cases with crazy urls like ./image/cat1).png + text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, + writeAnchorTag); + + // normal cases + text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, + writeAnchorTag); + + // handle reference-style shortcuts: [link text] + // These must come last in case you've also got [link test][1] + // or [link test](/foo) + text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag); + + // Lastly handle GithubMentions if option is enabled + if (options.ghMentions) { + text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) { + if (escape === '\\') { + return st + mentions; + } + + //check if options.ghMentionsLink is a string + if (!showdown.helper.isString(options.ghMentionsLink)) { + throw new Error('ghMentionsLink option must be a string'); + } + var lnk = options.ghMentionsLink.replace(/\{u}/g, username), + target = ''; + if (options.openLinksInNewWindow) { + target = ' rel="noopener noreferrer" target="¨E95Eblank"'; + } + return st + '' + mentions + ''; + }); + } + + text = globals.converter._dispatch('anchors.after', text, options, globals); + return text; +}); + +// url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-] + +var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi, + simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi, + delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi, + simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi, + delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, + + replaceLink = function (options) { + 'use strict'; + return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) { + link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + var lnkTxt = link, + append = '', + target = '', + lmc = leadingMagicChars || '', + tmc = trailingMagicChars || ''; + if (/^www\./i.test(link)) { + link = link.replace(/^www\./i, 'http://www.'); + } + if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) { + append = trailingPunctuation; + } + if (options.openLinksInNewWindow) { + target = ' rel="noopener noreferrer" target="¨E95Eblank"'; + } + return lmc + '' + lnkTxt + '' + append + tmc; + }; + }, + + replaceMail = function (options, globals) { + 'use strict'; + return function (wholeMatch, b, mail) { + var href = 'mailto:'; + b = b || ''; + mail = showdown.subParser('unescapeSpecialChars')(mail, options, globals); + if (options.encodeEmails) { + href = showdown.helper.encodeEmailAddress(href + mail); + mail = showdown.helper.encodeEmailAddress(mail); + } else { + href = href + mail; + } + return b + '' + mail + ''; + }; + }; + +showdown.subParser('autoLinks', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('autoLinks.before', text, options, globals); + + text = text.replace(delimUrlRegex, replaceLink(options)); + text = text.replace(delimMailRegex, replaceMail(options, globals)); + + text = globals.converter._dispatch('autoLinks.after', text, options, globals); + + return text; +}); + +showdown.subParser('simplifiedAutoLinks', function (text, options, globals) { + 'use strict'; + + if (!options.simplifiedAutoLink) { + return text; + } + + text = globals.converter._dispatch('simplifiedAutoLinks.before', text, options, globals); + + if (options.excludeTrailingPunctuationFromURLs) { + text = text.replace(simpleURLRegex2, replaceLink(options)); + } else { + text = text.replace(simpleURLRegex, replaceLink(options)); + } + text = text.replace(simpleMailRegex, replaceMail(options, globals)); + + text = globals.converter._dispatch('simplifiedAutoLinks.after', text, options, globals); + + return text; +}); + +/** + * These are all the transformations that form block-level + * tags like paragraphs, headers, and list items. + */ +showdown.subParser('blockGamut', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('blockGamut.before', text, options, globals); + + // we parse blockquotes first so that we can have headings and hrs + // inside blockquotes + text = showdown.subParser('blockQuotes')(text, options, globals); + text = showdown.subParser('headers')(text, options, globals); + + // Do Horizontal Rules: + text = showdown.subParser('horizontalRule')(text, options, globals); + + text = showdown.subParser('lists')(text, options, globals); + text = showdown.subParser('codeBlocks')(text, options, globals); + text = showdown.subParser('tables')(text, options, globals); + + // We already ran _HashHTMLBlocks() before, in Markdown(), but that + // was to escape raw HTML in the original Markdown source. This time, + // we're escaping the markup we've just created, so that we don't wrap + //

tags around block-level tags. + text = showdown.subParser('hashHTMLBlocks')(text, options, globals); + text = showdown.subParser('paragraphs')(text, options, globals); + + text = globals.converter._dispatch('blockGamut.after', text, options, globals); + + return text; +}); + +showdown.subParser('blockQuotes', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('blockQuotes.before', text, options, globals); + + // add a couple extra lines after the text and endtext mark + text = text + '\n\n'; + + var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm; + + if (options.splitAdjacentBlockquotes) { + rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm; + } + + text = text.replace(rgx, function (bq) { + // attacklab: hack around Konqueror 3.5.4 bug: + // "----------bug".replace(/^-/g,"") == "bug" + bq = bq.replace(/^[ \t]*>[ \t]?/gm, ''); // trim one level of quoting + + // attacklab: clean up hack + bq = bq.replace(/¨0/g, ''); + + bq = bq.replace(/^[ \t]+$/gm, ''); // trim whitespace-only lines + bq = showdown.subParser('githubCodeBlocks')(bq, options, globals); + bq = showdown.subParser('blockGamut')(bq, options, globals); // recurse + + bq = bq.replace(/(^|\n)/g, '$1 '); + // These leading spaces screw with

 content, so we need to fix that:
+    bq = bq.replace(/(\s*
[^\r]+?<\/pre>)/gm, function (wholeMatch, m1) {
+      var pre = m1;
+      // attacklab: hack around Konqueror 3.5.4 bug:
+      pre = pre.replace(/^  /mg, '¨0');
+      pre = pre.replace(/¨0/g, '');
+      return pre;
+    });
+
+    return showdown.subParser('hashBlock')('
\n' + bq + '\n
', options, globals); + }); + + text = globals.converter._dispatch('blockQuotes.after', text, options, globals); + return text; +}); + +/** + * Process Markdown `
` blocks.
+ */
+showdown.subParser('codeBlocks', function (text, options, globals) {
+  'use strict';
+
+  text = globals.converter._dispatch('codeBlocks.before', text, options, globals);
+
+  // sentinel workarounds for lack of \A and \Z, safari\khtml bug
+  text += '¨0';
+
+  var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;
+  text = text.replace(pattern, function (wholeMatch, m1, m2) {
+    var codeblock = m1,
+        nextChar = m2,
+        end = '\n';
+
+    codeblock = showdown.subParser('outdent')(codeblock, options, globals);
+    codeblock = showdown.subParser('encodeCode')(codeblock, options, globals);
+    codeblock = showdown.subParser('detab')(codeblock, options, globals);
+    codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines
+    codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing newlines
+
+    if (options.omitExtraWLInCodeBlocks) {
+      end = '';
+    }
+
+    codeblock = '
' + codeblock + end + '
'; + + return showdown.subParser('hashBlock')(codeblock, options, globals) + nextChar; + }); + + // strip sentinel + text = text.replace(/¨0/, ''); + + text = globals.converter._dispatch('codeBlocks.after', text, options, globals); + return text; +}); + +/** + * + * * Backtick quotes are used for spans. + * + * * You can use multiple backticks as the delimiters if you want to + * include literal backticks in the code span. So, this input: + * + * Just type ``foo `bar` baz`` at the prompt. + * + * Will translate to: + * + *

Just type foo `bar` baz at the prompt.

+ * + * There's no arbitrary limit to the number of backticks you + * can use as delimters. If you need three consecutive backticks + * in your code, use four for delimiters, etc. + * + * * You can use spaces to get literal backticks at the edges: + * + * ... type `` `bar` `` ... + * + * Turns to: + * + * ... type `bar` ... + */ +showdown.subParser('codeSpans', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('codeSpans.before', text, options, globals); + + if (typeof text === 'undefined') { + text = ''; + } + text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, + function (wholeMatch, m1, m2, m3) { + var c = m3; + c = c.replace(/^([ \t]*)/g, ''); // leading whitespace + c = c.replace(/[ \t]*$/g, ''); // trailing whitespace + c = showdown.subParser('encodeCode')(c, options, globals); + c = m1 + '' + c + ''; + c = showdown.subParser('hashHTMLSpans')(c, options, globals); + return c; + } + ); + + text = globals.converter._dispatch('codeSpans.after', text, options, globals); + return text; +}); + +/** + * Create a full HTML document from the processed markdown + */ +showdown.subParser('completeHTMLDocument', function (text, options, globals) { + 'use strict'; + + if (!options.completeHTMLDocument) { + return text; + } + + text = globals.converter._dispatch('completeHTMLDocument.before', text, options, globals); + + var doctype = 'html', + doctypeParsed = '\n', + title = '', + charset = '\n', + lang = '', + metadata = ''; + + if (typeof globals.metadata.parsed.doctype !== 'undefined') { + doctypeParsed = '\n'; + doctype = globals.metadata.parsed.doctype.toString().toLowerCase(); + if (doctype === 'html' || doctype === 'html5') { + charset = ''; + } + } + + for (var meta in globals.metadata.parsed) { + if (globals.metadata.parsed.hasOwnProperty(meta)) { + switch (meta.toLowerCase()) { + case 'doctype': + break; + + case 'title': + title = '' + globals.metadata.parsed.title + '\n'; + break; + + case 'charset': + if (doctype === 'html' || doctype === 'html5') { + charset = '\n'; + } else { + charset = '\n'; + } + break; + + case 'language': + case 'lang': + lang = ' lang="' + globals.metadata.parsed[meta] + '"'; + metadata += '\n'; + break; + + default: + metadata += '\n'; + } + } + } + + text = doctypeParsed + '\n\n' + title + charset + metadata + '\n\n' + text.trim() + '\n\n'; + + text = globals.converter._dispatch('completeHTMLDocument.after', text, options, globals); + return text; +}); + +/** + * Convert all tabs to spaces + */ +showdown.subParser('detab', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('detab.before', text, options, globals); + + // expand first n-1 tabs + text = text.replace(/\t(?=\t)/g, ' '); // g_tab_width + + // replace the nth with two sentinels + text = text.replace(/\t/g, '¨A¨B'); + + // use the sentinel to anchor our regex so it doesn't explode + text = text.replace(/¨B(.+?)¨A/g, function (wholeMatch, m1) { + var leadingText = m1, + numSpaces = 4 - leadingText.length % 4; // g_tab_width + + // there *must* be a better way to do this: + for (var i = 0; i < numSpaces; i++) { + leadingText += ' '; + } + + return leadingText; + }); + + // clean up sentinels + text = text.replace(/¨A/g, ' '); // g_tab_width + text = text.replace(/¨B/g, ''); + + text = globals.converter._dispatch('detab.after', text, options, globals); + return text; +}); + +showdown.subParser('ellipsis', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('ellipsis.before', text, options, globals); + + text = text.replace(/\.\.\./g, '…'); + + text = globals.converter._dispatch('ellipsis.after', text, options, globals); + + return text; +}); + +/** + * Turn emoji codes into emojis + * + * List of supported emojis: https://github.com/showdownjs/showdown/wiki/Emojis + */ +showdown.subParser('emoji', function (text, options, globals) { + 'use strict'; + + if (!options.emoji) { + return text; + } + + text = globals.converter._dispatch('emoji.before', text, options, globals); + + var emojiRgx = /:([\S]+?):/g; + + text = text.replace(emojiRgx, function (wm, emojiCode) { + if (showdown.helper.emojis.hasOwnProperty(emojiCode)) { + return showdown.helper.emojis[emojiCode]; + } + return wm; + }); + + text = globals.converter._dispatch('emoji.after', text, options, globals); + + return text; +}); + +/** + * Smart processing for ampersands and angle brackets that need to be encoded. + */ +showdown.subParser('encodeAmpsAndAngles', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('encodeAmpsAndAngles.before', text, options, globals); + + // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: + // http://bumppo.net/projects/amputator/ + text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, '&'); + + // Encode naked <'s + text = text.replace(/<(?![a-z\/?$!])/gi, '<'); + + // Encode < + text = text.replace(/ + text = text.replace(/>/g, '>'); + + text = globals.converter._dispatch('encodeAmpsAndAngles.after', text, options, globals); + return text; +}); + +/** + * Returns the string, with after processing the following backslash escape sequences. + * + * attacklab: The polite way to do this is with the new escapeCharacters() function: + * + * text = escapeCharacters(text,"\\",true); + * text = escapeCharacters(text,"`*_{}[]()>#+-.!",true); + * + * ...but we're sidestepping its use of the (slow) RegExp constructor + * as an optimization for Firefox. This function gets called a LOT. + */ +showdown.subParser('encodeBackslashEscapes', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('encodeBackslashEscapes.before', text, options, globals); + + text = text.replace(/\\(\\)/g, showdown.helper.escapeCharactersCallback); + text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown.helper.escapeCharactersCallback); + + text = globals.converter._dispatch('encodeBackslashEscapes.after', text, options, globals); + return text; +}); + +/** + * Encode/escape certain characters inside Markdown code runs. + * The point is that in code, these characters are literals, + * and lose their special Markdown meanings. + */ +showdown.subParser('encodeCode', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('encodeCode.before', text, options, globals); + + // Encode all ampersands; HTML entities are not + // entities within a Markdown code span. + text = text + .replace(/&/g, '&') + // Do the angle bracket song and dance: + .replace(//g, '>') + // Now, escape characters that are magic in Markdown: + .replace(/([*_{}\[\]\\=~-])/g, showdown.helper.escapeCharactersCallback); + + text = globals.converter._dispatch('encodeCode.after', text, options, globals); + return text; +}); + +/** + * Within tags -- meaning between < and > -- encode [\ ` * _ ~ =] so they + * don't conflict with their use in Markdown for code, italics and strong. + */ +showdown.subParser('escapeSpecialCharsWithinTagAttributes', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.before', text, options, globals); + + // Build a regex to find HTML tags. + var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, + comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi; + + text = text.replace(tags, function (wholeMatch) { + return wholeMatch + .replace(/(.)<\/?code>(?=.)/g, '$1`') + .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback); + }); + + text = text.replace(comments, function (wholeMatch) { + return wholeMatch + .replace(/([\\`*_~=|])/g, showdown.helper.escapeCharactersCallback); + }); + + text = globals.converter._dispatch('escapeSpecialCharsWithinTagAttributes.after', text, options, globals); + return text; +}); + +/** + * Handle github codeblocks prior to running HashHTML so that + * HTML contained within the codeblock gets escaped properly + * Example: + * ```ruby + * def hello_world(x) + * puts "Hello, #{x}" + * end + * ``` + */ +showdown.subParser('githubCodeBlocks', function (text, options, globals) { + 'use strict'; + + // early exit if option is not enabled + if (!options.ghCodeBlocks) { + return text; + } + + text = globals.converter._dispatch('githubCodeBlocks.before', text, options, globals); + + text += '¨0'; + + text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function (wholeMatch, delim, language, codeblock) { + var end = (options.omitExtraWLInCodeBlocks) ? '' : '\n'; + + // First parse the github code block + codeblock = showdown.subParser('encodeCode')(codeblock, options, globals); + codeblock = showdown.subParser('detab')(codeblock, options, globals); + codeblock = codeblock.replace(/^\n+/g, ''); // trim leading newlines + codeblock = codeblock.replace(/\n+$/g, ''); // trim trailing whitespace + + codeblock = '
' + codeblock + end + '
'; + + codeblock = showdown.subParser('hashBlock')(codeblock, options, globals); + + // Since GHCodeblocks can be false positives, we need to + // store the primitive text and the parsed text in a global var, + // and then return a token + return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n'; + }); + + // attacklab: strip sentinel + text = text.replace(/¨0/, ''); + + return globals.converter._dispatch('githubCodeBlocks.after', text, options, globals); +}); + +showdown.subParser('hashBlock', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashBlock.before', text, options, globals); + text = text.replace(/(^\n+|\n+$)/g, ''); + text = '\n\n¨K' + (globals.gHtmlBlocks.push(text) - 1) + 'K\n\n'; + text = globals.converter._dispatch('hashBlock.after', text, options, globals); + return text; +}); + +/** + * Hash and escape elements that should not be parsed as markdown + */ +showdown.subParser('hashCodeTags', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashCodeTags.before', text, options, globals); + + var repFunc = function (wholeMatch, match, left, right) { + var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right; + return '¨C' + (globals.gHtmlSpans.push(codeblock) - 1) + 'C'; + }; + + // Hash naked + text = showdown.helper.replaceRecursiveRegExp(text, repFunc, ']*>', '', 'gim'); + + text = globals.converter._dispatch('hashCodeTags.after', text, options, globals); + return text; +}); + +showdown.subParser('hashElement', function (text, options, globals) { + 'use strict'; + + return function (wholeMatch, m1) { + var blockText = m1; + + // Undo double lines + blockText = blockText.replace(/\n\n/g, '\n'); + blockText = blockText.replace(/^\n/, ''); + + // strip trailing blank lines + blockText = blockText.replace(/\n+$/g, ''); + + // Replace the element text with a marker ("¨KxK" where x is its key) + blockText = '\n\n¨K' + (globals.gHtmlBlocks.push(blockText) - 1) + 'K\n\n'; + + return blockText; + }; +}); + +showdown.subParser('hashHTMLBlocks', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashHTMLBlocks.before', text, options, globals); + + var blockTags = [ + 'pre', + 'div', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'blockquote', + 'table', + 'dl', + 'ol', + 'ul', + 'script', + 'noscript', + 'form', + 'fieldset', + 'iframe', + 'math', + 'style', + 'section', + 'header', + 'footer', + 'nav', + 'article', + 'aside', + 'address', + 'audio', + 'canvas', + 'figure', + 'hgroup', + 'output', + 'video', + 'p' + ], + repFunc = function (wholeMatch, match, left, right) { + var txt = wholeMatch; + // check if this html element is marked as markdown + // if so, it's contents should be parsed as markdown + if (left.search(/\bmarkdown\b/) !== -1) { + txt = left + globals.converter.makeHtml(match) + right; + } + return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n'; + }; + + if (options.backslashEscapesHTMLTags) { + // encode backslash escaped HTML tags + text = text.replace(/\\<(\/?[^>]+?)>/g, function (wm, inside) { + return '<' + inside + '>'; + }); + } + + // hash HTML Blocks + for (var i = 0; i < blockTags.length; ++i) { + + var opTagPos, + rgx1 = new RegExp('^ {0,3}(<' + blockTags[i] + '\\b[^>]*>)', 'im'), + patLeft = '<' + blockTags[i] + '\\b[^>]*>', + patRight = ''; + // 1. Look for the first position of the first opening HTML tag in the text + while ((opTagPos = showdown.helper.regexIndexOf(text, rgx1)) !== -1) { + + // if the HTML tag is \ escaped, we need to escape it and break + + + //2. Split the text in that position + var subTexts = showdown.helper.splitAtIndex(text, opTagPos), + //3. Match recursively + newSubText1 = showdown.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, 'im'); + + // prevent an infinite loop + if (newSubText1 === subTexts[1]) { + break; + } + text = subTexts[0].concat(newSubText1); + } + } + // HR SPECIAL CASE + text = text.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, + showdown.subParser('hashElement')(text, options, globals)); + + // Special case for standalone HTML comments + text = showdown.helper.replaceRecursiveRegExp(text, function (txt) { + return '\n\n¨K' + (globals.gHtmlBlocks.push(txt) - 1) + 'K\n\n'; + }, '^ {0,3}', 'gm'); + + // PHP and ASP-style processor instructions ( and <%...%>) + text = text.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, + showdown.subParser('hashElement')(text, options, globals)); + + text = globals.converter._dispatch('hashHTMLBlocks.after', text, options, globals); + return text; +}); + +/** + * Hash span elements that should not be parsed as markdown + */ +showdown.subParser('hashHTMLSpans', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('hashHTMLSpans.before', text, options, globals); + + function hashHTMLSpan (html) { + return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C'; + } + + // Hash Self Closing tags + text = text.replace(/<[^>]+?\/>/gi, function (wm) { + return hashHTMLSpan(wm); + }); + + // Hash tags without properties + text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) { + return hashHTMLSpan(wm); + }); + + // Hash tags with properties + text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) { + return hashHTMLSpan(wm); + }); + + // Hash self closing tags without /> + text = text.replace(/<[^>]+?>/gi, function (wm) { + return hashHTMLSpan(wm); + }); + + /*showdown.helper.matchRecursiveRegExp(text, ']*>', '', 'gi');*/ + + text = globals.converter._dispatch('hashHTMLSpans.after', text, options, globals); + return text; +}); + +/** + * Unhash HTML spans + */ +showdown.subParser('unhashHTMLSpans', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('unhashHTMLSpans.before', text, options, globals); + + for (var i = 0; i < globals.gHtmlSpans.length; ++i) { + var repText = globals.gHtmlSpans[i], + // limiter to prevent infinite loop (assume 10 as limit for recurse) + limit = 0; + + while (/¨C(\d+)C/.test(repText)) { + var num = RegExp.$1; + repText = repText.replace('¨C' + num + 'C', globals.gHtmlSpans[num]); + if (limit === 10) { + console.error('maximum nesting of 10 spans reached!!!'); + break; + } + ++limit; + } + text = text.replace('¨C' + i + 'C', repText); + } + + text = globals.converter._dispatch('unhashHTMLSpans.after', text, options, globals); + return text; +}); + +/** + * Hash and escape
 elements that should not be parsed as markdown
+ */
+showdown.subParser('hashPreCodeTags', function (text, options, globals) {
+  'use strict';
+  text = globals.converter._dispatch('hashPreCodeTags.before', text, options, globals);
+
+  var repFunc = function (wholeMatch, match, left, right) {
+    // encode html entities
+    var codeblock = left + showdown.subParser('encodeCode')(match, options, globals) + right;
+    return '\n\n¨G' + (globals.ghCodeBlocks.push({text: wholeMatch, codeblock: codeblock}) - 1) + 'G\n\n';
+  };
+
+  // Hash 

+  text = showdown.helper.replaceRecursiveRegExp(text, repFunc, '^ {0,3}]*>\\s*]*>', '^ {0,3}\\s*
', 'gim'); + + text = globals.converter._dispatch('hashPreCodeTags.after', text, options, globals); + return text; +}); + +showdown.subParser('headers', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('headers.before', text, options, globals); + + var headerLevelStart = (isNaN(parseInt(options.headerLevelStart))) ? 1 : parseInt(options.headerLevelStart), + + // Set text-style headers: + // Header 1 + // ======== + // + // Header 2 + // -------- + // + setextRegexH1 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, + setextRegexH2 = (options.smoothLivePreview) ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm; + + text = text.replace(setextRegexH1, function (wholeMatch, m1) { + + var spanGamut = showdown.subParser('spanGamut')(m1, options, globals), + hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"', + hLevel = headerLevelStart, + hashBlock = '' + spanGamut + ''; + return showdown.subParser('hashBlock')(hashBlock, options, globals); + }); + + text = text.replace(setextRegexH2, function (matchFound, m1) { + var spanGamut = showdown.subParser('spanGamut')(m1, options, globals), + hID = (options.noHeaderId) ? '' : ' id="' + headerId(m1) + '"', + hLevel = headerLevelStart + 1, + hashBlock = '' + spanGamut + ''; + return showdown.subParser('hashBlock')(hashBlock, options, globals); + }); + + // atx-style headers: + // # Header 1 + // ## Header 2 + // ## Header 2 with closing hashes ## + // ... + // ###### Header 6 + // + var atxStyle = (options.requireSpaceBeforeHeadingText) ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm; + + text = text.replace(atxStyle, function (wholeMatch, m1, m2) { + var hText = m2; + if (options.customizedHeaderId) { + hText = m2.replace(/\s?\{([^{]+?)}\s*$/, ''); + } + + var span = showdown.subParser('spanGamut')(hText, options, globals), + hID = (options.noHeaderId) ? '' : ' id="' + headerId(m2) + '"', + hLevel = headerLevelStart - 1 + m1.length, + header = '' + span + ''; + + return showdown.subParser('hashBlock')(header, options, globals); + }); + + function headerId (m) { + var title, + prefix; + + // It is separate from other options to allow combining prefix and customized + if (options.customizedHeaderId) { + var match = m.match(/\{([^{]+?)}\s*$/); + if (match && match[1]) { + m = match[1]; + } + } + + title = m; + + // Prefix id to prevent causing inadvertent pre-existing style matches. + if (showdown.helper.isString(options.prefixHeaderId)) { + prefix = options.prefixHeaderId; + } else if (options.prefixHeaderId === true) { + prefix = 'section-'; + } else { + prefix = ''; + } + + if (!options.rawPrefixHeaderId) { + title = prefix + title; + } + + if (options.ghCompatibleHeaderId) { + title = title + .replace(/ /g, '-') + // replace previously escaped chars (&, ¨ and $) + .replace(/&/g, '') + .replace(/¨T/g, '') + .replace(/¨D/g, '') + // replace rest of the chars (&~$ are repeated as they might have been escaped) + // borrowed from github's redcarpet (some they should produce similar results) + .replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, '') + .toLowerCase(); + } else if (options.rawHeaderId) { + title = title + .replace(/ /g, '-') + // replace previously escaped chars (&, ¨ and $) + .replace(/&/g, '&') + .replace(/¨T/g, '¨') + .replace(/¨D/g, '$') + // replace " and ' + .replace(/["']/g, '-') + .toLowerCase(); + } else { + title = title + .replace(/[^\w]/g, '') + .toLowerCase(); + } + + if (options.rawPrefixHeaderId) { + title = prefix + title; + } + + if (globals.hashLinkCounts[title]) { + title = title + '-' + (globals.hashLinkCounts[title]++); + } else { + globals.hashLinkCounts[title] = 1; + } + return title; + } + + text = globals.converter._dispatch('headers.after', text, options, globals); + return text; +}); + +/** + * Turn Markdown link shortcuts into XHTML tags. + */ +showdown.subParser('horizontalRule', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('horizontalRule.before', text, options, globals); + + var key = showdown.subParser('hashBlock')('
', options, globals); + text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key); + text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key); + text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key); + + text = globals.converter._dispatch('horizontalRule.after', text, options, globals); + return text; +}); + +/** + * Turn Markdown image shortcuts into tags. + */ +showdown.subParser('images', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('images.before', text, options, globals); + + var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, + crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, + base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, + referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, + refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g; + + function writeImageTagBase64 (wholeMatch, altText, linkId, url, width, height, m5, title) { + url = url.replace(/\s/g, ''); + return writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title); + } + + function writeImageTag (wholeMatch, altText, linkId, url, width, height, m5, title) { + + var gUrls = globals.gUrls, + gTitles = globals.gTitles, + gDims = globals.gDimensions; + + linkId = linkId.toLowerCase(); + + if (!title) { + title = ''; + } + // Special case for explicit empty url + if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { + url = ''; + + } else if (url === '' || url === null) { + if (linkId === '' || linkId === null) { + // lower-case and turn embedded newlines into spaces + linkId = altText.toLowerCase().replace(/ ?\n/g, ' '); + } + url = '#' + linkId; + + if (!showdown.helper.isUndefined(gUrls[linkId])) { + url = gUrls[linkId]; + if (!showdown.helper.isUndefined(gTitles[linkId])) { + title = gTitles[linkId]; + } + if (!showdown.helper.isUndefined(gDims[linkId])) { + width = gDims[linkId].width; + height = gDims[linkId].height; + } + } else { + return wholeMatch; + } + } + + altText = altText + .replace(/"/g, '"') + //altText = showdown.helper.escapeCharacters(altText, '*_', false); + .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + //url = showdown.helper.escapeCharacters(url, '*_', false); + url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback); + var result = '' + altText + 'x "optional title") + + // base64 encoded images + text = text.replace(base64RegExp, writeImageTagBase64); + + // cases with crazy urls like ./image/cat1).png + text = text.replace(crazyRegExp, writeImageTag); + + // normal cases + text = text.replace(inlineRegExp, writeImageTag); + + // handle reference-style shortcuts: ![img text] + text = text.replace(refShortcutRegExp, writeImageTag); + + text = globals.converter._dispatch('images.after', text, options, globals); + return text; +}); + +showdown.subParser('italicsAndBold', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('italicsAndBold.before', text, options, globals); + + // it's faster to have 3 separate regexes for each case than have just one + // because of backtracing, in some cases, it could lead to an exponential effect + // called "catastrophic backtrace". Ominous! + + function parseInside (txt, left, right) { + /* + if (options.simplifiedAutoLink) { + txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals); + } + */ + return left + txt + right; + } + + // Parse underscores + if (options.literalMidWordUnderscores) { + text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { + return parseInside (txt, '', ''); + }); + text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { + return parseInside (txt, '', ''); + }); + text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function (wm, txt) { + return parseInside (txt, '', ''); + }); + } else { + text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/_([^\s_][\s\S]*?)_/g, function (wm, m) { + // !/^_[^_]/.test(m) - test if it doesn't start with __ (since it seems redundant, we removed it) + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + } + + // Now parse asterisks + if (options.literalMidWordAsterisks) { + text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function (wm, lead, txt) { + return parseInside (txt, lead + '', ''); + }); + text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function (wm, lead, txt) { + return parseInside (txt, lead + '', ''); + }); + text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function (wm, lead, txt) { + return parseInside (txt, lead + '', ''); + }); + } else { + text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function (wm, m) { + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function (wm, m) { + // !/^\*[^*]/.test(m) - test if it doesn't start with ** (since it seems redundant, we removed it) + return (/\S$/.test(m)) ? parseInside (m, '', '') : wm; + }); + } + + + text = globals.converter._dispatch('italicsAndBold.after', text, options, globals); + return text; +}); + +/** + * Form HTML ordered (numbered) and unordered (bulleted) lists. + */ +showdown.subParser('lists', function (text, options, globals) { + 'use strict'; + + /** + * Process the contents of a single ordered or unordered list, splitting it + * into individual list items. + * @param {string} listStr + * @param {boolean} trimTrailing + * @returns {string} + */ + function processListItems (listStr, trimTrailing) { + // The $g_list_level global keeps track of when we're inside a list. + // Each time we enter a list, we increment it; when we leave a list, + // we decrement. If it's zero, we're not in a list anymore. + // + // We do this because when we're not inside a list, we want to treat + // something like this: + // + // I recommend upgrading to version + // 8. Oops, now this line is treated + // as a sub-list. + // + // As a single paragraph, despite the fact that the second line starts + // with a digit-period-space sequence. + // + // Whereas when we're inside a list (or sub-list), that line will be + // treated as the start of a sub-list. What a kludge, huh? This is + // an aspect of Markdown's syntax that's hard to parse perfectly + // without resorting to mind-reading. Perhaps the solution is to + // change the syntax rules such that sub-lists must start with a + // starting cardinal number; e.g. "1." or "a.". + globals.gListLevel++; + + // trim trailing blank lines: + listStr = listStr.replace(/\n{2,}$/, '\n'); + + // attacklab: add sentinel to emulate \z + listStr += '¨0'; + + var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, + isParagraphed = (/\n[ \t]*\n(?!¨0)/.test(listStr)); + + // Since version 1.5, nesting sublists requires 4 spaces (or 1 tab) indentation, + // which is a syntax breaking change + // activating this option reverts to old behavior + if (options.disableForced4SpacesIndentedSublists) { + rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm; + } + + listStr = listStr.replace(rgx, function (wholeMatch, m1, m2, m3, m4, taskbtn, checked) { + checked = (checked && checked.trim() !== ''); + + var item = showdown.subParser('outdent')(m4, options, globals), + bulletStyle = ''; + + // Support for github tasklists + if (taskbtn && options.tasklists) { + bulletStyle = ' class="task-list-item" style="list-style-type: none;"'; + item = item.replace(/^[ \t]*\[(x|X| )?]/m, function () { + var otp = '
  • a
  • + // instead of: + //
    • - - a
    + // So, to prevent it, we will put a marker (¨A)in the beginning of the line + // Kind of hackish/monkey patching, but seems more effective than overcomplicating the list parser + item = item.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g, function (wm2) { + return '¨A' + wm2; + }); + + // m1 - Leading line or + // Has a double return (multi paragraph) or + // Has sublist + if (m1 || (item.search(/\n{2,}/) > -1)) { + item = showdown.subParser('githubCodeBlocks')(item, options, globals); + item = showdown.subParser('blockGamut')(item, options, globals); + } else { + // Recursion for sub-lists: + item = showdown.subParser('lists')(item, options, globals); + item = item.replace(/\n$/, ''); // chomp(item) + item = showdown.subParser('hashHTMLBlocks')(item, options, globals); + + // Colapse double linebreaks + item = item.replace(/\n\n+/g, '\n\n'); + if (isParagraphed) { + item = showdown.subParser('paragraphs')(item, options, globals); + } else { + item = showdown.subParser('spanGamut')(item, options, globals); + } + } + + // now we need to remove the marker (¨A) + item = item.replace('¨A', ''); + // we can finally wrap the line in list item tags + item = '' + item + '\n'; + + return item; + }); + + // attacklab: strip sentinel + listStr = listStr.replace(/¨0/g, ''); + + globals.gListLevel--; + + if (trimTrailing) { + listStr = listStr.replace(/\s+$/, ''); + } + + return listStr; + } + + function styleStartNumber (list, listType) { + // check if ol and starts by a number different than 1 + if (listType === 'ol') { + var res = list.match(/^ *(\d+)\./); + if (res && res[1] !== '1') { + return ' start="' + res[1] + '"'; + } + } + return ''; + } + + /** + * Check and parse consecutive lists (better fix for issue #142) + * @param {string} list + * @param {string} listType + * @param {boolean} trimTrailing + * @returns {string} + */ + function parseConsecutiveLists (list, listType, trimTrailing) { + // check if we caught 2 or more consecutive lists by mistake + // we use the counterRgx, meaning if listType is UL we look for OL and vice versa + var olRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm, + ulRgx = (options.disableForced4SpacesIndentedSublists) ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm, + counterRxg = (listType === 'ul') ? olRgx : ulRgx, + result = ''; + + if (list.search(counterRxg) !== -1) { + (function parseCL (txt) { + var pos = txt.search(counterRxg), + style = styleStartNumber(list, listType); + if (pos !== -1) { + // slice + result += '\n\n<' + listType + style + '>\n' + processListItems(txt.slice(0, pos), !!trimTrailing) + '\n'; + + // invert counterType and listType + listType = (listType === 'ul') ? 'ol' : 'ul'; + counterRxg = (listType === 'ul') ? olRgx : ulRgx; + + //recurse + parseCL(txt.slice(pos)); + } else { + result += '\n\n<' + listType + style + '>\n' + processListItems(txt, !!trimTrailing) + '\n'; + } + })(list); + } else { + var style = styleStartNumber(list, listType); + result = '\n\n<' + listType + style + '>\n' + processListItems(list, !!trimTrailing) + '\n'; + } + + return result; + } + + /** Start of list parsing **/ + text = globals.converter._dispatch('lists.before', text, options, globals); + // add sentinel to hack around khtml/safari bug: + // http://bugs.webkit.org/show_bug.cgi?id=11231 + text += '¨0'; + + if (globals.gListLevel) { + text = text.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, + function (wholeMatch, list, m2) { + var listType = (m2.search(/[*+-]/g) > -1) ? 'ul' : 'ol'; + return parseConsecutiveLists(list, listType, true); + } + ); + } else { + text = text.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, + function (wholeMatch, m1, list, m3) { + var listType = (m3.search(/[*+-]/g) > -1) ? 'ul' : 'ol'; + return parseConsecutiveLists(list, listType, false); + } + ); + } + + // strip sentinel + text = text.replace(/¨0/, ''); + text = globals.converter._dispatch('lists.after', text, options, globals); + return text; +}); + +/** + * Parse metadata at the top of the document + */ +showdown.subParser('metadata', function (text, options, globals) { + 'use strict'; + + if (!options.metadata) { + return text; + } + + text = globals.converter._dispatch('metadata.before', text, options, globals); + + function parseMetadataContents (content) { + // raw is raw so it's not changed in any way + globals.metadata.raw = content; + + // escape chars forbidden in html attributes + // double quotes + content = content + // ampersand first + .replace(/&/g, '&') + // double quotes + .replace(/"/g, '"'); + + content = content.replace(/\n {4}/g, ' '); + content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function (wm, key, value) { + globals.metadata.parsed[key] = value; + return ''; + }); + } + + text = text.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/, function (wholematch, format, content) { + parseMetadataContents(content); + return '¨M'; + }); + + text = text.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function (wholematch, format, content) { + if (format) { + globals.metadata.format = format; + } + parseMetadataContents(content); + return '¨M'; + }); + + text = text.replace(/¨M/g, ''); + + text = globals.converter._dispatch('metadata.after', text, options, globals); + return text; +}); + +/** + * Remove one level of line-leading tabs or spaces + */ +showdown.subParser('outdent', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('outdent.before', text, options, globals); + + // attacklab: hack around Konqueror 3.5.4 bug: + // "----------bug".replace(/^-/g,"") == "bug" + text = text.replace(/^(\t|[ ]{1,4})/gm, '¨0'); // attacklab: g_tab_width + + // attacklab: clean up hack + text = text.replace(/¨0/g, ''); + + text = globals.converter._dispatch('outdent.after', text, options, globals); + return text; +}); + +/** + * + */ +showdown.subParser('paragraphs', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('paragraphs.before', text, options, globals); + // Strip leading and trailing lines: + text = text.replace(/^\n+/g, ''); + text = text.replace(/\n+$/g, ''); + + var grafs = text.split(/\n{2,}/g), + grafsOut = [], + end = grafs.length; // Wrap

    tags + + for (var i = 0; i < end; i++) { + var str = grafs[i]; + // if this is an HTML marker, copy it + if (str.search(/¨(K|G)(\d+)\1/g) >= 0) { + grafsOut.push(str); + + // test for presence of characters to prevent empty lines being parsed + // as paragraphs (resulting in undesired extra empty paragraphs) + } else if (str.search(/\S/) >= 0) { + str = showdown.subParser('spanGamut')(str, options, globals); + str = str.replace(/^([ \t]*)/g, '

    '); + str += '

    '; + grafsOut.push(str); + } + } + + /** Unhashify HTML blocks */ + end = grafsOut.length; + for (i = 0; i < end; i++) { + var blockText = '', + grafsOutIt = grafsOut[i], + codeFlag = false; + // if this is a marker for an html block... + // use RegExp.test instead of string.search because of QML bug + while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) { + var delim = RegExp.$1, + num = RegExp.$2; + + if (delim === 'K') { + blockText = globals.gHtmlBlocks[num]; + } else { + // we need to check if ghBlock is a false positive + if (codeFlag) { + // use encoded version of all text + blockText = showdown.subParser('encodeCode')(globals.ghCodeBlocks[num].text, options, globals); + } else { + blockText = globals.ghCodeBlocks[num].codeblock; + } + } + blockText = blockText.replace(/\$/g, '$$$$'); // Escape any dollar signs + + grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText); + // Check if grafsOutIt is a pre->code + if (/^]*>\s*]*>/.test(grafsOutIt)) { + codeFlag = true; + } + } + grafsOut[i] = grafsOutIt; + } + text = grafsOut.join('\n'); + // Strip leading and trailing lines: + text = text.replace(/^\n+/g, ''); + text = text.replace(/\n+$/g, ''); + return globals.converter._dispatch('paragraphs.after', text, options, globals); +}); + +/** + * Run extension + */ +showdown.subParser('runExtension', function (ext, text, options, globals) { + 'use strict'; + + if (ext.filter) { + text = ext.filter(text, globals.converter, options); + + } else if (ext.regex) { + // TODO remove this when old extension loading mechanism is deprecated + var re = ext.regex; + if (!(re instanceof RegExp)) { + re = new RegExp(re, 'g'); + } + text = text.replace(re, ext.replace); + } + + return text; +}); + +/** + * These are all the transformations that occur *within* block-level + * tags like paragraphs, headers, and list items. + */ +showdown.subParser('spanGamut', function (text, options, globals) { + 'use strict'; + + text = globals.converter._dispatch('spanGamut.before', text, options, globals); + text = showdown.subParser('codeSpans')(text, options, globals); + text = showdown.subParser('escapeSpecialCharsWithinTagAttributes')(text, options, globals); + text = showdown.subParser('encodeBackslashEscapes')(text, options, globals); + + // Process anchor and image tags. Images must come first, + // because ![foo][f] looks like an anchor. + text = showdown.subParser('images')(text, options, globals); + text = showdown.subParser('anchors')(text, options, globals); + + // Make links out of things like `` + // Must come after anchors, because you can use < and > + // delimiters in inline links like [this](). + text = showdown.subParser('autoLinks')(text, options, globals); + text = showdown.subParser('simplifiedAutoLinks')(text, options, globals); + text = showdown.subParser('emoji')(text, options, globals); + text = showdown.subParser('underline')(text, options, globals); + text = showdown.subParser('italicsAndBold')(text, options, globals); + text = showdown.subParser('strikethrough')(text, options, globals); + text = showdown.subParser('ellipsis')(text, options, globals); + + // we need to hash HTML tags inside spans + text = showdown.subParser('hashHTMLSpans')(text, options, globals); + + // now we encode amps and angles + text = showdown.subParser('encodeAmpsAndAngles')(text, options, globals); + + // Do hard breaks + if (options.simpleLineBreaks) { + // GFM style hard breaks + // only add line breaks if the text does not contain a block (special case for lists) + if (!/\n\n¨K/.test(text)) { + text = text.replace(/\n+/g, '
    \n'); + } + } else { + // Vanilla hard breaks + text = text.replace(/ +\n/g, '
    \n'); + } + + text = globals.converter._dispatch('spanGamut.after', text, options, globals); + return text; +}); + +showdown.subParser('strikethrough', function (text, options, globals) { + 'use strict'; + + function parseInside (txt) { + if (options.simplifiedAutoLink) { + txt = showdown.subParser('simplifiedAutoLinks')(txt, options, globals); + } + return '' + txt + ''; + } + + if (options.strikethrough) { + text = globals.converter._dispatch('strikethrough.before', text, options, globals); + text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); }); + text = globals.converter._dispatch('strikethrough.after', text, options, globals); + } + + return text; +}); + +/** + * Strips link definitions from text, stores the URLs and titles in + * hash references. + * Link defs are in the form: ^[id]: url "optional title" + */ +showdown.subParser('stripLinkDefinitions', function (text, options, globals) { + 'use strict'; + + var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm, + base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm; + + // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug + text += '¨0'; + + var replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) { + linkId = linkId.toLowerCase(); + if (url.match(/^data:.+?\/.+?;base64,/)) { + // remove newlines + globals.gUrls[linkId] = url.replace(/\s/g, ''); + } else { + globals.gUrls[linkId] = showdown.subParser('encodeAmpsAndAngles')(url, options, globals); // Link IDs are case-insensitive + } + + if (blankLines) { + // Oops, found blank lines, so it's not a title. + // Put back the parenthetical statement we stole. + return blankLines + title; + + } else { + if (title) { + globals.gTitles[linkId] = title.replace(/"|'/g, '"'); + } + if (options.parseImgDimensions && width && height) { + globals.gDimensions[linkId] = { + width: width, + height: height + }; + } + } + // Completely remove the definition from the text + return ''; + }; + + // first we try to find base64 link references + text = text.replace(base64Regex, replaceFunc); + + text = text.replace(regex, replaceFunc); + + // attacklab: strip sentinel + text = text.replace(/¨0/, ''); + + return text; +}); + +showdown.subParser('tables', function (text, options, globals) { + 'use strict'; + + if (!options.tables) { + return text; + } + + var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm, + //singeColTblRgx = /^ {0,3}\|.+\|\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n(?: {0,3}\|.+\|\n)+(?:\n\n|¨0)/gm; + singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm; + + function parseStyles (sLine) { + if (/^:[ \t]*--*$/.test(sLine)) { + return ' style="text-align:left;"'; + } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) { + return ' style="text-align:right;"'; + } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) { + return ' style="text-align:center;"'; + } else { + return ''; + } + } + + function parseHeaders (header, style) { + var id = ''; + header = header.trim(); + // support both tablesHeaderId and tableHeaderId due to error in documentation so we don't break backwards compatibility + if (options.tablesHeaderId || options.tableHeaderId) { + id = ' id="' + header.replace(/ /g, '_').toLowerCase() + '"'; + } + header = showdown.subParser('spanGamut')(header, options, globals); + + return '' + header + '\n'; + } + + function parseCells (cell, style) { + var subText = showdown.subParser('spanGamut')(cell, options, globals); + return '' + subText + '\n'; + } + + function buildTable (headers, cells) { + var tb = '\n\n\n', + tblLgn = headers.length; + + for (var i = 0; i < tblLgn; ++i) { + tb += headers[i]; + } + tb += '\n\n\n'; + + for (i = 0; i < cells.length; ++i) { + tb += '\n'; + for (var ii = 0; ii < tblLgn; ++ii) { + tb += cells[i][ii]; + } + tb += '\n'; + } + tb += '\n
    \n'; + return tb; + } + + function parseTable (rawTable) { + var i, tableLines = rawTable.split('\n'); + + for (i = 0; i < tableLines.length; ++i) { + // strip wrong first and last column if wrapped tables are used + if (/^ {0,3}\|/.test(tableLines[i])) { + tableLines[i] = tableLines[i].replace(/^ {0,3}\|/, ''); + } + if (/\|[ \t]*$/.test(tableLines[i])) { + tableLines[i] = tableLines[i].replace(/\|[ \t]*$/, ''); + } + // parse code spans first, but we only support one line code spans + tableLines[i] = showdown.subParser('codeSpans')(tableLines[i], options, globals); + } + + var rawHeaders = tableLines[0].split('|').map(function (s) { return s.trim();}), + rawStyles = tableLines[1].split('|').map(function (s) { return s.trim();}), + rawCells = [], + headers = [], + styles = [], + cells = []; + + tableLines.shift(); + tableLines.shift(); + + for (i = 0; i < tableLines.length; ++i) { + if (tableLines[i].trim() === '') { + continue; + } + rawCells.push( + tableLines[i] + .split('|') + .map(function (s) { + return s.trim(); + }) + ); + } + + if (rawHeaders.length < rawStyles.length) { + return rawTable; + } + + for (i = 0; i < rawStyles.length; ++i) { + styles.push(parseStyles(rawStyles[i])); + } + + for (i = 0; i < rawHeaders.length; ++i) { + if (showdown.helper.isUndefined(styles[i])) { + styles[i] = ''; + } + headers.push(parseHeaders(rawHeaders[i], styles[i])); + } + + for (i = 0; i < rawCells.length; ++i) { + var row = []; + for (var ii = 0; ii < headers.length; ++ii) { + if (showdown.helper.isUndefined(rawCells[i][ii])) { + + } + row.push(parseCells(rawCells[i][ii], styles[ii])); + } + cells.push(row); + } + + return buildTable(headers, cells); + } + + text = globals.converter._dispatch('tables.before', text, options, globals); + + // find escaped pipe characters + text = text.replace(/\\(\|)/g, showdown.helper.escapeCharactersCallback); + + // parse multi column tables + text = text.replace(tableRgx, parseTable); + + // parse one column tables + text = text.replace(singeColTblRgx, parseTable); + + text = globals.converter._dispatch('tables.after', text, options, globals); + + return text; +}); + +showdown.subParser('underline', function (text, options, globals) { + 'use strict'; + + if (!options.underline) { + return text; + } + + text = globals.converter._dispatch('underline.before', text, options, globals); + + if (options.literalMidWordUnderscores) { + text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) { + return '' + txt + ''; + }); + text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) { + return '' + txt + ''; + }); + } else { + text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) { + return (/\S$/.test(m)) ? '' + m + '' : wm; + }); + text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) { + return (/\S$/.test(m)) ? '' + m + '' : wm; + }); + } + + // escape remaining underscores to prevent them being parsed by italic and bold + text = text.replace(/(_)/g, showdown.helper.escapeCharactersCallback); + + text = globals.converter._dispatch('underline.after', text, options, globals); + + return text; +}); + +/** + * Swap back in all the special characters we've hidden. + */ +showdown.subParser('unescapeSpecialChars', function (text, options, globals) { + 'use strict'; + text = globals.converter._dispatch('unescapeSpecialChars.before', text, options, globals); + + text = text.replace(/¨E(\d+)E/g, function (wholeMatch, m1) { + var charCodeToReplace = parseInt(m1); + return String.fromCharCode(charCodeToReplace); + }); + + text = globals.converter._dispatch('unescapeSpecialChars.after', text, options, globals); + return text; +}); + +showdown.subParser('makeMarkdown.blockquote', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + var children = node.childNodes, + childrenLength = children.length; + + for (var i = 0; i < childrenLength; ++i) { + var innerTxt = showdown.subParser('makeMarkdown.node')(children[i], globals); + + if (innerTxt === '') { + continue; + } + txt += innerTxt; + } + } + // cleanup + txt = txt.trim(); + txt = '> ' + txt.split('\n').join('\n> '); + return txt; +}); + +showdown.subParser('makeMarkdown.codeBlock', function (node, globals) { + 'use strict'; + + var lang = node.getAttribute('language'), + num = node.getAttribute('precodenum'); + return '```' + lang + '\n' + globals.preList[num] + '\n```'; +}); + +showdown.subParser('makeMarkdown.codeSpan', function (node) { + 'use strict'; + + return '`' + node.innerHTML + '`'; +}); + +showdown.subParser('makeMarkdown.emphasis', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + txt += '*'; + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += '*'; + } + return txt; +}); + +showdown.subParser('makeMarkdown.header', function (node, globals, headerLevel) { + 'use strict'; + + var headerMark = new Array(headerLevel + 1).join('#'), + txt = ''; + + if (node.hasChildNodes()) { + txt = headerMark + ' '; + var children = node.childNodes, + childrenLength = children.length; + + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + } + return txt; +}); + +showdown.subParser('makeMarkdown.hr', function () { + 'use strict'; + + return '---'; +}); + +showdown.subParser('makeMarkdown.image', function (node) { + 'use strict'; + + var txt = ''; + if (node.hasAttribute('src')) { + txt += '![' + node.getAttribute('alt') + ']('; + txt += '<' + node.getAttribute('src') + '>'; + if (node.hasAttribute('width') && node.hasAttribute('height')) { + txt += ' =' + node.getAttribute('width') + 'x' + node.getAttribute('height'); + } + + if (node.hasAttribute('title')) { + txt += ' "' + node.getAttribute('title') + '"'; + } + txt += ')'; + } + return txt; +}); + +showdown.subParser('makeMarkdown.links', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes() && node.hasAttribute('href')) { + var children = node.childNodes, + childrenLength = children.length; + txt = '['; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += ']('; + txt += '<' + node.getAttribute('href') + '>'; + if (node.hasAttribute('title')) { + txt += ' "' + node.getAttribute('title') + '"'; + } + txt += ')'; + } + return txt; +}); + +showdown.subParser('makeMarkdown.list', function (node, globals, type) { + 'use strict'; + + var txt = ''; + if (!node.hasChildNodes()) { + return ''; + } + var listItems = node.childNodes, + listItemsLenght = listItems.length, + listNum = node.getAttribute('start') || 1; + + for (var i = 0; i < listItemsLenght; ++i) { + if (typeof listItems[i].tagName === 'undefined' || listItems[i].tagName.toLowerCase() !== 'li') { + continue; + } + + // define the bullet to use in list + var bullet = ''; + if (type === 'ol') { + bullet = listNum.toString() + '. '; + } else { + bullet = '- '; + } + + // parse list item + txt += bullet + showdown.subParser('makeMarkdown.listItem')(listItems[i], globals); + ++listNum; + } + + // add comment at the end to prevent consecutive lists to be parsed as one + txt += '\n\n'; + return txt.trim(); +}); + +showdown.subParser('makeMarkdown.listItem', function (node, globals) { + 'use strict'; + + var listItemTxt = ''; + + var children = node.childNodes, + childrenLenght = children.length; + + for (var i = 0; i < childrenLenght; ++i) { + listItemTxt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + // if it's only one liner, we need to add a newline at the end + if (!/\n$/.test(listItemTxt)) { + listItemTxt += '\n'; + } else { + // it's multiparagraph, so we need to indent + listItemTxt = listItemTxt + .split('\n') + .join('\n ') + .replace(/^ {4}$/gm, '') + .replace(/\n\n+/g, '\n\n'); + } + + return listItemTxt; +}); + + + +showdown.subParser('makeMarkdown.node', function (node, globals, spansOnly) { + 'use strict'; + + spansOnly = spansOnly || false; + + var txt = ''; + + // edge case of text without wrapper paragraph + if (node.nodeType === 3) { + return showdown.subParser('makeMarkdown.txt')(node, globals); + } + + // HTML comment + if (node.nodeType === 8) { + return '\n\n'; + } + + // process only node elements + if (node.nodeType !== 1) { + return ''; + } + + var tagName = node.tagName.toLowerCase(); + + switch (tagName) { + + // + // BLOCKS + // + case 'h1': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 1) + '\n\n'; } + break; + case 'h2': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 2) + '\n\n'; } + break; + case 'h3': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 3) + '\n\n'; } + break; + case 'h4': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 4) + '\n\n'; } + break; + case 'h5': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 5) + '\n\n'; } + break; + case 'h6': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.header')(node, globals, 6) + '\n\n'; } + break; + + case 'p': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.paragraph')(node, globals) + '\n\n'; } + break; + + case 'blockquote': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.blockquote')(node, globals) + '\n\n'; } + break; + + case 'hr': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.hr')(node, globals) + '\n\n'; } + break; + + case 'ol': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ol') + '\n\n'; } + break; + + case 'ul': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.list')(node, globals, 'ul') + '\n\n'; } + break; + + case 'precode': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.codeBlock')(node, globals) + '\n\n'; } + break; + + case 'pre': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.pre')(node, globals) + '\n\n'; } + break; + + case 'table': + if (!spansOnly) { txt = showdown.subParser('makeMarkdown.table')(node, globals) + '\n\n'; } + break; + + // + // SPANS + // + case 'code': + txt = showdown.subParser('makeMarkdown.codeSpan')(node, globals); + break; + + case 'em': + case 'i': + txt = showdown.subParser('makeMarkdown.emphasis')(node, globals); + break; + + case 'strong': + case 'b': + txt = showdown.subParser('makeMarkdown.strong')(node, globals); + break; + + case 'del': + txt = showdown.subParser('makeMarkdown.strikethrough')(node, globals); + break; + + case 'a': + txt = showdown.subParser('makeMarkdown.links')(node, globals); + break; + + case 'img': + txt = showdown.subParser('makeMarkdown.image')(node, globals); + break; + + default: + txt = node.outerHTML + '\n\n'; + } + + // common normalization + // TODO eventually + + return txt; +}); + +showdown.subParser('makeMarkdown.paragraph', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + } + + // some text normalization + txt = txt.trim(); + + return txt; +}); + +showdown.subParser('makeMarkdown.pre', function (node, globals) { + 'use strict'; + + var num = node.getAttribute('prenum'); + return '
    ' + globals.preList[num] + '
    '; +}); + +showdown.subParser('makeMarkdown.strikethrough', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + txt += '~~'; + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += '~~'; + } + return txt; +}); + +showdown.subParser('makeMarkdown.strong', function (node, globals) { + 'use strict'; + + var txt = ''; + if (node.hasChildNodes()) { + txt += '**'; + var children = node.childNodes, + childrenLength = children.length; + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals); + } + txt += '**'; + } + return txt; +}); + +showdown.subParser('makeMarkdown.table', function (node, globals) { + 'use strict'; + + var txt = '', + tableArray = [[], []], + headings = node.querySelectorAll('thead>tr>th'), + rows = node.querySelectorAll('tbody>tr'), + i, ii; + for (i = 0; i < headings.length; ++i) { + var headContent = showdown.subParser('makeMarkdown.tableCell')(headings[i], globals), + allign = '---'; + + if (headings[i].hasAttribute('style')) { + var style = headings[i].getAttribute('style').toLowerCase().replace(/\s/g, ''); + switch (style) { + case 'text-align:left;': + allign = ':---'; + break; + case 'text-align:right;': + allign = '---:'; + break; + case 'text-align:center;': + allign = ':---:'; + break; + } + } + tableArray[0][i] = headContent.trim(); + tableArray[1][i] = allign; + } + + for (i = 0; i < rows.length; ++i) { + var r = tableArray.push([]) - 1, + cols = rows[i].getElementsByTagName('td'); + + for (ii = 0; ii < headings.length; ++ii) { + var cellContent = ' '; + if (typeof cols[ii] !== 'undefined') { + cellContent = showdown.subParser('makeMarkdown.tableCell')(cols[ii], globals); + } + tableArray[r].push(cellContent); + } + } + + var cellSpacesCount = 3; + for (i = 0; i < tableArray.length; ++i) { + for (ii = 0; ii < tableArray[i].length; ++ii) { + var strLen = tableArray[i][ii].length; + if (strLen > cellSpacesCount) { + cellSpacesCount = strLen; + } + } + } + + for (i = 0; i < tableArray.length; ++i) { + for (ii = 0; ii < tableArray[i].length; ++ii) { + if (i === 1) { + if (tableArray[i][ii].slice(-1) === ':') { + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii].slice(-1), cellSpacesCount - 1, '-') + ':'; + } else { + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount, '-'); + } + } else { + tableArray[i][ii] = showdown.helper.padEnd(tableArray[i][ii], cellSpacesCount); + } + } + txt += '| ' + tableArray[i].join(' | ') + ' |\n'; + } + + return txt.trim(); +}); + +showdown.subParser('makeMarkdown.tableCell', function (node, globals) { + 'use strict'; + + var txt = ''; + if (!node.hasChildNodes()) { + return ''; + } + var children = node.childNodes, + childrenLength = children.length; + + for (var i = 0; i < childrenLength; ++i) { + txt += showdown.subParser('makeMarkdown.node')(children[i], globals, true); + } + return txt.trim(); +}); + +showdown.subParser('makeMarkdown.txt', function (node) { + 'use strict'; + + var txt = node.nodeValue; + + // multiple spaces are collapsed + txt = txt.replace(/ +/g, ' '); + + // replace the custom ¨NBSP; with a space + txt = txt.replace(/¨NBSP;/g, ' '); + + // ", <, > and & should replace escaped html entities + txt = showdown.helper.unescapeHTMLEntities(txt); + + // escape markdown magic characters + // emphasis, strong and strikethrough - can appear everywhere + // we also escape pipe (|) because of tables + // and escape ` because of code blocks and spans + txt = txt.replace(/([*_~|`])/g, '\\$1'); + + // escape > because of blockquotes + txt = txt.replace(/^(\s*)>/g, '\\$1>'); + + // hash character, only troublesome at the beginning of a line because of headers + txt = txt.replace(/^#/gm, '\\#'); + + // horizontal rules + txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, '$1\\$2$3'); + + // dot, because of ordered lists, only troublesome at the beginning of a line when preceded by an integer + txt = txt.replace(/^( {0,3}\d+)\./gm, '$1\\.'); + + // +, * and -, at the beginning of a line becomes a list, so we need to escape them also (asterisk was already escaped) + txt = txt.replace(/^( {0,3})([+-])/gm, '$1\\$2'); + + // images and links, ] followed by ( is problematic, so we escape it + txt = txt.replace(/]([\s]*)\(/g, '\\]$1\\('); + + // reference URIs must also be escaped + txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, '\\[$1]:'); + + return txt; +}); + +var root = this; + +// AMD Loader +if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { + 'use strict'; + return showdown; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + +// CommonJS/nodeJS Loader +} else {} +}).call(this); + +//# sourceMappingURL=showdown.js.map + + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/10.496bca49.chunk.js b/server/build/10.496bca49.chunk.js new file mode 100644 index 00000000..8318b7ba --- /dev/null +++ b/server/build/10.496bca49.chunk.js @@ -0,0 +1,11 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[10],{ + +/***/ 1898: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(30);var _strapiHelperPlugin=__webpack_require__(10);var EditView=(0,_react.lazy)(function(){return Promise.all(/* import() */[__webpack_require__.e(1), __webpack_require__.e(2)]).then(__webpack_require__.t.bind(null, 1966, 7));});var EditSettingsView=(0,_react.lazy)(function(){return __webpack_require__.e(/* import() */ 0).then(__webpack_require__.t.bind(null, 1893, 7));});var SingleTypeRecursivePath=function SingleTypeRecursivePath(props){var _useRouteMatch=(0,_reactRouterDom.useRouteMatch)(),url=_useRouteMatch.url;var _useParams=(0,_reactRouterDom.useParams)(),slug=_useParams.slug;var renderRoute=function renderRoute(routeProps,Component){return/*#__PURE__*/_react["default"].createElement(Component,(0,_extends2["default"])({},props,routeProps,{slug:slug}));};var routes=[{path:'ctm-configurations/edit-settings/:type',comp:EditSettingsView},{path:'',comp:EditView}].map(function(_ref){var path=_ref.path,comp=_ref.comp;return/*#__PURE__*/_react["default"].createElement(_reactRouterDom.Route,{key:path,path:"".concat(url,"/").concat(path),render:function render(props){return renderRoute(props,comp);}});});return/*#__PURE__*/_react["default"].createElement(_react.Suspense,{fallback:/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicatorPage,null)},/*#__PURE__*/_react["default"].createElement(_reactRouterDom.Switch,null,routes));};var _default=SingleTypeRecursivePath;exports["default"]=_default; + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/11.bfc882fc.chunk.js b/server/build/11.bfc882fc.chunk.js new file mode 100644 index 00000000..1a7369dd --- /dev/null +++ b/server/build/11.bfc882fc.chunk.js @@ -0,0 +1,10 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[11],{ + +/***/ 1896: +/***/ (function(module, exports) { + +IntlPolyfill.__addLocaleData({locale:"de",date:{ca:["gregory","buddhist","chinese","coptic","dangi","ethioaa","ethiopic","generic","hebrew","indian","islamic","islamicc","japanese","persian","roc"],hourNo0:true,hour12:false,formats:{short:"{1}, {0}",medium:"{1}, {0}",full:"{1} 'um' {0}",long:"{1} 'um' {0}",availableFormats:{"d":"d","E":"ccc",Ed:"E, d.",Ehm:"E h:mm a",EHm:"E, HH:mm",Ehms:"E, h:mm:ss a",EHms:"E, HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"d. MMM y G",GyMMMEd:"E, d. MMM y G","h":"h a","H":"HH 'Uhr'",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v","M":"L",Md:"d.M.",MEd:"E, d.M.",MMd:"d.MM.",MMdd:"dd.MM.",MMM:"LLL",MMMd:"d. MMM",MMMEd:"E, d. MMM",MMMMd:"d. MMMM",MMMMEd:"E, d. MMMM",ms:"mm:ss","y":"y",yM:"M.y",yMd:"d.M.y",yMEd:"E, d.M.y",yMM:"MM.y",yMMdd:"dd.MM.y",yMMM:"MMM y",yMMMd:"d. MMM y",yMMMEd:"E, d. MMM y",yMMMM:"MMMM y",yQQQ:"QQQ y",yQQQQ:"QQQQ y"},dateFormats:{yMMMMEEEEd:"EEEE, d. MMMM y",yMMMMd:"d. MMMM y",yMMMd:"dd.MM.y",yMd:"dd.MM.yy"},timeFormats:{hmmsszzzz:"HH:mm:ss zzzz",hmsz:"HH:mm:ss z",hms:"HH:mm:ss",hm:"HH:mm"}},calendars:{buddhist:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],long:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["BE"],short:["BE"],long:["BE"]},dayPeriods:{am:"vorm.",pm:"nachm."}},chinese:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"],long:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},dayPeriods:{am:"vorm.",pm:"nachm."}},coptic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"],long:["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"vorm.",pm:"nachm."}},dangi:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"],long:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},dayPeriods:{am:"vorm.",pm:"nachm."}},ethiopic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],long:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"vorm.",pm:"nachm."}},ethioaa:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],long:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["ERA0"],short:["ERA0"],long:["ERA0"]},dayPeriods:{am:"vorm.",pm:"nachm."}},generic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"],long:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"vorm.",pm:"nachm."}},gregory:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],long:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["v. Chr.","n. Chr.","v. u. Z.","u. Z."],short:["v. Chr.","n. Chr.","v. u. Z.","u. Z."],long:["v. Chr.","n. Chr.","vor unserer Zeitrechnung","unserer Zeitrechnung"]},dayPeriods:{am:"vorm.",pm:"nachm."}},hebrew:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13","7"],short:["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"],long:["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["AM"],short:["AM"],long:["AM"]},dayPeriods:{am:"vorm.",pm:"nachm."}},indian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"],long:["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["Saka"],short:["Saka"],long:["Saka"]},dayPeriods:{am:"vorm.",pm:"nachm."}},islamic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],long:["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["AH"],short:["AH"],long:["AH"]},dayPeriods:{am:"vorm.",pm:"nachm."}},islamicc:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],long:["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["AH"],short:["AH"],long:["AH"]},dayPeriods:{am:"vorm.",pm:"nachm."}},japanese:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],long:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["Taika (645–650)","Hakuchi (650–671)","Hakuhō (672–686)","Shuchō (686–701)","Taihō (701–704)","Keiun (704–708)","Wadō (708–715)","Reiki (715–717)","Yōrō (717–724)","Jinki (724–729)","Tenpyō (729–749)","Tenpyō-kampō (749-749)","Tenpyō-shōhō (749-757)","Tenpyō-hōji (757-765)","Tenpyō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770–780)","Ten-ō (781-782)","Enryaku (782–806)","Daidō (806–810)","Kōnin (810–824)","Tenchō (824–834)","Jōwa (834–848)","Kajō (848–851)","Ninju (851–854)","Saikō (854–857)","Ten-an (857-859)","Jōgan (859–877)","Gangyō (877–885)","Ninna (885–889)","Kanpyō (889–898)","Shōtai (898–901)","Engi (901–923)","Enchō (923–931)","Jōhei (931–938)","Tengyō (938–947)","Tenryaku (947–957)","Tentoku (957–961)","Ōwa (961–964)","Kōhō (964–968)","Anna (968–970)","Tenroku (970–973)","Ten’en (973–976)","Jōgen (976–978)","Tengen (978–983)","Eikan (983–985)","Kanna (985–987)","Eien (987–989)","Eiso (989–990)","Shōryaku (990–995)","Chōtoku (995–999)","Chōhō (999–1004)","Kankō (1004–1012)","Chōwa (1012–1017)","Kannin (1017–1021)","Jian (1021–1024)","Manju (1024–1028)","Chōgen (1028–1037)","Chōryaku (1037–1040)","Chōkyū (1040–1044)","Kantoku (1044–1046)","Eishō (1046–1053)","Tengi (1053–1058)","Kōhei (1058–1065)","Jiryaku (1065–1069)","Enkyū (1069–1074)","Shōho (1074–1077)","Shōryaku (1077–1081)","Eihō (1081–1084)","Ōtoku (1084–1087)","Kanji (1087–1094)","Kahō (1094–1096)","Eichō (1096–1097)","Jōtoku (1097–1099)","Kōwa (1099–1104)","Chōji (1104–1106)","Kashō (1106–1108)","Tennin (1108–1110)","Ten-ei (1110-1113)","Eikyū (1113–1118)","Gen’ei (1118–1120)","Hōan (1120–1124)","Tenji (1124–1126)","Daiji (1126–1131)","Tenshō (1131–1132)","Chōshō (1132–1135)","Hōen (1135–1141)","Eiji (1141–1142)","Kōji (1142–1144)","Ten’yō (1144–1145)","Kyūan (1145–1151)","Ninpei (1151–1154)","Kyūju (1154–1156)","Hōgen (1156–1159)","Heiji (1159–1160)","Eiryaku (1160–1161)","Ōho (1161–1163)","Chōkan (1163–1165)","Eiman (1165–1166)","Nin’an (1166–1169)","Kaō (1169–1171)","Shōan (1171–1175)","Angen (1175–1177)","Jishō (1177–1181)","Yōwa (1181–1182)","Juei (1182–1184)","Genryaku (1184–1185)","Bunji (1185–1190)","Kenkyū (1190–1199)","Shōji (1199–1201)","Kennin (1201–1204)","Genkyū (1204–1206)","Ken’ei (1206–1207)","Jōgen (1207–1211)","Kenryaku (1211–1213)","Kenpō (1213–1219)","Jōkyū (1219–1222)","Jōō (1222–1224)","Gennin (1224–1225)","Karoku (1225–1227)","Antei (1227–1229)","Kanki (1229–1232)","Jōei (1232–1233)","Tenpuku (1233–1234)","Bunryaku (1234–1235)","Katei (1235–1238)","Ryakunin (1238–1239)","En’ō (1239–1240)","Ninji (1240–1243)","Kangen (1243–1247)","Hōji (1247–1249)","Kenchō (1249–1256)","Kōgen (1256–1257)","Shōka (1257–1259)","Shōgen (1259–1260)","Bun’ō (1260–1261)","Kōchō (1261–1264)","Bun’ei (1264–1275)","Kenji (1275–1278)","Kōan (1278–1288)","Shōō (1288–1293)","Einin (1293–1299)","Shōan (1299–1302)","Kengen (1302–1303)","Kagen (1303–1306)","Tokuji (1306–1308)","Enkyō (1308–1311)","Ōchō (1311–1312)","Shōwa (1312–1317)","Bunpō (1317–1319)","Genō (1319–1321)","Genkō (1321–1324)","Shōchū (1324–1326)","Karyaku (1326–1329)","Gentoku (1329–1331)","Genkō (1331–1334)","Kenmu (1334–1336)","Engen (1336–1340)","Kōkoku (1340–1346)","Shōhei (1346–1370)","Kentoku (1370–1372)","Bunchū (1372–1375)","Tenju (1375–1379)","Kōryaku (1379–1381)","Kōwa (1381–1384)","Genchū (1384–1392)","Meitoku (1384–1387)","Kakei (1387–1389)","Kōō (1389–1390)","Meitoku (1390–1394)","Ōei (1394–1428)","Shōchō (1428–1429)","Eikyō (1429–1441)","Kakitsu (1441–1444)","Bun’an (1444–1449)","Hōtoku (1449–1452)","Kyōtoku (1452–1455)","Kōshō (1455–1457)","Chōroku (1457–1460)","Kanshō (1460–1466)","Bunshō (1466–1467)","Ōnin (1467–1469)","Bunmei (1469–1487)","Chōkyō (1487–1489)","Entoku (1489–1492)","Meiō (1492–1501)","Bunki (1501–1504)","Eishō (1504–1521)","Taiei (1521–1528)","Kyōroku (1528–1532)","Tenbun (1532–1555)","Kōji (1555–1558)","Eiroku (1558–1570)","Genki (1570–1573)","Tenshō (1573–1592)","Bunroku (1592–1596)","Keichō (1596–1615)","Genna (1615–1624)","Kan’ei (1624–1644)","Shōho (1644–1648)","Keian (1648–1652)","Jōō (1652–1655)","Meireki (1655–1658)","Manji (1658–1661)","Kanbun (1661–1673)","Enpō (1673–1681)","Tenna (1681–1684)","Jōkyō (1684–1688)","Genroku (1688–1704)","Hōei (1704–1711)","Shōtoku (1711–1716)","Kyōhō (1716–1736)","Genbun (1736–1741)","Kanpō (1741–1744)","Enkyō (1744–1748)","Kan’en (1748–1751)","Hōreki (1751–1764)","Meiwa (1764–1772)","An’ei (1772–1781)","Tenmei (1781–1789)","Kansei (1789–1801)","Kyōwa (1801–1804)","Bunka (1804–1818)","Bunsei (1818–1830)","Tenpō (1830–1844)","Kōka (1844–1848)","Kaei (1848–1854)","Ansei (1854–1860)","Man’en (1860–1861)","Bunkyū (1861–1864)","Genji (1864–1865)","Keiō (1865–1868)","M","T","S","H"],short:["Taika (645–650)","Hakuchi (650–671)","Hakuhō (672–686)","Shuchō (686–701)","Taihō (701–704)","Keiun (704–708)","Wadō (708–715)","Reiki (715–717)","Yōrō (717–724)","Jinki (724–729)","Tenpyō (729–749)","Tenpyō-kampō (749-749)","Tenpyō-shōhō (749-757)","Tenpyō-hōji (757-765)","Tenpyō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770–780)","Ten-ō (781-782)","Enryaku (782–806)","Daidō (806–810)","Kōnin (810–824)","Tenchō (824–834)","Jōwa (834–848)","Kajō (848–851)","Ninju (851–854)","Saikō (854–857)","Ten-an (857-859)","Jōgan (859–877)","Gangyō (877–885)","Ninna (885–889)","Kanpyō (889–898)","Shōtai (898–901)","Engi (901–923)","Enchō (923–931)","Jōhei (931–938)","Tengyō (938–947)","Tenryaku (947–957)","Tentoku (957–961)","Ōwa (961–964)","Kōhō (964–968)","Anna (968–970)","Tenroku (970–973)","Ten’en (973–976)","Jōgen (976–978)","Tengen (978–983)","Eikan (983–985)","Kanna (985–987)","Eien (987–989)","Eiso (989–990)","Shōryaku (990–995)","Chōtoku (995–999)","Chōhō (999–1004)","Kankō (1004–1012)","Chōwa (1012–1017)","Kannin (1017–1021)","Jian (1021–1024)","Manju (1024–1028)","Chōgen (1028–1037)","Chōryaku (1037–1040)","Chōkyū (1040–1044)","Kantoku (1044–1046)","Eishō (1046–1053)","Tengi (1053–1058)","Kōhei (1058–1065)","Jiryaku (1065–1069)","Enkyū (1069–1074)","Shōho (1074–1077)","Shōryaku (1077–1081)","Eihō (1081–1084)","Ōtoku (1084–1087)","Kanji (1087–1094)","Kahō (1094–1096)","Eichō (1096–1097)","Jōtoku (1097–1099)","Kōwa (1099–1104)","Chōji (1104–1106)","Kashō (1106–1108)","Tennin (1108–1110)","Ten-ei (1110-1113)","Eikyū (1113–1118)","Gen’ei (1118–1120)","Hōan (1120–1124)","Tenji (1124–1126)","Daiji (1126–1131)","Tenshō (1131–1132)","Chōshō (1132–1135)","Hōen (1135–1141)","Eiji (1141–1142)","Kōji (1142–1144)","Ten’yō (1144–1145)","Kyūan (1145–1151)","Ninpei (1151–1154)","Kyūju (1154–1156)","Hōgen (1156–1159)","Heiji (1159–1160)","Eiryaku (1160–1161)","Ōho (1161–1163)","Chōkan (1163–1165)","Eiman (1165–1166)","Nin’an (1166–1169)","Kaō (1169–1171)","Shōan (1171–1175)","Angen (1175–1177)","Jishō (1177–1181)","Yōwa (1181–1182)","Juei (1182–1184)","Genryaku (1184–1185)","Bunji (1185–1190)","Kenkyū (1190–1199)","Shōji (1199–1201)","Kennin (1201–1204)","Genkyū (1204–1206)","Ken’ei (1206–1207)","Jōgen (1207–1211)","Kenryaku (1211–1213)","Kenpō (1213–1219)","Jōkyū (1219–1222)","Jōō (1222–1224)","Gennin (1224–1225)","Karoku (1225–1227)","Antei (1227–1229)","Kanki (1229–1232)","Jōei (1232–1233)","Tenpuku (1233–1234)","Bunryaku (1234–1235)","Katei (1235–1238)","Ryakunin (1238–1239)","En’ō (1239–1240)","Ninji (1240–1243)","Kangen (1243–1247)","Hōji (1247–1249)","Kenchō (1249–1256)","Kōgen (1256–1257)","Shōka (1257–1259)","Shōgen (1259–1260)","Bun’ō (1260–1261)","Kōchō (1261–1264)","Bun’ei (1264–1275)","Kenji (1275–1278)","Kōan (1278–1288)","Shōō (1288–1293)","Einin (1293–1299)","Shōan (1299–1302)","Kengen (1302–1303)","Kagen (1303–1306)","Tokuji (1306–1308)","Enkyō (1308–1311)","Ōchō (1311–1312)","Shōwa (1312–1317)","Bunpō (1317–1319)","Genō (1319–1321)","Genkō (1321–1324)","Shōchū (1324–1326)","Karyaku (1326–1329)","Gentoku (1329–1331)","Genkō (1331–1334)","Kenmu (1334–1336)","Engen (1336–1340)","Kōkoku (1340–1346)","Shōhei (1346–1370)","Kentoku (1370–1372)","Bunchū (1372–1375)","Tenju (1375–1379)","Kōryaku (1379–1381)","Kōwa (1381–1384)","Genchū (1384–1392)","Meitoku (1384–1387)","Kakei (1387–1389)","Kōō (1389–1390)","Meitoku (1390–1394)","Ōei (1394–1428)","Shōchō (1428–1429)","Eikyō (1429–1441)","Kakitsu (1441–1444)","Bun’an (1444–1449)","Hōtoku (1449–1452)","Kyōtoku (1452–1455)","Kōshō (1455–1457)","Chōroku (1457–1460)","Kanshō (1460–1466)","Bunshō (1466–1467)","Ōnin (1467–1469)","Bunmei (1469–1487)","Chōkyō (1487–1489)","Entoku (1489–1492)","Meiō (1492–1501)","Bunki (1501–1504)","Eishō (1504–1521)","Taiei (1521–1528)","Kyōroku (1528–1532)","Tenbun (1532–1555)","Kōji (1555–1558)","Eiroku (1558–1570)","Genki (1570–1573)","Tenshō (1573–1592)","Bunroku (1592–1596)","Keichō (1596–1615)","Genna (1615–1624)","Kan’ei (1624–1644)","Shōho (1644–1648)","Keian (1648–1652)","Jōō (1652–1655)","Meireki (1655–1658)","Manji (1658–1661)","Kanbun (1661–1673)","Enpō (1673–1681)","Tenna (1681–1684)","Jōkyō (1684–1688)","Genroku (1688–1704)","Hōei (1704–1711)","Shōtoku (1711–1716)","Kyōhō (1716–1736)","Genbun (1736–1741)","Kanpō (1741–1744)","Enkyō (1744–1748)","Kan’en (1748–1751)","Hōreki (1751–1764)","Meiwa (1764–1772)","An’ei (1772–1781)","Tenmei (1781–1789)","Kansei (1789–1801)","Kyōwa (1801–1804)","Bunka (1804–1818)","Bunsei (1818–1830)","Tenpō (1830–1844)","Kōka (1844–1848)","Kaei (1848–1854)","Ansei (1854–1860)","Man’en (1860–1861)","Bunkyū (1861–1864)","Genji (1864–1865)","Keiō (1865–1868)","Meiji","Taishō","Shōwa","Heisei"],long:["Taika (645–650)","Hakuchi (650–671)","Hakuhō (672–686)","Shuchō (686–701)","Taihō (701–704)","Keiun (704–708)","Wadō (708–715)","Reiki (715–717)","Yōrō (717–724)","Jinki (724–729)","Tenpyō (729–749)","Tenpyō-kampō (749-749)","Tenpyō-shōhō (749-757)","Tenpyō-hōji (757-765)","Tenpyō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770–780)","Ten-ō (781-782)","Enryaku (782–806)","Daidō (806–810)","Kōnin (810–824)","Tenchō (824–834)","Jōwa (834–848)","Kajō (848–851)","Ninju (851–854)","Saikō (854–857)","Ten-an (857-859)","Jōgan (859–877)","Gangyō (877–885)","Ninna (885–889)","Kanpyō (889–898)","Shōtai (898–901)","Engi (901–923)","Enchō (923–931)","Jōhei (931–938)","Tengyō (938–947)","Tenryaku (947–957)","Tentoku (957–961)","Ōwa (961–964)","Kōhō (964–968)","Anna (968–970)","Tenroku (970–973)","Ten’en (973–976)","Jōgen (976–978)","Tengen (978–983)","Eikan (983–985)","Kanna (985–987)","Eien (987–989)","Eiso (989–990)","Shōryaku (990–995)","Chōtoku (995–999)","Chōhō (999–1004)","Kankō (1004–1012)","Chōwa (1012–1017)","Kannin (1017–1021)","Jian (1021–1024)","Manju (1024–1028)","Chōgen (1028–1037)","Chōryaku (1037–1040)","Chōkyū (1040–1044)","Kantoku (1044–1046)","Eishō (1046–1053)","Tengi (1053–1058)","Kōhei (1058–1065)","Jiryaku (1065–1069)","Enkyū (1069–1074)","Shōho (1074–1077)","Shōryaku (1077–1081)","Eihō (1081–1084)","Ōtoku (1084–1087)","Kanji (1087–1094)","Kahō (1094–1096)","Eichō (1096–1097)","Jōtoku (1097–1099)","Kōwa (1099–1104)","Chōji (1104–1106)","Kashō (1106–1108)","Tennin (1108–1110)","Ten-ei (1110-1113)","Eikyū (1113–1118)","Gen’ei (1118–1120)","Hōan (1120–1124)","Tenji (1124–1126)","Daiji (1126–1131)","Tenshō (1131–1132)","Chōshō (1132–1135)","Hōen (1135–1141)","Eiji (1141–1142)","Kōji (1142–1144)","Ten’yō (1144–1145)","Kyūan (1145–1151)","Ninpei (1151–1154)","Kyūju (1154–1156)","Hōgen (1156–1159)","Heiji (1159–1160)","Eiryaku (1160–1161)","Ōho (1161–1163)","Chōkan (1163–1165)","Eiman (1165–1166)","Nin’an (1166–1169)","Kaō (1169–1171)","Shōan (1171–1175)","Angen (1175–1177)","Jishō (1177–1181)","Yōwa (1181–1182)","Juei (1182–1184)","Genryaku (1184–1185)","Bunji (1185–1190)","Kenkyū (1190–1199)","Shōji (1199–1201)","Kennin (1201–1204)","Genkyū (1204–1206)","Ken’ei (1206–1207)","Jōgen (1207–1211)","Kenryaku (1211–1213)","Kenpō (1213–1219)","Jōkyū (1219–1222)","Jōō (1222–1224)","Gennin (1224–1225)","Karoku (1225–1227)","Antei (1227–1229)","Kanki (1229–1232)","Jōei (1232–1233)","Tenpuku (1233–1234)","Bunryaku (1234–1235)","Katei (1235–1238)","Ryakunin (1238–1239)","En’ō (1239–1240)","Ninji (1240–1243)","Kangen (1243–1247)","Hōji (1247–1249)","Kenchō (1249–1256)","Kōgen (1256–1257)","Shōka (1257–1259)","Shōgen (1259–1260)","Bun’ō (1260–1261)","Kōchō (1261–1264)","Bun’ei (1264–1275)","Kenji (1275–1278)","Kōan (1278–1288)","Shōō (1288–1293)","Einin (1293–1299)","Shōan (1299–1302)","Kengen (1302–1303)","Kagen (1303–1306)","Tokuji (1306–1308)","Enkyō (1308–1311)","Ōchō (1311–1312)","Shōwa (1312–1317)","Bunpō (1317–1319)","Genō (1319–1321)","Genkō (1321–1324)","Shōchū (1324–1326)","Karyaku (1326–1329)","Gentoku (1329–1331)","Genkō (1331–1334)","Kenmu (1334–1336)","Engen (1336–1340)","Kōkoku (1340–1346)","Shōhei (1346–1370)","Kentoku (1370–1372)","Bunchū (1372–1375)","Tenju (1375–1379)","Kōryaku (1379–1381)","Kōwa (1381–1384)","Genchū (1384–1392)","Meitoku (1384–1387)","Kakei (1387–1389)","Kōō (1389–1390)","Meitoku (1390–1394)","Ōei (1394–1428)","Shōchō (1428–1429)","Eikyō (1429–1441)","Kakitsu (1441–1444)","Bun’an (1444–1449)","Hōtoku (1449–1452)","Kyōtoku (1452–1455)","Kōshō (1455–1457)","Chōroku (1457–1460)","Kanshō (1460–1466)","Bunshō (1466–1467)","Ōnin (1467–1469)","Bunmei (1469–1487)","Chōkyō (1487–1489)","Entoku (1489–1492)","Meiō (1492–1501)","Bunki (1501–1504)","Eishō (1504–1521)","Taiei (1521–1528)","Kyōroku (1528–1532)","Tenbun (1532–1555)","Kōji (1555–1558)","Eiroku (1558–1570)","Genki (1570–1573)","Tenshō (1573–1592)","Bunroku (1592–1596)","Keichō (1596–1615)","Genna (1615–1624)","Kan’ei (1624–1644)","Shōho (1644–1648)","Keian (1648–1652)","Jōō (1652–1655)","Meireki (1655–1658)","Manji (1658–1661)","Kanbun (1661–1673)","Enpō (1673–1681)","Tenna (1681–1684)","Jōkyō (1684–1688)","Genroku (1688–1704)","Hōei (1704–1711)","Shōtoku (1711–1716)","Kyōhō (1716–1736)","Genbun (1736–1741)","Kanpō (1741–1744)","Enkyō (1744–1748)","Kan’en (1748–1751)","Hōreki (1751–1764)","Meiwa (1764–1772)","An’ei (1772–1781)","Tenmei (1781–1789)","Kansei (1789–1801)","Kyōwa (1801–1804)","Bunka (1804–1818)","Bunsei (1818–1830)","Tenpō (1830–1844)","Kōka (1844–1848)","Kaei (1848–1854)","Ansei (1854–1860)","Man’en (1860–1861)","Bunkyū (1861–1864)","Genji (1864–1865)","Keiō (1865–1868)","Meiji","Taishō","Shōwa","Heisei"]},dayPeriods:{am:"vorm.",pm:"nachm."}},persian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],long:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["AP"],short:["AP"],long:["AP"]},dayPeriods:{am:"vorm.",pm:"nachm."}},roc:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],long:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},days:{narrow:["S","M","D","M","D","F","S"],short:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],long:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},eras:{narrow:["Before R.O.C.","Minguo"],short:["Before R.O.C.","Minguo"],long:["Before R.O.C.","Minguo"]},dayPeriods:{am:"vorm.",pm:"nachm."}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"{minusSign}{number}"},currency:{positivePattern:"{number} {currency}",negativePattern:"{minusSign}{number} {currency}"},percent:{positivePattern:"{number} {percentSign}",negativePattern:"{minusSign}{number} {percentSign}"}},symbols:{latn:{decimal:",",group:".",nan:"NaN",plusSign:"+",minusSign:"-",percentSign:"%",infinity:"∞"}},currencies:{ATS:"öS",AUD:"AU$",BGM:"BGK",BGO:"BGJ",BRL:"R$",CAD:"CA$",CNY:"CN¥",DEM:"DM",EUR:"€",GBP:"£",HKD:"HK$",ILS:"₪",INR:"₹",JPY:"¥",KRW:"₩",MXN:"MX$",NZD:"NZ$",THB:"฿",TWD:"NT$",USD:"$",VND:"₫",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}}); + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/12.dad7292d.chunk.js b/server/build/12.dad7292d.chunk.js new file mode 100644 index 00000000..f4ad2dbd --- /dev/null +++ b/server/build/12.dad7292d.chunk.js @@ -0,0 +1,10 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[12],{ + +/***/ 1895: +/***/ (function(module, exports) { + +IntlPolyfill.__addLocaleData({locale:"en",date:{ca:["gregory","buddhist","chinese","coptic","dangi","ethioaa","ethiopic","generic","hebrew","indian","islamic","islamicc","japanese","persian","roc"],hourNo0:true,hour12:true,formats:{short:"{1}, {0}",medium:"{1}, {0}",full:"{1} 'at' {0}",long:"{1} 'at' {0}",availableFormats:{"d":"d","E":"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G","h":"h a","H":"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v","M":"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss","y":"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y",yQQQ:"QQQ y",yQQQQ:"QQQQ y"},dateFormats:{yMMMMEEEEd:"EEEE, MMMM d, y",yMMMMd:"MMMM d, y",yMMMd:"MMM d, y",yMd:"M/d/yy"},timeFormats:{hmmsszzzz:"h:mm:ss a zzzz",hmsz:"h:mm:ss a z",hms:"h:mm:ss a",hm:"h:mm a"}},calendars:{buddhist:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["BE"],short:["BE"],long:["BE"]},dayPeriods:{am:"AM",pm:"PM"}},chinese:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Mo1","Mo2","Mo3","Mo4","Mo5","Mo6","Mo7","Mo8","Mo9","Mo10","Mo11","Mo12"],long:["Month1","Month2","Month3","Month4","Month5","Month6","Month7","Month8","Month9","Month10","Month11","Month12"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriods:{am:"AM",pm:"PM"}},coptic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"],long:["Tout","Baba","Hator","Kiahk","Toba","Amshir","Baramhat","Baramouda","Bashans","Paona","Epep","Mesra","Nasie"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"AM",pm:"PM"}},dangi:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Mo1","Mo2","Mo3","Mo4","Mo5","Mo6","Mo7","Mo8","Mo9","Mo10","Mo11","Mo12"],long:["Month1","Month2","Month3","Month4","Month5","Month6","Month7","Month8","Month9","Month10","Month11","Month12"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriods:{am:"AM",pm:"PM"}},ethiopic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],long:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"AM",pm:"PM"}},ethioaa:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13"],short:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"],long:["Meskerem","Tekemt","Hedar","Tahsas","Ter","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehasse","Pagumen"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0"],short:["ERA0"],long:["ERA0"]},dayPeriods:{am:"AM",pm:"PM"}},generic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"],long:["M01","M02","M03","M04","M05","M06","M07","M08","M09","M10","M11","M12"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["ERA0","ERA1"],short:["ERA0","ERA1"],long:["ERA0","ERA1"]},dayPeriods:{am:"AM",pm:"PM"}},gregory:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["B","A","BCE","CE"],short:["BC","AD","BCE","CE"],long:["Before Christ","Anno Domini","Before Common Era","Common Era"]},dayPeriods:{am:"AM",pm:"PM"}},hebrew:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12","13","7"],short:["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"],long:["Tishri","Heshvan","Kislev","Tevet","Shevat","Adar I","Adar","Nisan","Iyar","Sivan","Tamuz","Av","Elul","Adar II"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AM"],short:["AM"],long:["AM"]},dayPeriods:{am:"AM",pm:"PM"}},indian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"],long:["Chaitra","Vaisakha","Jyaistha","Asadha","Sravana","Bhadra","Asvina","Kartika","Agrahayana","Pausa","Magha","Phalguna"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["Saka"],short:["Saka"],long:["Saka"]},dayPeriods:{am:"AM",pm:"PM"}},islamic:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],long:["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AH"],short:["AH"],long:["AH"]},dayPeriods:{am:"AM",pm:"PM"}},islamicc:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Muh.","Saf.","Rab. I","Rab. II","Jum. I","Jum. II","Raj.","Sha.","Ram.","Shaw.","Dhuʻl-Q.","Dhuʻl-H."],long:["Muharram","Safar","Rabiʻ I","Rabiʻ II","Jumada I","Jumada II","Rajab","Shaʻban","Ramadan","Shawwal","Dhuʻl-Qiʻdah","Dhuʻl-Hijjah"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AH"],short:["AH"],long:["AH"]},dayPeriods:{am:"AM",pm:"PM"}},japanese:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["Taika (645–650)","Hakuchi (650–671)","Hakuhō (672–686)","Shuchō (686–701)","Taihō (701–704)","Keiun (704–708)","Wadō (708–715)","Reiki (715–717)","Yōrō (717–724)","Jinki (724–729)","Tenpyō (729–749)","Tenpyō-kampō (749-749)","Tenpyō-shōhō (749-757)","Tenpyō-hōji (757-765)","Tenpyō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770–780)","Ten-ō (781-782)","Enryaku (782–806)","Daidō (806–810)","Kōnin (810–824)","Tenchō (824–834)","Jōwa (834–848)","Kajō (848–851)","Ninju (851–854)","Saikō (854–857)","Ten-an (857-859)","Jōgan (859–877)","Gangyō (877–885)","Ninna (885–889)","Kanpyō (889–898)","Shōtai (898–901)","Engi (901–923)","Enchō (923–931)","Jōhei (931–938)","Tengyō (938–947)","Tenryaku (947–957)","Tentoku (957–961)","Ōwa (961–964)","Kōhō (964–968)","Anna (968–970)","Tenroku (970–973)","Ten’en (973–976)","Jōgen (976–978)","Tengen (978–983)","Eikan (983–985)","Kanna (985–987)","Eien (987–989)","Eiso (989–990)","Shōryaku (990–995)","Chōtoku (995–999)","Chōhō (999–1004)","Kankō (1004–1012)","Chōwa (1012–1017)","Kannin (1017–1021)","Jian (1021–1024)","Manju (1024–1028)","Chōgen (1028–1037)","Chōryaku (1037–1040)","Chōkyū (1040–1044)","Kantoku (1044–1046)","Eishō (1046–1053)","Tengi (1053–1058)","Kōhei (1058–1065)","Jiryaku (1065–1069)","Enkyū (1069–1074)","Shōho (1074–1077)","Shōryaku (1077–1081)","Eihō (1081–1084)","Ōtoku (1084–1087)","Kanji (1087–1094)","Kahō (1094–1096)","Eichō (1096–1097)","Jōtoku (1097–1099)","Kōwa (1099–1104)","Chōji (1104–1106)","Kashō (1106–1108)","Tennin (1108–1110)","Ten-ei (1110-1113)","Eikyū (1113–1118)","Gen’ei (1118–1120)","Hōan (1120–1124)","Tenji (1124–1126)","Daiji (1126–1131)","Tenshō (1131–1132)","Chōshō (1132–1135)","Hōen (1135–1141)","Eiji (1141–1142)","Kōji (1142–1144)","Ten’yō (1144–1145)","Kyūan (1145–1151)","Ninpei (1151–1154)","Kyūju (1154–1156)","Hōgen (1156–1159)","Heiji (1159–1160)","Eiryaku (1160–1161)","Ōho (1161–1163)","Chōkan (1163–1165)","Eiman (1165–1166)","Nin’an (1166–1169)","Kaō (1169–1171)","Shōan (1171–1175)","Angen (1175–1177)","Jishō (1177–1181)","Yōwa (1181–1182)","Juei (1182–1184)","Genryaku (1184–1185)","Bunji (1185–1190)","Kenkyū (1190–1199)","Shōji (1199–1201)","Kennin (1201–1204)","Genkyū (1204–1206)","Ken’ei (1206–1207)","Jōgen (1207–1211)","Kenryaku (1211–1213)","Kenpō (1213–1219)","Jōkyū (1219–1222)","Jōō (1222–1224)","Gennin (1224–1225)","Karoku (1225–1227)","Antei (1227–1229)","Kanki (1229–1232)","Jōei (1232–1233)","Tenpuku (1233–1234)","Bunryaku (1234–1235)","Katei (1235–1238)","Ryakunin (1238–1239)","En’ō (1239–1240)","Ninji (1240–1243)","Kangen (1243–1247)","Hōji (1247–1249)","Kenchō (1249–1256)","Kōgen (1256–1257)","Shōka (1257–1259)","Shōgen (1259–1260)","Bun’ō (1260–1261)","Kōchō (1261–1264)","Bun’ei (1264–1275)","Kenji (1275–1278)","Kōan (1278–1288)","Shōō (1288–1293)","Einin (1293–1299)","Shōan (1299–1302)","Kengen (1302–1303)","Kagen (1303–1306)","Tokuji (1306–1308)","Enkyō (1308–1311)","Ōchō (1311–1312)","Shōwa (1312–1317)","Bunpō (1317–1319)","Genō (1319–1321)","Genkō (1321–1324)","Shōchū (1324–1326)","Karyaku (1326–1329)","Gentoku (1329–1331)","Genkō (1331–1334)","Kenmu (1334–1336)","Engen (1336–1340)","Kōkoku (1340–1346)","Shōhei (1346–1370)","Kentoku (1370–1372)","Bunchū (1372–1375)","Tenju (1375–1379)","Kōryaku (1379–1381)","Kōwa (1381–1384)","Genchū (1384–1392)","Meitoku (1384–1387)","Kakei (1387–1389)","Kōō (1389–1390)","Meitoku (1390–1394)","Ōei (1394–1428)","Shōchō (1428–1429)","Eikyō (1429–1441)","Kakitsu (1441–1444)","Bun’an (1444–1449)","Hōtoku (1449–1452)","Kyōtoku (1452–1455)","Kōshō (1455–1457)","Chōroku (1457–1460)","Kanshō (1460–1466)","Bunshō (1466–1467)","Ōnin (1467–1469)","Bunmei (1469–1487)","Chōkyō (1487–1489)","Entoku (1489–1492)","Meiō (1492–1501)","Bunki (1501–1504)","Eishō (1504–1521)","Taiei (1521–1528)","Kyōroku (1528–1532)","Tenbun (1532–1555)","Kōji (1555–1558)","Eiroku (1558–1570)","Genki (1570–1573)","Tenshō (1573–1592)","Bunroku (1592–1596)","Keichō (1596–1615)","Genna (1615–1624)","Kan’ei (1624–1644)","Shōho (1644–1648)","Keian (1648–1652)","Jōō (1652–1655)","Meireki (1655–1658)","Manji (1658–1661)","Kanbun (1661–1673)","Enpō (1673–1681)","Tenna (1681–1684)","Jōkyō (1684–1688)","Genroku (1688–1704)","Hōei (1704–1711)","Shōtoku (1711–1716)","Kyōhō (1716–1736)","Genbun (1736–1741)","Kanpō (1741–1744)","Enkyō (1744–1748)","Kan’en (1748–1751)","Hōreki (1751–1764)","Meiwa (1764–1772)","An’ei (1772–1781)","Tenmei (1781–1789)","Kansei (1789–1801)","Kyōwa (1801–1804)","Bunka (1804–1818)","Bunsei (1818–1830)","Tenpō (1830–1844)","Kōka (1844–1848)","Kaei (1848–1854)","Ansei (1854–1860)","Man’en (1860–1861)","Bunkyū (1861–1864)","Genji (1864–1865)","Keiō (1865–1868)","M","T","S","H"],short:["Taika (645–650)","Hakuchi (650–671)","Hakuhō (672–686)","Shuchō (686–701)","Taihō (701–704)","Keiun (704–708)","Wadō (708–715)","Reiki (715–717)","Yōrō (717–724)","Jinki (724–729)","Tenpyō (729–749)","Tenpyō-kampō (749-749)","Tenpyō-shōhō (749-757)","Tenpyō-hōji (757-765)","Tenpyō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770–780)","Ten-ō (781-782)","Enryaku (782–806)","Daidō (806–810)","Kōnin (810–824)","Tenchō (824–834)","Jōwa (834–848)","Kajō (848–851)","Ninju (851–854)","Saikō (854–857)","Ten-an (857-859)","Jōgan (859–877)","Gangyō (877–885)","Ninna (885–889)","Kanpyō (889–898)","Shōtai (898–901)","Engi (901–923)","Enchō (923–931)","Jōhei (931–938)","Tengyō (938–947)","Tenryaku (947–957)","Tentoku (957–961)","Ōwa (961–964)","Kōhō (964–968)","Anna (968–970)","Tenroku (970–973)","Ten’en (973–976)","Jōgen (976–978)","Tengen (978–983)","Eikan (983–985)","Kanna (985–987)","Eien (987–989)","Eiso (989–990)","Shōryaku (990–995)","Chōtoku (995–999)","Chōhō (999–1004)","Kankō (1004–1012)","Chōwa (1012–1017)","Kannin (1017–1021)","Jian (1021–1024)","Manju (1024–1028)","Chōgen (1028–1037)","Chōryaku (1037–1040)","Chōkyū (1040–1044)","Kantoku (1044–1046)","Eishō (1046–1053)","Tengi (1053–1058)","Kōhei (1058–1065)","Jiryaku (1065–1069)","Enkyū (1069–1074)","Shōho (1074–1077)","Shōryaku (1077–1081)","Eihō (1081–1084)","Ōtoku (1084–1087)","Kanji (1087–1094)","Kahō (1094–1096)","Eichō (1096–1097)","Jōtoku (1097–1099)","Kōwa (1099–1104)","Chōji (1104–1106)","Kashō (1106–1108)","Tennin (1108–1110)","Ten-ei (1110-1113)","Eikyū (1113–1118)","Gen’ei (1118–1120)","Hōan (1120–1124)","Tenji (1124–1126)","Daiji (1126–1131)","Tenshō (1131–1132)","Chōshō (1132–1135)","Hōen (1135–1141)","Eiji (1141–1142)","Kōji (1142–1144)","Ten’yō (1144–1145)","Kyūan (1145–1151)","Ninpei (1151–1154)","Kyūju (1154–1156)","Hōgen (1156–1159)","Heiji (1159–1160)","Eiryaku (1160–1161)","Ōho (1161–1163)","Chōkan (1163–1165)","Eiman (1165–1166)","Nin’an (1166–1169)","Kaō (1169–1171)","Shōan (1171–1175)","Angen (1175–1177)","Jishō (1177–1181)","Yōwa (1181–1182)","Juei (1182–1184)","Genryaku (1184–1185)","Bunji (1185–1190)","Kenkyū (1190–1199)","Shōji (1199–1201)","Kennin (1201–1204)","Genkyū (1204–1206)","Ken’ei (1206–1207)","Jōgen (1207–1211)","Kenryaku (1211–1213)","Kenpō (1213–1219)","Jōkyū (1219–1222)","Jōō (1222–1224)","Gennin (1224–1225)","Karoku (1225–1227)","Antei (1227–1229)","Kanki (1229–1232)","Jōei (1232–1233)","Tenpuku (1233–1234)","Bunryaku (1234–1235)","Katei (1235–1238)","Ryakunin (1238–1239)","En’ō (1239–1240)","Ninji (1240–1243)","Kangen (1243–1247)","Hōji (1247–1249)","Kenchō (1249–1256)","Kōgen (1256–1257)","Shōka (1257–1259)","Shōgen (1259–1260)","Bun’ō (1260–1261)","Kōchō (1261–1264)","Bun’ei (1264–1275)","Kenji (1275–1278)","Kōan (1278–1288)","Shōō (1288–1293)","Einin (1293–1299)","Shōan (1299–1302)","Kengen (1302–1303)","Kagen (1303–1306)","Tokuji (1306–1308)","Enkyō (1308–1311)","Ōchō (1311–1312)","Shōwa (1312–1317)","Bunpō (1317–1319)","Genō (1319–1321)","Genkō (1321–1324)","Shōchū (1324–1326)","Karyaku (1326–1329)","Gentoku (1329–1331)","Genkō (1331–1334)","Kenmu (1334–1336)","Engen (1336–1340)","Kōkoku (1340–1346)","Shōhei (1346–1370)","Kentoku (1370–1372)","Bunchū (1372–1375)","Tenju (1375–1379)","Kōryaku (1379–1381)","Kōwa (1381–1384)","Genchū (1384–1392)","Meitoku (1384–1387)","Kakei (1387–1389)","Kōō (1389–1390)","Meitoku (1390–1394)","Ōei (1394–1428)","Shōchō (1428–1429)","Eikyō (1429–1441)","Kakitsu (1441–1444)","Bun’an (1444–1449)","Hōtoku (1449–1452)","Kyōtoku (1452–1455)","Kōshō (1455–1457)","Chōroku (1457–1460)","Kanshō (1460–1466)","Bunshō (1466–1467)","Ōnin (1467–1469)","Bunmei (1469–1487)","Chōkyō (1487–1489)","Entoku (1489–1492)","Meiō (1492–1501)","Bunki (1501–1504)","Eishō (1504–1521)","Taiei (1521–1528)","Kyōroku (1528–1532)","Tenbun (1532–1555)","Kōji (1555–1558)","Eiroku (1558–1570)","Genki (1570–1573)","Tenshō (1573–1592)","Bunroku (1592–1596)","Keichō (1596–1615)","Genna (1615–1624)","Kan’ei (1624–1644)","Shōho (1644–1648)","Keian (1648–1652)","Jōō (1652–1655)","Meireki (1655–1658)","Manji (1658–1661)","Kanbun (1661–1673)","Enpō (1673–1681)","Tenna (1681–1684)","Jōkyō (1684–1688)","Genroku (1688–1704)","Hōei (1704–1711)","Shōtoku (1711–1716)","Kyōhō (1716–1736)","Genbun (1736–1741)","Kanpō (1741–1744)","Enkyō (1744–1748)","Kan’en (1748–1751)","Hōreki (1751–1764)","Meiwa (1764–1772)","An’ei (1772–1781)","Tenmei (1781–1789)","Kansei (1789–1801)","Kyōwa (1801–1804)","Bunka (1804–1818)","Bunsei (1818–1830)","Tenpō (1830–1844)","Kōka (1844–1848)","Kaei (1848–1854)","Ansei (1854–1860)","Man’en (1860–1861)","Bunkyū (1861–1864)","Genji (1864–1865)","Keiō (1865–1868)","Meiji","Taishō","Shōwa","Heisei"],long:["Taika (645–650)","Hakuchi (650–671)","Hakuhō (672–686)","Shuchō (686–701)","Taihō (701–704)","Keiun (704–708)","Wadō (708–715)","Reiki (715–717)","Yōrō (717–724)","Jinki (724–729)","Tenpyō (729–749)","Tenpyō-kampō (749-749)","Tenpyō-shōhō (749-757)","Tenpyō-hōji (757-765)","Tenpyō-jingo (765-767)","Jingo-keiun (767-770)","Hōki (770–780)","Ten-ō (781-782)","Enryaku (782–806)","Daidō (806–810)","Kōnin (810–824)","Tenchō (824–834)","Jōwa (834–848)","Kajō (848–851)","Ninju (851–854)","Saikō (854–857)","Ten-an (857-859)","Jōgan (859–877)","Gangyō (877–885)","Ninna (885–889)","Kanpyō (889–898)","Shōtai (898–901)","Engi (901–923)","Enchō (923–931)","Jōhei (931–938)","Tengyō (938–947)","Tenryaku (947–957)","Tentoku (957–961)","Ōwa (961–964)","Kōhō (964–968)","Anna (968–970)","Tenroku (970–973)","Ten’en (973–976)","Jōgen (976–978)","Tengen (978–983)","Eikan (983–985)","Kanna (985–987)","Eien (987–989)","Eiso (989–990)","Shōryaku (990–995)","Chōtoku (995–999)","Chōhō (999–1004)","Kankō (1004–1012)","Chōwa (1012–1017)","Kannin (1017–1021)","Jian (1021–1024)","Manju (1024–1028)","Chōgen (1028–1037)","Chōryaku (1037–1040)","Chōkyū (1040–1044)","Kantoku (1044–1046)","Eishō (1046–1053)","Tengi (1053–1058)","Kōhei (1058–1065)","Jiryaku (1065–1069)","Enkyū (1069–1074)","Shōho (1074–1077)","Shōryaku (1077–1081)","Eihō (1081–1084)","Ōtoku (1084–1087)","Kanji (1087–1094)","Kahō (1094–1096)","Eichō (1096–1097)","Jōtoku (1097–1099)","Kōwa (1099–1104)","Chōji (1104–1106)","Kashō (1106–1108)","Tennin (1108–1110)","Ten-ei (1110-1113)","Eikyū (1113–1118)","Gen’ei (1118–1120)","Hōan (1120–1124)","Tenji (1124–1126)","Daiji (1126–1131)","Tenshō (1131–1132)","Chōshō (1132–1135)","Hōen (1135–1141)","Eiji (1141–1142)","Kōji (1142–1144)","Ten’yō (1144–1145)","Kyūan (1145–1151)","Ninpei (1151–1154)","Kyūju (1154–1156)","Hōgen (1156–1159)","Heiji (1159–1160)","Eiryaku (1160–1161)","Ōho (1161–1163)","Chōkan (1163–1165)","Eiman (1165–1166)","Nin’an (1166–1169)","Kaō (1169–1171)","Shōan (1171–1175)","Angen (1175–1177)","Jishō (1177–1181)","Yōwa (1181–1182)","Juei (1182–1184)","Genryaku (1184–1185)","Bunji (1185–1190)","Kenkyū (1190–1199)","Shōji (1199–1201)","Kennin (1201–1204)","Genkyū (1204–1206)","Ken’ei (1206–1207)","Jōgen (1207–1211)","Kenryaku (1211–1213)","Kenpō (1213–1219)","Jōkyū (1219–1222)","Jōō (1222–1224)","Gennin (1224–1225)","Karoku (1225–1227)","Antei (1227–1229)","Kanki (1229–1232)","Jōei (1232–1233)","Tenpuku (1233–1234)","Bunryaku (1234–1235)","Katei (1235–1238)","Ryakunin (1238–1239)","En’ō (1239–1240)","Ninji (1240–1243)","Kangen (1243–1247)","Hōji (1247–1249)","Kenchō (1249–1256)","Kōgen (1256–1257)","Shōka (1257–1259)","Shōgen (1259–1260)","Bun’ō (1260–1261)","Kōchō (1261–1264)","Bun’ei (1264–1275)","Kenji (1275–1278)","Kōan (1278–1288)","Shōō (1288–1293)","Einin (1293–1299)","Shōan (1299–1302)","Kengen (1302–1303)","Kagen (1303–1306)","Tokuji (1306–1308)","Enkyō (1308–1311)","Ōchō (1311–1312)","Shōwa (1312–1317)","Bunpō (1317–1319)","Genō (1319–1321)","Genkō (1321–1324)","Shōchū (1324–1326)","Karyaku (1326–1329)","Gentoku (1329–1331)","Genkō (1331–1334)","Kenmu (1334–1336)","Engen (1336–1340)","Kōkoku (1340–1346)","Shōhei (1346–1370)","Kentoku (1370–1372)","Bunchū (1372–1375)","Tenju (1375–1379)","Kōryaku (1379–1381)","Kōwa (1381–1384)","Genchū (1384–1392)","Meitoku (1384–1387)","Kakei (1387–1389)","Kōō (1389–1390)","Meitoku (1390–1394)","Ōei (1394–1428)","Shōchō (1428–1429)","Eikyō (1429–1441)","Kakitsu (1441–1444)","Bun’an (1444–1449)","Hōtoku (1449–1452)","Kyōtoku (1452–1455)","Kōshō (1455–1457)","Chōroku (1457–1460)","Kanshō (1460–1466)","Bunshō (1466–1467)","Ōnin (1467–1469)","Bunmei (1469–1487)","Chōkyō (1487–1489)","Entoku (1489–1492)","Meiō (1492–1501)","Bunki (1501–1504)","Eishō (1504–1521)","Taiei (1521–1528)","Kyōroku (1528–1532)","Tenbun (1532–1555)","Kōji (1555–1558)","Eiroku (1558–1570)","Genki (1570–1573)","Tenshō (1573–1592)","Bunroku (1592–1596)","Keichō (1596–1615)","Genna (1615–1624)","Kan’ei (1624–1644)","Shōho (1644–1648)","Keian (1648–1652)","Jōō (1652–1655)","Meireki (1655–1658)","Manji (1658–1661)","Kanbun (1661–1673)","Enpō (1673–1681)","Tenna (1681–1684)","Jōkyō (1684–1688)","Genroku (1688–1704)","Hōei (1704–1711)","Shōtoku (1711–1716)","Kyōhō (1716–1736)","Genbun (1736–1741)","Kanpō (1741–1744)","Enkyō (1744–1748)","Kan’en (1748–1751)","Hōreki (1751–1764)","Meiwa (1764–1772)","An’ei (1772–1781)","Tenmei (1781–1789)","Kansei (1789–1801)","Kyōwa (1801–1804)","Bunka (1804–1818)","Bunsei (1818–1830)","Tenpō (1830–1844)","Kōka (1844–1848)","Kaei (1848–1854)","Ansei (1854–1860)","Man’en (1860–1861)","Bunkyū (1861–1864)","Genji (1864–1865)","Keiō (1865–1868)","Meiji","Taishō","Shōwa","Heisei"]},dayPeriods:{am:"AM",pm:"PM"}},persian:{months:{narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],short:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],long:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["AP"],short:["AP"],long:["AP"]},dayPeriods:{am:"AM",pm:"PM"}},roc:{months:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},days:{narrow:["S","M","T","W","T","F","S"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},eras:{narrow:["Before R.O.C.","Minguo"],short:["Before R.O.C.","Minguo"],long:["Before R.O.C.","Minguo"]},dayPeriods:{am:"AM",pm:"PM"}}}},number:{nu:["latn"],patterns:{decimal:{positivePattern:"{number}",negativePattern:"{minusSign}{number}"},currency:{positivePattern:"{currency}{number}",negativePattern:"{minusSign}{currency}{number}"},percent:{positivePattern:"{number}{percentSign}",negativePattern:"{minusSign}{number}{percentSign}"}},symbols:{latn:{decimal:".",group:",",nan:"NaN",plusSign:"+",minusSign:"-",percentSign:"%",infinity:"∞"}},currencies:{AUD:"A$",BRL:"R$",CAD:"CA$",CNY:"CN¥",EUR:"€",GBP:"£",HKD:"HK$",ILS:"₪",INR:"₹",JPY:"¥",KRW:"₩",MXN:"MX$",NZD:"NZ$",TWD:"NT$",USD:"$",VND:"₫",XAF:"FCFA",XCD:"EC$",XOF:"CFA",XPF:"CFPF"}}}); + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/13.ad3d6b66.chunk.js b/server/build/13.ad3d6b66.chunk.js new file mode 100644 index 00000000..fdbdc411 --- /dev/null +++ b/server/build/13.ad3d6b66.chunk.js @@ -0,0 +1,10 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[13],{ + +/***/ 2008: +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/13685372945d816a2b474fc082fd9aaa.ttf b/server/build/13685372945d816a2b474fc082fd9aaa.ttf new file mode 100644 index 00000000..948a2a6c Binary files /dev/null and b/server/build/13685372945d816a2b474fc082fd9aaa.ttf differ diff --git a/server/build/13fa4c60e0ee7ea5fe2bd84059fb8cac.woff b/server/build/13fa4c60e0ee7ea5fe2bd84059fb8cac.woff new file mode 100644 index 00000000..760b1247 Binary files /dev/null and b/server/build/13fa4c60e0ee7ea5fe2bd84059fb8cac.woff differ diff --git a/server/build/16d14ad314296a4644d550c8f20bd407.woff b/server/build/16d14ad314296a4644d550c8f20bd407.woff new file mode 100644 index 00000000..ef8de9a0 Binary files /dev/null and b/server/build/16d14ad314296a4644d550c8f20bd407.woff differ diff --git a/server/build/1ab236ed440ee51810c56bd16628aef0.ttf b/server/build/1ab236ed440ee51810c56bd16628aef0.ttf new file mode 100644 index 00000000..5b979039 Binary files /dev/null and b/server/build/1ab236ed440ee51810c56bd16628aef0.ttf differ diff --git a/server/build/2.3e8c6cc9.chunk.js b/server/build/2.3e8c6cc9.chunk.js new file mode 100644 index 00000000..4d6b5ccf --- /dev/null +++ b/server/build/2.3e8c6cc9.chunk.js @@ -0,0 +1,1296 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[2],{ + +/***/ 1906: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var _EditViewDataManager=_interopRequireDefault(__webpack_require__(1967));var useDataManager=function useDataManager(){return(0,_react.useContext)(_EditViewDataManager["default"]);};var _default=useDataManager;exports["default"]=_default; + +/***/ }), + +/***/ 1908: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding: 18px 30px 18px 30px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Container=_styledComponents["default"].div(_templateObject());var _default=Container;exports["default"]=_default; + +/***/ }), + +/***/ 1920: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _pluginId=_interopRequireDefault(__webpack_require__(105));var getTrad=function getTrad(id){return"".concat(_pluginId["default"],".").concat(id);};var _default=getTrad;exports["default"]=_default; + +/***/ }), + +/***/ 1922: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var _EditView=_interopRequireDefault(__webpack_require__(1968));var useEditView=function useEditView(){return(0,_react.useContext)(_EditView["default"]);};var _default=useEditView;exports["default"]=_default; + +/***/ }), + +/***/ 1923: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactIntl=__webpack_require__(15);var _reactFontawesome=__webpack_require__(45);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _useEditView2=_interopRequireDefault(__webpack_require__(1922));var _ComponentInitializer=_interopRequireDefault(__webpack_require__(2045));var _NonRepeatableComponent=_interopRequireDefault(__webpack_require__(2047));var _RepeatableComponent=_interopRequireDefault(__webpack_require__(2221));var _ComponentIcon=_interopRequireDefault(__webpack_require__(2228));var _Label=_interopRequireDefault(__webpack_require__(2229));var _ResetComponent=_interopRequireDefault(__webpack_require__(2230));var _Wrapper=_interopRequireDefault(__webpack_require__(2231));/* eslint-disable import/no-cycle */var FieldComponent=function FieldComponent(_ref){var componentFriendlyName=_ref.componentFriendlyName,componentUid=_ref.componentUid,icon=_ref.icon,isFromDynamicZone=_ref.isFromDynamicZone,isRepeatable=_ref.isRepeatable,isNested=_ref.isNested,label=_ref.label,max=_ref.max,min=_ref.min,name=_ref.name;var _useDataManager=(0,_useDataManager2["default"])(),modifiedData=_useDataManager.modifiedData,removeComponentFromField=_useDataManager.removeComponentFromField;var _useEditView=(0,_useEditView2["default"])(),allLayoutData=_useEditView.allLayoutData;var componentValue=(0,_lodash.get)(modifiedData,name,null);var componentValueLength=(0,_lodash.size)(componentValue);var isInitialized=componentValue!==null||isFromDynamicZone;var showResetComponent=!isRepeatable&&isInitialized&&!isFromDynamicZone;var currentComponentSchema=(0,_lodash.get)(allLayoutData,['components',componentUid],{});var displayedFields=(0,_lodash.get)(currentComponentSchema,['layouts','edit'],[]);return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{className:"col-12",isFromDynamicZone:isFromDynamicZone},isFromDynamicZone&&/*#__PURE__*/_react["default"].createElement(_ComponentIcon["default"],{title:componentFriendlyName},/*#__PURE__*/_react["default"].createElement("div",{className:"component_name"},/*#__PURE__*/_react["default"].createElement("div",{className:"component_icon"},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:icon,title:componentFriendlyName})),/*#__PURE__*/_react["default"].createElement("p",null,componentFriendlyName))),/*#__PURE__*/_react["default"].createElement(_Label["default"],null,label,"\xA0",isRepeatable&&"(".concat(componentValueLength,")")),showResetComponent&&/*#__PURE__*/_react["default"].createElement(_ResetComponent["default"],{onClick:function onClick(e){e.preventDefault();e.stopPropagation();removeComponentFromField(name,componentUid);}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.reset-entry")}),/*#__PURE__*/_react["default"].createElement("div",null)),!isRepeatable&&!isInitialized&&/*#__PURE__*/_react["default"].createElement(_ComponentInitializer["default"],{componentUid:componentUid,name:name}),!isRepeatable&&isInitialized&&/*#__PURE__*/_react["default"].createElement(_NonRepeatableComponent["default"],{fields:displayedFields,isFromDynamicZone:isFromDynamicZone,name:name,schema:currentComponentSchema}),isRepeatable&&/*#__PURE__*/_react["default"].createElement(_RepeatableComponent["default"],{componentValue:componentValue,componentValueLength:componentValueLength,componentUid:componentUid,fields:displayedFields,isFromDynamicZone:isFromDynamicZone,isNested:isNested,max:max,min:min,name:name,schema:currentComponentSchema}));};FieldComponent.defaultProps={componentFriendlyName:null,icon:'smile',isFromDynamicZone:false,isRepeatable:false,isNested:false,max:Infinity,min:-Infinity};FieldComponent.propTypes={componentFriendlyName:_propTypes["default"].string,componentUid:_propTypes["default"].string.isRequired,icon:_propTypes["default"].string,isFromDynamicZone:_propTypes["default"].bool,isRepeatable:_propTypes["default"].bool,isNested:_propTypes["default"].bool,label:_propTypes["default"].string.isRequired,max:_propTypes["default"].number,min:_propTypes["default"].number,name:_propTypes["default"].string.isRequired};var _default=FieldComponent;exports["default"]=_default; + +/***/ }), + +/***/ 1929: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactFontawesome=__webpack_require__(45);var _Wrapper=_interopRequireDefault(__webpack_require__(1930));var DynamicComponentCard=function DynamicComponentCard(_ref){var children=_ref.children,componentUid=_ref.componentUid,friendlyName=_ref.friendlyName,icon=_ref.icon,_onClick=_ref.onClick;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{onClick:function onClick(e){e.preventDefault();e.stopPropagation();_onClick(componentUid);}},/*#__PURE__*/_react["default"].createElement("button",{className:"component-icon",type:"button"},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:icon})),/*#__PURE__*/_react["default"].createElement("div",{className:"component-uid"},/*#__PURE__*/_react["default"].createElement("span",null,friendlyName)),children);};DynamicComponentCard.defaultProps={children:null,friendlyName:'',onClick:function onClick(){},icon:'smile'};DynamicComponentCard.propTypes={children:_propTypes["default"].node,componentUid:_propTypes["default"].string.isRequired,friendlyName:_propTypes["default"].string,icon:_propTypes["default"].string,onClick:_propTypes["default"].func};var _default=DynamicComponentCard;exports["default"]=_default; + +/***/ }), + +/***/ 1930: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n height: 90px;\n width: 139px !important;\n margin-right: 10px;\n padding: 18px 10px;\n background-color: #ffffff;\n color: #919bae;\n text-align: center;\n border-radius: 2px;\n cursor: pointer;\n border: 1px solid #ffffff;\n\n button {\n outline: 0;\n }\n\n .component-uid {\n width: 119px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: #919bae;\n font-weight: 500;\n font-size: 13px;\n line-height: normal;\n }\n\n .component-icon {\n width: 35px;\n height: 35px;\n margin-bottom: 5px;\n line-height: 35px;\n align-self: center;\n border-radius: 50%;\n background-color: #e9eaeb;\n color: #b4b6ba;\n padding: 0;\n i,\n svg {\n margin: auto;\n display: block;\n }\n }\n\n &:hover {\n background-color: #e6f0fb;\n color: #007eff;\n border: 1px solid #aed4fb;\n\n .component-icon {\n background-color: #aed4fb;\n color: #007eff;\n }\n .component-uid {\n color: #007eff;\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 1938: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireDefault(__webpack_require__(1));var _lodash=__webpack_require__(8);var _pluginId=_interopRequireDefault(__webpack_require__(105));/** + * Retrieve external links from injected components + * @type {Array} List of external links to display + */var getInjectedComponents=function getInjectedComponents(container,area,plugins,currentEnvironment,slug,push){for(var _len=arguments.length,rest=new Array(_len>6?_len-6:0),_key=6;_key<_len;_key++){rest[_key-6]=arguments[_key];}var componentsToInject=Object.keys(plugins).reduce(function(acc,current){// Retrieve injected compos from plugin +var currentPlugin=plugins[current];var injectedComponents=(0,_lodash.get)(currentPlugin,'injectedComponents',[]);var compos=injectedComponents.filter(function(compo){return compo.plugin==="".concat(_pluginId["default"],".").concat(container)&&compo.area===area;}).map(function(compo){var Component=compo.component;return/*#__PURE__*/_react["default"].createElement(Component,(0,_extends2["default"])({viewProps:rest,currentEnvironment:currentEnvironment,getModelName:function getModelName(){return slug;},push:push},compo.props,{key:compo.key}));});return[].concat((0,_toConsumableArray2["default"])(acc),(0,_toConsumableArray2["default"])(compos));},[]);return componentsToInject;};var _default=getInjectedComponents;exports["default"]=_default; + +/***/ }), + +/***/ 1939: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactIntl=__webpack_require__(15);var _custom=__webpack_require__(72);var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _InputJSONWithErrors=_interopRequireDefault(__webpack_require__(2048));var _InputFileWithErrors=_interopRequireDefault(__webpack_require__(2062));var _SelectWrapper=_interopRequireDefault(__webpack_require__(1971));var _WysiwygWithErrors=_interopRequireDefault(__webpack_require__(2081));var _InputUID=_interopRequireDefault(__webpack_require__(2208));var getInputType=function getInputType(){var type=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';switch((0,_lodash.toLower)(type)){case'boolean':return'bool';case'decimal':case'float':case'integer':return'number';case'date':case'datetime':case'time':return type;case'email':return'email';case'enumeration':return'select';case'password':return'password';case'string':return'text';case'text':return'textarea';case'media':case'file':case'files':return'media';case'json':return'json';case'wysiwyg':case'WYSIWYG':case'richtext':return'wysiwyg';case'uid':return'uid';default:return'text';}};function Inputs(_ref){var autoFocus=_ref.autoFocus,keys=_ref.keys,layout=_ref.layout,name=_ref.name,onBlur=_ref.onBlur;var _useDataManager=(0,_useDataManager2["default"])(),didCheckErrors=_useDataManager.didCheckErrors,formErrors=_useDataManager.formErrors,modifiedData=_useDataManager.modifiedData,onChange=_useDataManager.onChange;var attribute=(0,_react.useMemo)(function(){return(0,_lodash.get)(layout,['schema','attributes',name],{});},[layout,name]);var metadatas=(0,_react.useMemo)(function(){return(0,_lodash.get)(layout,['metadatas',name,'edit'],{});},[layout,name]);var disabled=(0,_react.useMemo)(function(){return!(0,_lodash.get)(metadatas,'editable',true);},[metadatas]);var type=(0,_react.useMemo)(function(){return(0,_lodash.get)(attribute,'type',null);},[attribute]);var validations=(0,_lodash.omit)(attribute,['type','model','via','collection','default','plugin','enum']);var description=metadatas.description,visible=metadatas.visible;var value=(0,_lodash.get)(modifiedData,keys,null);if(visible===false){return null;}var temporaryErrorIdUntilBuffetjsSupportsFormattedMessage='app.utils.defaultMessage';var errorId=(0,_lodash.get)(formErrors,[keys,'id'],temporaryErrorIdUntilBuffetjsSupportsFormattedMessage);var isRequired=(0,_lodash.get)(validations,['required'],false);if(type==='relation'){return/*#__PURE__*/_react["default"].createElement("div",{key:keys},/*#__PURE__*/_react["default"].createElement(_SelectWrapper["default"],(0,_extends2["default"])({},metadatas,{name:keys,plugin:attribute.plugin,relationType:attribute.relationType,targetModel:attribute.targetModel,value:(0,_lodash.get)(modifiedData,keys)})));}var inputValue=value;// Fix for input file multipe +if(type==='media'&&!value){inputValue=[];}var step;if(type==='float'||type==='decimal'){step='any';}else if(type==='time'||type==='datetime'){step=30;}else{step='1';}var options=(0,_lodash.get)(attribute,'enum',[]).map(function(v){return/*#__PURE__*/_react["default"].createElement("option",{key:v,value:v},v);});var enumOptions=[/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.InputSelect.option.placeholder",key:"__enum_option_null"},function(msg){return/*#__PURE__*/_react["default"].createElement("option",{disabled:isRequired,hidden:isRequired,value:""},msg);})].concat((0,_toConsumableArray2["default"])(options));return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:errorId},function(error){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,(0,_extends2["default"])({},metadatas,{autoComplete:"new-password",autoFocus:autoFocus,didCheckErrors:didCheckErrors,disabled:disabled,error:(0,_lodash.isEmpty)(error)||errorId===temporaryErrorIdUntilBuffetjsSupportsFormattedMessage?null:error,inputDescription:description,description:description,contentTypeUID:layout.uid,customInputs:{media:_InputFileWithErrors["default"],json:_InputJSONWithErrors["default"],wysiwyg:_WysiwygWithErrors["default"],uid:_InputUID["default"]},multiple:(0,_lodash.get)(attribute,'multiple',false),attribute:attribute,name:keys,onBlur:onBlur,onChange:onChange,options:enumOptions,step:step,type:getInputType(type),validations:validations,value:inputValue,withDefaultValue:false}));});}Inputs.defaultProps={autoFocus:false,onBlur:null};Inputs.propTypes={autoFocus:_propTypes["default"].bool,keys:_propTypes["default"].string.isRequired,layout:_propTypes["default"].object.isRequired,name:_propTypes["default"].string.isRequired,onBlur:_propTypes["default"].func,onChange:_propTypes["default"].func.isRequired};var _default=(0,_react.memo)(Inputs);exports["default"]=_default; + +/***/ }), + +/***/ 1953: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var WysiwygContext=(0,_react.createContext)();var _default=WysiwygContext;exports["default"]=_default; + +/***/ }), + +/***/ 1954: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.DEFAULT_INDENTATION=exports.CONTROLS=exports.SELECT_OPTIONS=void 0;var SELECT_OPTIONS=[{id:'components.Wysiwyg.selectOptions.title',value:''},{id:'components.Wysiwyg.selectOptions.H1',value:'#'},{id:'components.Wysiwyg.selectOptions.H2',value:'##'},{id:'components.Wysiwyg.selectOptions.H3',value:'###'},{id:'components.Wysiwyg.selectOptions.H4',value:'####'},{id:'components.Wysiwyg.selectOptions.H5',value:'#####'},{id:'components.Wysiwyg.selectOptions.H6',value:'######'}];exports.SELECT_OPTIONS=SELECT_OPTIONS;var CONTROLS=[[{label:'B',style:'BOLD',className:'bold',hideLabel:true,handler:'addContent',text:'**textToReplace**'},{label:'I',style:'ITALIC',className:'italic',hideLabel:true,handler:'addContent',text:'*textToReplace*'},{label:'U',style:'UNDERLINE',className:'underline',hideLabel:true,handler:'addContent',text:'__textToReplace__'},{label:'S',style:'STRIKED',className:'striked',hideLabel:true,handler:'addContent',text:'~~textToReplace~~'},{label:'UL',style:'unordered-list-item',className:'ul',hideLabel:true,handler:'addUlBlock',text:'- textToReplace'},{label:'OL',style:'ordered-list-item',className:'ol',hideLabel:true,handler:'addOlBlock',text:'1. textToReplace'}],[{label:'<>',style:'CODE',className:'code',hideLabel:true,handler:'addSimpleBlockWithSelection',text:'```textToReplace```'},{label:'img',style:'IMG',className:'img',hideLabel:true,handler:'addSimpleBlockWithSelection',text:'![text](textToReplace)'},{label:'Link',style:'LINK',className:'link',hideLabel:true,handler:'addContent',text:'[text](textToReplace)'},{label:'quotes',style:'BLOCKQUOTE',className:'quote',hideLabel:true,handler:'addSimpleBlockWithSelection',text:'> textToReplace'}]];exports.CONTROLS=CONTROLS;var DEFAULT_INDENTATION=' ';exports.DEFAULT_INDENTATION=DEFAULT_INDENTATION; + +/***/ }), + +/***/ 1966: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.EditView=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactRouterDom=__webpack_require__(30);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _Container=_interopRequireDefault(__webpack_require__(1908));var _DynamicZone=_interopRequireDefault(__webpack_require__(2044));var _FormWrapper=_interopRequireDefault(__webpack_require__(2239));var _FieldComponent=_interopRequireDefault(__webpack_require__(1923));var _Inputs=_interopRequireDefault(__webpack_require__(1939));var _SelectWrapper=_interopRequireDefault(__webpack_require__(1971));var _getComponents=_interopRequireDefault(__webpack_require__(1938));var _EditViewDataManagerProvider=_interopRequireDefault(__webpack_require__(2240));var _EditViewProvider=_interopRequireDefault(__webpack_require__(2249));var _Header=_interopRequireDefault(__webpack_require__(2250));var _createAttributesLayout=_interopRequireDefault(__webpack_require__(2251));var _components=__webpack_require__(2252);var _init=_interopRequireDefault(__webpack_require__(2253));var _reducer=_interopRequireWildcard(__webpack_require__(2254));/* eslint-disable react/no-array-index-key */var EditView=function EditView(_ref){var components=_ref.components,currentEnvironment=_ref.currentEnvironment,layouts=_ref.layouts,plugins=_ref.plugins,slug=_ref.slug;var formatLayoutRef=(0,_react.useRef)();formatLayoutRef.current=_createAttributesLayout["default"];// Retrieve push to programmatically navigate between views +var _useHistory=(0,_reactRouterDom.useHistory)(),push=_useHistory.push;// Retrieve the search and the pathname +var _useLocation=(0,_reactRouterDom.useLocation)(),search=_useLocation.search,pathname=_useLocation.pathname;var _useRouteMatch=(0,_reactRouterDom.useRouteMatch)('/plugins/content-manager/:contentType'),contentType=_useRouteMatch.params.contentType;var isSingleType=contentType==='singleType';var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState,function(){return(0,_init["default"])(_reducer.initialState);}),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),reducerState=_useReducer2[0],dispatch=_useReducer2[1];var allLayoutData=(0,_react.useMemo)(function(){return(0,_lodash.get)(layouts,[slug],{});},[layouts,slug]);var currentContentTypeLayoutData=(0,_react.useMemo)(function(){return(0,_lodash.get)(allLayoutData,['contentType'],{});},[allLayoutData]);var currentContentTypeLayout=(0,_react.useMemo)(function(){return(0,_lodash.get)(currentContentTypeLayoutData,['layouts','edit'],[]);},[currentContentTypeLayoutData]);var currentContentTypeLayoutRelations=(0,_react.useMemo)(function(){return(0,_lodash.get)(currentContentTypeLayoutData,['layouts','editRelations'],[]);},[currentContentTypeLayoutData]);var currentContentTypeSchema=(0,_react.useMemo)(function(){return(0,_lodash.get)(currentContentTypeLayoutData,['schema'],{});},[currentContentTypeLayoutData]);var getFieldMetas=(0,_react.useCallback)(function(fieldName){return(0,_lodash.get)(currentContentTypeLayoutData,['metadatas',fieldName,'edit'],{});},[currentContentTypeLayoutData]);var getField=(0,_react.useCallback)(function(fieldName){return(0,_lodash.get)(currentContentTypeSchema,['attributes',fieldName],{});},[currentContentTypeSchema]);var getFieldType=(0,_react.useCallback)(function(fieldName){return(0,_lodash.get)(getField(fieldName),['type'],'');},[getField]);var getFieldComponentUid=(0,_react.useCallback)(function(fieldName){return(0,_lodash.get)(getField(fieldName),['component'],'');},[getField]);// Check if a block is a dynamic zone +var isDynamicZone=(0,_react.useCallback)(function(block){return block.every(function(subBlock){return subBlock.every(function(obj){return getFieldType(obj.name)==='dynamiczone';});});},[getFieldType]);(0,_react.useEffect)(function(){// Force state to be cleared when navigation from one entry to another +dispatch({type:'RESET_PROPS'});dispatch({type:'SET_LAYOUT_DATA',formattedContentTypeLayout:formatLayoutRef.current(currentContentTypeLayout,currentContentTypeSchema.attributes)});},[currentContentTypeLayout,currentContentTypeSchema.attributes]);var _reducerState$toJS=reducerState.toJS(),formattedContentTypeLayout=_reducerState$toJS.formattedContentTypeLayout,isDraggingComponent=_reducerState$toJS.isDraggingComponent;// We can't use the getQueryParameters helper here because the search +// can contain 'redirectUrl' several times since we can navigate between documents +var redirectURL=search.split('redirectUrl=').filter(function(_,index){return index!==0;}).join('redirectUrl=');var redirectToPreviousPage=function redirectToPreviousPage(){return push(redirectURL);};return/*#__PURE__*/_react["default"].createElement(_EditViewProvider["default"],{allLayoutData:allLayoutData,components:components,layout:currentContentTypeLayoutData,isDraggingComponent:isDraggingComponent,setIsDraggingComponent:function setIsDraggingComponent(){dispatch({type:'SET_IS_DRAGGING_COMPONENT'});},unsetIsDraggingComponent:function unsetIsDraggingComponent(){dispatch({type:'UNSET_IS_DRAGGING_COMPONENT'});}},/*#__PURE__*/_react["default"].createElement(_EditViewDataManagerProvider["default"],{allLayoutData:allLayoutData,redirectToPreviousPage:redirectToPreviousPage,slug:slug},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.BackHeader,{onClick:redirectToPreviousPage}),/*#__PURE__*/_react["default"].createElement(_Container["default"],{className:"container-fluid"},/*#__PURE__*/_react["default"].createElement(_Header["default"],null),/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{paddingTop:3}},/*#__PURE__*/_react["default"].createElement("div",{className:"col-md-12 col-lg-9",style:{marginBottom:13}},formattedContentTypeLayout.map(function(block,blockIndex){if(isDynamicZone(block)){var name=block[0][0].name;var _getField=getField(name),max=_getField.max,min=_getField.min;return/*#__PURE__*/_react["default"].createElement(_DynamicZone["default"],{key:blockIndex,name:name,max:max,min:min});}return/*#__PURE__*/_react["default"].createElement(_FormWrapper["default"],{key:blockIndex},block.map(function(fieldsBlock,fieldsBlockIndex){return/*#__PURE__*/_react["default"].createElement("div",{className:"row",key:fieldsBlockIndex},fieldsBlock.map(function(_ref2,fieldIndex){var name=_ref2.name,size=_ref2.size;var isComponent=getFieldType(name)==='component';if(isComponent){var componentUid=getFieldComponentUid(name);var isRepeatable=(0,_lodash.get)(getField(name),'repeatable',false);var _getField2=getField(name),_max=_getField2.max,_min=_getField2.min;var label=(0,_lodash.get)(getFieldMetas(name),'label',componentUid);return/*#__PURE__*/_react["default"].createElement(_FieldComponent["default"],{key:componentUid,componentUid:componentUid,isRepeatable:isRepeatable,label:label,max:_max,min:_min,name:name});}return/*#__PURE__*/_react["default"].createElement("div",{className:"col-".concat(size),key:name},/*#__PURE__*/_react["default"].createElement(_Inputs["default"],{autoFocus:blockIndex===0&&fieldsBlockIndex===0&&fieldIndex===0,keys:name,layout:currentContentTypeLayoutData,name:name,onChange:function onChange(){}}));}));}));})),/*#__PURE__*/_react["default"].createElement("div",{className:"col-md-12 col-lg-3"},currentContentTypeLayoutRelations.length>0&&/*#__PURE__*/_react["default"].createElement(_components.SubWrapper,{style:{padding:'0 20px 1px',marginBottom:'25px'}},/*#__PURE__*/_react["default"].createElement("div",{style:{paddingTop:'22px'}},currentContentTypeLayoutRelations.map(function(relationName){var relation=(0,_lodash.get)(currentContentTypeLayoutData,['schema','attributes',relationName],{});var relationMetas=(0,_lodash.get)(currentContentTypeLayoutData,['metadatas',relationName,'edit'],{});return/*#__PURE__*/_react["default"].createElement(_SelectWrapper["default"],(0,_extends2["default"])({},relation,relationMetas,{key:relationName,name:relationName,relationsType:relation.relationType}));}))),/*#__PURE__*/_react["default"].createElement(_components.LinkWrapper,null,/*#__PURE__*/_react["default"].createElement("ul",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LiLink,{message:{id:'app.links.configure-view'},icon:"layout",key:"".concat(_pluginId["default"],".link"),url:"".concat(isSingleType?"".concat(pathname,"/"):'',"ctm-configurations/edit-settings/content-types"),onClick:function onClick(){// emitEvent('willEditContentTypeLayoutFromEditView'); +}}),(0,_getComponents["default"])('editView','right.links',plugins,currentEnvironment,slug))))))));};exports.EditView=EditView;EditView.defaultProps={currentEnvironment:'production',emitEvent:function emitEvent(){},plugins:{}};EditView.propTypes={currentEnvironment:_propTypes["default"].string,components:_propTypes["default"].array.isRequired,emitEvent:_propTypes["default"].func,layouts:_propTypes["default"].object.isRequired,slug:_propTypes["default"].string.isRequired,plugins:_propTypes["default"].object};var _default=(0,_react.memo)(EditView);exports["default"]=_default; + +/***/ }), + +/***/ 1967: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var EditViewDataManagerContext=(0,_react.createContext)();var _default=EditViewDataManagerContext;exports["default"]=_default; + +/***/ }), + +/***/ 1968: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var EditViewContext=(0,_react.createContext)();var _default=EditViewContext;exports["default"]=_default; + +/***/ }), + +/***/ 1969: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n margin: 0 !important;\n padding: 0 20px !important;\n\n ","\n"]);_templateObject=function _templateObject(){return data;};return data;}var NonRepeatableWrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isEmpty=_ref.isEmpty,isFromDynamicZone=_ref.isFromDynamicZone;if(isEmpty){return"\n position: relative;\n height: 108px;\n margin-bottom: 21px !important;\n background-color: #fafafb;\n text-align: center;\n cursor: pointer;\n border-radius: 2px;\n\n > button {\n position: absolute;\n top: 30px;\n left: calc(50% - 18px);\n height: 36px;\n width: 36px;\n line-height: 38px;\n border-radius: 50%;\n background-color: #f3f4f4;\n cursor: pointer;\n }\n border: 1px solid transparent;\n\n &:hover {\n border: 1px solid #aed4fb;\n background-color: #e6f0fb;\n > button {\n :before,\n :after {\n background-color: #007eff;\n }\n background-color: #aed4fb;\n }\n\n > p {\n color: #007eff;\n }\n }\n ";}if(isFromDynamicZone){return"\n background-color: #fff;\n padding: 0 10px !important;\n ";}return"\n padding-top: 25px !important;\n background-color: #f7f8f8;\n margin-bottom: 18px !important;\n ";});var _default=NonRepeatableWrapper;exports["default"]=_default; + +/***/ }), + +/***/ 1970: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n height: 36px;\n width: 36px;\n background-color: #f3f4f4;\n border-radius: 50%;\n text-align: center;\n\n :focus {\n outline: 0;\n }\n\n :before {\n ","\n }\n :after {\n ","\n }\n\n :before,\n :after {\n background-color: #b4b6ba;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var beforeStyle="\n content: ' ';\n position: absolute;\n display: block;\n width: 14px;\n height: 2px;\n left: 11px;\n top: 17px;\n bottom: 10px;\n z-index: 9;\n";var afterStyle="\n content: ' ';\n position: absolute;\n display: block;\n height: 14px;\n width: 2px;\n left: 17px;\n top: 11px;\n right: 10px;\n z-index: 9;\n";var Button=_styledComponents["default"].button(_templateObject(),beforeStyle,afterStyle);var _default=Button;exports["default"]=_default; + +/***/ }), + +/***/ 1971: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _reactRouterDom=__webpack_require__(30);var _lodash=__webpack_require__(8);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _useEditView2=_interopRequireDefault(__webpack_require__(1922));var _SelectOne=_interopRequireDefault(__webpack_require__(2077));var _SelectMany=_interopRequireDefault(__webpack_require__(2078));var _components=__webpack_require__(2080);function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i0;var hasMinError=dynamicZoneErrors.length>0&&(0,_lodash.get)(dynamicZoneErrors,[0,'id'],'').includes('min');var hasRequiredError=hasError&&!hasMinError;var hasMaxError=hasError&&(0,_lodash.get)(dynamicZoneErrors,[0,'id'],'')==='components.Input.error.validation.max';return/*#__PURE__*/_react["default"].createElement(_DynamicZoneWrapper["default"],null,getDynamicDisplayedComponents().length>0&&/*#__PURE__*/_react["default"].createElement(_Label["default"],null,/*#__PURE__*/_react["default"].createElement("p",null,metas.label),/*#__PURE__*/_react["default"].createElement("p",null,metas.description)),/*#__PURE__*/_react["default"].createElement(_ComponentWrapper["default"],null,getDynamicDisplayedComponents().map(function(componentUid,index){var showDownIcon=dynamicDisplayedComponentsLength>0&&index0&&index>0;return/*#__PURE__*/_react["default"].createElement("div",{key:index},/*#__PURE__*/_react["default"].createElement("div",{className:"arrow-icons"},showDownIcon&&/*#__PURE__*/_react["default"].createElement(_RoundCTA["default"],{className:"arrow-btn arrow-down",onClick:function onClick(){return moveComponentDown(name,index);}},/*#__PURE__*/_react["default"].createElement(_icons.Arrow,null)),showUpIcon&&/*#__PURE__*/_react["default"].createElement(_RoundCTA["default"],{className:"arrow-btn arrow-up",onClick:function onClick(){return moveComponentUp(name,index);}},/*#__PURE__*/_react["default"].createElement(_icons.Arrow,null))),/*#__PURE__*/_react["default"].createElement(_RoundCTA["default"],{onClick:function onClick(){return removeComponentFromDynamicZone(name,index);}},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:"trash"})),/*#__PURE__*/_react["default"].createElement(_FieldComponent["default"],{componentUid:componentUid,componentFriendlyName:getDynamicComponentInfos(componentUid).name,icon:getDynamicComponentInfos(componentUid).icon,label:"",name:"".concat(name,".").concat(index),isFromDynamicZone:true}));})),/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,/*#__PURE__*/_react["default"].createElement(_Button["default"],{type:"button",hasError:hasError,className:isOpen&&'isOpen',onClick:function onClick(){if(dynamicDisplayedComponentsLength1?'.plural':'.singular'),values:{count:missingComponentNumber}})),/*#__PURE__*/_react["default"].createElement("div",{className:"info"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.DynamicZone.add-compo"),values:{componentName:name}})),/*#__PURE__*/_react["default"].createElement(_ComponentsPicker["default"],{isOpen:isOpen},/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement("p",{className:"componentPickerTitle"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.DynamicZone.pick-compo")})),/*#__PURE__*/_react["default"].createElement("div",{className:"componentsList"},dynamicZoneAvailableComponents.map(function(componentUid){var _getDynamicComponentI=getDynamicComponentInfos(componentUid),icon=_getDynamicComponentI.icon,friendlyName=_getDynamicComponentI.name;return/*#__PURE__*/_react["default"].createElement(_DynamicComponentCard["default"],{key:componentUid,componentUid:componentUid,friendlyName:friendlyName,icon:icon,onClick:function onClick(){setIsOpen(false);var shouldCheckErrors=hasError;addComponentToDynamicZone(name,componentUid,shouldCheckErrors);}});}))))));};exports.DynamicZone=DynamicZone;DynamicZone.defaultProps={max:Infinity,min:-Infinity};DynamicZone.propTypes={max:_propTypes["default"].number,min:_propTypes["default"].number,name:_propTypes["default"].string.isRequired};var _default=DynamicZone;exports["default"]=_default; + +/***/ }), + +/***/ 2045: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _NonRepeatableWrapper=_interopRequireDefault(__webpack_require__(1969));var _PlusButton=_interopRequireDefault(__webpack_require__(1970));var _P=_interopRequireDefault(__webpack_require__(2046));var ComponentInitializer=function ComponentInitializer(_ref){var componentUid=_ref.componentUid,name=_ref.name;var _useDataManager=(0,_useDataManager2["default"])(),addNonRepeatableComponentToField=_useDataManager.addNonRepeatableComponentToField;return/*#__PURE__*/_react["default"].createElement(_NonRepeatableWrapper["default"],{isEmpty:true},/*#__PURE__*/_react["default"].createElement(_PlusButton["default"],{onClick:function onClick(){return addNonRepeatableComponentToField(name,componentUid);},type:"button"}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.empty-repeatable")},function(msg){return/*#__PURE__*/_react["default"].createElement(_P["default"],{style:{paddingTop:78}},msg);}));};ComponentInitializer.defaultProps={name:''};ComponentInitializer.propTypes={componentUid:_propTypes["default"].string.isRequired,name:_propTypes["default"].string};var _default=ComponentInitializer;exports["default"]=_default; + +/***/ }), + +/***/ 2046: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n color: #9ea7b8;\n font-size: 13px;\n font-weight: 500;\n"]);_templateObject=function _templateObject(){return data;};return data;}var P=_styledComponents["default"].p(_templateObject());var _default=P;exports["default"]=_default; + +/***/ }), + +/***/ 2047: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _NonRepeatableWrapper=_interopRequireDefault(__webpack_require__(1969));var _Inputs=_interopRequireDefault(__webpack_require__(1939));var _FieldComponent=_interopRequireDefault(__webpack_require__(1923));/* eslint-disable react/no-array-index-key */ /* eslint-disable import/no-cycle */var NonRepeatableComponent=function NonRepeatableComponent(_ref){var fields=_ref.fields,isFromDynamicZone=_ref.isFromDynamicZone,name=_ref.name,schema=_ref.schema;var getField=function getField(fieldName){return(0,_lodash.get)(schema,['schema','attributes',fieldName],{});};var getMeta=function getMeta(fieldName){return(0,_lodash.get)(schema,['metadatas',fieldName,'edit'],{});};return/*#__PURE__*/_react["default"].createElement(_NonRepeatableWrapper["default"],{isFromDynamicZone:isFromDynamicZone},fields.map(function(fieldRow,key){return/*#__PURE__*/_react["default"].createElement("div",{className:"row",key:key},fieldRow.map(function(field){var currentField=getField(field.name);var isComponent=(0,_lodash.get)(currentField,'type','')==='component';var keys="".concat(name,".").concat(field.name);if(isComponent){var componentUid=currentField.component;var metas=getMeta(field.name);return/*#__PURE__*/_react["default"].createElement(_FieldComponent["default"],{key:field.name,componentUid:componentUid,isRepeatable:currentField.repeatable,label:metas.label,max:currentField.max,min:currentField.min,name:keys});}return/*#__PURE__*/_react["default"].createElement("div",{key:field.name,className:"col-".concat(field.size)},/*#__PURE__*/_react["default"].createElement(_Inputs["default"],{keys:keys,layout:schema,name:field.name,onChange:function onChange(){}}));}));}));};NonRepeatableComponent.defaultProps={fields:[],isFromDynamicZone:false};NonRepeatableComponent.propTypes={fields:_propTypes["default"].array,isFromDynamicZone:_propTypes["default"].bool,name:_propTypes["default"].string.isRequired,schema:_propTypes["default"].object.isRequired};var _default=NonRepeatableComponent;exports["default"]=_default; + +/***/ }), + +/***/ 2048: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _classnames=_interopRequireDefault(__webpack_require__(23));var _styles=__webpack_require__(21);var _core=__webpack_require__(53);var _InputJSON=_interopRequireDefault(__webpack_require__(2049));var _Wrapper=_interopRequireDefault(__webpack_require__(2061));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var InputJSONWithErrors=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(InputJSONWithErrors,_React$Component);var _super=_createSuper(InputJSONWithErrors);function InputJSONWithErrors(){var _this;(0,_classCallCheck2["default"])(this,InputJSONWithErrors);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleChange",function(e){_this.props.onChange(e);});return _this;}(0,_createClass2["default"])(InputJSONWithErrors,[{key:"render",value:function render(){var _this2=this;var _this$props=this.props,autoFocus=_this$props.autoFocus,className=_this$props.className,deactivateErrorHighlight=_this$props.deactivateErrorHighlight,disabled=_this$props.disabled,inputError=_this$props.error,inputClassName=_this$props.inputClassName,inputDescription=_this$props.inputDescription,inputStyle=_this$props.inputStyle,label=_this$props.label,name=_this$props.name,onBlur=_this$props.onBlur,placeholder=_this$props.placeholder,resetProps=_this$props.resetProps,tabIndex=_this$props.tabIndex,validations=_this$props.validations,value=_this$props.value,rest=(0,_objectWithoutProperties2["default"])(_this$props,["autoFocus","className","deactivateErrorHighlight","disabled","error","inputClassName","inputDescription","inputStyle","label","name","onBlur","placeholder","resetProps","tabIndex","validations","value"]);var handleBlur=(0,_lodash.isFunction)(onBlur)?onBlur:this.handleBlur;return/*#__PURE__*/_react["default"].createElement(_core.Error,{inputError:inputError,name:name,type:"text",validations:validations},function(_ref){var canCheck=_ref.canCheck,onBlur=_ref.onBlur,error=_ref.error,dispatch=_ref.dispatch;var hasError=error&&error!==null;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{className:"".concat((0,_classnames["default"])(!(0,_lodash.isEmpty)(className)&&className)," ").concat(hasError?'bordered':'')},/*#__PURE__*/_react["default"].createElement(_styles.Label,{htmlFor:name},label),/*#__PURE__*/_react["default"].createElement(_InputJSON["default"],(0,_extends2["default"])({},rest,{autoFocus:autoFocus,className:inputClassName,disabled:disabled,deactivateErrorHighlight:deactivateErrorHighlight,name:name,onBlur:(0,_lodash.isFunction)(handleBlur)?handleBlur:onBlur,onChange:function onChange(e){if(!canCheck){dispatch({type:'SET_CHECK'});}dispatch({type:'SET_ERROR',error:null});_this2.handleChange(e);},placeholder:placeholder,resetProps:resetProps,style:inputStyle,tabIndex:tabIndex,value:value})),!hasError&&inputDescription&&/*#__PURE__*/_react["default"].createElement(_styles.Description,null,inputDescription),hasError&&/*#__PURE__*/_react["default"].createElement(_styles.ErrorMessage,null,error));});}}]);return InputJSONWithErrors;}(_react["default"].Component);InputJSONWithErrors.defaultProps={autoFocus:false,className:'',deactivateErrorHighlight:false,didCheckErrors:false,disabled:false,error:null,inputClassName:'',inputDescription:'',inputStyle:{},label:'',labelClassName:'',labelStyle:{},onBlur:false,placeholder:'',resetProps:false,tabIndex:'0',validations:{},value:null};InputJSONWithErrors.propTypes={autoFocus:_propTypes["default"].bool,className:_propTypes["default"].string,deactivateErrorHighlight:_propTypes["default"].bool,didCheckErrors:_propTypes["default"].bool,disabled:_propTypes["default"].bool,error:_propTypes["default"].string,inputClassName:_propTypes["default"].string,inputDescription:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].func,_propTypes["default"].shape({id:_propTypes["default"].string,params:_propTypes["default"].object})]),inputStyle:_propTypes["default"].object,label:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].func,_propTypes["default"].shape({id:_propTypes["default"].string,params:_propTypes["default"].object})]),labelClassName:_propTypes["default"].string,labelStyle:_propTypes["default"].object,name:_propTypes["default"].string.isRequired,onBlur:_propTypes["default"].oneOfType([_propTypes["default"].bool,_propTypes["default"].func]),onChange:_propTypes["default"].func.isRequired,placeholder:_propTypes["default"].string,resetProps:_propTypes["default"].bool,tabIndex:_propTypes["default"].string,validations:_propTypes["default"].object,value:_propTypes["default"].oneOfType([_propTypes["default"].array,_propTypes["default"].object,_propTypes["default"].bool,_propTypes["default"].string,_propTypes["default"].number])};var _default=InputJSONWithErrors;exports["default"]=_default; + +/***/ }), + +/***/ 2049: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _codemirror=_interopRequireDefault(__webpack_require__(1912));__webpack_require__(2050);__webpack_require__(2051);__webpack_require__(2052);__webpack_require__(2053);__webpack_require__(2054);__webpack_require__(2055);__webpack_require__(2057);var _lodash=__webpack_require__(8);var _jsonlint=_interopRequireDefault(__webpack_require__(2059));var _components=_interopRequireDefault(__webpack_require__(2060));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var WAIT=600;var stringify=JSON.stringify;var DEFAULT_THEME='3024-night';var InputJSON=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(InputJSON,_React$Component);var _super=_createSuper(InputJSON);function InputJSON(props){var _this;(0,_classCallCheck2["default"])(this,InputJSON);_this=_super.call(this,props);(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"timer",null);(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"setInitValue",function(){var value=_this.props.value;try{_this.setState({hasInitValue:true});if(value===null)return _this.codeMirror.setValue('');return _this.codeMirror.setValue(stringify(value,null,2));}catch(err){return _this.setState({error:true});}});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"setSize",function(){return _this.codeMirror.setSize('100%','auto');});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getContentAtLine",function(line){return _this.codeMirror.getLine(line);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getEditorOption",function(opt){return _this.codeMirror.getOption(opt);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getValue",function(){return _this.codeMirror.getValue();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"markSelection",function(_ref){var message=_ref.message;var line=parseInt(message.split(':')[0].split('line ')[1],10)-1;var content=_this.getContentAtLine(line);if(content==='{'){line+=1;content=_this.getContentAtLine(line);}var chEnd=content.length;var chStart=chEnd-(0,_lodash.trimStart)(content,' ').length;var markedText=_this.codeMirror.markText({line:line,ch:chStart},{line:line,ch:chEnd},{className:'colored'});_this.setState({markedText:markedText});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleBlur",function(_ref2){var target=_ref2.target;var _this$props=_this.props,name=_this$props.name,onBlur=_this$props.onBlur;if(target===undefined){// codemirror catches multiple events +onBlur({target:{name:name,type:'json',value:_this.getValue()}});}});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleChange",function(){var hasInitValue=_this.state.hasInitValue;var _this$props2=_this.props,name=_this$props2.name,onChange=_this$props2.onChange;var value=_this.codeMirror.getValue();if(!hasInitValue){_this.setState({hasInitValue:true});// Fix for the input firing on onChange event on mount +return;}if(value===''){value=null;}// Update the parent +onChange({target:{name:name,value:value,type:'json'}});// Remove higlight error +if(_this.state.markedText){_this.state.markedText.clear();_this.setState({markedText:null,error:null});}clearTimeout(_this.timer);_this.timer=setTimeout(function(){return _this.testJSON(_this.codeMirror.getValue());},WAIT);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"testJSON",function(value){try{_jsonlint["default"].parse(value);}catch(err){_this.markSelection(err);}});_this.editor=_react["default"].createRef();_this.state={error:false,markedText:null};return _this;}(0,_createClass2["default"])(InputJSON,[{key:"componentDidMount",value:function componentDidMount(){// Init codemirror component +this.codeMirror=_codemirror["default"].fromTextArea(this.editor.current,{autoCloseBrackets:true,lineNumbers:true,matchBrackets:true,mode:'application/json',readOnly:this.props.disabled,smartIndent:true,styleSelectedText:true,tabSize:2,theme:DEFAULT_THEME,fontSize:'13px'});this.codeMirror.on('change',this.handleChange);this.codeMirror.on('blur',this.handleBlur);this.setSize();this.setInitValue();}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if((0,_lodash.isEmpty)(prevProps.value)&&!(0,_lodash.isEmpty)(this.props.value)&&!this.state.hasInitValue){this.setInitValue();}}},{key:"render",value:function render(){if(this.state.error){return/*#__PURE__*/_react["default"].createElement("div",null,"error json");}return/*#__PURE__*/_react["default"].createElement(_components["default"],null,/*#__PURE__*/_react["default"].createElement("textarea",{ref:this.editor,autoComplete:"off",id:this.props.name,defaultValue:""}));}}]);return InputJSON;}(_react["default"].Component);InputJSON.defaultProps={disabled:false,onBlur:function onBlur(){},onChange:function onChange(){},value:null};InputJSON.propTypes={disabled:_propTypes["default"].bool,name:_propTypes["default"].string.isRequired,onBlur:_propTypes["default"].func,onChange:_propTypes["default"].func,value:_propTypes["default"].any};var _default=InputJSON;exports["default"]=_default; + +/***/ }), + +/***/ 2059: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* Jison generated parser */ /* eslint-disable */var jsonlint=function(){var parser={trace:function trace(){},yy:{},symbols_:{"error":2,"JSONString":3,"STRING":4,"JSONNumber":5,"NUMBER":6,"JSONNullLiteral":7,"NULL":8,"JSONBooleanLiteral":9,"TRUE":10,"FALSE":11,"JSONText":12,"JSONValue":13,"EOF":14,"JSONObject":15,"JSONArray":16,"{":17,"}":18,"JSONMemberList":19,"JSONMember":20,":":21,",":22,"[":23,"]":24,"JSONElementList":25,"$accept":0,"$end":1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:// replace escaped characters with actual character +this.$=yytext.replace(/\\(\\|")/g,"$"+"1").replace(/\\n/g,'\n').replace(/\\r/g,'\r').replace(/\\t/g,'\t').replace(/\\v/g,'\v').replace(/\\f/g,'\f').replace(/\\b/g,'\b');break;case 2:this.$=Number(yytext);break;case 3:this.$=null;break;case 4:this.$=true;break;case 5:this.$=false;break;case 6:return this.$=$$[$0-1];break;case 13:this.$={};break;case 14:this.$=$$[$0-1];break;case 15:this.$=[$$[$0-2],$$[$0]];break;case 16:this.$={};this.$[$$[$0][0]]=$$[$0][1];break;case 17:this.$=$$[$0-2];$$[$0-2][$$[$0][0]]=$$[$0][1];break;case 18:this.$=[];break;case 19:this.$=$$[$0-1];break;case 20:this.$=[$$[$0]];break;case 21:this.$=$$[$0-2];$$[$0-2].push($$[$0]);break;}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function parseError(str,hash){throw new Error(str);},parse:function parse(input){var self=this,stack=[0],vstack=[null],// semantic value stack +lstack=[],// location stack +table=this.table,yytext='',yylineno=0,yyleng=0,recovering=0,TERROR=2,EOF=1;//this.reductionCount = this.shiftCount = 0; +this.lexer.setInput(input);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;if(typeof this.lexer.yylloc=='undefined')this.lexer.yylloc={};var yyloc=this.lexer.yylloc;lstack.push(yyloc);if(typeof this.yy.parseError==='function')this.parseError=this.yy.parseError;function popStack(n){stack.length=stack.length-2*n;vstack.length=vstack.length-n;lstack.length=lstack.length-n;}function lex(){var token;token=self.lexer.lex()||1;// $end = 1 +// if token isn't its numeric value, convert +if(typeof token!=='number'){token=self.symbols_[token]||token;}return token;}var symbol,preErrorSymbol,state,action,a,r,yyval={},p,len,newState,expected;while(true){// retreive state number from top of stack +state=stack[stack.length-1];// use default actions if available +if(this.defaultActions[state]){action=this.defaultActions[state];}else{if(symbol==null)symbol=lex();// read action for current state and first input +action=table[state]&&table[state][symbol];}// handle parse error +_handle_error:if(typeof action==='undefined'||!action.length||!action[0]){if(!recovering){// Report error +expected=[];for(p in table[state]){if(this.terminals_[p]&&p>2){expected.push("'"+this.terminals_[p]+"'");}}var errStr='';if(this.lexer.showPosition){errStr='Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ')+", got '"+this.terminals_[symbol]+"'";}else{errStr='Parse error on line '+(yylineno+1)+": Unexpected "+(symbol==1/*EOF*/?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'");}this.parseError(errStr,{text:this.lexer.match,token:this.terminals_[symbol]||symbol,line:this.lexer.yylineno,loc:yyloc,expected:expected});}// just recovered from another error +if(recovering==3){if(symbol==EOF){throw new Error(errStr||'Parsing halted.');}// discard current lookahead and grab another +yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc;symbol=lex();}// try to recover from error +while(1){// check for error recovery rule in this state +if(TERROR.toString()in table[state]){break;}if(state==0){throw new Error(errStr||'Parsing halted.');}popStack(1);state=stack[stack.length-1];}preErrorSymbol=symbol;// save the lookahead token +symbol=TERROR;// insert generic error symbol as new lookahead +state=stack[stack.length-1];action=table[state]&&table[state][TERROR];recovering=3;// allow 3 real symbols to be shifted before reporting a new error +}// this shouldn't happen, unless resolve defaults are off +if(action[0]instanceof Array&&action.length>1){throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);}switch(action[0]){case 1:// shift +//this.shiftCount++; +stack.push(symbol);vstack.push(this.lexer.yytext);lstack.push(this.lexer.yylloc);stack.push(action[1]);// push state +symbol=null;if(!preErrorSymbol){// normal execution/no error +yyleng=this.lexer.yyleng;yytext=this.lexer.yytext;yylineno=this.lexer.yylineno;yyloc=this.lexer.yylloc;if(recovering>0)recovering--;}else{// error just occurred, resume old lookahead f/ before error +symbol=preErrorSymbol;preErrorSymbol=null;}break;case 2:// reduce +//this.reductionCount++; +len=this.productions_[action[1]][1];// perform semantic action +yyval.$=vstack[vstack.length-len];// default to $$ = $1 +// default location, uses first token for firsts, last for lasts +yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column};r=this.performAction.call(yyval,yytext,yyleng,yylineno,this.yy,action[1],vstack,lstack);if(typeof r!=='undefined'){return r;}// pop off stack +if(len){stack=stack.slice(0,-1*len*2);vstack=vstack.slice(0,-1*len);lstack=lstack.slice(0,-1*len);}stack.push(this.productions_[action[1]][0]);// push nonterminal (reduce) +vstack.push(yyval.$);lstack.push(yyval._$);// goto new state = table[STATE][NONTERMINAL] +newState=table[stack[stack.length-2]][stack[stack.length-1]];stack.push(newState);break;case 3:// accept +return true;}}return true;}};/* Jison generated lexer */var lexer=function(){var lexer={EOF:1,parseError:function parseError(str,hash){if(this.yy.parseError){this.yy.parseError(str,hash);}else{throw new Error(str);}},setInput:function setInput(input){this._input=input;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match='';this.conditionStack=['INITIAL'];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};return this;},input:function input(){var ch=this._input[0];this.yytext+=ch;this.yyleng++;this.match+=ch;this.matched+=ch;var lines=ch.match(/\n/);if(lines)this.yylineno++;this._input=this._input.slice(1);return ch;},unput:function unput(ch){this._input=ch+this._input;return this;},more:function more(){this._more=true;return this;},less:function less(n){this._input=this.match.slice(n)+this._input;},pastInput:function pastInput(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?'...':'')+past.substr(-20).replace(/\n/g,"");},upcomingInput:function upcomingInput(){var next=this.match;if(next.length<20){next+=this._input.substr(0,20-next.length);}return(next.substr(0,20)+(next.length>20?'...':'')).replace(/\n/g,"");},showPosition:function showPosition(){var pre=this.pastInput();var c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+"\n"+c+"^";},next:function next(){if(this.done){return this.EOF;}if(!this._input)this.done=true;var token,match,tempMatch,index,col,lines;if(!this._more){this.yytext='';this.match='';}var rules=this._currentRules();for(var i=0;imatch[0].length)){match=tempMatch;index=i;if(!this.options.flex)break;}}if(match){lines=match[0].match(/\n.*/g);if(lines)this.yylineno+=lines.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-1:this.yylloc.last_column+match[0].length};this.yytext+=match[0];this.match+=match[0];this.yyleng=this.yytext.length;this._more=false;this._input=this._input.slice(match[0].length);this.matched+=match[0];token=this.performAction.call(this,this.yy,this,rules[index],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(token)return token;else return;}if(this._input===""){return this.EOF;}else{this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),{text:"",token:null,line:this.yylineno});}},lex:function lex(){var r=this.next();if(typeof r!=='undefined'){return r;}else{return this.lex();}},begin:function begin(condition){this.conditionStack.push(condition);},popState:function popState(){return this.conditionStack.pop();},_currentRules:function _currentRules(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;},topState:function topState(){return this.conditionStack[this.conditionStack.length-2];},pushState:function begin(condition){this.begin(condition);}};lexer.options={};lexer.performAction=function anonymous(yy,yy_,$avoiding_name_collisions,YY_START){var YYSTATE=YY_START;switch($avoiding_name_collisions){case 0:/* skip whitespace */break;case 1:return 6;break;case 2:yy_.yytext=yy_.yytext.substr(1,yy_.yyleng-2);return 4;break;case 3:return 17;break;case 4:return 18;break;case 5:return 23;break;case 6:return 24;break;case 7:return 22;break;case 8:return 21;break;case 9:return 10;break;case 10:return 11;break;case 11:return 8;break;case 12:return 14;break;case 13:return'INVALID';break;}};lexer.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/];lexer.conditions={"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],"inclusive":true}};;return lexer;}();parser.lexer=lexer;return parser;}();if(true){exports.parser=jsonlint;exports.parse=function(){return jsonlint.parse.apply(jsonlint,arguments);};exports.main=function commonjsMain(args){if(!args[1]){throw new Error('Usage: '+args[0]+' FILE');}};} + +/***/ }), + +/***/ 2060: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n margin-bottom: 3px;\n line-height: 18px;\n\n .CodeMirror {\n font-size: 13px !important;\n }\n\n > div {\n border-radius: 3px;\n\n > div:last-of-type {\n min-height: 315px;\n max-height: 635px;\n font-weight: 500;\n font-size: 1.3rem !important;\n }\n }\n\n .colored {\n background-color: yellow;\n color: black !important;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2061: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding-bottom: 26px;\n\n label {\n margin-bottom: 1rem;\n line-height: 18px;\n display: block;\n }\n > div {\n border-radius: 4px;\n border: 1px solid #090300;\n }\n &.bordered {\n > div {\n border-color: red;\n }\n }\n > p {\n width 100%;\n padding-top: 14px;\n font-size: 1.2rem;\n line-height: normal;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: -11px;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2062: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _lodash=__webpack_require__(8);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _styles=__webpack_require__(21);var _core=__webpack_require__(53);var _InputFile=_interopRequireDefault(__webpack_require__(2063));var _Container=_interopRequireDefault(__webpack_require__(2076));/** + * + * InputFileWithErrors + */function InputFileWithErrors(_ref){var className=_ref.className,inputError=_ref.error,inputDescription=_ref.inputDescription,label=_ref.label,multiple=_ref.multiple,name=_ref.name,onChange=_ref.onChange,style=_ref.style,validations=_ref.validations,value=_ref.value;var _useState=(0,_react.useState)(null),_useState2=(0,_slicedToArray2["default"])(_useState,2),fileLabel=_useState2[0],setFilelabel=_useState2[1];(0,_react.useEffect)(function(){if((0,_lodash.isArray)(value)&&value.length>0){setFilelabel(1);}else{setFilelabel(null);}},[value]);var setLabel=function setLabel(label){setFilelabel(label);};return/*#__PURE__*/_react["default"].createElement(_core.Error,{inputError:inputError,name:name,type:"text",validations:validations},function(props){var error=props.error;var hasError=error&&error!==null;return/*#__PURE__*/_react["default"].createElement(_Container["default"],{className:className!==''&&className,style:style},/*#__PURE__*/_react["default"].createElement(_styles.Label,{htmlFor:"".concat(name,"NotNeeded")},label,multiple&&fileLabel&&/*#__PURE__*/_react["default"].createElement("span",{className:"labelNumber"},"\xA0(",fileLabel,"/",value.length,")")),/*#__PURE__*/_react["default"].createElement(_InputFile["default"],(0,_extends2["default"])({},props,{error:hasError,onChange:onChange,value:value,setLabel:setLabel,name:name,multiple:multiple})),!hasError&&inputDescription&&/*#__PURE__*/_react["default"].createElement(_styles.Description,null,inputDescription),hasError&&/*#__PURE__*/_react["default"].createElement(_styles.ErrorMessage,null,error));});}InputFileWithErrors.defaultProps={className:'',error:null,inputDescription:'',label:'',multiple:false,style:{},validations:{},value:[]};InputFileWithErrors.propTypes={className:_propTypes["default"].string,error:_propTypes["default"].string,inputDescription:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].func,_propTypes["default"].shape({id:_propTypes["default"].string,params:_propTypes["default"].object})]),label:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].func,_propTypes["default"].shape({id:_propTypes["default"].string,params:_propTypes["default"].object})]),multiple:_propTypes["default"].bool,name:_propTypes["default"].string.isRequired,onChange:_propTypes["default"].func.isRequired,style:_propTypes["default"].object,validations:_propTypes["default"].object,value:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].object,_propTypes["default"].array])};var _default=(0,_react.memo)(InputFileWithErrors);exports["default"]=_default; + +/***/ }), + +/***/ 2063: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _InputMedia=_interopRequireDefault(__webpack_require__(2064));// import { InputFile as Input } from 'strapi-helper-plugin'; +function InputFile(_ref){var onBlur=_ref.onBlur,_onChange=_ref.onChange,multiple=_ref.multiple,error=_ref.error,dispatch=_ref.dispatch,name=_ref.name,value=_ref.value,setLabel=_ref.setLabel;(0,_react.useEffect)(function(){dispatch({type:'SET_CHECK'});},[dispatch]);return/*#__PURE__*/_react["default"].createElement(_InputMedia["default"],{multiple:multiple,error:error,name:name,onChange:function onChange(e){dispatch({type:'SET_ERROR',error:null});_onChange(e);onBlur(e);},setLabel:setLabel,value:value});}InputFile.defaultProps={dispatch:function dispatch(){},error:false,multiple:false,onBlur:function onBlur(){},setLabel:function setLabel(){},value:[]};InputFile.propTypes={dispatch:_propTypes["default"].func,error:_propTypes["default"].bool,multiple:_propTypes["default"].bool,name:_propTypes["default"].string.isRequired,onBlur:_propTypes["default"].func,onChange:_propTypes["default"].func.isRequired,setLabel:_propTypes["default"].func,value:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].object,_propTypes["default"].array])};var _default=(0,_react.memo)(InputFile);exports["default"]=_default; + +/***/ }), + +/***/ 2064: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _classnames=_interopRequireDefault(__webpack_require__(23));var _ImgPreview=_interopRequireDefault(__webpack_require__(2065));var _InputFileDetails=_interopRequireDefault(__webpack_require__(2072));var _Wrapper=_interopRequireDefault(__webpack_require__(2075));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}/* eslint-disable react/jsx-handler-names */var InputFile=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(InputFile,_React$Component);var _super=_createSuper(InputFile);function InputFile(){var _this;(0,_classCallCheck2["default"])(this,InputFile);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"state",{didDeleteFile:false,isUploading:false,position:0});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"onDrop",function(e){e.preventDefault();_this.addFilesToProps(e.dataTransfer.files);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleClick",function(e){e.preventDefault();e.stopPropagation();_this.inputFile.click();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleChange",function(_ref){var target=_ref.target;return _this.addFilesToProps(target.files);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"addFilesToProps",function(files){if(files.length===0){return;}var initAcc=_this.props.multiple?(0,_lodash.cloneDeep)(_this.props.value):{};var value=Object.keys(files).reduce(function(acc,current){if(_this.props.multiple){acc.push(files[current]);}else if(current==='0'){acc[0]=files[0];}return acc;},initAcc);var target={name:_this.props.name,type:'file',value:value};_this.inputFile.value='';_this.setState({isUploading:!_this.state.isUploading});_this.props.onChange({target:target});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleFileDelete",function(e){e.preventDefault();e.stopPropagation();// Remove the file from props +var value=_this.props.multiple?(0,_lodash.cloneDeep)(_this.props.value):{};// Remove the file from the array if multiple files upload is enable +if(_this.props.multiple){value.splice(_this.state.position,1);}// Update the parent's props +var target={name:_this.props.name,type:'file',value:Object.keys(value).length===0?'':value};_this.props.onChange({target:target});// Update the position of the children +if(_this.props.multiple){var newPosition=value.length===0?0:value.length-1;_this.updateFilePosition(newPosition,value.length);}_this.setState({didDeleteFile:!_this.state.didDeleteFile});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"updateFilePosition",function(newPosition){var size=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_this.props.value.length;var label=size===0?false:newPosition+1;_this.props.setLabel(label);_this.setState({position:newPosition});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"isVisibleDetails",function(){var value=_this.props.value;if(!value||(0,_lodash.isArray)(value)&&value.length===0||(0,_lodash.isObject)(value)&&Object.keys(value).length===0){return false;}return true;});return _this;}(0,_createClass2["default"])(InputFile,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.value!==this.props.value){this.setState({position:0});}}},{key:"render",value:function render(){var _this2=this;var _this$props=this.props,multiple=_this$props.multiple,name=_this$props.name,onChange=_this$props.onChange,value=_this$props.value;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])('form-control','inputFileControlForm',this.props.error&&'is-invalid')},/*#__PURE__*/_react["default"].createElement(_ImgPreview["default"],{didDeleteFile:this.state.didDeleteFile,files:value,isUploading:this.state.isUploading,multiple:multiple,name:name,onChange:onChange,onBrowseClick:this.handleClick,onDrop:this.onDrop,position:this.state.position,updateFilePosition:this.updateFilePosition}),/*#__PURE__*/_react["default"].createElement("label",{style:{marginBottom:0,width:'100%'}},/*#__PURE__*/_react["default"].createElement("input",{className:"inputFile",multiple:multiple,name:name,onChange:this.handleChange,type:"file",ref:function ref(input){return _this2.inputFile=input;}}),/*#__PURE__*/_react["default"].createElement("div",{className:"buttonContainer"},/*#__PURE__*/_react["default"].createElement("i",{className:"fa fa-plus"}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"app.components.InputFile.newFile"})))),this.isVisibleDetails()&&/*#__PURE__*/_react["default"].createElement(_InputFileDetails["default"],{file:value[this.state.position]||value[0]||value,multiple:multiple,number:value.length,onFileDelete:this.handleFileDelete}));}}]);return InputFile;}(_react["default"].Component);InputFile.defaultProps={multiple:false,setLabel:function setLabel(){},value:[],error:false};InputFile.propTypes={error:_propTypes["default"].bool,multiple:_propTypes["default"].bool,name:_propTypes["default"].string.isRequired,onChange:_propTypes["default"].func.isRequired,setLabel:_propTypes["default"].func,value:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].object,_propTypes["default"].array])};var _default=InputFile;exports["default"]=_default; + +/***/ }), + +/***/ 2065: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _classnames=_interopRequireDefault(__webpack_require__(23));var _ImgPreviewArrow=_interopRequireDefault(__webpack_require__(2066));var _ImgPreviewHint=_interopRequireDefault(__webpack_require__(2068));var _IconUpload=_interopRequireDefault(__webpack_require__(2070));var _Wrapper=_interopRequireDefault(__webpack_require__(2071));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}/* eslint-disable react/no-unused-state */var ImgPreview=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(ImgPreview,_React$Component);var _super=_createSuper(ImgPreview);function ImgPreview(){var _this;(0,_classCallCheck2["default"])(this,ImgPreview);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"state",{imgURL:'',isDraging:false,isOver:false,isOverArrow:false,isImg:false,isInitValue:false});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getFileType",function(fileName){return fileName.split('.').slice(-1)[0];});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"generateImgURL",function(file){if(_this.isPictureType(file.name)&&!(0,_lodash.has)(file,'url')){var reader=new FileReader();reader.onloadend=function(){_this.setState({imgURL:reader.result,isImg:true});};reader.readAsDataURL(file);}else if((0,_lodash.has)(file,'url')){var isImg=_this.isPictureType(file.name);var imgURL=file.url[0]==='/'?"".concat(strapi.backendURL).concat(file.url):file.url;_this.setState({isImg:isImg,imgURL:imgURL});}else{_this.setState({isImg:false,imgURL:file.name});}});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleClick",function(type){var _this$props=_this.props,files=_this$props.files,position=_this$props.position;var file;// eslint-disable-line no-unused-vars +var nextPosition;switch(type){case'right':file=files[position+1]||files[0];nextPosition=files[position+1]?position+1:0;break;case'left':file=files[position-1]||files[files.length-1];nextPosition=files[position-1]?position-1:files.length-1;break;default:// Do nothing +}// Update the parent position +_this.updateFilePosition(nextPosition);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDragEnter",function(e){e.preventDefault();e.stopPropagation();_this.setState({isDraging:true});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDragLeave",function(e){e.preventDefault();e.stopPropagation();_this.setState({isDraging:false});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDragOver",function(e){e.preventDefault();e.stopPropagation();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDrop",function(e){_this.setState({isDraging:false});_this.props.onDrop(e);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"isPictureType",function(fileName){return /\.(jpe?g|png|gif)$/i.test(fileName);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"updateFilePosition",function(newPosition){_this.props.updateFilePosition(newPosition);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"renderContent",function(){var fileType=_this.getFileType(_this.state.imgURL);if(_this.state.isImg){var imgURL=(0,_lodash.startsWith)(_this.state.imgURL,'/')?"".concat(strapi.backendURL).concat(_this.state.imgURL):_this.state.imgURL;return/*#__PURE__*/_react["default"].createElement("img",{src:imgURL,alt:""});}return/*#__PURE__*/_react["default"].createElement("div",{className:"fileIcon",onDrop:_this.handleDrop},/*#__PURE__*/_react["default"].createElement("i",{className:"far fa-file-".concat(fileType)}));});return _this;}(0,_createClass2["default"])(ImgPreview,[{key:"componentDidMount",value:function componentDidMount(){// We don't need the generateImgURL function here since the compo will +// always have an init value here +var file=this.props.multiple?(0,_lodash.get)(this.props.files,['0','name'],''):(0,_lodash.get)(this.props.files,'name');this.setState({imgURL:(0,_lodash.get)(this.props.files,['0','url'],'')||(0,_lodash.get)(this.props.files,'url',''),isImg:this.isPictureType(file)});}},{key:"UNSAFE_componentWillReceiveProps",value:function UNSAFE_componentWillReceiveProps(nextProps){if(nextProps.isUploading!==this.props.isUploading){var lastFile=this.props.multiple?nextProps.files.slice(-1)[0]:nextProps.files[0]||nextProps.files;this.generateImgURL(lastFile);if(this.props.multiple){this.updateFilePosition(nextProps.files.length-1);}}// Update the preview or slide pictures or init the component +if(nextProps.didDeleteFile!==this.props.didDeleteFile||nextProps.position!==this.props.position||(0,_lodash.size)(nextProps.files)!==(0,_lodash.size)(this.props.files)&&!this.state.isInitValue){var file=nextProps.files[nextProps.position]||nextProps.files||'';this.generateImgURL(file);if(!this.state.isInitValue){this.setState({isInitValue:true});}}if((0,_lodash.isEmpty)(nextProps.files)){this.setState({isImg:false,imgURL:null});}if(nextProps.files!==this.props.files){var _file=nextProps.files[nextProps.position]||nextProps.files||'';this.generateImgURL(_file);if(!this.state.isInitValue){this.setState({isInitValue:true});}}}},{key:"componentDidCatch",value:function componentDidCatch(error,info){console.log('An error occured in ImgPreview',info);}},{key:"render",value:function render(){var _this2=this;var _this$props2=this.props,files=_this$props2.files,onBrowseClick=_this$props2.onBrowseClick;var imgURL=this.state.imgURL;var containerStyle=(0,_lodash.isEmpty)(imgURL)?{display:'flex',zIndex:9999}:{};return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{onDragOver:this.handleDragOver,onDragEnter:this.handleDragEnter,style:containerStyle},(0,_lodash.isEmpty)(imgURL)&&/*#__PURE__*/_react["default"].createElement(_IconUpload["default"],null),/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])(this.state.isDraging&&'overlay'),onDragLeave:this.handleDragLeave,onDragOver:this.handleDragOver,onDrop:this.handleDrop}),/*#__PURE__*/_react["default"].createElement(_ImgPreviewHint["default"],{displayHint:(0,_lodash.isEmpty)(files),onClick:onBrowseClick,onDrop:this.handleDrop,showWhiteHint:this.state.isDraging||(0,_lodash.isEmpty)(files)}),!(0,_lodash.isEmpty)(imgURL)&&this.renderContent(),/*#__PURE__*/_react["default"].createElement(_ImgPreviewArrow["default"],{enable:(0,_lodash.isArray)(files)&&(0,_lodash.size)(files)>1,onClick:this.handleClick,onMouseEnter:function onMouseEnter(){return _this2.setState({isOverArrow:true});},onMouseLeave:function onMouseLeave(){return _this2.setState({isOverArrow:false});},show:(0,_lodash.isArray)(files)&&(0,_lodash.size)(files)>1,type:"right"}),/*#__PURE__*/_react["default"].createElement(_ImgPreviewArrow["default"],{enable:(0,_lodash.isArray)(files)&&(0,_lodash.size)(files)>1,onClick:this.handleClick,onMouseEnter:function onMouseEnter(){return _this2.setState({isOverArrow:true});},onMouseLeave:function onMouseLeave(){return _this2.setState({isOverArrow:false});},show:(0,_lodash.isArray)(files)&&(0,_lodash.size)(files)>1}));}}]);return ImgPreview;}(_react["default"].Component);ImgPreview.defaultProps={didDeleteFile:false,files:[],isUploading:false,multiple:false,onBrowseClick:function onBrowseClick(){},onDrop:function onDrop(){},position:0,updateFilePosition:function updateFilePosition(){}};ImgPreview.propTypes={didDeleteFile:_propTypes["default"].bool,files:_propTypes["default"].oneOfType([_propTypes["default"].object,_propTypes["default"].array]),isUploading:_propTypes["default"].bool,multiple:_propTypes["default"].bool,onBrowseClick:_propTypes["default"].func,onDrop:_propTypes["default"].func,position:_propTypes["default"].number,updateFilePosition:_propTypes["default"].func};var _default=ImgPreview;exports["default"]=_default; + +/***/ }), + +/***/ 2066: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _Wrapper=_interopRequireDefault(__webpack_require__(2067));/** + * + * ImgPreviewArrow + * + */function ImgPreviewArrow(props){var divStyle=props.show?{}:{display:'none'};if(props.enable){divStyle={zIndex:99999};}return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{type:props.type,style:divStyle,onClick:function onClick(e){e.preventDefault();e.stopPropagation();props.onClick(props.type);},onMouseEnter:props.onMouseEnter,onMouseLeave:props.onMouseLeave});}ImgPreviewArrow.defaultProps={enable:false,onClick:function onClick(){},onMouseEnter:function onMouseEnter(){},onMouseLeave:function onMouseLeave(){},show:false,type:'left'};ImgPreviewArrow.propTypes={enable:_propTypes["default"].bool,onClick:_propTypes["default"].func,onMouseEnter:_propTypes["default"].func,onMouseLeave:_propTypes["default"].func,show:_propTypes["default"].bool,type:_propTypes["default"].string};var _default=ImgPreviewArrow;exports["default"]=_default; + +/***/ }), + +/***/ 2067: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n right: 0;\n &:before {\n content: '\f105';\n vertical-align: middle;\n text-align: center;\n font-family: 'FontAwesome';\n font-size: 20px;\n font-weight: 800;\n }\n "],["\n right: 0;\n &:before {\n content: '\\f105';\n vertical-align: middle;\n text-align: center;\n font-family: 'FontAwesome';\n font-size: 20px;\n font-weight: 800;\n }\n "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n left: 0;\n &:before {\n content: '\f104';\n vertical-align: middle;\n text-align: center;\n font-family: 'FontAwesome';\n font-size: 20px;\n font-weight: 800;\n }\n "],["\n left: 0;\n &:before {\n content: '\\f104';\n vertical-align: middle;\n text-align: center;\n font-family: 'FontAwesome';\n font-size: 20px;\n font-weight: 800;\n }\n "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 56px;\n height: 32px;\n width: 28px;\n background: rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n text-align: center;\n color: #fff;\n cursor: pointer;\n z-index: 99;\n\n ","\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var type=_ref.type;if(type==='left'){return(0,_styledComponents.css)(_templateObject2());}return(0,_styledComponents.css)(_templateObject3());});var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2068: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _P=_interopRequireDefault(__webpack_require__(2069));/** + * + * ImgPreviewHint + * + */ /* eslint-disable */function ImgPreviewHint(props){var pStyle;switch(true){case props.showWhiteHint:pStyle={zIndex:999,color:'#fff'};break;case props.displayHint:pStyle={zIndex:4};break;default:pStyle={display:'none'};}var browse=/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"app.components.ImgPreview.hint.browse"},function(message){return/*#__PURE__*/_react["default"].createElement("u",{onClick:props.onClick},message);});return/*#__PURE__*/_react["default"].createElement(_P["default"],{style:pStyle,onDragEnter:function onDragEnter(e){return e.stopPropagation();},onDrop:props.onDrop},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"app.components.ImgPreview.hint",values:{browse:browse}}));}ImgPreviewHint.defaultProps={displayHint:false,onClick:function onClick(){},onDrop:function onDrop(){},showWhiteHint:false};ImgPreviewHint.propTypes={displayHint:_propTypes["default"].bool,onClick:_propTypes["default"].func,onDrop:_propTypes["default"].func,showWhiteHint:_propTypes["default"].bool};var _default=ImgPreviewHint;exports["default"]=_default; + +/***/ }), + +/***/ 2069: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 52px;\n display: block;\n width: 100%;\n padding: 12px 75px 0 75px;\n white-space: pre-line;\n color: #333740;\n line-height: 18px;\n font-size: 13px;\n > span {\n display: block;\n > u {\n cursor: pointer;\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var P=_styledComponents["default"].p(_templateObject());var _default=P;exports["default"]=_default; + +/***/ }), + +/***/ 2070: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var IconUpload=function IconUpload(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"105",height:"84",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",style:{margin:'auto'}},/*#__PURE__*/_react["default"].createElement("defs",null,/*#__PURE__*/_react["default"].createElement("rect",{id:"a",y:"1.354",width:"77.333",height:"62.292",rx:"4"}),/*#__PURE__*/_react["default"].createElement("rect",{id:"b",y:"1.354",width:"77.333",height:"62.292",rx:"4"})),/*#__PURE__*/_react["default"].createElement("g",{fill:"none",fillRule:"evenodd",opacity:".05"},/*#__PURE__*/_react["default"].createElement("g",{transform:"rotate(-12 75.8 12.214)"},/*#__PURE__*/_react["default"].createElement("use",{fill:"#FAFAFB",xlinkHref:"#a"}),/*#__PURE__*/_react["default"].createElement("rect",{stroke:"#979797",x:".5",y:"1.854",width:"76.333",height:"61.292",rx:"4"})),/*#__PURE__*/_react["default"].createElement("path",{d:"M74.255 36.05l3.942 18.544-57.385 12.198-1.689-7.948L29.35 42.827l7.928 5.236 16.363-25.628L74.255 36.05zM71.974 6.078l-65.21 13.86a1.272 1.272 0 0 0-.833.589 1.311 1.311 0 0 0-.19 1.014l10.7 50.334c.076.358.27.641.584.849.314.207.648.273 1.001.198l65.21-13.86c.353-.076.63-.272.833-.589.203-.317.266-.655.19-1.014l-10.7-50.334a1.311 1.311 0 0 0-.584-.849 1.272 1.272 0 0 0-1.001-.198zm6.803-.061L89.475 56.35c.387 1.822.08 3.517-.921 5.085-1.001 1.568-2.399 2.543-4.192 2.924L19.152 78.22c-1.793.381-3.466.06-5.019-.966-1.552-1.026-2.522-2.45-2.91-4.27L.525 22.65c-.387-1.822-.08-3.517.921-5.085 1.001-1.568 2.399-2.543 4.192-2.924L70.848.78c1.793-.381 3.466-.06 5.019.966 1.552 1.026 2.522 2.45 2.91 4.27z",fill:"#333740",fillRule:"nonzero"}),/*#__PURE__*/_react["default"].createElement("g",null,/*#__PURE__*/_react["default"].createElement("g",{transform:"rotate(15 7.723 110.16)"},/*#__PURE__*/_react["default"].createElement("use",{fill:"#FAFAFB",xlinkHref:"#b"}),/*#__PURE__*/_react["default"].createElement("rect",{stroke:"#979797",x:".5",y:"1.854",width:"76.333",height:"61.292",rx:"4"})),/*#__PURE__*/_react["default"].createElement("path",{d:"M49.626 26.969c-.584 2.18-1.832 3.832-3.744 4.955-1.911 1.123-3.94 1.398-6.086.822-2.147-.575-3.767-1.827-4.86-3.755-1.094-1.929-1.35-3.983-.765-6.163.584-2.18 1.832-3.832 3.743-4.955 1.912-1.124 3.94-1.398 6.087-.823s3.767 1.827 4.86 3.756c1.094 1.928 1.349 3.983.765 6.163zm37.007 26.74L81.726 72.02 25.058 56.836l2.103-7.848 16.384-9.63 4.687 8.266 26.214-15.406 12.187 21.49zm11.574-27.742L33.812 8.712a1.272 1.272 0 0 0-1.01.146c-.324.19-.533.463-.628.817L18.855 59.38c-.095.354-.05.695.136 1.022.186.327.453.538.802.631l64.395 17.255c.349.093.685.045 1.01-.146.324-.19.533-.463.628-.817L99.145 27.62c.095-.354.05-.695-.136-1.022a1.272 1.272 0 0 0-.802-.631zm6.09 3.033l-13.32 49.705c-.481 1.799-1.524 3.17-3.128 4.112-1.605.943-3.292 1.177-5.063.703L18.39 66.265c-1.771-.474-3.115-1.52-4.033-3.14-.918-1.618-1.136-3.327-.654-5.125L27.022 8.295c.482-1.799 1.525-3.17 3.13-4.112 1.604-.943 3.291-1.177 5.062-.703L99.61 20.735c1.771.474 3.115 1.52 4.033 3.14.918 1.618 1.136 3.327.654 5.125z",fill:"#333740",fillRule:"nonzero"}))));};var _default=IconUpload;exports["default"]=_default; + +/***/ }), + +/***/ 2071: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n width: 100%;\n height: 162px;\n z-index: 1 !important;\n border-top-left-radius: 2px;\n border-top-right-radius: 2px;\n text-align: center;\n vertical-align: middle;\n background-color: #333740;\n background-position: center;\n background-repeat: no-repeat !important;\n white-space: nowrap;\n\n > img {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n margin: auto;\n max-width: 100%;\n max-height: 100%;\n z-index: 3;\n }\n\n .fileIcon {\n display: flex;\n flex-direction: column;\n height: 100%;\n color: #fff;\n justify-content: space-around;\n font-size: 30px;\n svg {\n margin: auto;\n }\n }\n\n .overlay {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 162px;\n z-index: 999;\n background: #333740;\n opacity: 0.9;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2072: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _reactFontawesome=__webpack_require__(45);var _EmptyWrapper=_interopRequireDefault(__webpack_require__(2073));var _Wrapper=_interopRequireDefault(__webpack_require__(2074));/** + * + * InputFileDetails + * + */ /* eslint-disable */function InputFileDetails(props){if(props.number===0&&props.multiple){return/*#__PURE__*/_react["default"].createElement(_EmptyWrapper["default"],null);}// TODO improve logic +if(!(0,_lodash.get)(props.file,'name')&&!props.multiple){return/*#__PURE__*/_react["default"].createElement(_EmptyWrapper["default"],null);}var url=(0,_lodash.startsWith)(props.file.url,'/')?"".concat(strapi.backendURL).concat(props.file.url):props.file.url;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,/*#__PURE__*/_react["default"].createElement("div",{className:"detailBanner"},/*#__PURE__*/_react["default"].createElement("div",null,props.file.url&&/*#__PURE__*/_react["default"].createElement("a",{href:url,className:"externalLink",target:"_blank",rel:"noopener noreferrer"},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:"external-link-alt"}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"app.components.InputFileDetails.open"}))),/*#__PURE__*/_react["default"].createElement("div",{className:"removeContainer",onClick:props.onFileDelete,style:{marginBottom:'-2px',paddingTop:'4px'}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"app.components.InputFileDetails.remove"}))));}InputFileDetails.defaultProps={file:{},multiple:false,number:0,onFileDelete:function onFileDelete(){}};InputFileDetails.propTypes={file:_propTypes["default"].oneOfType([_propTypes["default"].object,_propTypes["default"].array]),multiple:_propTypes["default"].bool,number:_propTypes["default"].number,onFileDelete:_propTypes["default"].func};var _default=InputFileDetails;exports["default"]=_default; + +/***/ }), + +/***/ 2073: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n width: 100%;\n padding-top: 6px;\n margin-bottom: 23px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var EmptyWrapper=_styledComponents["default"].div(_templateObject());var _default=EmptyWrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2074: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n width: 100%;\n padding-top: 6px;\n margin-bottom: -13px;\n\n .detailBanner {\n display: flex;\n justify-content: space-between;\n line-height: 23px;\n -webkit-font-smoothing: antialiased;\n\n > div:first-child {\n display: flex;\n > div:nth-child(2) {\n color: #333740;\n font-size: 13px;\n font-weight: 400;\n }\n }\n }\n\n .externalLink {\n color: #333740;\n text-decoration: none;\n\n &:hover,\n &:active {\n color: #333740;\n text-decoration: none;\n }\n\n > i,\n > svg {\n margin-right: 7px;\n color: #b3b5b9;\n }\n }\n\n .removeContainer {\n color: #ff3000;\n font-size: 13px;\n font-weight: 400;\n cursor: pointer;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2075: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n .inputFile {\n overflow: hidden;\n position: absolute;\n z-index: -1;\n opacity: 0;\n }\n\n .buttonContainer {\n width: 100%;\n height: 34px;\n line-height: 34px;\n text-align: center;\n background-color: #fafafb;\n border-top: 0;\n border-bottom-left-radius: 2px;\n border-bottom-right-radius: 2px;\n color: #333740;\n font-size: 12px;\n font-weight: 700;\n -webkit-font-smoothing: antialiased;\n\n cursor: pointer;\n text-transform: uppercase;\n > i,\n > svg {\n margin-right: 10px;\n }\n }\n\n .copy {\n cursor: copy !important;\n }\n\n .inputFileControlForm {\n padding: 0;\n height: auto;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2076: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n min-width: 200px;\n font-size: 1.3rem;\n padding-bottom: 26px;\n\n .labelFile {\n margin-bottom: 9px;\n }\n\n .labelNumber {\n font-weight: 500;\n }\n\n &.bordered {\n .editorWrapper {\n border-color: red;\n }\n }\n > div + p {\n width 100%;\n padding-top: 14px;\n font-size: 1.2rem;\n line-height: normal;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-bottom: -11px;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Container=_styledComponents["default"].div(_templateObject());var _default=Container;exports["default"]=_default; + +/***/ }), + +/***/ 2077: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactSelect=_interopRequireDefault(__webpack_require__(200));function SelectOne(_ref){var mainField=_ref.mainField,name=_ref.name,isDisabled=_ref.isDisabled,isLoading=_ref.isLoading,onChange=_ref.onChange,onInputChange=_ref.onInputChange,onMenuClose=_ref.onMenuClose,onMenuScrollToBottom=_ref.onMenuScrollToBottom,options=_ref.options,placeholder=_ref.placeholder,value=_ref.value;return/*#__PURE__*/_react["default"].createElement(_reactSelect["default"],{id:name,isClearable:true,isDisabled:isDisabled,isLoading:isLoading,options:options,onChange:onChange,onInputChange:onInputChange,onMenuClose:onMenuClose,onMenuScrollToBottom:onMenuScrollToBottom,placeholder:placeholder,value:(0,_lodash.isNull)(value)?null:{label:(0,_lodash.get)(value,[mainField],''),value:value}});}SelectOne.defaultProps={value:null};SelectOne.propTypes={isDisabled:_propTypes["default"].bool.isRequired,isLoading:_propTypes["default"].bool.isRequired,mainField:_propTypes["default"].string.isRequired,name:_propTypes["default"].string.isRequired,onChange:_propTypes["default"].func.isRequired,onInputChange:_propTypes["default"].func.isRequired,onMenuClose:_propTypes["default"].func.isRequired,onMenuScrollToBottom:_propTypes["default"].func.isRequired,options:_propTypes["default"].array.isRequired,placeholder:_propTypes["default"].node.isRequired,value:_propTypes["default"].object};var _default=(0,_react.memo)(SelectOne);exports["default"]=_default; + +/***/ }), + +/***/ 2078: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactDnd=__webpack_require__(352);var _reactSelect=_interopRequireWildcard(__webpack_require__(200));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var _components=__webpack_require__(648);var _ListItem=_interopRequireDefault(__webpack_require__(2079));function SelectMany(_ref){var addRelation=_ref.addRelation,mainField=_ref.mainField,name=_ref.name,isDisabled=_ref.isDisabled,isLoading=_ref.isLoading,move=_ref.move,nextSearch=_ref.nextSearch,onInputChange=_ref.onInputChange,onMenuClose=_ref.onMenuClose,onMenuScrollToBottom=_ref.onMenuScrollToBottom,_onRemove=_ref.onRemove,options=_ref.options,placeholder=_ref.placeholder,targetModel=_ref.targetModel,value=_ref.value;var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].RELATION}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var findRelation=function findRelation(id){var relation=value.filter(function(c){return"".concat(c.id)==="".concat(id);})[0];return{relation:relation,index:value.indexOf(relation)};};var moveRelation=(0,_react.useCallback)(function(id,atIndex){var _findRelation=findRelation(id),index=_findRelation.index;move(index,atIndex,name);},// eslint-disable-next-line react-hooks/exhaustive-deps +[value]);var filterConfig={ignoreCase:true,ignoreAccents:true,trim:false,matchFrom:'any'};return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_reactSelect["default"],{isDisabled:isDisabled,id:name,filterOption:function filterOption(candidate,input){if(!(0,_lodash.isEmpty)(value)){var isSelected=value.findIndex(function(item){return item.id===candidate.value.id;})!==-1;if(isSelected){return false;}}if(input){return(0,_reactSelect.createFilter)(filterConfig)(candidate,input);}return true;},isLoading:isLoading,isMulti:true,isSearchable:true,options:options,onChange:addRelation,onInputChange:onInputChange,onMenuClose:onMenuClose,onMenuScrollToBottom:onMenuScrollToBottom,placeholder:placeholder,value:[]}),/*#__PURE__*/_react["default"].createElement(_components.ListWrapper,{ref:drop},!(0,_lodash.isEmpty)(value)&&/*#__PURE__*/_react["default"].createElement("ul",null,value.map(function(data,index){return/*#__PURE__*/_react["default"].createElement(_ListItem["default"],{key:data.id,data:data,findRelation:findRelation,mainField:mainField,moveRelation:moveRelation,nextSearch:nextSearch,onRemove:function onRemove(){return _onRemove("".concat(name,".").concat(index));},targetModel:targetModel});})),!(0,_lodash.isEmpty)(value)&&value.length>4&&/*#__PURE__*/_react["default"].createElement(_components.ListShadow,null)));}SelectMany.defaultProps={move:function move(){},value:null};SelectMany.propTypes={addRelation:_propTypes["default"].func.isRequired,isDisabled:_propTypes["default"].bool.isRequired,mainField:_propTypes["default"].string.isRequired,move:_propTypes["default"].func,name:_propTypes["default"].string.isRequired,nextSearch:_propTypes["default"].string.isRequired,isLoading:_propTypes["default"].bool.isRequired,onInputChange:_propTypes["default"].func.isRequired,onMenuClose:_propTypes["default"].func.isRequired,onMenuScrollToBottom:_propTypes["default"].func.isRequired,onRemove:_propTypes["default"].func.isRequired,options:_propTypes["default"].array.isRequired,placeholder:_propTypes["default"].node.isRequired,targetModel:_propTypes["default"].string.isRequired,value:_propTypes["default"].array};var _default=(0,_react.memo)(SelectMany);exports["default"]=_default; + +/***/ }), + +/***/ 2079: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactDnd=__webpack_require__(352);var _reactDndHtml5Backend=__webpack_require__(644);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var _components=__webpack_require__(648);var _Relation=_interopRequireDefault(__webpack_require__(654));function ListItem(_ref){var data=_ref.data,findRelation=_ref.findRelation,mainField=_ref.mainField,moveRelation=_ref.moveRelation,nextSearch=_ref.nextSearch,onRemove=_ref.onRemove,targetModel=_ref.targetModel;var to="/plugins/".concat(_pluginId["default"],"/collectionType/").concat(targetModel,"/").concat(data.id,"?redirectUrl=").concat(nextSearch);var originalIndex=findRelation(data.id).index;var _useDrag=(0,_reactDnd.useDrag)({item:{type:_ItemTypes["default"].RELATION,id:data.id,originalIndex:originalIndex,data:data,mainField:mainField},collect:function collect(monitor){return{isDragging:monitor.isDragging()};}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),isDragging=_useDrag2[0].isDragging,drag=_useDrag2[1],preview=_useDrag2[2];var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].RELATION,canDrop:function canDrop(){return false;},hover:function hover(_ref2){var draggedId=_ref2.id;if(draggedId!==data.id){var _findRelation=findRelation(data.id),overIndex=_findRelation.index;moveRelation(draggedId,overIndex);}}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];(0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:true});},[preview]);var opacity=isDragging?0.2:1;return/*#__PURE__*/_react["default"].createElement(_components.Li,{ref:function ref(node){return drag(drop(node));},style:{opacity:opacity}},/*#__PURE__*/_react["default"].createElement(_Relation["default"],{mainField:mainField,onRemove:onRemove,data:data,to:to}));}ListItem.defaultProps={findRelation:function findRelation(){},moveRelation:function moveRelation(){},nextSearch:'',onRemove:function onRemove(){},targetModel:''};ListItem.propTypes={data:_propTypes["default"].object.isRequired,findRelation:_propTypes["default"].func,mainField:_propTypes["default"].string.isRequired,moveRelation:_propTypes["default"].func,nextSearch:_propTypes["default"].string,onRemove:_propTypes["default"].func,targetModel:_propTypes["default"].string};var _default=(0,_react.memo)(ListItem);exports["default"]=_default; + +/***/ }), + +/***/ 2080: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wrapper=exports.Nav=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n > div {\n display: flex;\n\n justify-content: space-between;\n\n a {\n color: #007eff !important;\n font-size: 1.3rem;\n\n &:hover {\n text-decoration: underline !important;\n cursor: pointer;\n }\n }\n }\n .description {\n color: #9ea7b8;\n font-family: 'Lato';\n font-size: 1.2rem;\n margin-top: -5px;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n margin-bottom: 27px;\n\n label {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 1.3rem;\n font-weight: 500;\n }\n\n nav + div {\n height: 34px;\n background-color: white;\n margin-top: 5px;\n > div {\n min-height: 34px;\n height: 100%;\n border: 1px solid #e3e9f3;\n border-radius: 3px;\n box-shadow: 0 1px 1px 0 rgba(104, 118, 142, 0.05);\n flex-wrap: initial;\n padding: 0 10px;\n\n // Arrow\n &:before {\n content: '\f0d7';\n position: absolute;\n top: 5px;\n right: 10px;\n font-family: 'FontAwesome';\n font-size: 14px;\n font-weight: 800;\n color: #aaa;\n }\n > div {\n padding: 0;\n &:first-of-type {\n // Placeholder\n > div span {\n color: #aaa;\n }\n }\n }\n div:last-of-type {\n span {\n display: none;\n & + div {\n display: none;\n }\n }\n svg {\n width: 15px;\n margin-right: 6px;\n }\n }\n span {\n font-size: 13px;\n line-height: 34px;\n color: #333740;\n }\n :hover {\n cursor: pointer;\n border-color: #e3e9f3;\n &:before {\n color: #666;\n }\n }\n }\n span[aria-live='polite'] + div {\n &:before {\n transform: rotate(180deg);\n top: 4px;\n }\n & + div {\n z-index: 2;\n height: fit-content;\n padding: 0;\n margin-top: -2px;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n &:before {\n content: '';\n }\n div {\n width: 100%;\n }\n > div {\n max-height: 200px;\n height: fit-content;\n div {\n height: 36px;\n cursor: pointer;\n }\n }\n }\n }\n }\n"],["\n position: relative;\n margin-bottom: 27px;\n\n label {\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 1.3rem;\n font-weight: 500;\n }\n\n nav + div {\n height: 34px;\n background-color: white;\n margin-top: 5px;\n > div {\n min-height: 34px;\n height: 100%;\n border: 1px solid #e3e9f3;\n border-radius: 3px;\n box-shadow: 0 1px 1px 0 rgba(104, 118, 142, 0.05);\n flex-wrap: initial;\n padding: 0 10px;\n\n // Arrow\n &:before {\n content: '\\f0d7';\n position: absolute;\n top: 5px;\n right: 10px;\n font-family: 'FontAwesome';\n font-size: 14px;\n font-weight: 800;\n color: #aaa;\n }\n > div {\n padding: 0;\n &:first-of-type {\n // Placeholder\n > div span {\n color: #aaa;\n }\n }\n }\n div:last-of-type {\n span {\n display: none;\n & + div {\n display: none;\n }\n }\n svg {\n width: 15px;\n margin-right: 6px;\n }\n }\n span {\n font-size: 13px;\n line-height: 34px;\n color: #333740;\n }\n :hover {\n cursor: pointer;\n border-color: #e3e9f3;\n &:before {\n color: #666;\n }\n }\n }\n span[aria-live='polite'] + div {\n &:before {\n transform: rotate(180deg);\n top: 4px;\n }\n & + div {\n z-index: 2;\n height: fit-content;\n padding: 0;\n margin-top: -2px;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n &:before {\n content: '';\n }\n div {\n width: 100%;\n }\n > div {\n max-height: 200px;\n height: fit-content;\n div {\n height: 36px;\n cursor: pointer;\n }\n }\n }\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var Nav=_styledComponents["default"].nav(_templateObject2());exports.Nav=Nav; + +/***/ }), + +/***/ 2081: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _classnames=_interopRequireDefault(__webpack_require__(23));var _styles=__webpack_require__(21);var _core=__webpack_require__(53);var _Wysiwyg=_interopRequireDefault(__webpack_require__(2082));var _Wrapper=_interopRequireDefault(__webpack_require__(2207));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}// eslint-disable-next-line react/prefer-stateless-function +var WysiwygWithErrors=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(WysiwygWithErrors,_React$Component);var _super=_createSuper(WysiwygWithErrors);function WysiwygWithErrors(){(0,_classCallCheck2["default"])(this,WysiwygWithErrors);return _super.apply(this,arguments);}(0,_createClass2["default"])(WysiwygWithErrors,[{key:"render",value:function render(){var _this$props=this.props,autoFocus=_this$props.autoFocus,className=_this$props.className,deactivateErrorHighlight=_this$props.deactivateErrorHighlight,disabled=_this$props.disabled,inputError=_this$props.error,inputClassName=_this$props.inputClassName,inputDescription=_this$props.inputDescription,inputStyle=_this$props.inputStyle,label=_this$props.label,name=_this$props.name,handleBlur=_this$props.onBlur,_onChange=_this$props.onChange,placeholder=_this$props.placeholder,resetProps=_this$props.resetProps,style=_this$props.style,tabIndex=_this$props.tabIndex,validations=_this$props.validations,value=_this$props.value,rest=(0,_objectWithoutProperties2["default"])(_this$props,["autoFocus","className","deactivateErrorHighlight","disabled","error","inputClassName","inputDescription","inputStyle","label","name","onBlur","onChange","placeholder","resetProps","style","tabIndex","validations","value"]);return/*#__PURE__*/_react["default"].createElement(_core.Error,{inputError:inputError,name:name,type:"text",validations:validations},function(_ref){var canCheck=_ref.canCheck,onBlur=_ref.onBlur,error=_ref.error,dispatch=_ref.dispatch;var hasError=error&&error!==null;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{className:"".concat((0,_classnames["default"])(!(0,_lodash.isEmpty)(className)&&className)," ").concat(hasError?'bordered':''),style:style},/*#__PURE__*/_react["default"].createElement(_styles.Label,{htmlFor:name},label),/*#__PURE__*/_react["default"].createElement(_Wysiwyg["default"],(0,_extends2["default"])({},rest,{autoFocus:autoFocus,className:inputClassName,disabled:disabled,deactivateErrorHighlight:deactivateErrorHighlight,error:hasError,name:name,onBlur:(0,_lodash.isFunction)(handleBlur)?handleBlur:onBlur,onChange:function onChange(e){if(!canCheck){dispatch({type:'SET_CHECK'});}dispatch({type:'SET_ERROR',error:null});_onChange(e);},placeholder:placeholder,resetProps:resetProps,style:inputStyle,tabIndex:tabIndex,value:value})),!hasError&&inputDescription&&/*#__PURE__*/_react["default"].createElement(_styles.Description,null,inputDescription),hasError&&/*#__PURE__*/_react["default"].createElement(_styles.ErrorMessage,null,error));});}}]);return WysiwygWithErrors;}(_react["default"].Component);WysiwygWithErrors.defaultProps={autoFocus:false,className:'',deactivateErrorHighlight:false,didCheckErrors:false,disabled:false,error:null,inputClassName:'',inputDescription:'',inputStyle:{},label:'',onBlur:false,placeholder:'',resetProps:false,style:{},tabIndex:'0',validations:{},value:null};WysiwygWithErrors.propTypes={autoFocus:_propTypes["default"].bool,className:_propTypes["default"].string,deactivateErrorHighlight:_propTypes["default"].bool,didCheckErrors:_propTypes["default"].bool,disabled:_propTypes["default"].bool,error:_propTypes["default"].string,inputClassName:_propTypes["default"].string,inputDescription:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].func,_propTypes["default"].shape({id:_propTypes["default"].string,params:_propTypes["default"].object})]),inputStyle:_propTypes["default"].object,label:_propTypes["default"].oneOfType([_propTypes["default"].string,_propTypes["default"].func,_propTypes["default"].shape({id:_propTypes["default"].string,params:_propTypes["default"].object})]),name:_propTypes["default"].string.isRequired,onBlur:_propTypes["default"].oneOfType([_propTypes["default"].bool,_propTypes["default"].func]),onChange:_propTypes["default"].func.isRequired,placeholder:_propTypes["default"].string,resetProps:_propTypes["default"].bool,style:_propTypes["default"].object,tabIndex:_propTypes["default"].string,validations:_propTypes["default"].object,value:_propTypes["default"].string};var _default=WysiwygWithErrors;exports["default"]=_default; + +/***/ }), + +/***/ 2082: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _draftJs=__webpack_require__(1924);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _classnames=_interopRequireDefault(__webpack_require__(23));var _strapiHelperPlugin=__webpack_require__(10);var _WysiwygProvider=_interopRequireDefault(__webpack_require__(2170));var _WysiwygInlineControls=_interopRequireDefault(__webpack_require__(2171));var _WysiwygDropUpload=_interopRequireDefault(__webpack_require__(2185));var _WysiwygBottomControls=_interopRequireDefault(__webpack_require__(2187));var _WysiwygEditor=_interopRequireDefault(__webpack_require__(1998));var _customSelect=_interopRequireDefault(__webpack_require__(2189));var _previewControl=_interopRequireDefault(__webpack_require__(2192));var _previewWysiwyg=_interopRequireDefault(__webpack_require__(2194));var _toggleMode=_interopRequireDefault(__webpack_require__(2202));var _constants=__webpack_require__(1954);var _helpers=__webpack_require__(2204);var _utils=__webpack_require__(2205);var _EditorWrapper=_interopRequireDefault(__webpack_require__(2206));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}/* eslint-disable */var Wysiwyg=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(Wysiwyg,_React$Component);var _super=_createSuper(Wysiwyg);function Wysiwyg(_props){var _this;(0,_classCallCheck2["default"])(this,Wysiwyg);_this=_super.call(this,_props);(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"setInitialValue",function(props){if((0,_lodash.isEmpty)(props.value)){return _this.setState({editorState:_draftJs.EditorState.createEmpty()});}var contentState=_draftJs.ContentState.createFromText(props.value);var newEditorState=_draftJs.EditorState.createWithContent(contentState);var editorState=_this.state.isFocused?_draftJs.EditorState.moveFocusToEnd(newEditorState):newEditorState;return _this.setState({editorState:editorState});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"addContent",function(content,style){var selectedText=_this.getSelectedText();// Retrieve the associated data for the type to add +var _getBlockContent=(0,_helpers.getBlockContent)(style),innerContent=_getBlockContent.innerContent,endReplacer=_getBlockContent.endReplacer,startReplacer=_getBlockContent.startReplacer;// Replace the selected text by the markdown command or insert default text +var defaultContent=selectedText===''?(0,_lodash.replace)(content,'textToReplace',innerContent):(0,_lodash.replace)(content,'textToReplace',selectedText);// Get the current cursor position +var cursorPosition=(0,_helpers.getOffSets)(_this.getSelection()).start;var textWithEntity=_this.modifyBlockContent(defaultContent);// Highlight the text +var _getDefaultSelectionO=(0,_helpers.getDefaultSelectionOffsets)(defaultContent,startReplacer,endReplacer,cursorPosition),anchorOffset=_getDefaultSelectionO.anchorOffset,focusOffset=_getDefaultSelectionO.focusOffset;// Merge the current selection with the new one +var updatedSelection=_this.getSelection().merge({anchorOffset:anchorOffset,focusOffset:focusOffset});var newEditorState=_draftJs.EditorState.push(_this.getEditorState(),textWithEntity,'insert-character');// Update the parent reducer +_this.sendData(newEditorState);// Don't handle selection : the user has selected some text to be changed with the appropriate markdown +if(selectedText!==''){return _this.setState({editorState:newEditorState},function(){_this.focus();});}return _this.setState({// Highlight the text if the selection wad empty +editorState:_draftJs.EditorState.forceSelection(newEditorState,updatedSelection)});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"addOlBlock",function(){// Get all the selected blocks +var selectedBlocksList=(0,_utils.getSelectedBlocksList)(_this.getEditorState());var newEditorState=_this.getEditorState();// Check if the cursor is NOT at the beginning of a new line +// So we need to move all the next blocks +if((0,_helpers.getOffSets)(_this.getSelection()).start!==0){// Retrieve all the blocks after the current position +var nextBlocks=(0,_utils.getNextBlocksList)(newEditorState,_this.getSelection().getStartKey());var liNumber=1;// Loop to update each block after the inserted li +nextBlocks.map(function(block,index){var previousContent=index===0?_this.getEditorState().getCurrentContent().getBlockForKey(_this.getCurrentAnchorKey()):newEditorState.getCurrentContent().getBlockBefore(block.getKey());// Check if there was an li before the position so we update the entire list bullets +var number=previousContent?parseInt(previousContent.getText().split('.')[0],10):0;liNumber=(0,_lodash.isNaN)(number)?1:number+1;var nextBlockText=index===0?"".concat(liNumber,". "):nextBlocks.get(index-1).getText();// Update the current block +var newBlock=(0,_utils.createNewBlock)(nextBlockText,'block-list',block.getKey());// Update the contentState +var newContentState=_this.createNewContentStateFromBlock(newBlock,newEditorState.getCurrentContent());newEditorState=_draftJs.EditorState.push(newEditorState,newContentState);});// Move the cursor to the correct position and add a space after '.' +// 2 for the dot and the space after, we add the number length (10 = offset of 2) +var offset=2+liNumber.toString().length;var updatedSelection=(0,_utils.updateSelection)(_this.getSelection(),nextBlocks,offset);return _this.setState({editorState:_draftJs.EditorState.acceptSelection(newEditorState,updatedSelection)});}// If the cursor is at the beginning we need to move all the content after the cursor so we don't loose the data +selectedBlocksList.map(function(block,i){var selectedText=block.getText();var li=selectedText===''?"".concat(i+1,". "):"".concat(i+1,". ").concat(selectedText);var newBlock=(0,_utils.createNewBlock)(li,'block-list',block.getKey());var newContentState=_this.createNewContentStateFromBlock(newBlock,newEditorState.getCurrentContent());newEditorState=_draftJs.EditorState.push(newEditorState,newContentState);});// Update the parent reducer +_this.sendData(newEditorState);return _this.setState({editorState:_draftJs.EditorState.moveFocusToEnd(newEditorState)});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"addUlBlock",function(){var selectedBlocksList=(0,_utils.getSelectedBlocksList)(_this.getEditorState());var newEditorState=_this.getEditorState();if((0,_helpers.getOffSets)(_this.getSelection()).start!==0){var nextBlocks=(0,_utils.getNextBlocksList)(newEditorState,_this.getSelection().getStartKey());nextBlocks.map(function(block,index){var nextBlockText=index===0?'- ':nextBlocks.get(index-1).getText();var newBlock=(0,_utils.createNewBlock)(nextBlockText,'block-list',block.getKey());var newContentState=_this.createNewContentStateFromBlock(newBlock,newEditorState.getCurrentContent());newEditorState=_draftJs.EditorState.push(newEditorState,newContentState);});var updatedSelection=(0,_utils.updateSelection)(_this.getSelection(),nextBlocks,2);return _this.setState({editorState:_draftJs.EditorState.acceptSelection(newEditorState,updatedSelection)});}selectedBlocksList.map(function(block){var selectedText=block.getText();var li=selectedText===''?'- ':"- ".concat(selectedText);var newBlock=(0,_utils.createNewBlock)(li,'block-list',block.getKey());var newContentState=_this.createNewContentStateFromBlock(newBlock,newEditorState.getCurrentContent());newEditorState=_draftJs.EditorState.push(newEditorState,newContentState);});_this.sendData(newEditorState);return _this.setState({editorState:_draftJs.EditorState.moveFocusToEnd(newEditorState)});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"addBlock",function(text){var nextBlockKey=_this.getNextBlockKey(_this.getCurrentAnchorKey())||(0,_draftJs.genKey)();var newBlock=(0,_utils.createNewBlock)(text,'header',nextBlockKey);var newContentState=_this.createNewContentStateFromBlock(newBlock);var newEditorState=_this.createNewEditorState(newContentState,text);return _this.setState({editorState:newEditorState},function(){_this.focus();});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"addSimpleBlockWithSelection",function(content,style){var selectedText=_this.getSelectedText();var _getBlockContent2=(0,_helpers.getBlockContent)(style),innerContent=_getBlockContent2.innerContent,endReplacer=_getBlockContent2.endReplacer,startReplacer=_getBlockContent2.startReplacer;var defaultContent=selectedText===''?(0,_lodash.replace)(content,'textToReplace',innerContent):(0,_lodash.replace)(content,'textToReplace',selectedText);var newBlock=(0,_utils.createNewBlock)(defaultContent);var newContentState=_this.createNewContentStateFromBlock(newBlock);var _getDefaultSelectionO2=(0,_helpers.getDefaultSelectionOffsets)(defaultContent,startReplacer,endReplacer),anchorOffset=_getDefaultSelectionO2.anchorOffset,focusOffset=_getDefaultSelectionO2.focusOffset;var newEditorState=_this.createNewEditorState(newContentState,defaultContent);var updatedSelection=(0,_helpers.getOffSets)(_this.getSelection()).start===0?_this.getSelection().merge({anchorOffset:anchorOffset,focusOffset:focusOffset}):new _draftJs.SelectionState({anchorKey:newBlock.getKey(),anchorOffset:anchorOffset,focusOffset:focusOffset,focusKey:newBlock.getKey(),isBackward:false});newEditorState=_draftJs.EditorState.acceptSelection(newEditorState,updatedSelection);return _this.setState({editorState:_draftJs.EditorState.forceSelection(newEditorState,newEditorState.getSelection())});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"createNewEditorState",function(newContentState,text){var newEditorState;if((0,_helpers.getOffSets)(_this.getSelection()).start!==0){newEditorState=_draftJs.EditorState.push(_this.getEditorState(),newContentState);}else{var textWithEntity=_this.modifyBlockContent(text);newEditorState=_draftJs.EditorState.push(_this.getEditorState(),textWithEntity,'insert-characters');}return newEditorState;});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"createNewBlockMap",function(newBlock,contentState){return contentState.getBlockMap().set(newBlock.key,newBlock);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"createNewContentStateFromBlock",function(newBlock){var contentState=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_this.getEditorState().getCurrentContent();return _draftJs.ContentState.createFromBlockArray(_this.createNewBlockMap(newBlock,contentState).toArray()).set('selectionBefore',contentState.getSelectionBefore()).set('selectionAfter',contentState.getSelectionAfter());});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getCharactersNumber",function(){var editorState=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_this.getEditorState();var plainText=editorState.getCurrentContent().getPlainText();var spacesNumber=plainText.split(' ').length;return(0,_lodash.words)(plainText).join('').length+spacesNumber-1;});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getEditorState",function(){return _this.state.editorState;});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getSelection",function(){return _this.getEditorState().getSelection();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getCurrentAnchorKey",function(){return _this.getSelection().getAnchorKey();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getCurrentContentBlock",function(){return _this.getEditorState().getCurrentContent().getBlockForKey(_this.getSelection().getAnchorKey());});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getNextBlockKey",function(currentBlockKey){var editorState=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_this.getEditorState();return editorState.getCurrentContent().getKeyAfter(currentBlockKey);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getSelectedText",function(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:(0,_helpers.getOffSets)(_this.getSelection()),start=_ref.start,end=_ref.end;return _this.getCurrentContentBlock().getText().slice(start,end);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleBlur",function(){var target={name:_this.props.name,type:'textarea',value:_this.getEditorState().getCurrentContent().getPlainText()};_this.props.onBlur({target:target});_this.blur();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleChangeSelect",function(_ref2){var target=_ref2.target;_this.setState({headerValue:target.value});var selectedText=_this.getSelectedText();var title=selectedText===''?"".concat(target.value," "):"".concat(target.value," ").concat(selectedText);_this.addBlock(title);return _this.setState({headerValue:''});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleClickPreview",function(){return _this.setState({isPreviewMode:!_this.state.isPreviewMode});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDragEnter",function(e){e.preventDefault();e.stopPropagation();if(!_this.state.isDraging){_this.setState({isDraging:true});}});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDragLeave",function(){return _this.setState({isDraging:false});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDragOver",function(e){e.preventDefault();e.stopPropagation();});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleDrop",function(e){e.preventDefault();if(_this.state.isPreviewMode){return _this.setState({isDraging:false});}var files=e.dataTransfer?e.dataTransfer.files:e.target.files;return _this.uploadFile(files);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleKeyCommand",function(command,editorState){var newState=_draftJs.RichUtils.handleKeyCommand(editorState,command);if(command==='bold'||command==='italic'||command==='underline'){var _getKeyCommandData=(0,_helpers.getKeyCommandData)(command),content=_getKeyCommandData.content,style=_getKeyCommandData.style;_this.addContent(content,style);return false;}if(newState&&command!=='backspace'){_this.onChange(newState);return true;}return false;});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handlePastedFiles",function(files){return _this.uploadFile(files);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleReturn",function(e,editorState){var selection=editorState.getSelection();var currentBlock=editorState.getCurrentContent().getBlockForKey(selection.getStartKey());if(currentBlock.getText().split('')[0]==='-'){_this.addUlBlock();return true;}if(currentBlock.getText().split('.').length>1&&!(0,_lodash.isNaN)(parseInt(currentBlock.getText().split('.')[0],10))){_this.addOlBlock();return true;}return false;});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"mapKeyToEditorCommand",function(e){if(e.keyCode===9/* TAB */){var newEditorState=_draftJs.RichUtils.onTab(e,_this.state.editorState,4/* maxDepth */);if(newEditorState!==_this.state.editorState){_this.onChange(newEditorState);}return;}return(0,_draftJs.getDefaultKeyBinding)(e);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"modifyBlockContent",function(text){var contentState=arguments.length>1&&arguments[1]!==undefined?arguments[1]:_this.getEditorState().getCurrentContent();return _draftJs.Modifier.replaceText(contentState,_this.getSelection(),text);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"onChange",function(editorState){_this.setState({editorState:editorState});_this.sendData(editorState);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleTab",function(e){e.preventDefault();var newEditorState=(0,_utils.onTab)(_this.getEditorState());return _this.onChange(newEditorState);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"sendData",function(editorState){if(_this.getEditorState().getCurrentContent()!==editorState.getCurrentContent()||editorState.getLastChangeType()==='remove-range'){_this.props.onChange({target:{value:editorState.getCurrentContent().getPlainText(),name:_this.props.name,type:'textarea'}});}else return;});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"toggleFullScreen",function(e){e.preventDefault();_this.setState({isFullscreen:!_this.state.isFullscreen,isPreviewMode:false});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"uploadFile",function(files){var formData=new FormData();formData.append('files',files[0]);var headers={};var newEditorState=_this.getEditorState();var nextBlocks=(0,_utils.getNextBlocksList)(newEditorState,_this.getSelection().getStartKey());// Loop to update each block after the inserted li +nextBlocks.map(function(block,index){// Update the current block +var nextBlockText=index===0?"![Uploading ".concat(files[0].name,"]()"):nextBlocks.get(index-1).getText();var newBlock=(0,_utils.createNewBlock)(nextBlockText,'unstyled',block.getKey());// Update the contentState +var newContentState=_this.createNewContentStateFromBlock(newBlock,newEditorState.getCurrentContent());newEditorState=_draftJs.EditorState.push(newEditorState,newContentState);});var offset="![Uploading ".concat(files[0].name,"]()").length;var updatedSelection=(0,_utils.updateSelection)(_this.getSelection(),nextBlocks,offset);_this.setState({editorState:_draftJs.EditorState.acceptSelection(newEditorState,updatedSelection)});return(0,_strapiHelperPlugin.request)('/upload',{method:'POST',headers:headers,body:formData},false,false).then(function(response){var nextBlockKey=newEditorState.getCurrentContent().getKeyAfter(newEditorState.getSelection().getStartKey());var content="![text](".concat(response[0].url,")");var newContentState=_this.createNewContentStateFromBlock((0,_utils.createNewBlock)(content,'unstyled',nextBlockKey));newEditorState=_draftJs.EditorState.push(newEditorState,newContentState);var updatedSelection=(0,_utils.updateSelection)(_this.getSelection(),nextBlocks,2);_this.sendData(newEditorState);_this.setState({editorState:_draftJs.EditorState.acceptSelection(newEditorState,updatedSelection)});})["catch"](function(){_this.setState({editorState:_draftJs.EditorState.undo(_this.getEditorState())});})["finally"](function(){_this.setState({isDraging:false});});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"renderDrop",function(){return/*#__PURE__*/_react["default"].createElement(_WysiwygDropUpload["default"],{onDrop:_this.handleDrop,onDragOver:_this.handleDragOver,onDragLeave:_this.handleDragLeave});});_this.state={editorState:_draftJs.EditorState.createEmpty(),isDraging:false,isFocused:false,isFullscreen:false,isPreviewMode:false,headerValue:''};_this.focus=function(){_this.setState({isFocused:true});return _this.domEditor.focus();};_this.blur=function(){_this.setState({isFocused:false});return _this.domEditor.blur();};return _this;}(0,_createClass2["default"])(Wysiwyg,[{key:"componentDidMount",value:function componentDidMount(){if(this.props.autoFocus){this.focus();}if(!(0,_lodash.isEmpty)(this.props.value)){this.setInitialValue(this.props);}}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(nextProps,nextState){if(nextProps.value!==this.props.value&&!this.state.isFocused){return true;}if(nextState.editorState!==this.state.editorState){return true;}if(nextProps.resetProps!==this.props.resetProps){return true;}if(nextState.isDraging!==this.state.isDraging){return true;}if(nextState.isFocused!==this.state.isFocused){return true;}if(nextState.isFullscreen!==this.state.isFullscreen){return true;}if(nextState.isPreviewMode!==this.state.isPreviewMode){return true;}if(nextState.headerValue!==this.state.headerValue){return true;}if(nextProps.error!==this.props.error){return true;}return false;}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){// Handle resetProps +if(prevProps.resetProps!==this.props.resetProps){this.setInitialValue(this.props);}// Update the content when used in a dynamiczone +if(prevProps.value!==this.props.value&&!this.state.isFocused){this.setInitialValue(this.props);}}/** + * Init the editor with data from + * @param {[type]} props [description] + */},{key:"render",value:function render(){var _this2=this;var _this$state=this.state,editorState=_this$state.editorState,isPreviewMode=_this$state.isPreviewMode,isFullscreen=_this$state.isFullscreen;var editorStyle=isFullscreen?{marginTop:'0'}:this.props.style;return/*#__PURE__*/_react["default"].createElement(_WysiwygProvider["default"],{handleChangeSelect:this.handleChangeSelect,headerValue:this.state.headerValue,html:this.props.value,isPreviewMode:this.state.isPreviewMode,isFullscreen:this.state.isFullscreen,placeholder:this.props.placeholder},/*#__PURE__*/_react["default"].createElement(_EditorWrapper["default"],{isFullscreen:isFullscreen},/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])('editorWrapper',!this.props.deactivateErrorHighlight&&this.props.error&&'editorError',!(0,_lodash.isEmpty)(this.props.className)&&this.props.className),onClick:function onClick(e){if(isFullscreen){e.preventDefault();e.stopPropagation();}},onDragEnter:this.handleDragEnter,onDragOver:this.handleDragOver,style:editorStyle},this.state.isDraging&&this.renderDrop(),/*#__PURE__*/_react["default"].createElement("div",{className:"controlsContainer"},/*#__PURE__*/_react["default"].createElement(_customSelect["default"],null),_constants.CONTROLS.map(function(value,key){return/*#__PURE__*/_react["default"].createElement(_WysiwygInlineControls["default"],{key:key,buttons:value,disabled:isPreviewMode,editorState:editorState,handlers:{addContent:_this2.addContent,addOlBlock:_this2.addOlBlock,addSimpleBlockWithSelection:_this2.addSimpleBlockWithSelection,addUlBlock:_this2.addUlBlock},onToggle:_this2.toggleInlineStyle,onToggleBlock:_this2.toggleBlockType});}),!isFullscreen?/*#__PURE__*/_react["default"].createElement(_toggleMode["default"],{isPreviewMode:isPreviewMode,onClick:this.handleClickPreview}):/*#__PURE__*/_react["default"].createElement("div",{style:{marginRight:'10px'}})),isPreviewMode?/*#__PURE__*/_react["default"].createElement(_previewWysiwyg["default"],{data:this.props.value}):/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])('editor',isFullscreen&&'editorFullScreen'),onClick:this.focus},/*#__PURE__*/_react["default"].createElement(_WysiwygEditor["default"],{blockStyleFn:_helpers.getBlockStyle,editorState:editorState,handleKeyCommand:this.handleKeyCommand,handlePastedFiles:this.handlePastedFiles,handleReturn:this.handleReturn,keyBindingFn:this.mapKeyToEditorCommand,onBlur:this.handleBlur,onChange:this.onChange,onTab:this.handleTab,placeholder:this.props.placeholder,setRef:function setRef(editor){return _this2.domEditor=editor;},stripPastedStyles:true,tabIndex:this.props.tabIndex}),/*#__PURE__*/_react["default"].createElement("input",{className:"editorInput",tabIndex:"-1"})),!isFullscreen&&/*#__PURE__*/_react["default"].createElement(_WysiwygBottomControls["default"],{isPreviewMode:isPreviewMode,onClick:this.toggleFullScreen,onChange:this.handleDrop})),isFullscreen&&/*#__PURE__*/_react["default"].createElement("div",{className:(0,_classnames["default"])('editorWrapper'),onClick:function onClick(e){e.preventDefault();e.stopPropagation();},style:{marginTop:'0'}},/*#__PURE__*/_react["default"].createElement(_previewControl["default"],{onClick:this.toggleFullScreen,characters:this.getCharactersNumber()}),/*#__PURE__*/_react["default"].createElement(_previewWysiwyg["default"],{data:this.props.value}))));}}]);return Wysiwyg;}(_react["default"].Component);Wysiwyg.defaultProps={autoFocus:false,className:'',deactivateErrorHighlight:false,error:false,onBlur:function onBlur(){},onChange:function onChange(){},placeholder:'',resetProps:false,style:{},tabIndex:'0',value:''};Wysiwyg.propTypes={autoFocus:_propTypes["default"].bool,className:_propTypes["default"].string,deactivateErrorHighlight:_propTypes["default"].bool,error:_propTypes["default"].bool,name:_propTypes["default"].string.isRequired,onBlur:_propTypes["default"].func,onChange:_propTypes["default"].func,placeholder:_propTypes["default"].string,resetProps:_propTypes["default"].bool,style:_propTypes["default"].object,tabIndex:_propTypes["default"].string,value:_propTypes["default"].string};var _default=Wysiwyg;exports["default"]=_default; + +/***/ }), + +/***/ 2170: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _Wysiwyg=_interopRequireDefault(__webpack_require__(1953));function WysiwygProvider(_ref){var children=_ref.children,rest=(0,_objectWithoutProperties2["default"])(_ref,["children"]);return/*#__PURE__*/_react["default"].createElement(_Wysiwyg["default"].Provider,{value:rest},children);}WysiwygProvider.propTypes={children:_propTypes["default"].node.isRequired};var _default=WysiwygProvider;exports["default"]=_default; + +/***/ }), + +/***/ 2171: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _Button=_interopRequireDefault(__webpack_require__(2172));var _Wrapper=_interopRequireDefault(__webpack_require__(2184));/** + * + * WysiwygInlineControls + * + */var WysiwygInlineControls=function WysiwygInlineControls(_ref){var buttons=_ref.buttons,disabled=_ref.disabled,editorState=_ref.editorState,handlers=_ref.handlers,onToggle=_ref.onToggle,onToggleBlock=_ref.onToggleBlock;var selection=editorState.getSelection();var blockType=editorState.getCurrentContent().getBlockForKey(selection.getStartKey()).getType();var currentStyle=editorState.getCurrentInlineStyle();return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,buttons.map(function(type){return/*#__PURE__*/_react["default"].createElement(_Button["default"],{key:type.label,active:type.style===blockType||currentStyle.has(type.style),className:type.className,disabled:disabled,handler:type.handler,handlers:handlers,hideLabel:type.hideLabel||false,label:type.label,onToggle:onToggle,onToggleBlock:onToggleBlock,style:type.style,text:type.text});}));};WysiwygInlineControls.defaultProps={buttons:[],disabled:false,onToggle:function onToggle(){},onToggleBlock:function onToggleBlock(){}};WysiwygInlineControls.propTypes={buttons:_propTypes["default"].array,disabled:_propTypes["default"].bool,editorState:_propTypes["default"].object.isRequired,handlers:_propTypes["default"].object.isRequired,onToggle:_propTypes["default"].func,onToggleBlock:_propTypes["default"].func};var _default=WysiwygInlineControls;exports["default"]=_default; + +/***/ }), + +/***/ 2172: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _Bold=_interopRequireDefault(__webpack_require__(2173));var _Code=_interopRequireDefault(__webpack_require__(2174));var _Media=_interopRequireDefault(__webpack_require__(2175));var _Italic=_interopRequireDefault(__webpack_require__(2176));var _Link=_interopRequireDefault(__webpack_require__(2177));var _Ol=_interopRequireDefault(__webpack_require__(2178));var _Quote=_interopRequireDefault(__webpack_require__(2179));var _Striked=_interopRequireDefault(__webpack_require__(2180));var _Ul=_interopRequireDefault(__webpack_require__(2181));var _Underline=_interopRequireDefault(__webpack_require__(2182));var _StyledButton=_interopRequireDefault(__webpack_require__(2183));var icons={bold:_Bold["default"],italic:_Italic["default"],underline:_Underline["default"],ul:_Ul["default"],ol:_Ol["default"],link:_Link["default"],quote:_Quote["default"],code:_Code["default"],striked:_Striked["default"],img:_Media["default"]};var Button=function Button(_ref){var active=_ref.active,disabled=_ref.disabled,type=_ref.className,handler=_ref.handler,handlers=_ref.handlers,hideLabel=_ref.hideLabel,label=_ref.label,style=_ref.style,text=_ref.text;var handleClick=function handleClick(e){e.preventDefault();handlers[handler](text,style);};var Icon=icons[type];return/*#__PURE__*/_react["default"].createElement(_StyledButton["default"],{active:active,disabled:disabled,onClick:handleClick,type:type},icons[type]&&/*#__PURE__*/_react["default"].createElement(Icon,null),!hideLabel&&label);};Button.defaultProps={active:false,className:'',disabled:false,hideLabel:false,label:'',style:'',text:''};Button.propTypes={active:_propTypes["default"].bool,className:_propTypes["default"].string,disabled:_propTypes["default"].bool,handler:_propTypes["default"].string.isRequired,handlers:_propTypes["default"].object.isRequired,hideLabel:_propTypes["default"].bool,label:_propTypes["default"].string,style:_propTypes["default"].string,text:_propTypes["default"].string};var _default=Button;exports["default"]=_default; + +/***/ }), + +/***/ 2173: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Bold=function Bold(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"9",height:"10",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("text",{transform:"translate(-12 -10)",fill:"#333740",fillRule:"evenodd",fontSize:"13",fontFamily:"Baskerville-SemiBold, Baskerville",fontWeight:"500"},/*#__PURE__*/_react["default"].createElement("tspan",{x:"12",y:"20"},"B")));};var _default=Bold;exports["default"]=_default; + +/***/ }), + +/***/ 2174: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Code=function Code(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"12",height:"8",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"#333740",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("path",{d:"M3.653 7.385a.632.632 0 0 1-.452-.191L.214 4.154a.66.66 0 0 1 0-.922L3.201.19a.632.632 0 0 1 .905 0 .66.66 0 0 1 0 .921l-2.534 2.58 2.534 2.58a.66.66 0 0 1 0 .922.632.632 0 0 1-.453.19zM8.347 7.385a.632.632 0 0 0 .452-.191l2.987-3.04a.66.66 0 0 0 0-.922L8.799.19a.632.632 0 0 0-.905 0 .66.66 0 0 0 0 .921l2.534 2.58-2.534 2.58a.66.66 0 0 0 0 .922c.125.127.289.19.453.19z"})));};var _default=Code;exports["default"]=_default; + +/***/ }), + +/***/ 2175: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Media=function Media(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"12",height:"11",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"#333740",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("path",{d:"M9 4.286a1.286 1.286 0 1 0 0-2.572 1.286 1.286 0 0 0 0 2.572z"}),/*#__PURE__*/_react["default"].createElement("path",{d:"M11.25 0H.75C.332 0 0 .34 0 .758v8.77c0 .418.332.758.75.758h10.5c.418 0 .75-.34.75-.758V.758A.752.752 0 0 0 11.25 0zM8.488 5.296a.46.46 0 0 0-.342-.167c-.137 0-.234.065-.343.153l-.501.423c-.105.075-.188.126-.308.126a.443.443 0 0 1-.295-.11 3.5 3.5 0 0 1-.115-.11L5.143 4.054a.59.59 0 0 0-.897.008L.857 8.148V1.171a.353.353 0 0 1 .351-.314h9.581a.34.34 0 0 1 .346.322l.008 6.975-2.655-2.858z"})));};var _default=Media;exports["default"]=_default; + +/***/ }), + +/***/ 2176: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Italic=function Italic(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"6",height:"9",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("text",{transform:"translate(-13 -11)",fill:"#333740",fillRule:"evenodd",fontWeight:"500",fontSize:"13",fontFamily:"Baskerville-SemiBoldItalic, Baskerville",fontStyle:"italic"},/*#__PURE__*/_react["default"].createElement("tspan",{x:"13",y:"20"},"I")));};var _default=Italic;exports["default"]=_default; + +/***/ }), + +/***/ 2177: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Link=function Link(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"12",height:"6",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"none",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("path",{d:"M6.063 1.5H6h.063z",fill:"#000"}),/*#__PURE__*/_react["default"].createElement("path",{d:"M9.516 0H8s.813.531.988 1.5h.528c.55 0 .984.434.984.984v1c0 .55-.434 1.016-.984 1.016h-3.5A1.03 1.03 0 0 1 5 3.484V2.5H3.5v.984A2.518 2.518 0 0 0 6.016 6h3.5C10.896 6 12 4.866 12 3.484v-1A2.473 2.473 0 0 0 9.516 0z",fill:"#333740"}),/*#__PURE__*/_react["default"].createElement("path",{d:"M8.3 1.5A2.473 2.473 0 0 0 6.016 0h-3.5C1.134 0 0 1.103 0 2.484v1A2.526 2.526 0 0 0 2.516 6H4s-.806-.531-1.003-1.5h-.481A1.03 1.03 0 0 1 1.5 3.484v-1c0-.55.466-.984 1.016-.984h3.5c.55 0 .984.434.984.984V3.5h1.5V2.484c0-.35-.072-.684-.2-.984z",fill:"#333740"})));};var _default=Link;exports["default"]=_default; + +/***/ }), + +/***/ 2178: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Ol=function Ol(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"12",height:"8",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"#333740",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("path",{d:"M2.4 3H.594v-.214h.137c.123 0 .212-.01.266-.032.053-.022.086-.052.1-.092a.67.67 0 0 0 .018-.188V.74a.46.46 0 0 0-.03-.194C1.064.504 1.021.476.955.46A1.437 1.437 0 0 0 .643.435H.539V.23c.332-.035.565-.067.7-.096.135-.03.258-.075.37-.134h.275v2.507c0 .104.023.177.07.218.047.04.14.061.278.061H2.4V3zM2.736 6.695l-.132.528h-.246a.261.261 0 0 0 .015-.074c0-.058-.049-.087-.146-.087H.293v-.198c.258-.173.511-.367.76-.581.25-.215.457-.437.623-.667.166-.23.249-.447.249-.653a.49.49 0 0 0-.321-.478.794.794 0 0 0-.582-.006.482.482 0 0 0-.196.138.284.284 0 0 0-.07.182c0 .074.04.17.12.289.006.008.009.015.009.02 0 .012-.041.03-.123.053l-.19.057a.693.693 0 0 1-.115.03c-.031 0-.067-.038-.108-.114a.516.516 0 0 1 .071-.586.899.899 0 0 1 .405-.238c.18-.058.4-.087.657-.087.317 0 .566.044.749.132.183.087.306.187.37.3a.64.64 0 0 1 .094.312c0 .197-.089.389-.266.575a5.296 5.296 0 0 1-.916.74 62.947 62.947 0 0 1-.62.413h1.843zM4 0h8v1H4zM4 2h8v1H4zM4 4h8v1H4zM4 6h8v1H4z"})));};var _default=Ol;exports["default"]=_default; + +/***/ }), + +/***/ 2179: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Quote=function Quote(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"9",height:"9",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"#333740",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("path",{d:"M3 0C2.047 0 1.301.263.782.782.263 1.302 0 2.047 0 3v6h3.75V3H1.5c0-.54.115-.93.343-1.157C2.07 1.615 2.46 1.5 3 1.5M8.25 0c-.953 0-1.699.263-2.218.782-.519.52-.782 1.265-.782 2.218v6H9V3H6.75c0-.54.115-.93.343-1.157.227-.228.617-.343 1.157-.343"})));};var _default=Quote;exports["default"]=_default; + +/***/ }), + +/***/ 2180: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Striked=function Striked(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"19",height:"10",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"none",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("text",{fontFamily:"Lato-Semibold, Lato",fontSize:"11",fontWeight:"500",fill:"#41464E",transform:"translate(0 -2)"},/*#__PURE__*/_react["default"].createElement("tspan",{x:"1",y:"11"},"abc")),/*#__PURE__*/_react["default"].createElement("path",{d:"M.5 6.5h18",stroke:"#2C3039",strokeLinecap:"square"})));};var _default=Striked;exports["default"]=_default; + +/***/ }), + +/***/ 2181: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Ul=function Ul(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"13",height:"7",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("g",{fill:"none",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("path",{fill:"#333740",d:"M5 0h8v1H5zM5 2h8v1H5zM5 4h8v1H5zM5 6h8v1H5z"}),/*#__PURE__*/_react["default"].createElement("rect",{stroke:"#333740",x:".5",y:".5",width:"2",height:"2",rx:"1"}),/*#__PURE__*/_react["default"].createElement("rect",{stroke:"#333740",x:".5",y:"4.5",width:"2",height:"2",rx:"1"})));};var _default=Ul;exports["default"]=_default; + +/***/ }), + +/***/ 2182: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var Underline=function Underline(){return/*#__PURE__*/_react["default"].createElement("svg",{width:"10",height:"10",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/_react["default"].createElement("text",{transform:"translate(-10 -11)",fill:"#101622",fillRule:"evenodd",fontSize:"13",fontFamily:"Baskerville-SemiBold, Baskerville",fontWeight:"500"},/*#__PURE__*/_react["default"].createElement("tspan",{x:"10",y:"20"},"U")));};var _default=Underline;exports["default"]=_default; + +/***/ }), + +/***/ 2183: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n opacity: 0.7;\n cursor: not-allowed;\n "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n border: 0;\n background: rgba(16, 22, 34, 0);\n box-shadow: inset 0 -1px 0 0 rgba(16, 22, 34, 0.04),\n inset 0 1px 0 0 rgba(16, 22, 34, 0.04);\n "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 32px;\n min-width: 32px;\n background-color: #ffffff;\n border: 1px solid rgba(16, 22, 34, 0.1);\n font-size: 13px;\n font-weight: 500;\n line-height: 32px;\n text-align: center;\n cursor: pointer;\n\n &:hover {\n background-color: #f3f4f4;\n }\n &:active,\n &:focus {\n outline: 0;\n }\n\n ","\n\n > svg {\n margin: auto;\n > text {\n font-family: Baskerville-SemiBoldItalic, Baskerville;\n }\n }\n\n background-position: center;\n background-repeat: no-repeat;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Button=_styledComponents["default"].button(_templateObject(),function(_ref){var active=_ref.active,disabled=_ref.disabled;if(active){return(0,_styledComponents.css)(_templateObject2());}if(disabled){return(0,_styledComponents.css)(_templateObject3());}return'';});var _default=Button;exports["default"]=_default; + +/***/ }), + +/***/ 2184: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n height: 49px;\n display: flex;\n padding: 8px 3px 0 10px;\n background-color: #f3f4f4;\n user-select: none;\n overflow-x: auto;\n > button:nth-child(even) {\n border-left: 0;\n border-right: 0;\n }\n > button:first-child {\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n }\n > button:last-child {\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n border-right: 1px solid rgba(16, 22, 34, 0.1);\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2185: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _Label=_interopRequireDefault(__webpack_require__(2186));/** + * + * WysiwygDropUpload + * + */var WysiwygDropUpload=function WysiwygDropUpload(props){return/*#__PURE__*/_react["default"].createElement(_Label["default"],props,/*#__PURE__*/_react["default"].createElement("input",{onChange:function onChange(){},type:"file",tabIndex:"-1"}));};var _default=WysiwygDropUpload;exports["default"]=_default; + +/***/ }), + +/***/ 2186: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n background-color: rgba(28, 93, 231, 0.01);\n\n > input {\n display: none;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Label=_styledComponents["default"].label(_templateObject());var _default=Label;exports["default"]=_default; + +/***/ }), + +/***/ 2187: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _components=__webpack_require__(2188);/** + * + * WysiwygBottomControls + * + */ /* eslint-disable jsx-a11y/label-has-associated-control */ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ /* eslint-disable jsx-a11y/no-static-element-interactions */var WysiwygBottomControls=function WysiwygBottomControls(_ref){var isPreviewMode=_ref.isPreviewMode,onChange=_ref.onChange,onClick=_ref.onClick;var browse=/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.WysiwygBottomControls.uploadFiles.browse"},function(message){return/*#__PURE__*/_react["default"].createElement(_components.Span,null,message);});return/*#__PURE__*/_react["default"].createElement(_components.Wrapper,null,/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement("label",{className:"dropLabel",onClick:function onClick(e){if(isPreviewMode){e.preventDefault();}}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.WysiwygBottomControls.uploadFiles",values:{browse:browse}}),/*#__PURE__*/_react["default"].createElement("input",{type:"file",onChange:onChange}))),/*#__PURE__*/_react["default"].createElement("div",{className:"fullScreenWrapper",onClick:onClick},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.WysiwygBottomControls.fullscreen"})));};WysiwygBottomControls.defaultProps={isPreviewMode:false,onChange:function onChange(){},onClick:function onClick(){}};WysiwygBottomControls.propTypes={isPreviewMode:_propTypes["default"].bool,onChange:_propTypes["default"].func,onClick:_propTypes["default"].func};var _default=WysiwygBottomControls;exports["default"]=_default; + +/***/ }), + +/***/ 2188: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wrapper=exports.Span=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 30px;\n width: 100%;\n padding: 0 15px;\n justify-content: space-between;\n background-color: #fafafb;\n line-height: 30px;\n font-size: 13px;\n font-family: Lato;\n border-top: 1px dashed #e3e4e4;\n\n > div:first-child {\n > span:last-child {\n font-size: 12px;\n }\n }\n\n .fullScreenWrapper {\n cursor: pointer;\n &:after {\n content: '\f065';\n margin-left: 8px;\n font-family: FontAwesome;\n font-size: 12px;\n }\n }\n\n .dropLabel {\n > input {\n display: none;\n }\n }\n"],["\n display: flex;\n height: 30px;\n width: 100%;\n padding: 0 15px;\n justify-content: space-between;\n background-color: #fafafb;\n line-height: 30px;\n font-size: 13px;\n font-family: Lato;\n border-top: 1px dashed #e3e4e4;\n\n > div:first-child {\n > span:last-child {\n font-size: 12px;\n }\n }\n\n .fullScreenWrapper {\n cursor: pointer;\n &:after {\n content: '\\f065';\n margin-left: 8px;\n font-family: FontAwesome;\n font-size: 12px;\n }\n }\n\n .dropLabel {\n > input {\n display: none;\n }\n }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n color: #1c5de7;\n text-decoration: underline;\n cursor: pointer;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Span=_styledComponents["default"].span(_templateObject());exports.Span=Span;var Wrapper=_styledComponents["default"].div(_templateObject2());exports.Wrapper=Wrapper; + +/***/ }), + +/***/ 2189: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _strapiHelperPlugin=__webpack_require__(10);var _useWysiwyg2=_interopRequireDefault(__webpack_require__(2190));var _constants=__webpack_require__(1954);var _SelectWrapper=_interopRequireDefault(__webpack_require__(2191));/** + * + * + * CustomSelect + * + */var CustomSelect=function CustomSelect(){var _useWysiwyg=(0,_useWysiwyg2["default"])(),isPreviewMode=_useWysiwyg.isPreviewMode,headerValue=_useWysiwyg.headerValue,isFullscreen=_useWysiwyg.isFullscreen,handleChangeSelect=_useWysiwyg.handleChangeSelect;return/*#__PURE__*/_react["default"].createElement(_SelectWrapper["default"],{isFullscreen:isFullscreen},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.InputSelect,{disabled:isPreviewMode,name:"headerSelect",onChange:handleChangeSelect,value:headerValue,selectOptions:_constants.SELECT_OPTIONS}));};var _default=CustomSelect;exports["default"]=_default; + +/***/ }), + +/***/ 2190: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var _Wysiwyg=_interopRequireDefault(__webpack_require__(1953));var useWysiwyg=function useWysiwyg(){return(0,_react.useContext)(_Wysiwyg["default"]);};var _default=useWysiwyg;exports["default"]=_default; + +/***/ }), + +/***/ 2191: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n margin-right: 5px;\n "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n min-width: 110px !important;\n "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n min-width: ",";\n margin-left: 15px;\n > select {\n ","\n box-shadow: 0 0 0 rgba(0, 0, 0, 0) !important;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var SelectWrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isFullScreen=_ref.isFullScreen;return isFullScreen?'161px':'115px';},function(_ref2){var isFullScreen=_ref2.isFullScreen;if(isFullScreen){return(0,_styledComponents.css)(_templateObject2());}else{return(0,_styledComponents.css)(_templateObject3());}});var _default=SelectWrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2192: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _PreviewControlWrapper=_interopRequireDefault(__webpack_require__(2193));/** + * + * + * PreviewControl + * + */var PreviewControl=function PreviewControl(_ref){var onClick=_ref.onClick;return/*#__PURE__*/_react["default"].createElement(_PreviewControlWrapper["default"],{onClick:onClick},/*#__PURE__*/_react["default"].createElement("div",null),/*#__PURE__*/_react["default"].createElement("div",{className:"wysiwygCollapse"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.Wysiwyg.collapse"})));};PreviewControl.defaultProps={onClick:function onClick(){}};PreviewControl.propTypes={onClick:_propTypes["default"].func};var _default=PreviewControl;exports["default"]=_default; + +/***/ }), + +/***/ 2193: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: flex;\n height: 49px;\n width: 100%;\n padding: 0 17px;\n justify-content: space-between;\n background-color: #fafafb;\n line-height: 30px;\n font-size: 12px;\n font-family: Lato;\n background-color: #fff;\n border-bottom: 1px solid #f3f4f4;\n line-height: 49px;\n font-size: 13px;\n > div:first-child {\n > span:last-child {\n font-size: 12px;\n }\n }\n cursor: pointer;\n\n .wysiwygCollapse {\n &:after {\n content: '\f066';\n font-family: FontAwesome;\n margin-left: 8px;\n }\n }\n"],["\n display: flex;\n height: 49px;\n width: 100%;\n padding: 0 17px;\n justify-content: space-between;\n background-color: #fafafb;\n line-height: 30px;\n font-size: 12px;\n font-family: Lato;\n background-color: #fff;\n border-bottom: 1px solid #f3f4f4;\n line-height: 49px;\n font-size: 13px;\n > div:first-child {\n > span:last-child {\n font-size: 12px;\n }\n }\n cursor: pointer;\n\n .wysiwygCollapse {\n &:after {\n content: '\\f066';\n font-family: FontAwesome;\n margin-left: 8px;\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var PreviewControlWrapper=_styledComponents["default"].div(_templateObject());var _default=PreviewControlWrapper;exports["default"]=_default; + +/***/ }), + +/***/ 2194: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _draftJs=__webpack_require__(1924);var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);var _Wysiwyg=_interopRequireDefault(__webpack_require__(1953));var _WysiwygEditor=_interopRequireDefault(__webpack_require__(1998));var _converter=_interopRequireDefault(__webpack_require__(2195));var _strategies=__webpack_require__(2197);var _PreviewWysiwygWrapper=_interopRequireDefault(__webpack_require__(2198));var _image=_interopRequireDefault(__webpack_require__(2199));var _link=_interopRequireDefault(__webpack_require__(2200));var _video=_interopRequireDefault(__webpack_require__(2201));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}/* eslint-disable react/no-unused-state */ /* eslint-disable no-new */ /* eslint-disable consistent-return */ /* eslint-disable react/sort-comp */function getBlockStyle(block){switch(block.getType()){case'blockquote':return'editorBlockquote';case'code-block':return'editorCodeBlock';case'unstyled':return'editorParagraph';case'unordered-list-item':return'unorderedList';case'ordered-list-item':case'header-one':case'header-two':case'header-three':case'header-four':case'header-five':case'header-six':default:return null;}}var decorator=new _draftJs.CompositeDecorator([{strategy:_strategies.findLinkEntities,component:_link["default"]},{strategy:_strategies.findImageEntities,component:_image["default"]},{strategy:_strategies.findVideoEntities,component:_video["default"]},{strategy:_strategies.findAtomicEntities,component:_link["default"]}]);var getBlockSpecForElement=function getBlockSpecForElement(aElement){return{contentType:'link',aHref:aElement.href,aInnerHTML:aElement.innerHTML};};var elementToBlockSpecElement=function elementToBlockSpecElement(element){return wrapBlockSpec(getBlockSpecForElement(element));};var wrapBlockSpec=function wrapBlockSpec(blockSpec){if(blockSpec==null){return null;}var tempEl=document.createElement('blockquote');// stringify meta data and insert it as text content of temp HTML element. We will later extract +// and parse it. +tempEl.innerText=JSON.stringify(blockSpec);return tempEl;};var replaceElement=function replaceElement(oldEl,newEl){if(!(newEl instanceof HTMLElement)){return;}var parentNode=oldEl.parentNode;return parentNode.replaceChild(newEl,oldEl);};var aReplacer=function aReplacer(aElement){return replaceElement(aElement,elementToBlockSpecElement(aElement));};var createContentBlock=function createContentBlock(){var blockData=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var key=blockData.key,type=blockData.type,text=blockData.text,data=blockData.data,inlineStyles=blockData.inlineStyles,entityData=blockData.entityData;var blockSpec={type:type!==null&&type!==undefined?type:'unstyled',text:text!==null&&text!==undefined?text:'',key:key!==null&&key!==undefined?key:(0,_draftJs.genKey)()};if(data){blockSpec.data=(0,_immutable.fromJS)(data);}if(inlineStyles||entityData){var entityKey;if(entityData){var _type=entityData.type,mutability=entityData.mutability,_data=entityData.data;entityKey=_draftJs.Entity.create(_type,mutability,_data);}else{entityKey=null;}var style=(0,_immutable.OrderedSet)(inlineStyles||[]);var charData=_draftJs.CharacterMetadata.applyEntity(_draftJs.CharacterMetadata.create({style:style,entityKey:entityKey}),entityKey);blockSpec.characterList=(0,_immutable.List)((0,_immutable.Repeat)(charData,text.length));}return new _draftJs.ContentBlock(blockSpec);};var PreviewWysiwyg=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(PreviewWysiwyg,_React$PureComponent);var _super=_createSuper(PreviewWysiwyg);function PreviewWysiwyg(){var _this;(0,_classCallCheck2["default"])(this,PreviewWysiwyg);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"state",{editorState:_draftJs.EditorState.createEmpty(),isMounted:false});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"previewHTML",function(rawContent){var initHtml=(0,_lodash.isEmpty)(rawContent)?'

    ':rawContent;var html=new DOMParser().parseFromString(_converter["default"].makeHtml(initHtml),'text/html');(0,_lodash.toArray)(html.getElementsByTagName('a'))// Retrieve all the links
    tags +.filter(function(value){return value.getElementsByTagName('img').length>0;})// Filter by checking if they have any children +.forEach(aReplacer);// Change those links into
    elements so we can set some metacharacters with the img content +// TODO: +// in the same way, retrieve all
     tags
    +// create custom atomic block
    +// create custom code block
    +var blocksFromHTML=(0,_draftJs.convertFromHTML)(html.body.innerHTML);if(blocksFromHTML.contentBlocks){blocksFromHTML=blocksFromHTML.contentBlocks.reduce(function(acc,block){if(block.getType()==='blockquote'){try{var _JSON$parse=JSON.parse(block.getText()),aHref=_JSON$parse.aHref,aInnerHTML=_JSON$parse.aInnerHTML;var entityData={type:'LINK',mutability:'IMMUTABLE',data:{aHref:aHref,aInnerHTML:aInnerHTML}};var blockSpec=Object.assign({type:'atomic',text:' ',key:block.getKey()},{entityData:entityData});var atomicBlock=createContentBlock(blockSpec);// Create an atomic block so we can identify it easily
    +return acc.concat([atomicBlock]);}catch(err){return acc.concat(block);}}return acc.concat(block);},[]);var contentState=_draftJs.ContentState.createFromBlockArray(blocksFromHTML);return _this.setState({editorState:_draftJs.EditorState.createWithContent(contentState,decorator)});}return _this.setState({editorState:_draftJs.EditorState.createEmpty()});});return _this;}(0,_createClass2["default"])(PreviewWysiwyg,[{key:"componentDidMount",value:function componentDidMount(){var data=this.props.data;this.setState({isMounted:true});if(!(0,_lodash.isEmpty)(data)){this.previewHTML(data);}}// NOTE: This is not optimal and this lifecycle should be removed
    +// I couldn't find a better way to decrease the fullscreen preview's data conversion time
    +// Trying with componentDidUpdate didn't work
    +},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(nextProps,nextState){var _this2=this;if(nextProps.data!==this.props.data){new Promise(function(resolve){setTimeout(function(){if(nextProps.data===_this2.props.data&&nextState.isMounted){// I use an handler here to update the state which is fine since the condition above prevent
    +// from entering into an infinite loop
    +_this2.previewHTML(nextProps.data);}resolve();},300);});}}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.setState({isMounted:false});}},{key:"render",value:function render(){var placeholder=this.context.placeholder;return/*#__PURE__*/_react["default"].createElement(_PreviewWysiwygWrapper["default"],{isFullscreen:this.context.isFullscreen},/*#__PURE__*/_react["default"].createElement(_WysiwygEditor["default"],{blockStyleFn:getBlockStyle,editorState:this.state.editorState,onChange:function onChange(){},placeholder:placeholder}),/*#__PURE__*/_react["default"].createElement("input",{className:"editorInput",value:"",onChange:function onChange(){},tabIndex:"-1"}));}}]);return PreviewWysiwyg;}(_react["default"].PureComponent);(0,_defineProperty2["default"])(PreviewWysiwyg,"contextType",_Wysiwyg["default"]);PreviewWysiwyg.defaultProps={data:''};PreviewWysiwyg.propTypes={data:_propTypes["default"].string};var _default=PreviewWysiwyg;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2195:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _showdown=_interopRequireDefault(__webpack_require__(2196));var converterOptions={backslashEscapesHTMLTags:true,emoji:true,parseImgDimensions:true,simpleLineBreaks:true,simplifiedAutoLink:true,smoothLivePreview:true,splitAdjacentBlockquotes:false,strikethrough:true,tables:true,tasklists:true,underline:true};var converter=new _showdown["default"].Converter(converterOptions);var _default=converter;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2197:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports.findAtomicEntities=findAtomicEntities;exports.findLinkEntities=findLinkEntities;exports.findImageEntities=findImageEntities;exports.findVideoEntities=findVideoEntities;/* eslint-disable no-unused-vars */function findLinkEntities(contentBlock,callback,contentState){contentBlock.findEntityRanges(function(character){var entityKey=character.getEntity();return entityKey!==null&&contentState.getEntity(entityKey).getType()==='LINK';},callback);}function findAtomicEntities(contentBlock,callback,contentState){contentBlock.findEntityRanges(function(character){var entityKey=character.getEntity();return entityKey!==null&&contentBlock.getType()==='atomic';},callback);}function findImageEntities(contentBlock,callback,contentState){contentBlock.findEntityRanges(function(character){var entityKey=character.getEntity();return entityKey!==null&&contentState.getEntity(entityKey).getType()==='IMAGE'&&!isVideoType(contentState.getEntity(entityKey).getData().src);},callback);}function findVideoEntities(contentBlock,cb,contentState){contentBlock.findEntityRanges(function(character){var entityKey=character.getEntity();return entityKey!==null&&contentState.getEntity(entityKey).getType()==='IMAGE'&&isVideoType(contentState.getEntity(entityKey).getData().src);},cb);}var isVideoType=function isVideoType(fileName){return /\.(mp4|mpg|mpeg|mov|avi)$/i.test(fileName);};
    +
    +/***/ }),
    +
    +/***/ 2198:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        max-height: calc(100% - 70px) !important;\n        margin-bottom: 0;\n        margin-top: 9px;\n        padding: 10px 20px;\n        overflow: auto;\n      "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  max-height: 555px;\n  min-height: 294px;\n  overflow: auto;\n  padding: 20px 20px 0 20px;\n  font-size: 16px;\n  background-color: #fff;\n  line-height: 24px !important;\n  font-family: 'Lato';\n  cursor: text;\n\n  // TODO define rules for header's margin\n  h1,\n  h2,\n  h3,\n  h4,\n  h5,\n  h6 {\n    margin: 0;\n    line-height: 24px !important;\n    font-family: 'Lato';\n  }\n\n  h1 {\n    margin-top: 11px !important;\n    font-size: 36px;\n    font-weight: 600;\n  }\n\n  h2 {\n    margin-top: 26px;\n    font-size: 30px;\n    font-weight: 500;\n  }\n\n  h3 {\n    margin-top: 26px;\n    font-size: 24px;\n    font-weight: 500;\n  }\n\n  h4 {\n    margin-top: 26px;\n    font-size: 20px;\n    font-weight: 500;\n  }\n\n  > div {\n    > div {\n      > div {\n        margin-bottom: 32px;\n      }\n    }\n  }\n\n  li {\n    margin-top: 0;\n  }\n\n  ul,\n  ol {\n    padding: 0;\n    margin-top: 27px;\n  }\n\n  ol {\n    padding-left: 20px;\n  }\n\n  // NOTE: we might need this later\n  span {\n    white-space: pre-line;\n  }\n\n  h1 + .editorParagraph {\n    margin-top: 31px;\n  }\n\n  .editorParagraph + * {\n    margin-bottom: -2px !important;\n  }\n\n  .editorParagraph + .editorBlockquote {\n    margin-bottom: 32px !important;\n  }\n\n  .editorBlockquote + ul {\n    margin-top: 38px !important;\n  }\n\n  .editorParagraph {\n    color: #333740;\n    margin-top: 27px;\n    margin-bottom: -3px;\n    font-size: 16px;\n    font-weight: 400;\n  }\n\n  .editorBlockquote {\n    margin-top: 41px;\n    margin-bottom: 34px;\n    font-size: 16px;\n    font-weight: 400;\n    border-left: 5px solid #eee;\n    font-style: italic;\n    padding: 10px 20px;\n  }\n\n  .unorderedList {\n    padding: 0;\n    margin-left: 18px;\n  }\n\n  .editorCodeBlock {\n    padding: 16px;\n    margin-top: 26px;\n    padding-bottom: 0;\n    background-color: rgba(0, 0, 0, 0.05);\n    border-radius: 3px;\n\n    span {\n      font-family: Consolas, monospace !important;\n      font-size: 12px;\n      line-height: 16px;\n      white-space: pre;\n    }\n  }\n\n  .editorInput {\n    height: 0;\n    width: 0;\n  }\n\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var PreviewWysiwygWrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isFullscreen=_ref.isFullscreen;if(isFullscreen){return(0,_styledComponents.css)(_templateObject2());}});var _default=PreviewWysiwygWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2199:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));/**
    + *
    + * Image
    + *
    + */var Image=function Image(props){var _props$contentState$g=props.contentState.getEntity(props.entityKey).getData(),alt=_props$contentState$g.alt,height=_props$contentState$g.height,src=_props$contentState$g.src,width=_props$contentState$g.width;return/*#__PURE__*/_react["default"].createElement("img",{alt:alt,src:src,height:height,width:width,style:{maxWidth:'100%'}});};Image.propTypes={contentState:_propTypes["default"].object.isRequired,entityKey:_propTypes["default"].string.isRequired};var _default=Image;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2200:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);/**
    + *
    + * Link
    + *
    + */var Link=function Link(props){var _props$contentState$g=props.contentState.getEntity(props.entityKey).getData(),url=_props$contentState$g.url,aHref=_props$contentState$g.aHref,aInnerHTML=_props$contentState$g.aInnerHTML;var content=aInnerHTML;if((0,_lodash.includes)(aInnerHTML,' '};case'BOLD':return{innerContent:'bold text',endReplacer:'*',startReplacer:'*'};case'ITALIC':return{innerContent:'italic text',endReplacer:'*',startReplacer:'*'};case'STRIKED':return{innerContent:'striked out',endReplacer:'~',startReplacer:'~'};case'UNDERLINE':return{innerContent:'underlined text',endReplacer:'_',startReplacer:'_'};case'LINK':return{innerContent:'link',endReplacer:')',startReplacer:'[text]('};default:return{innerContent:'',endReplacer:'',startReplacer:''};}}var getDefaultSelectionOffsets=function getDefaultSelectionOffsets(content,startReplacer,endReplacer){var initPosition=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;return{anchorOffset:initPosition+content.length-(0,_lodash.trimStart)(content,startReplacer).length,focusOffset:initPosition+(0,_lodash.trimEnd)(content,endReplacer).length};};/**
    + * Get the start and end offset
    + * @param  {Object} selection
    + * @return {Object}
    + */exports.getDefaultSelectionOffsets=getDefaultSelectionOffsets;function getOffSets(selection){return{end:selection.getEndOffset(),start:selection.getStartOffset()};}function getKeyCommandData(command){var content;var style;switch(command){case'bold':content='**textToReplace**';style='BOLD';break;case'italic':content='*textToReplace*';style='ITALIC';break;case'underline':content='__textToReplace__';style='UNDERLINE';break;default:content='';style='';}return{content:content,style:style};}
    +
    +/***/ }),
    +
    +/***/ 2205:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports.createNewBlock=createNewBlock;exports.getNextBlocksList=getNextBlocksList;exports.updateSelection=updateSelection;exports.getSelectedBlocksList=getSelectedBlocksList;exports.onTab=onTab;var _draftJs=__webpack_require__(1924);var _immutable=__webpack_require__(35);var _constants=__webpack_require__(1954);/**
    + *
    + * Utils
    + *
    + */function createNewBlock(){var text=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';var type=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'unstyled';var key=arguments.length>2&&arguments[2]!==undefined?arguments[2]:(0,_draftJs.genKey)();return new _draftJs.ContentBlock({key:key,type:type,text:text,charaterList:(0,_immutable.List)([])});}function getNextBlocksList(editorState,startKey){return editorState.getCurrentContent().getBlockMap().toSeq().skipUntil(function(_,k){return k===startKey;}).toList().shift().concat([createNewBlock()]);}function updateSelection(selection,blocks,offset){return selection.merge({anchorKey:blocks.get(0).getKey(),focusKey:blocks.get(0).getKey(),anchorOffset:offset,focusOffset:offset});}function getSelectedBlocksList(editorState){var selectionState=editorState.getSelection();var contentState=editorState.getCurrentContent();var startKey=selectionState.getStartKey();var endKey=selectionState.getEndKey();var blockMap=contentState.getBlockMap();return blockMap.toSeq().skipUntil(function(_,k){return k===startKey;}).takeUntil(function(_,k){return k===endKey;}).concat([[endKey,blockMap.get(endKey)]]).toList();}function onTab(editorState){var contentState=editorState.getCurrentContent();var selection=editorState.getSelection();var newContentState;if(selection.isCollapsed()){newContentState=_draftJs.Modifier.insertText(contentState,selection,_constants.DEFAULT_INDENTATION);}else{newContentState=_draftJs.Modifier.replaceText(contentState,selection,_constants.DEFAULT_INDENTATION);}return _draftJs.EditorState.push(editorState,newContentState,'insert-characters');}
    +
    +/***/ }),
    +
    +/***/ 2206:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        position: fixed;\n        z-index: 1040;\n        top: calc(6rem + 90px);\n        left: calc(24rem + 28px);\n        right: 28px;\n        bottom: 32px;\n        display: flex;\n        background-color: transparent;\n        z-index: 99999;\n\n        > div {\n          min-width: 50%;\n        }\n        > div:first-child {\n          border-top-right-radius: 0;\n          border-bottom-right-radius: 0;\n        }\n        > div:last-child {\n          border-left: 0;\n          border-top-left-radius: 0;\n          border-bottom-left-radius: 0;\n        }\n        .editorWrapper {\n          border-color: #f3f4f4 !important;\n        }\n      "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  ","\n\n  .controlsContainer {\n    display: flex;\n    box-sizing: border-box;\n    background-color: #f3f4f4;\n\n    select {\n      min-height: 31px !important;\n      min-width: 161px !important;\n      font-weight: 600;\n      outline: none;\n\n      &:focus,\n      &:active {\n        border: 1px solid #e3e9f3;\n      }\n    }\n  }\n\n  .editorWrapper {\n    min-height: 320px;\n    margin-top: 0.9rem;\n    border: 1px solid #f3f4f4;\n    border-radius: 0.25rem;\n    line-height: 18px !important;\n    font-size: 13px;\n    box-shadow: 0px 1px 1px rgba(104, 118, 142, 0.05);\n    background-color: #fff;\n    position: relative;\n  }\n\n  .editorError {\n    border-color: #ff203c !important;\n  }\n\n  .editor {\n    min-height: 294px;\n    max-height: 555px;\n    padding: 20px 20px 0 20px;\n    font-size: 13px;\n    background-color: #fff;\n    line-height: 18px !important;\n    cursor: text;\n    overflow: auto;\n\n    h1,\n    h2,\n    h3,\n    h4,\n    h5,\n    h6 {\n      margin: 0;\n      line-height: 18px !important;\n    }\n    h1 {\n      margin-top: 13px !important;\n      margin-bottom: 22px;\n    }\n    > div {\n      > div {\n        > div {\n          margin-bottom: 32px;\n        }\n      }\n    }\n    li {\n      margin-top: 0;\n    }\n    ul,\n    ol {\n      margin-bottom: 18px;\n    }\n  }\n\n  .editorFullScreen {\n    max-height: calc(100% - 70px) !important;\n    margin-bottom: 0;\n    overflow: auto;\n  }\n\n  .editorInput {\n    height: 0;\n    width: 0;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var EditorWrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isFullscreen=_ref.isFullscreen;if(isFullscreen){return(0,_styledComponents.css)(_templateObject2());}});var _default=EditorWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2207:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-bottom: 2.4rem;\n  font-size: 1.3rem;\n  font-family: 'Lato'; \n  label {\n    display: block;\n    margin-bottom: 1rem;\n  }\n  &.bordered {\n    .editorWrapper {\n      border-color: red;\n    }\n  }\n  > div + p {\n    width 100%;\n    padding-top: 12px;\n    font-size: 1.2rem;\n    line-height: normal;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    margin-bottom: -9px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2208:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _icons=__webpack_require__(94);var _styles=__webpack_require__(21);var _core=__webpack_require__(53);var _hooks=__webpack_require__(651);var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _getRequestUrl=_interopRequireDefault(__webpack_require__(645));var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _RightLabel=_interopRequireDefault(__webpack_require__(2209));var _Options=_interopRequireDefault(__webpack_require__(2210));var _RegenerateButton=_interopRequireDefault(__webpack_require__(2215));var _RightContent=_interopRequireDefault(__webpack_require__(2216));var _InputUID=_interopRequireDefault(__webpack_require__(2217));var _Wrapper=_interopRequireDefault(__webpack_require__(2218));var _SubLabel=_interopRequireDefault(__webpack_require__(2219));var _regex=_interopRequireDefault(__webpack_require__(2220));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i InputDropdown.
    +// TODO : Use the Compounds components pattern
    +// https://blog.bitsrc.io/understanding-compound-components-in-react-23c4b84535b5
    +var InputUID=function InputUID(_ref){var attribute=_ref.attribute,contentTypeUID=_ref.contentTypeUID,description=_ref.description,inputError=_ref.error,name=_ref.name,onChange=_ref.onChange,required=_ref.required,validations=_ref.validations,value=_ref.value,editable=_ref.editable,inputProps=(0,_objectWithoutProperties2["default"])(_ref,["attribute","contentTypeUID","description","error","name","onChange","required","validations","value","editable"]);var _useDataManager=(0,_useDataManager2["default"])(),modifiedData=_useDataManager.modifiedData,initialData=_useDataManager.initialData;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isLoading=_useState2[0],setIsLoading=_useState2[1];var _useState3=(0,_react.useState)(null),_useState4=(0,_slicedToArray2["default"])(_useState3,2),availability=_useState4[0],setAvailability=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=(0,_slicedToArray2["default"])(_useState5,2),isSuggestionOpen=_useState6[0],setIsSuggestionOpen=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=(0,_slicedToArray2["default"])(_useState7,2),isCustomized=_useState8[0],setIsCustomized=_useState8[1];var _useState9=(0,_react.useState)(),_useState10=(0,_slicedToArray2["default"])(_useState9,2),label=_useState10[0],setLabel=_useState10[1];var debouncedValue=(0,_hooks.useDebounce)(value,300);var debouncedTargetFieldValue=(0,_hooks.useDebounce)(modifiedData[attribute.targetField],300);var wrapperRef=(0,_react.useRef)(null);var generateUid=(0,_react.useRef)();var initialValue=initialData[name];var isCreation=(0,_lodash.isEmpty)(initialData);generateUid.current=/*#__PURE__*/(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){var requestURL,_yield$request,data;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:setIsLoading(true);requestURL=(0,_getRequestUrl["default"])('explorer/uid/generate');_context.prev=2;_context.next=5;return(0,_strapiHelperPlugin.request)(requestURL,{method:'POST',body:{contentTypeUID:contentTypeUID,field:name,data:modifiedData}});case 5:_yield$request=_context.sent;data=_yield$request.data;onChange({target:{name:name,value:data,type:'text'}});setIsLoading(false);_context.next=15;break;case 11:_context.prev=11;_context.t0=_context["catch"](2);console.error({err:_context.t0});setIsLoading(false);case 15:case"end":return _context.stop();}}},_callee,null,[[2,11]]);}));var checkAvailability=/*#__PURE__*/function(){var _ref3=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){var requestURL,data;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:setIsLoading(true);requestURL=(0,_getRequestUrl["default"])('explorer/uid/check-availability');_context2.prev=2;_context2.next=5;return(0,_strapiHelperPlugin.request)(requestURL,{method:'POST',body:{contentTypeUID:contentTypeUID,field:name,value:value?value.trim():null}});case 5:data=_context2.sent;setAvailability(data);if(data.suggestion){setIsSuggestionOpen(true);}setIsLoading(false);_context2.next=15;break;case 11:_context2.prev=11;_context2.t0=_context2["catch"](2);console.error({err:_context2.t0});setIsLoading(false);case 15:case"end":return _context2.stop();}}},_callee2,null,[[2,11]]);}));return function checkAvailability(){return _ref3.apply(this,arguments);};}();(0,_react.useEffect)(function(){if(!value&&required){generateUid.current();}// eslint-disable-next-line react-hooks/exhaustive-deps
    +},[]);(0,_react.useEffect)(function(){if(debouncedValue&&debouncedValue.trim().match(_regex["default"])&&debouncedValue!==initialValue){checkAvailability();}if(!debouncedValue){setAvailability(null);}// eslint-disable-next-line react-hooks/exhaustive-deps
    +},[debouncedValue,initialValue]);(0,_react.useEffect)(function(){var timer;if(availability&&availability.isAvailable){timer=setTimeout(function(){setAvailability(null);},4000);}return function(){if(timer){clearTimeout(timer);}};},[availability]);(0,_react.useEffect)(function(){if(!isCustomized&&isCreation&&debouncedTargetFieldValue!==null){generateUid.current();}},[debouncedTargetFieldValue,isCustomized,isCreation]);(0,_hooks.useClickAwayListener)(wrapperRef,function(){return setIsSuggestionOpen(false);});var handleFocus=function handleFocus(){if(availability&&availability.suggestion){setIsSuggestionOpen(true);}};var handleSuggestionClick=function handleSuggestionClick(){setIsSuggestionOpen(false);onChange({target:{name:name,value:availability.suggestion,type:'text'}});};var handleGenerateMouseEnter=function handleGenerateMouseEnter(){setLabel('regenerate');};var handleGenerateMouseLeave=function handleGenerateMouseLeave(){setLabel(null);};var handleChange=function handleChange(e,canCheck,dispatch){if(!canCheck){dispatch({type:'SET_CHECK'});}dispatch({type:'SET_ERROR',error:null});if(e.target.value&&isCreation){setIsCustomized(true);}onChange(e);};return/*#__PURE__*/_react["default"].createElement(_core.Error,{name:name,inputError:inputError,type:"text",validations:_objectSpread({},validations,{regex:_regex["default"]})},function(_ref4){var canCheck=_ref4.canCheck,onBlur=_ref4.onBlur,error=_ref4.error,dispatch=_ref4.dispatch;var hasError=error&&error!==null;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{ref:wrapperRef},/*#__PURE__*/_react["default"].createElement(Name,{htmlFor:name},name),/*#__PURE__*/_react["default"].createElement(InputContainer,null,/*#__PURE__*/_react["default"].createElement(_InputUID["default"],(0,_extends2["default"])({},inputProps,{editable:editable,error:hasError,onFocus:handleFocus,name:name,onChange:function onChange(e){return handleChange(e,canCheck,dispatch);},type:"text",onBlur:onBlur// eslint-disable-next-line no-irregular-whitespace
    +,value:value||''})),/*#__PURE__*/_react["default"].createElement(_RightContent["default"],null,/*#__PURE__*/_react["default"].createElement(_RightLabel["default"],{availability:availability,label:label}),editable&&/*#__PURE__*/_react["default"].createElement(_RegenerateButton["default"],{onMouseEnter:handleGenerateMouseEnter,onMouseLeave:handleGenerateMouseLeave,onClick:generateUid.current},isLoading?/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicator,{small:true}):/*#__PURE__*/_react["default"].createElement(_icons.Sync,{fill:label?'#007EFF':'#B5B7BB',width:"11px",height:"11px"}))),availability&&availability.suggestion&&isSuggestionOpen&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.uid.suggested")},function(msg){return/*#__PURE__*/_react["default"].createElement(_Options["default"],{title:msg,options:[{id:'suggestion',label:availability.suggestion,onClick:handleSuggestionClick}]});})),!hasError&&description&&/*#__PURE__*/_react["default"].createElement(_SubLabel["default"],{as:_styles.Description},description),hasError&&/*#__PURE__*/_react["default"].createElement(_SubLabel["default"],{as:_styles.ErrorMessage},error));});};InputUID.propTypes={attribute:_propTypes["default"].object.isRequired,contentTypeUID:_propTypes["default"].string.isRequired,description:_propTypes["default"].string,editable:_propTypes["default"].bool,error:_propTypes["default"].string,name:_propTypes["default"].string.isRequired,onChange:_propTypes["default"].func.isRequired,required:_propTypes["default"].bool,validations:_propTypes["default"].object,value:_propTypes["default"].string};InputUID.defaultProps={description:'',editable:false,error:null,required:false,validations:{},value:''};var _default=InputUID;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2209:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _react=_interopRequireDefault(__webpack_require__(1));var _icons=__webpack_require__(94);var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _getTrad=_interopRequireDefault(__webpack_require__(1920));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 0 5px;\n  text-transform: capitalize;\n  font-size: 1.3rem;\n  color: ",";\n"]);_templateObject=function _templateObject(){return data;};return data;}// Note you don't need to create a specific file for this one
    +// as it will soon be replaced by the Text one so you can leave it in this file.
    +var RightContentLabel=_styledComponents["default"].div(_templateObject(),function(_ref){var theme=_ref.theme,color=_ref.color;return theme.main.colors[color];});var RightLabel=function RightLabel(_ref2){var label=_ref2.label,availability=_ref2.availability;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),formatMessage=_useGlobalContext.formatMessage;if(label){return/*#__PURE__*/_react["default"].createElement(RightContentLabel,{color:"blue"},formatMessage({id:(0,_getTrad["default"])('components.uid.regenerate')}));}if(availability!==null){// This should be more generic in the futur.
    +return availability.isAvailable?/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_icons.Success,{fill:"#27b70f",width:"20px",height:"20px"}),/*#__PURE__*/_react["default"].createElement(RightContentLabel,{color:"green"},formatMessage({id:"".concat(_pluginId["default"],".components.uid.available")}))):/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_icons.Remove,{fill:"#ff203c",width:"9px",height:"9px"}),/*#__PURE__*/_react["default"].createElement(RightContentLabel,{color:"red"},formatMessage({id:(0,_getTrad["default"])('components.uid.unavailable')})));}return null;};RightLabel.propTypes={label:_propTypes["default"].string,availability:_propTypes["default"].shape({isAvailable:_propTypes["default"].bool})};RightLabel.defaultProps={label:null,availability:null};var _default=RightLabel;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2210:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _getTrad=_interopRequireDefault(__webpack_require__(1920));var _wrapper=_interopRequireDefault(__webpack_require__(2211));var _Option=_interopRequireDefault(__webpack_require__(2212));var _OptionsTitle=_interopRequireDefault(__webpack_require__(2213));var _RightOptionLabel=_interopRequireDefault(__webpack_require__(2214));var Options=function Options(_ref){var options=_ref.options,title=_ref.title;return/*#__PURE__*/_react["default"].createElement(_wrapper["default"],null,title&&/*#__PURE__*/_react["default"].createElement(_OptionsTitle["default"],null,title),options.map(function(option){return/*#__PURE__*/_react["default"].createElement(_Option["default"],{key:option.id,onClick:option.onClick},/*#__PURE__*/_react["default"].createElement("div",null,option.label),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_getTrad["default"])('components.uid.apply')},function(msg){return/*#__PURE__*/_react["default"].createElement(_RightOptionLabel["default"],{className:"right-label"},msg);}));}));};Options.propTypes={options:_propTypes["default"].array.isRequired,title:_propTypes["default"].string};Options.defaultProps={title:null};var _default=Options;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2211:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: absolute;\n  width: 100%;\n  margin-top: 3px;\n  border: 1px solid ",";\n  border-radius: 2px;\n  background-color: white;\n  z-index: 11;\n"]);_templateObject=function _templateObject(){return data;};return data;}var wrapper=_styledComponents["default"].div(_templateObject(),function(props){return props.theme.main.colors.border;});var _default=wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2212:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  justify-content: space-between;\n  align-items: baseline;\n  padding: 0.5rem 1rem;\n  font-size: 1.5rem;\n  line-height: 3rem;\n  cursor: pointer;\n  &:hover {\n    background-color: #e4f0fc;\n    .right-label {\n      display: block;\n    }\n  }\n  .right-label {\n    display: block;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Option=_styledComponents["default"].div(_templateObject());var _default=Option;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2213:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 0.7rem 1rem;\n  font-size: 1.2rem;\n  font-weight: bold;\n  line-height: 2.1rem;\n  text-transform: uppercase;\n  color: #9ea7b8;\n"]);_templateObject=function _templateObject(){return data;};return data;}var OptionsTitle=_styledComponents["default"].div(_templateObject());var _default=OptionsTitle;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2214:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  color: #007dff;\n  text-transform: uppercase;\n  font-weight: bold;\n  font-size: 1.1rem;\n"]);_templateObject=function _templateObject(){return data;};return data;}var RightOptionLabel=_styledComponents["default"].div(_templateObject());var _default=RightOptionLabel;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2215:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 40px;\n  height: 32px;\n  background-color: #fafafb;\n  z-index: 10;\n  \n  &:hover {\n    cursor: pointer;\n    background-color: #aed4fb;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var RegenerateButton=_styledComponents["default"].div(_templateObject());var _default=RegenerateButton;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2216:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  z-index: 10;\n  background-color: ",";\n  align-items: center;\n  line-height: 32px;\n  right: 1px;\n  top: 1px;\n  position: absolute;\n"]);_templateObject=function _templateObject(){return data;};return data;}var RightContent=_styledComponents["default"].div(_templateObject(),function(_ref){var theme=_ref.theme;return theme.main.colors.white;});var _default=RightContent;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2217:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _core=__webpack_require__(53);var _styles=__webpack_require__(21);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 100%;\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}var InputUID=(0,_styledComponents["default"])(_core.InputText)(_templateObject(),function(_ref){var error=_ref.error;return error&&"\n      > input {\n        border-color: ".concat(_styles.colors.darkOrange,";\n      }\n    ");});var _default=InputUID;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2218:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  padding-bottom: 23px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2219:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-top: 10px;\n  line-height: normal;\n  font-size: 1.3rem;\n"]);_templateObject=function _templateObject(){return data;};return data;}var SubLabel=_styledComponents["default"].p(_templateObject());var _default=SubLabel;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2220:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var UID_REGEX=new RegExp(/^[A-Za-z0-9-_.~]*$/);var _default=UID_REGEX;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2221:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactDnd=__webpack_require__(352);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactIntl=__webpack_require__(15);var _styles=__webpack_require__(21);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var _AddFieldButton=_interopRequireDefault(__webpack_require__(2222));var _DraggedItem=_interopRequireDefault(__webpack_require__(2223));var _EmptyComponent=_interopRequireDefault(__webpack_require__(2225));var _init=_interopRequireDefault(__webpack_require__(2226));var _reducer=_interopRequireWildcard(__webpack_require__(2227));/* eslint-disable import/no-cycle */var RepeatableComponent=function RepeatableComponent(_ref){var componentUid=_ref.componentUid,componentValue=_ref.componentValue,componentValueLength=_ref.componentValueLength,fields=_ref.fields,isNested=_ref.isNested,max=_ref.max,min=_ref.min,name=_ref.name,schema=_ref.schema;var _useDataManager=(0,_useDataManager2["default"])(),addRepeatableComponentToField=_useDataManager.addRepeatableComponentToField,formErrors=_useDataManager.formErrors;var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].COMPONENT}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var componentErrorKeys=Object.keys(formErrors).filter(function(errorKey){return(0,_lodash.take)(errorKey.split('.'),isNested?3:1).join('.')===name;}).map(function(errorKey){return errorKey.split('.').slice(0,name.split('.').length+1).join('.');});// We need to synchronize the collapses array with the data
    +// The key needed for react in the list will be the one from the collapses data
    +// This way we don't have to mutate the data when it is received and we can use a unique key
    +var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState,function(){return(0,_init["default"])(_reducer.initialState,componentValue);}),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var _state$toJS=state.toJS(),collapses=_state$toJS.collapses;var toggleCollapses=function toggleCollapses(index){dispatch({type:'TOGGLE_COLLAPSE',index:index});};var missingComponentsValue=min-componentValueLength;var errorsArray=componentErrorKeys.map(function(key){return(0,_lodash.get)(formErrors,[key,'id'],'');});var hasMinError=(0,_lodash.get)(errorsArray,[0],'').includes('min')&&!collapses.some(function(obj){return obj.isOpen===true;});return/*#__PURE__*/_react["default"].createElement("div",null,componentValueLength===0&&/*#__PURE__*/_react["default"].createElement(_EmptyComponent["default"],{hasMinError:hasMinError},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.empty-repeatable")},function(msg){return/*#__PURE__*/_react["default"].createElement("p",null,msg);})),/*#__PURE__*/_react["default"].createElement("div",{ref:drop},componentValueLength>0&&componentValue.map(function(data,index){var componentFieldName="".concat(name,".").concat(index);var doesPreviousFieldContainErrorsAndIsOpen=componentErrorKeys.includes("".concat(name,".").concat(index-1))&&index!==0&&(0,_lodash.get)(collapses,[index-1,'isOpen'],false)===false;var hasErrors=componentErrorKeys.includes(componentFieldName);return/*#__PURE__*/_react["default"].createElement(_DraggedItem["default"],{fields:fields,componentFieldName:componentFieldName,doesPreviousFieldContainErrorsAndIsOpen:doesPreviousFieldContainErrorsAndIsOpen,hasErrors:hasErrors,hasMinError:hasMinError,isFirst:index===0,isOpen:(0,_lodash.get)(collapses,[index,'isOpen'],false),key:(0,_lodash.get)(collapses,[index,'_temp__id'],null),onClickToggle:function onClickToggle(){// Close all other collapses and open the selected one
    +toggleCollapses(index);},removeCollapse:function removeCollapse(){dispatch({type:'REMOVE_COLLAPSE',index:index});},moveCollapse:function moveCollapse(dragIndex,hoverIndex){dispatch({type:'MOVE_COLLAPSE',dragIndex:dragIndex,hoverIndex:hoverIndex});},parentName:name,schema:schema,toggleCollapses:toggleCollapses});})),/*#__PURE__*/_react["default"].createElement(_AddFieldButton["default"],{hasMinError:hasMinError,withBorderRadius:false,doesPreviousFieldContainErrorsAndIsClosed:componentValueLength>0&&componentErrorKeys.includes("".concat(name,".").concat(componentValueLength-1))&&collapses[componentValueLength-1].isOpen===false,type:"button",onClick:function onClick(){if(componentValueLength=max){strapi.notification.info("".concat(_pluginId["default"],".components.notification.info.maximum-requirement"));}}},/*#__PURE__*/_react["default"].createElement("i",{className:"fa fa-plus"}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".containers.EditView.add.new")})),hasMinError&&/*#__PURE__*/_react["default"].createElement(_styles.ErrorMessage,null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.DynamicZone.missing").concat(missingComponentsValue>1?'.plural':'.singular'),values:{count:missingComponentsValue}})));};RepeatableComponent.defaultProps={componentValue:null,componentValueLength:0,fields:[],isNested:false,max:Infinity,min:-Infinity};RepeatableComponent.propTypes={componentUid:_propTypes["default"].string.isRequired,componentValue:_propTypes["default"].oneOfType([_propTypes["default"].array,_propTypes["default"].object]),componentValueLength:_propTypes["default"].number,fields:_propTypes["default"].array,isNested:_propTypes["default"].bool,max:_propTypes["default"].number,min:_propTypes["default"].number,name:_propTypes["default"].string.isRequired,schema:_propTypes["default"].object.isRequired};var _default=RepeatableComponent;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2222:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        border-radius: 2px;\n      "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 100%;\n  height: 37px;\n  margin-bottom: 21px;\n  padding: 0 0 3px 0;\n  text-align: center;\n  border: 1px solid rgba(227, 233, 243, 0.75);\n  border-top: 1px solid\n    ",";\n\n  border-bottom-left-radius: 2px;\n  border-bottom-right-radius: 2px;\n  ","\n\n  ","\n\n  color: #007eff;\n  font-size: 12px;\n  font-weight: 700;\n  -webkit-font-smoothing: antialiased;\n  line-height: normal;\n  cursor: pointer;\n  text-transform: uppercase;\n  letter-spacing: 0.5px;\n  background-color: #fff;\n  &:focus {\n    outline: 0;\n  }\n  > i,\n  svg {\n    margin-right: 10px;\n  }\n  & + p {\n    margin-bottom: 17px;\n    margin-top: -18px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Button=_styledComponents["default"].button(_templateObject(),function(_ref){var doesPreviousFieldContainErrorsAndIsClosed=_ref.doesPreviousFieldContainErrorsAndIsClosed;return doesPreviousFieldContainErrorsAndIsClosed?'#FFA784':'rgba(227, 233, 243, 0.75)';},function(_ref2){var withBorderRadius=_ref2.withBorderRadius;if(withBorderRadius){return(0,_styledComponents.css)(_templateObject2());}return'';},function(_ref3){var hasMinError=_ref3.hasMinError;if(hasMinError){return"\n        border-color: #FAA684;\n        border-top-color: rgba(227, 233, 243, 0.75);\n      ";}return'';});var _default=Button;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2223:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactstrap=__webpack_require__(71);var _reactDnd=__webpack_require__(352);var _reactDndHtml5Backend=__webpack_require__(644);var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var _useEditView2=_interopRequireDefault(__webpack_require__(1922));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var _Inputs=_interopRequireDefault(__webpack_require__(1939));var _FieldComponent=_interopRequireDefault(__webpack_require__(1923));var _Banner=_interopRequireDefault(__webpack_require__(652));var _FormWrapper=_interopRequireDefault(__webpack_require__(2224));/* eslint-disable import/no-cycle */ /* eslint-disable react/no-array-index-key */ // Issues:
    +// https://github.com/react-dnd/react-dnd/issues/1368
    +// https://github.com/frontend-collective/react-sortable-tree/issues/490
    +var DraggedItem=function DraggedItem(_ref){var componentFieldName=_ref.componentFieldName,doesPreviousFieldContainErrorsAndIsOpen=_ref.doesPreviousFieldContainErrorsAndIsOpen,fields=_ref.fields,hasErrors=_ref.hasErrors,hasMinError=_ref.hasMinError,isFirst=_ref.isFirst,isOpen=_ref.isOpen,moveCollapse=_ref.moveCollapse,onClickToggle=_ref.onClickToggle,removeCollapse=_ref.removeCollapse,schema=_ref.schema,toggleCollapses=_ref.toggleCollapses;var _useDataManager=(0,_useDataManager2["default"])(),checkFormErrors=_useDataManager.checkFormErrors,modifiedData=_useDataManager.modifiedData,moveComponentField=_useDataManager.moveComponentField,removeRepeatableField=_useDataManager.removeRepeatableField,triggerFormValidation=_useDataManager.triggerFormValidation;var _useEditView=(0,_useEditView2["default"])(),setIsDraggingComponent=_useEditView.setIsDraggingComponent,unsetIsDraggingComponent=_useEditView.unsetIsDraggingComponent;var mainField=(0,_lodash.get)(schema,['settings','mainField'],'id');var displayedValue=(0,_lodash.get)(modifiedData,[].concat((0,_toConsumableArray2["default"])(componentFieldName.split('.')),[mainField]),null);var dragRef=(0,_react.useRef)(null);var dropRef=(0,_react.useRef)(null);var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),showForm=_useState2[0],setShowForm=_useState2[1];(0,_react.useEffect)(function(){if(isOpen){setShowForm(true);}},[isOpen]);var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].COMPONENT,canDrop:function canDrop(){return false;},hover:function hover(item,monitor){if(!dropRef.current){return;}var dragPath=item.originalPath;var hoverPath=componentFieldName;var fullPathToComponentArray=dragPath.split('.');var dragIndexString=fullPathToComponentArray.slice().splice(-1).join('');var hoverIndexString=hoverPath.split('.').splice(-1).join('');var pathToComponentArray=fullPathToComponentArray.slice(0,fullPathToComponentArray.length-1);var dragIndex=parseInt(dragIndexString,10);var hoverIndex=parseInt(hoverIndexString,10);// Don't replace items with themselves
    +if(dragIndex===hoverIndex){return;}// Determine rectangle on screen
    +var hoverBoundingRect=dropRef.current.getBoundingClientRect();// Get vertical middle
    +var hoverMiddleY=(hoverBoundingRect.bottom-hoverBoundingRect.top)/2;// Determine mouse position
    +var clientOffset=monitor.getClientOffset();// Get pixels to the top
    +var hoverClientY=clientOffset.y-hoverBoundingRect.top;// Only perform the move when the mouse has crossed half of the items height
    +// When dragging downwards, only move when the cursor is below 50%
    +// When dragging upwards, only move when the cursor is above 50%
    +// Dragging downwards
    +if(dragIndexhoverIndex&&hoverClientY>hoverMiddleY){return;}// Time to actually perform the action in the data
    +moveComponentField(pathToComponentArray,dragIndex,hoverIndex);// Time to actually perform the action in the synchronized collapses
    +moveCollapse(dragIndex,hoverIndex);// Note: we're mutating the monitor item here!
    +// Generally it's better to avoid mutations,
    +// but it's good here for the sake of performance
    +// to avoid expensive index searches.
    +item.originalPath=hoverPath;}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var _useDrag=(0,_reactDnd.useDrag)({item:{type:_ItemTypes["default"].COMPONENT,displayedValue:displayedValue,originalPath:componentFieldName},begin:function begin(){// Close all collapses
    +toggleCollapses(-1);// Prevent the relations select from firing requests
    +setIsDraggingComponent();},end:function end(){// Enable the relations select to fire requests
    +unsetIsDraggingComponent();// Update the errors
    +triggerFormValidation();},collect:function collect(monitor){return{isDragging:monitor.isDragging()};}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),isDragging=_useDrag2[0].isDragging,drag=_useDrag2[1],preview=_useDrag2[2];(0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:false});},[preview]);var getField=function getField(fieldName){return(0,_lodash.get)(schema,['schema','attributes',fieldName],{});};var getMeta=function getMeta(fieldName){return(0,_lodash.get)(schema,['metadatas',fieldName,'edit'],{});};// Create the refs
    +// We need 1 for the drop target
    +// 1 for the drag target
    +var refs={dragRef:drag(dragRef),dropRef:drop(dropRef)};return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_Banner["default"],{componentFieldName:componentFieldName,hasErrors:hasErrors,hasMinError:hasMinError,isFirst:isFirst,displayedValue:displayedValue,doesPreviousFieldContainErrorsAndIsOpen:doesPreviousFieldContainErrorsAndIsOpen,isDragging:isDragging,isOpen:isOpen,onClickToggle:onClickToggle,onClickRemove:function onClickRemove(){removeRepeatableField(componentFieldName);removeCollapse();},ref:refs}),/*#__PURE__*/_react["default"].createElement(_reactstrap.Collapse,{isOpen:isOpen,style:{backgroundColor:'#FAFAFB'},onExited:function onExited(){return setShowForm(false);}},!isDragging&&/*#__PURE__*/_react["default"].createElement(_FormWrapper["default"],{hasErrors:hasErrors,isOpen:isOpen},showForm&&fields.map(function(fieldRow,key){return/*#__PURE__*/_react["default"].createElement("div",{className:"row",key:key},fieldRow.map(function(field){var currentField=getField(field.name);var isComponent=(0,_lodash.get)(currentField,'type','')==='component';var keys="".concat(componentFieldName,".").concat(field.name);if(isComponent){var componentUid=currentField.component;var metas=getMeta(field.name);return/*#__PURE__*/_react["default"].createElement(_FieldComponent["default"],{componentUid:componentUid,isRepeatable:currentField.repeatable,key:field.name,label:metas.label,isNested:true,name:keys,max:currentField.max,min:currentField.min});}return/*#__PURE__*/_react["default"].createElement("div",{key:field.name,className:"col-".concat(field.size)},/*#__PURE__*/_react["default"].createElement(_Inputs["default"],{autoFocus:false,keys:keys,layout:schema,name:field.name,onChange:function onChange(){},onBlur:hasErrors?checkFormErrors:null}));}));}))));};DraggedItem.defaultProps={doesPreviousFieldContainErrorsAndIsOpen:false,fields:[],hasErrors:false,hasMinError:false,isFirst:false,isOpen:false,moveCollapse:function moveCollapse(){},toggleCollapses:function toggleCollapses(){}};DraggedItem.propTypes={componentFieldName:_propTypes["default"].string.isRequired,doesPreviousFieldContainErrorsAndIsOpen:_propTypes["default"].bool,fields:_propTypes["default"].array,hasErrors:_propTypes["default"].bool,hasMinError:_propTypes["default"].bool,isFirst:_propTypes["default"].bool,isOpen:_propTypes["default"].bool,moveCollapse:_propTypes["default"].func,onClickToggle:_propTypes["default"].func.isRequired,removeCollapse:_propTypes["default"].func.isRequired,schema:_propTypes["default"].object.isRequired,toggleCollapses:_propTypes["default"].func};var _default=DraggedItem;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2224:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-top: 24px;\n  padding-left: 20px;\n  padding-right: 20px;\n  padding-bottom: 10px;\n  border-top: 1px solid\n    ",";\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable indent */var FormWrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var hasErrors=_ref.hasErrors,isOpen=_ref.isOpen;if(hasErrors){return'#ffa784';}if(isOpen){return'#AED4FB';}return'rgba(227, 233, 243, 0.75)';});var _default=FormWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2225:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 71px;\n  border: 1px solid rgba(227, 233, 243, 0.75);\n  border-top-left-radius: 2px;\n  border-top-right-radius: 2px;\n  border-bottom: 0;\n  line-height: 66px;\n  text-align: center;\n  background-color: #fff;\n\n  ","\n\n  > p {\n    color: #9ea7b8;\n    font-size: 13px;\n    font-weight: 500;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var EmptyComponent=_styledComponents["default"].div(_templateObject(),function(_ref){var hasMinError=_ref.hasMinError;if(hasMinError){return'border-color: #FAA684';}return'';});var _default=EmptyComponent;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2226:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);// Initialize all the fields of the component is the isOpen key to false
    +// The key will be used to control the open close state of the banner
    +function init(initialState,componentValue){return initialState.update('collapses',function(list){if((0,_lodash.isArray)(componentValue)){return(0,_immutable.fromJS)(componentValue.map(function(_,i){return{isOpen:false,_temp__id:i};}));}return list;});}var _default=init;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2227:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _immutable=__webpack_require__(35);var initialState=(0,_immutable.fromJS)({collapses:[]});exports.initialState=initialState;var getMax=function getMax(arr){if(arr.size===0){return-1;}return Math.max.apply(Math,arr.toJS().map(function(o){return o._temp__id;}));};var reducer=function reducer(state,action){switch(action.type){case'ADD_NEW_FIELD':return state.update('collapses',function(list){return list.map(function(obj){return obj.update('isOpen',function(){return false;});}).push((0,_immutable.fromJS)({isOpen:true,_temp__id:getMax(list)+1}));});case'MOVE_COLLAPSE':return state.updateIn(['collapses'],function(list){var oldList=list;var newList=list["delete"](action.dragIndex).insert(action.hoverIndex,state.getIn(['collapses',action.dragIndex]));// Fix for
    +// https://github.com/react-dnd/react-dnd/issues/1368
    +// https://github.com/frontend-collective/react-sortable-tree/issues/490
    +if(oldList.size!==newList.size){strapi.notification.error("An error occured while reordering your component's field, please try again");return oldList;}return newList;});case'TOGGLE_COLLAPSE':return state.update('collapses',function(list){return list.map(function(obj,index){if(index===action.index){return obj.update('isOpen',function(v){return!v;});}return obj.update('isOpen',function(){return false;});});});case'REMOVE_COLLAPSE':return state.removeIn(['collapses',action.index]).update('collapses',function(list){return list.map(function(obj){return obj.set('isOpen',false);});}).update('collapses',function(list){if(action.shouldAddEmptyField){return list.push((0,_immutable.fromJS)({isOpen:true}));}return list;});default:return state;}};var _default=reducer;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2228:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: absolute;\n  top: -16px;\n  left: 10px;\n  display: flex;\n\n  > .component_name {\n    overflow: hidden;\n    position: relative;\n    width: 31px;\n    height: 31px;\n    padding: 0 11px 0 0px;\n    color: #007eff;\n    font-size: 13px;\n    font-weight: 600;\n    line-height: 26px;\n    border-radius: 31px;\n    border: 2px solid white;\n    background-color: #e6f0fb;\n    transition: all 0.2s ease-out;\n\n    .component_icon {\n      z-index: 1;\n      display: flex;\n      position: absolute;\n      top: -1px;\n      left: -1px;\n      width: 29px;\n      height: 29px;\n      border-radius: 31px;\n      border: 1px solid white;\n      background-color: #e6f0fb;\n\n      i,\n      svg {\n        margin: auto;\n        color: #007eff;\n        font-size: 11px;\n      }\n    }\n\n    &:hover {\n      cursor: pointer;\n      width: auto !important;\n      padding-left: 39px;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ComponentIcon=_styledComponents["default"].div(_templateObject());var _default=ComponentIcon;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2229:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  font-weight: 500;\n  font-size: 13px;\n  margin-bottom: 1rem;\n  display: block;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Label=_styledComponents["default"].label(_templateObject());var _default=Label;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2230:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: absolute;\n  top: 0;\n  right: 15px;\n  display: flex;\n\n  cursor: pointer;\n  color: #4b515a;\n\n  > span {\n    margin-right: 10px;\n    display: none;\n  }\n\n  &:hover {\n    > div {\n      background-color: #faa684;\n    }\n    color: #f64d0a;\n    > span {\n      display: initial;\n    }\n  }\n\n  > div {\n    width: 24px;\n    height: 24px;\n    background-color: #f3f4f4;\n    text-align: center;\n    border-radius: 2px;\n    &:after {\n      content: '\f1f8';\n      font-size: 14px;\n      font-family: FontAwesome;\n    }\n  }\n"],["\n  position: absolute;\n  top: 0;\n  right: 15px;\n  display: flex;\n\n  cursor: pointer;\n  color: #4b515a;\n\n  > span {\n    margin-right: 10px;\n    display: none;\n  }\n\n  &:hover {\n    > div {\n      background-color: #faa684;\n    }\n    color: #f64d0a;\n    > span {\n      display: initial;\n    }\n  }\n\n  > div {\n    width: 24px;\n    height: 24px;\n    background-color: #f3f4f4;\n    text-align: center;\n    border-radius: 2px;\n    &:after {\n      content: '\\f1f8';\n      font-size: 14px;\n      font-family: FontAwesome;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ResetComponent=_styledComponents["default"].div(_templateObject());var _default=ResetComponent;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2231:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  .row {\n    margin-bottom: 4px;\n  }\n\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject(),function(_ref){var isFromDynamicZone=_ref.isFromDynamicZone;if(isFromDynamicZone){return"\n        background-color: #fff;\n      ";}return'';});var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2232:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _PlusButton=_interopRequireDefault(__webpack_require__(1970));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  transform: rotate(-90deg);\n  transition: background-color 0.1s linear;\n  transition: transform 0.1s ease-in-out;\n  &:hover {\n    background-color: #aed4fb;\n    :before,\n    :after {\n      background-color: #007eff;\n    }\n  }\n\n  ","\n  &.isOpen {\n    transform: rotate(-45deg);\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Button=(0,_styledComponents["default"])(_PlusButton["default"])(_templateObject(),function(_ref){var hasError=_ref.hasError;if(hasError){return"\n        background-color: #FAA684;\n        :before, :after {\n          background-color: #F64D0A;\n        }\n      ";}return'';});var _default=Button;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2233:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n      max-height: 260px;\n    "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  overflow: hidden;\n  max-height: 0;\n  transition: max-height 0.2s ease-out;\n\n  > div {\n    margin-top: 15px;\n    padding: 23px 18px 21px 18px;\n    background-color: #f2f3f4;\n  }\n\n  ","\n\n  .componentPickerTitle {\n    margin-bottom: 15px;\n    color: #919bae;\n    font-weight: 600;\n    font-size: 13px;\n    line-height: normal;\n  }\n  .componentsList {\n    display: flex;\n    overflow-x: auto;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ComponentsPicker=_styledComponents["default"].div(_templateObject(),function(_ref){var isOpen=_ref.isOpen;return isOpen&&(0,_styledComponents.css)(_templateObject2());});var _default=ComponentsPicker;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2234:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  > div {\n    position: relative;\n    box-shadow: 0 2px 4px #e3e9f3;\n    border-radius: 2px;\n    .arrow-icons {\n      position: absolute;\n      top: -12px;\n      right: 49px;\n      z-index: 9;\n      .arrow-btn {\n        display: inline-flex;\n        svg {\n          margin-left: 5px;\n          margin-top: 5px;\n        }\n      }\n    }\n    &:not(:first-of-type) {\n      margin-top: 32px;\n      &:before {\n        content: '&';\n        position: absolute;\n        top: -30px;\n        left: 24.5px;\n        height: 100%;\n        width: 2px;\n        background-color: #e6f0fb;\n        color: transparent;\n      }\n    }\n    > div:last-of-type {\n      padding-top: 6px;\n      padding-bottom: 5px;\n      margin-bottom: 22px;\n      border-radius: 2px;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ComponentWrapper=_styledComponents["default"].div(_templateObject());var _default=ComponentWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2235:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  padding-top: 10px;\n  margin-bottom: 15px;\n  & + & {\n    padding-top: 13px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var DynamicZoneWrapper=_styledComponents["default"].div(_templateObject());var _default=DynamicZoneWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2236:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 9px 20px;\n  font-size: 13px;\n  font-weight: 600;\n  position: relative;\n  min-height: 64px;\n  &:after {\n    content: '\u2022';\n    position: absolute;\n    top: 15px;\n    left: 21.5px;\n    font-size: 15px;\n    width: 8px;\n    height: 8px;\n    background-color: #aed4fb;\n    color: transparent;\n    border-radius: 4px;\n    border: 1px solid white;\n  }\n  &:before {\n    content: '&';\n    position: absolute;\n    top: 22px;\n    left: 24.5px;\n    height: 100%;\n    width: 2px;\n    background-color: #e6f0fb;\n    color: transparent;\n  }\n  p {\n    padding-left: 18px;\n    margin-bottom: 0;\n  }\n  p:last-of-type:not(:first-of-type) {\n    color: #9ea7b8;\n    font-weight: 400;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Label=_styledComponents["default"].div(_templateObject());var _default=Label;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2237:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 31px;\n  width: 31px;\n  border-radius: 50%;\n  background-color: #f2f3f4;\n  border: 2px solid #ffffff;\n  cursor: pointer;\n  display: flex;\n  z-index: 9;\n  svg {\n    font-size: 10px;\n    line-height: 29px;\n    margin: auto;\n  }\n  &:not(.arrow-btn) {\n    position: absolute;\n    top: -16px;\n    right: 10px;\n    transition: all 200ms ease-in;\n    &:hover {\n      background-color: #faa684;\n      color: #f64d0a;\n    }\n  }\n  &.arrow-btn {\n    height: 22px;\n    width: 22px;\n    background-color: #ffffff;\n    border: 2px solid #ffffff;\n    svg {\n      font-size: 10px;\n      line-height: 22px;\n    }\n    &:hover {\n      background-color: #f2f3f4;\n    }\n    &.arrow-down {\n      transform: rotate(180deg);\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var RoundCTA=_styledComponents["default"].div(_templateObject());var _default=RoundCTA;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2238:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  padding-top: 5px;\n  text-align: center;\n  .info {\n    position: absolute;\n    display: none;\n    top: 10px;\n    left: calc(50% + 28px);\n    > span {\n      letter-spacing: 0.5px;\n      text-transform: uppercase;\n      color: #007eff;\n      font-size: 11px;\n      font-weight: 700;\n    }\n  }\n  button {\n    &:not(.isOpen):hover + .info {\n      display: block;\n    }\n  }\n  .error-label {\n    color: #f64d0a;\n    font-size: 13px;\n    margin-top: 4px;\n    margin-bottom: -5px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2239:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 22px 10px 0 10px;\n  background: #ffffff;\n  border-radius: 2px;\n  box-shadow: 0 2px 4px #e3e9f3;\n  margin-bottom: 3px;\n  > div {\n    margin-right: 0;\n    margin-left: 0;\n  }\n  .row {\n    margin-bottom: 4px;\n    &:last-of-type {\n      margin-bottom: 0;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var FormWrapper=_styledComponents["default"].div(_templateObject());var _default=FormWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2240:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _lodash=__webpack_require__(8);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(30);var _strapiHelperPlugin=__webpack_require__(10);var _EditViewDataManager=_interopRequireDefault(__webpack_require__(1967));var _pluginId=_interopRequireDefault(__webpack_require__(105));var _init=_interopRequireDefault(__webpack_require__(2241));var _reducer=_interopRequireWildcard(__webpack_require__(2242));var _utils=__webpack_require__(2243);var getRequestUrl=function getRequestUrl(path){return"/".concat(_pluginId["default"],"/explorer/").concat(path);};var EditViewDataManagerProvider=function EditViewDataManagerProvider(_ref){var allLayoutData=_ref.allLayoutData,children=_ref.children,redirectToPreviousPage=_ref.redirectToPreviousPage,slug=_ref.slug;var _useParams=(0,_reactRouterDom.useParams)(),id=_useParams.id;// Retrieve the search
    +var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState,_init["default"]),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),reducerState=_useReducer2[0],dispatch=_useReducer2[1];var _reducerState$toJS=reducerState.toJS(),formErrors=_reducerState$toJS.formErrors,initialData=_reducerState$toJS.initialData,isLoading=_reducerState$toJS.isLoading,modifiedData=_reducerState$toJS.modifiedData,modifiedDZName=_reducerState$toJS.modifiedDZName,shouldShowLoadingState=_reducerState$toJS.shouldShowLoadingState,shouldCheckErrors=_reducerState$toJS.shouldCheckErrors;var _useState=(0,_react.useState)(id==='create'),_useState2=(0,_slicedToArray2["default"])(_useState,2),isCreatingEntry=_useState2[0],setIsCreatingEntry=_useState2[1];var currentContentTypeLayout=(0,_lodash.get)(allLayoutData,['contentType'],{});var abortController=new AbortController();var signal=abortController.signal;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent,formatMessage=_useGlobalContext.formatMessage;var _useRouteMatch=(0,_reactRouterDom.useRouteMatch)('/plugins/content-manager/:contentType'),contentType=_useRouteMatch.params.contentType;var isSingleType=contentType==='singleType';(0,_react.useEffect)(function(){if(!isLoading){checkFormErrors();}// eslint-disable-next-line react-hooks/exhaustive-deps
    +},[shouldCheckErrors]);(0,_react.useEffect)(function(){var fetchData=/*#__PURE__*/function(){var _ref2=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){var data;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return(0,_strapiHelperPlugin.request)(getRequestUrl("".concat(slug,"/").concat(id||'')),{method:'GET',signal:signal});case 3:data=_context.sent;dispatch({type:'GET_DATA_SUCCEEDED',data:data});_context.next=11;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);if(id&&_context.t0.code!==20){strapi.notification.error("".concat(_pluginId["default"],".error.record.fetch"));}if(!id&&_context.t0.response.status===404){setIsCreatingEntry(true);}case 11:case"end":return _context.stop();}}},_callee,null,[[0,7]]);}));return function fetchData(){return _ref2.apply(this,arguments);};}();var componentsDataStructure=Object.keys(allLayoutData.components).reduce(function(acc,current){acc[current]=(0,_utils.createDefaultForm)((0,_lodash.get)(allLayoutData,['components',current,'schema','attributes'],{}),allLayoutData.components);return acc;},{});var contentTypeDataStructure=(0,_utils.createDefaultForm)(currentContentTypeLayout.schema.attributes,allLayoutData.components);// Force state to be cleared when navigation from one entry to another
    +dispatch({type:'RESET_PROPS'});dispatch({type:'SET_DEFAULT_DATA_STRUCTURES',componentsDataStructure:componentsDataStructure,contentTypeDataStructure:contentTypeDataStructure});if(!isCreatingEntry){fetchData();}else{// Will create default form
    +dispatch({type:'SET_DEFAULT_MODIFIED_DATA_STRUCTURE',contentTypeDataStructure:contentTypeDataStructure});}return function(){abortController.abort();};// eslint-disable-next-line react-hooks/exhaustive-deps
    +},[id,slug,isCreatingEntry]);var addComponentToDynamicZone=function addComponentToDynamicZone(keys,componentUid){var shouldCheckErrors=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;emitEvent('addComponentToDynamicZone');dispatch({type:'ADD_COMPONENT_TO_DYNAMIC_ZONE',keys:keys.split('.'),componentUid:componentUid,shouldCheckErrors:shouldCheckErrors});};var addNonRepeatableComponentToField=function addNonRepeatableComponentToField(keys,componentUid){dispatch({type:'ADD_NON_REPEATABLE_COMPONENT_TO_FIELD',keys:keys.split('.'),componentUid:componentUid});};var addRelation=function addRelation(_ref3){var _ref3$target=_ref3.target,name=_ref3$target.name,value=_ref3$target.value;dispatch({type:'ADD_RELATION',keys:name.split('.'),value:value});};var addRepeatableComponentToField=function addRepeatableComponentToField(keys,componentUid){var shouldCheckErrors=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;dispatch({type:'ADD_REPEATABLE_COMPONENT_TO_FIELD',keys:keys.split('.'),componentUid:componentUid,shouldCheckErrors:shouldCheckErrors});};var checkFormErrors=/*#__PURE__*/function(){var _ref4=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){var dataToSet,schema,errors,updatedData,_args2=arguments;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:dataToSet=_args2.length>0&&_args2[0]!==undefined?_args2[0]:{};schema=(0,_utils.createYupSchema)(currentContentTypeLayout,{components:(0,_lodash.get)(allLayoutData,'components',{})});errors={};updatedData=(0,_lodash.cloneDeep)(modifiedData);if(!(0,_lodash.isEmpty)(updatedData)){(0,_lodash.set)(updatedData,dataToSet.path,dataToSet.value);}_context2.prev=5;_context2.next=8;return schema.validate(updatedData,{abortEarly:false});case 8:_context2.next=14;break;case 10:_context2.prev=10;_context2.t0=_context2["catch"](5);errors=(0,_utils.getYupInnerErrors)(_context2.t0);if(modifiedDZName){errors=Object.keys(errors).reduce(function(acc,current){var dzName=current.split('.')[0];if(dzName!==modifiedDZName){acc[current]=errors[current];}return acc;},{});}case 14:dispatch({type:'SET_ERRORS',errors:errors});case 15:case"end":return _context2.stop();}}},_callee2,null,[[5,10]]);}));return function checkFormErrors(){return _ref4.apply(this,arguments);};}();var handleChange=function handleChange(_ref5){var _ref5$target=_ref5.target,name=_ref5$target.name,value=_ref5$target.value,type=_ref5$target.type;var inputValue=value;// Empty string is not a valid date,
    +// Set the date to null when it's empty
    +if(type==='date'&&value===''){inputValue=null;}// Allow to reset enum
    +if(type==='select-one'&&value===''){inputValue=null;}// Allow to reset number input
    +if(type==='number'&&value===''){inputValue=null;}dispatch({type:'ON_CHANGE',keys:name.split('.'),value:inputValue});};var handleSubmit=/*#__PURE__*/function(){var _ref6=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(e){var schema,filesToUpload,cleanedData,formData,headers,method,endPoint,error,errors;return _regenerator["default"].wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:e.preventDefault();// Create yup schema
    +schema=(0,_utils.createYupSchema)(currentContentTypeLayout,{components:(0,_lodash.get)(allLayoutData,'components',{})});_context3.prev=2;_context3.next=5;return schema.validate(modifiedData,{abortEarly:false});case 5:// Set the loading state in the plugin header
    +filesToUpload=(0,_utils.getFilesToUpload)(modifiedData);// Remove keys that are not needed
    +// Clean relations
    +cleanedData=(0,_utils.cleanData)((0,_lodash.cloneDeep)(modifiedData),currentContentTypeLayout,allLayoutData.components);formData=new FormData();formData.append('data',JSON.stringify(cleanedData));Object.keys(filesToUpload).forEach(function(key){var files=filesToUpload[key];files.forEach(function(file){formData.append("files.".concat(key),file);});});// Change the request helper default headers so we can pass a FormData
    +headers={};method=isCreatingEntry?'POST':'PUT';// All endpoints for creation and edition are the same for both content types
    +// But, the id from the URL didn't exist for the single types.
    +// So, we use the id of the modified data if this one is setted.
    +if(isCreatingEntry){endPoint=slug;}else if(modifiedData){endPoint="".concat(slug,"/").concat(modifiedData.id);}else{endPoint="".concat(slug,"/").concat(id);}emitEvent(isCreatingEntry?'willCreateEntry':'willEditEntry');_context3.prev=14;_context3.next=17;return(0,_strapiHelperPlugin.request)(getRequestUrl(endPoint),{method:method,headers:headers,body:formData,signal:signal},false,false);case 17:emitEvent(isCreatingEntry?'didCreateEntry':'didEditEntry');dispatch({type:'SUBMIT_SUCCESS'});strapi.notification.success("".concat(_pluginId["default"],".success.record.save"));if(isSingleType){setIsCreatingEntry(false);}else{redirectToPreviousPage();}_context3.next=30;break;case 23:_context3.prev=23;_context3.t0=_context3["catch"](14);console.error({err:_context3.t0});error=(0,_lodash.get)(_context3.t0,['response','payload','message','0','messages','0','id'],'SERVER ERROR');setIsSubmitting(false);emitEvent(isCreatingEntry?'didNotCreateEntry':'didNotEditEntry',{error:_context3.t0});strapi.notification.error(error);case 30:_context3.next=37;break;case 32:_context3.prev=32;_context3.t1=_context3["catch"](2);errors=(0,_utils.getYupInnerErrors)(_context3.t1);console.error({err:_context3.t1,errors:errors});dispatch({type:'SUBMIT_ERRORS',errors:errors});case 37:case"end":return _context3.stop();}}},_callee3,null,[[2,32],[14,23]]);}));return function handleSubmit(_x){return _ref6.apply(this,arguments);};}();var moveComponentDown=function moveComponentDown(dynamicZoneName,currentIndex){emitEvent('changeComponentsOrder');dispatch({type:'MOVE_COMPONENT_DOWN',dynamicZoneName:dynamicZoneName,currentIndex:currentIndex,shouldCheckErrors:shouldCheckDZErrors(dynamicZoneName)});};var moveComponentUp=function moveComponentUp(dynamicZoneName,currentIndex){emitEvent('changeComponentsOrder');dispatch({type:'MOVE_COMPONENT_UP',dynamicZoneName:dynamicZoneName,currentIndex:currentIndex,shouldCheckErrors:shouldCheckDZErrors(dynamicZoneName)});};var moveComponentField=function moveComponentField(pathToComponent,dragIndex,hoverIndex){dispatch({type:'MOVE_COMPONENT_FIELD',pathToComponent:pathToComponent,dragIndex:dragIndex,hoverIndex:hoverIndex});};var moveRelation=function moveRelation(dragIndex,overIndex,name){dispatch({type:'MOVE_FIELD',dragIndex:dragIndex,overIndex:overIndex,keys:name.split('.')});};var onRemoveRelation=function onRemoveRelation(keys){dispatch({type:'REMOVE_RELATION',keys:keys});};var shouldCheckDZErrors=function shouldCheckDZErrors(dzName){var doesDZHaveError=Object.keys(formErrors).some(function(key){return key.split('.')[0]===dzName;});var shouldCheckErrors=!(0,_lodash.isEmpty)(formErrors)&&doesDZHaveError;return shouldCheckErrors;};var removeComponentFromDynamicZone=function removeComponentFromDynamicZone(dynamicZoneName,index){emitEvent('removeComponentFromDynamicZone');dispatch({type:'REMOVE_COMPONENT_FROM_DYNAMIC_ZONE',dynamicZoneName:dynamicZoneName,index:index,shouldCheckErrors:shouldCheckDZErrors(dynamicZoneName)});};var removeComponentFromField=function removeComponentFromField(keys,componentUid){dispatch({type:'REMOVE_COMPONENT_FROM_FIELD',keys:keys.split('.'),componentUid:componentUid});};var removeRepeatableField=function removeRepeatableField(keys,componentUid){dispatch({type:'REMOVE_REPEATABLE_FIELD',keys:keys.split('.'),componentUid:componentUid});};var setIsSubmitting=function setIsSubmitting(){var value=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;dispatch({type:'IS_SUBMITTING',value:value});};var deleteSuccess=function deleteSuccess(){dispatch({type:'DELETE_SUCCEEDED'});};var resetData=function resetData(){dispatch({type:'RESET_DATA'});};var clearData=function clearData(){if(isSingleType){setIsCreatingEntry(true);}dispatch({type:'SET_DEFAULT_MODIFIED_DATA_STRUCTURE',contentTypeDataStructure:{}});};var triggerFormValidation=function triggerFormValidation(){dispatch({type:'TRIGGER_FORM_VALIDATION'});};var showLoader=!isCreatingEntry&&isLoading;return/*#__PURE__*/_react["default"].createElement(_EditViewDataManager["default"].Provider,{value:{addComponentToDynamicZone:addComponentToDynamicZone,addNonRepeatableComponentToField:addNonRepeatableComponentToField,addRelation:addRelation,addRepeatableComponentToField:addRepeatableComponentToField,allLayoutData:allLayoutData,checkFormErrors:checkFormErrors,clearData:clearData,deleteSuccess:deleteSuccess,formErrors:formErrors,initialData:initialData,layout:currentContentTypeLayout,modifiedData:modifiedData,moveComponentDown:moveComponentDown,moveComponentField:moveComponentField,moveComponentUp:moveComponentUp,moveRelation:moveRelation,onChange:handleChange,onRemoveRelation:onRemoveRelation,redirectToPreviousPage:redirectToPreviousPage,removeComponentFromDynamicZone:removeComponentFromDynamicZone,removeComponentFromField:removeComponentFromField,removeRepeatableField:removeRepeatableField,resetData:resetData,setIsSubmitting:setIsSubmitting,shouldShowLoadingState:shouldShowLoadingState,slug:slug,triggerFormValidation:triggerFormValidation}},showLoader?/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicatorPage,null):/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_reactRouterDom.Prompt,{when:!(0,_lodash.isEqual)(modifiedData,initialData),message:formatMessage({id:'global.prompt.unsaved'})}),/*#__PURE__*/_react["default"].createElement("form",{onSubmit:handleSubmit},children)));};EditViewDataManagerProvider.defaultProps={redirectToPreviousPage:function redirectToPreviousPage(){}};EditViewDataManagerProvider.propTypes={allLayoutData:_propTypes["default"].object.isRequired,children:_propTypes["default"].node.isRequired,redirectToPreviousPage:_propTypes["default"].func,slug:_propTypes["default"].string.isRequired};var _default=EditViewDataManagerProvider;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2241:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function init(initialState){return initialState;}var _default=init;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2242:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _immutable=__webpack_require__(35);var initialState=(0,_immutable.fromJS)({componentsDataStructure:{},contentTypeDataStructure:{},formErrors:{},isLoading:true,initialData:{},modifiedData:{},shouldShowLoadingState:false,shouldCheckErrors:false,modifiedDZName:null});exports.initialState=initialState;var reducer=function reducer(state,action){switch(action.type){case'ADD_NON_REPEATABLE_COMPONENT_TO_FIELD':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){var defaultDataStructure=state.getIn(['componentsDataStructure',action.componentUid]);return(0,_immutable.fromJS)(defaultDataStructure);});case'ADD_REPEATABLE_COMPONENT_TO_FIELD':{return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(list){var defaultDataStructure=state.getIn(['componentsDataStructure',action.componentUid]);if(list){return list.push(defaultDataStructure);}return(0,_immutable.fromJS)([defaultDataStructure]);}).update('shouldCheckErrors',function(v){if(action.shouldCheckErrors===true){return!v;}return v;});}case'ADD_COMPONENT_TO_DYNAMIC_ZONE':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(list){var defaultDataStructure=state.getIn(['componentsDataStructure',action.componentUid]).set('__component',action.componentUid);if(list){return list.push(defaultDataStructure);}return(0,_immutable.fromJS)([defaultDataStructure]);}).update('modifiedDZName',function(){return action.keys[0];}).update('shouldCheckErrors',function(v){if(action.shouldCheckErrors===true){return!v;}return v;});case'ADD_RELATION':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(list){if(!action.value){return list;}var el=action.value[0].value;if(list){return list.push((0,_immutable.fromJS)(el));}return(0,_immutable.fromJS)([el]);});case'GET_DATA_SUCCEEDED':return state.update('initialData',function(){return(0,_immutable.fromJS)(action.data);}).update('modifiedData',function(){return(0,_immutable.fromJS)(action.data);}).update('isLoading',function(){return false;});case'IS_SUBMITTING':return state.update('shouldShowLoadingState',function(){return action.value;});case'MOVE_COMPONENT_FIELD':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.pathToComponent)),function(list){return list["delete"](action.dragIndex).insert(action.hoverIndex,state.getIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.pathToComponent),[action.dragIndex])));});case'MOVE_COMPONENT_UP':return state.update('shouldCheckErrors',function(v){if(action.shouldCheckErrors){return!v;}return v;}).updateIn(['modifiedData',action.dynamicZoneName],function(list){return list["delete"](action.currentIndex).insert(action.currentIndex-1,state.getIn(['modifiedData',action.dynamicZoneName,action.currentIndex]));});case'MOVE_COMPONENT_DOWN':return state.update('shouldCheckErrors',function(v){if(action.shouldCheckErrors){return!v;}return v;}).updateIn(['modifiedData',action.dynamicZoneName],function(list){return list["delete"](action.currentIndex).insert(action.currentIndex+1,state.getIn(['modifiedData',action.dynamicZoneName,action.currentIndex]));});case'MOVE_FIELD':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(list){return list["delete"](action.dragIndex).insert(action.overIndex,list.get(action.dragIndex));});case'ON_CHANGE':{var newState=state;var _action$keys=(0,_slicedToArray2["default"])(action.keys,1),nonRepeatableComponentKey=_action$keys[0];if(action.keys.length===2&&state.getIn(['modifiedData',nonRepeatableComponentKey])===null){newState=state.updateIn(['modifiedData',nonRepeatableComponentKey],function(){return(0,_immutable.fromJS)({});});}return newState.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){return action.value;});}case'REMOVE_COMPONENT_FROM_DYNAMIC_ZONE':return state.update('shouldCheckErrors',function(v){if(action.shouldCheckErrors){return!v;}return v;}).deleteIn(['modifiedData',action.dynamicZoneName,action.index]);case'REMOVE_COMPONENT_FROM_FIELD':{var componentPathToRemove=['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys));return state.updateIn(componentPathToRemove,function(){return null;});}case'REMOVE_REPEATABLE_FIELD':{var _componentPathToRemove=['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys));return state.update('shouldCheckErrors',function(v){var hasErrors=state.get('formErrors').keySeq().size>0;if(hasErrors){return!v;}return v;}).deleteIn(_componentPathToRemove);}case'REMOVE_RELATION':return state.removeIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys.split('.'))));case'RESET_DATA':return state.update('modifiedData',function(){return state.get('initialData');}).update('formErrors',function(){return(0,_immutable.fromJS)({});});case'RESET_PROPS':return initialState;case'SET_DEFAULT_DATA_STRUCTURES':return state.update('componentsDataStructure',function(){return(0,_immutable.fromJS)(action.componentsDataStructure);}).update('contentTypeDataStructure',function(){return(0,_immutable.fromJS)(action.contentTypeDataStructure);});case'SET_DEFAULT_MODIFIED_DATA_STRUCTURE':return state.update('isLoading',function(){return false;}).update('initialData',function(){return(0,_immutable.fromJS)(action.contentTypeDataStructure);}).update('modifiedData',function(){return(0,_immutable.fromJS)(action.contentTypeDataStructure);});case'SET_ERRORS':return state.update('modifiedDZName',function(){return null;}).update('formErrors',function(){return(0,_immutable.fromJS)(action.errors);});case'SUBMIT_ERRORS':return state.update('formErrors',function(){return(0,_immutable.fromJS)(action.errors);}).update('shouldShowLoadingState',function(){return false;});case'SUBMIT_SUCCESS':case'DELETE_SUCCEEDED':return state.update('isLoading',function(){return false;}).update('initialData',function(){return state.get('modifiedData');});case'TRIGGER_FORM_VALIDATION':return state.update('shouldCheckErrors',function(v){var hasErrors=state.get('formErrors').keySeq().size>0;if(hasErrors){return!v;}return v;});default:return state;}};var _default=reducer;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2243:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"cleanData",{enumerable:true,get:function get(){return _cleanData["default"];}});Object.defineProperty(exports,"createDefaultForm",{enumerable:true,get:function get(){return _createDefaultForm["default"];}});Object.defineProperty(exports,"getFilesToUpload",{enumerable:true,get:function get(){return _getFilesToUpload["default"];}});Object.defineProperty(exports,"getYupInnerErrors",{enumerable:true,get:function get(){return _getYupInnerErrors["default"];}});Object.defineProperty(exports,"createYupSchema",{enumerable:true,get:function get(){return _schema["default"];}});var _cleanData=_interopRequireDefault(__webpack_require__(2244));var _createDefaultForm=_interopRequireDefault(__webpack_require__(2245));var _getFilesToUpload=_interopRequireDefault(__webpack_require__(2246));var _getYupInnerErrors=_interopRequireDefault(__webpack_require__(2247));var _schema=_interopRequireDefault(__webpack_require__(2248));
    +
    +/***/ }),
    +
    +/***/ 2244:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.helperCleanData=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _lodash=__webpack_require__(8);/* eslint-disable indent */var cleanData=function cleanData(retrievedData,currentSchema,componentsSchema){var getType=function getType(schema,attrName){return(0,_lodash.get)(schema,['attributes',attrName,'type'],'');};var getOtherInfos=function getOtherInfos(schema,arr){return(0,_lodash.get)(schema,['attributes'].concat((0,_toConsumableArray2["default"])(arr)),'');};var recursiveCleanData=function recursiveCleanData(data,schema){return Object.keys(data).reduce(function(acc,current){var attrType=getType(schema.schema,current);var value=(0,_lodash.get)(data,current);var component=getOtherInfos(schema.schema,[current,'component']);var isRepeatable=getOtherInfos(schema.schema,[current,'repeatable']);var cleanedData;switch(attrType){case'json':try{cleanedData=JSON.parse(value);}catch(err){cleanedData=value;}break;case'date':case'datetime':cleanedData=value&&value._isAMomentObject===true?value.toISOString():value;break;case'media':if(getOtherInfos(schema.schema,[current,'multiple'])===true){cleanedData=value?helperCleanData(value.filter(function(file){return!(file instanceof File);}),'id'):null;}else{cleanedData=(0,_lodash.get)(value,0)instanceof File?null:(0,_lodash.get)(value,'id',null);}break;case'component':if(isRepeatable){cleanedData=value?value.map(function(data){var subCleanedData=recursiveCleanData(data,componentsSchema[component]);return subCleanedData;}):value;}else{cleanedData=value?recursiveCleanData(value,componentsSchema[component]):value;}break;case'dynamiczone':cleanedData=value.map(function(componentData){var subCleanedData=recursiveCleanData(componentData,componentsSchema[componentData.__component]);return subCleanedData;});break;default:cleanedData=helperCleanData(value,'id');}acc[current]=cleanedData;return acc;},{});};return recursiveCleanData(retrievedData,currentSchema);};var helperCleanData=function helperCleanData(value,key){if((0,_lodash.isArray)(value)){return value.map(function(obj){return obj[key]?obj[key]:obj;});}if((0,_lodash.isObject)(value)){return value[key];}return value;};exports.helperCleanData=helperCleanData;var _default=cleanData;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2245:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _lodash=__webpack_require__(8);var createDefaultForm=function createDefaultForm(attributes,allComponentsSchema){return Object.keys(attributes).reduce(function(acc,current){var attribute=(0,_lodash.get)(attributes,[current],{});var defaultValue=attribute["default"],component=attribute.component,type=attribute.type,required=attribute.required,min=attribute.min,repeatable=attribute.repeatable;if(type==='json'){acc[current]=null;}if(type==='json'&&required===true){acc[current]={};}if(defaultValue!==undefined){acc[current]=defaultValue;}if(type==='component'){var currentComponentSchema=(0,_lodash.get)(allComponentsSchema,[component,'schema','attributes'],{});var currentComponentDefaultForm=createDefaultForm(currentComponentSchema,allComponentsSchema);if(required===true){acc[current]=repeatable===true?[]:{};}if(min&&repeatable===true&&required){acc[current]=[];for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:null;return Object.keys(data).reduce(function(acc,current){var currentData=data[current];var path=prefix?"".concat(prefix,".").concat(current):current;var filterFiles=function filterFiles(files){return files.filter(function(file){return file instanceof File;});};var hasFiles=function hasFiles(data){return data.some(function(file){return file instanceof File;});};var hasFile=function hasFile(data){return(0,_lodash.get)(data,0,null)instanceof File;};if((0,_lodash.isArray)(currentData)&&hasFiles(currentData)){acc[path]=filterFiles(currentData);}if((0,_lodash.isObject)(currentData)&&!(0,_lodash.isArray)(currentData)&&hasFile(currentData)){var currentFile=(0,_lodash.get)(currentData,0);acc[path]=[currentFile];}if((0,_lodash.isArray)(currentData)&&!hasFiles(currentData)){return _objectSpread({},acc,{},getFilesToUpload(currentData,path));}if((0,_lodash.isObject)(currentData)&&!(0,_lodash.isArray)(currentData)&&!hasFile(currentData)){return _objectSpread({},acc,{},getFilesToUpload(currentData,path));}return acc;},{});};var _default=getFilesToUpload;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2247:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _lodash=__webpack_require__(8);var getYupInnerErrors=function getYupInnerErrors(error){return(0,_lodash.get)(error,'inner',[]).reduce(function(acc,curr){acc[curr.path.split('[').join('.').split(']').join('')]={id:curr.message};return acc;},{});};var _default=getYupInnerErrors;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2248:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _lodash=__webpack_require__(8);var yup=_interopRequireWildcard(__webpack_require__(201));var _strapiHelperPlugin=__webpack_require__(10);yup.addMethod(yup.mixed,'defined',function(){return this.test('defined',_strapiHelperPlugin.translatedErrors.required,function(value){return value!==undefined;});});yup.addMethod(yup.array,'notEmptyMin',function(min){return this.test('notEmptyMin',_strapiHelperPlugin.translatedErrors.min,function(value){if((0,_lodash.isEmpty)(value)){return true;}return value.length>=min;});});yup.addMethod(yup.string,'isInferior',function(message,max){return this.test('isInferior',message,function(value){if(!value){return true;}if(Number.isNaN((0,_lodash.toNumber)(value))){return true;}return(0,_lodash.toNumber)(max)>=(0,_lodash.toNumber)(value);});});yup.addMethod(yup.string,'isSuperior',function(message,min){return this.test('isSuperior',message,function(value){if(!value){return true;}if(Number.isNaN((0,_lodash.toNumber)(value))){return true;}return(0,_lodash.toNumber)(value)>=(0,_lodash.toNumber)(min);});});var getAttributes=function getAttributes(data){return(0,_lodash.get)(data,['schema','attributes'],{});};var createYupSchema=function createYupSchema(model,_ref){var components=_ref.components;var attributes=getAttributes(model);return yup.object().shape(Object.keys(attributes).reduce(function(acc,current){var attribute=attributes[current];if(attribute.type!=='relation'&&attribute.type!=='component'&&attribute.type!=='dynamiczone'){var formatted=createYupSchemaAttribute(attribute.type,attribute);acc[current]=formatted;}if(attribute.type==='relation'){acc[current]=['oneWay','oneToOne','manyToOne','oneToManyMorph','oneToOneMorph'].includes(attribute.relationType)?yup.object().nullable():yup.array().nullable();}if(attribute.type==='component'){var componentFieldSchema=createYupSchema(components[attribute.component],{components:components});if(attribute.repeatable===true){var min=attribute.min,max=attribute.max,required=attribute.required;var _componentSchema=yup.lazy(function(value){var baseSchema=yup.array().of(componentFieldSchema);if(min){if(required){baseSchema=baseSchema.min(min,_strapiHelperPlugin.translatedErrors.min);}else if(required!==true&&(0,_lodash.isEmpty)(value)){baseSchema=baseSchema.nullable();}else{baseSchema=baseSchema.min(min,_strapiHelperPlugin.translatedErrors.min);}}if(max){baseSchema=baseSchema.max(max,_strapiHelperPlugin.translatedErrors.max);}return baseSchema;});acc[current]=_componentSchema;return acc;}var componentSchema=yup.lazy(function(obj){if(obj!==undefined){return attribute.required===true?componentFieldSchema.defined():componentFieldSchema.nullable();}return attribute.required===true?yup.object().defined():yup.object().nullable();});acc[current]=componentSchema;return acc;}if(attribute.type==='dynamiczone'){var dynamicZoneSchema=yup.array().of(yup.lazy(function(_ref2){var __component=_ref2.__component;return createYupSchema(components[__component],{components:components});}));var _max=attribute.max,_min=attribute.min;if(attribute.required){dynamicZoneSchema=dynamicZoneSchema.required();if(_min){dynamicZoneSchema=dynamicZoneSchema.min(_min,_strapiHelperPlugin.translatedErrors.min).required(_strapiHelperPlugin.translatedErrors.required);}}else{// eslint-disable-next-line no-lonely-if
    +if(_min){dynamicZoneSchema=dynamicZoneSchema.notEmptyMin(_min);}}if(_max){dynamicZoneSchema=dynamicZoneSchema.max(_max,_strapiHelperPlugin.translatedErrors.max);}acc[current]=dynamicZoneSchema;}return acc;},{}));};var createYupSchemaAttribute=function createYupSchemaAttribute(type,validations){var schema=yup.mixed();if(['string','uid','text','richtext','email','password','enumeration'].includes(type)){schema=yup.string();}if(type==='json'){schema=yup.mixed(_strapiHelperPlugin.translatedErrors.json).test('isJSON',_strapiHelperPlugin.translatedErrors.json,function(value){if(value===undefined){return true;}if((0,_lodash.isNumber)(value)||(0,_lodash.isNull)(value)||(0,_lodash.isObject)(value)||(0,_lodash.isArray)(value)){return true;}try{JSON.parse(value);return true;}catch(err){return false;}}).nullable();}if(type==='email'){schema=schema.email(_strapiHelperPlugin.translatedErrors.email);}if(['number','integer','biginteger','float','decimal'].includes(type)){schema=yup.number().transform(function(cv){return(0,_lodash.isNaN)(cv)?undefined:cv;}).typeError();}if(['date','datetime'].includes(type)){schema=yup.date();}if(type==='biginteger'){schema=yup.string().matches(/^\d*$/);}Object.keys(validations).forEach(function(validation){var validationValue=validations[validation];if(!!validationValue||!(0,_lodash.isBoolean)(validationValue)&&Number.isInteger(Math.floor(validationValue))||validationValue===0){switch(validation){case'required':schema=schema.required(_strapiHelperPlugin.translatedErrors.required);break;case'max':{if(type==='biginteger'){schema=schema.isInferior(_strapiHelperPlugin.translatedErrors.max,validationValue);}else{schema=schema.max(validationValue,_strapiHelperPlugin.translatedErrors.max);}break;}case'maxLength':schema=schema.max(validationValue,_strapiHelperPlugin.translatedErrors.maxLength);break;case'min':{if(type==='biginteger'){schema=schema.isSuperior(_strapiHelperPlugin.translatedErrors.min,validationValue);}else{schema=schema.min(validationValue,_strapiHelperPlugin.translatedErrors.min);}break;}case'minLength':schema=schema.min(validationValue,_strapiHelperPlugin.translatedErrors.minLength);break;case'regex':schema=schema.matches(validationValue,_strapiHelperPlugin.translatedErrors.regex);break;case'lowercase':if(['text','textarea','email','string'].includes(type)){schema=schema.strict().lowercase();}break;case'uppercase':if(['text','textarea','email','string'].includes(type)){schema=schema.strict().uppercase();}break;case'positive':if(['number','integer','bigint','float','decimal'].includes(type)){schema=schema.positive();}break;case'negative':if(['number','integer','bigint','float','decimal'].includes(type)){schema=schema.negative();}break;default:schema=schema.nullable();}}});return schema;};var _default=createYupSchema;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2249:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _EditView=_interopRequireDefault(__webpack_require__(1968));function EditViewProvider(_ref){var children=_ref.children,rest=(0,_objectWithoutProperties2["default"])(_ref,["children"]);return/*#__PURE__*/_react["default"].createElement(_EditView["default"].Provider,{value:rest},children);}EditViewProvider.propTypes={children:_propTypes["default"].node.isRequired};var _default=EditViewProvider;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2250:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(30);var _custom=__webpack_require__(72);var _strapiHelperPlugin=__webpack_require__(10);var _lodash=__webpack_require__(8);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useDataManager2=_interopRequireDefault(__webpack_require__(1906));var getRequestUrl=function getRequestUrl(path){return"/".concat(_pluginId["default"],"/explorer/").concat(path);};var Header=function Header(){var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),showWarningCancel=_useState2[0],setWarningCancel=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),showWarningDelete=_useState4[0],setWarningDelete=_useState4[1];var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),formatMessage=_useGlobalContext.formatMessage,emitEvent=_useGlobalContext.emitEvent;var _useParams=(0,_reactRouterDom.useParams)(),id=_useParams.id;var _useDataManager=(0,_useDataManager2["default"])(),deleteSuccess=_useDataManager.deleteSuccess,initialData=_useDataManager.initialData,layout=_useDataManager.layout,redirectToPreviousPage=_useDataManager.redirectToPreviousPage,resetData=_useDataManager.resetData,setIsSubmitting=_useDataManager.setIsSubmitting,slug=_useDataManager.slug,clearData=_useDataManager.clearData;var _useRouteMatch=(0,_reactRouterDom.useRouteMatch)('/plugins/content-manager/:contentType'),contentType=_useRouteMatch.params.contentType;var isSingleType=contentType==='singleType';var currentContentTypeMainField=(0,_lodash.get)(layout,['settings','mainField'],'id');var currentContentTypeName=(0,_lodash.get)(layout,['schema','info','name']);var isCreatingEntry=id==='create'||isSingleType&&!initialData.created_at;/* eslint-disable indent */var entryHeaderTitle=isCreatingEntry?formatMessage({id:"".concat(_pluginId["default"],".containers.Edit.pluginHeader.title.new")}):(0,_strapiHelperPlugin.templateObject)({mainField:currentContentTypeMainField},initialData).mainField;/* eslint-enable indent */var headerTitle=isSingleType?currentContentTypeName:entryHeaderTitle;var getHeaderActions=function getHeaderActions(){var headerActions=[{onClick:function onClick(){toggleWarningCancel();},color:'cancel',label:formatMessage({id:"".concat(_pluginId["default"],".containers.Edit.reset")}),type:'button',style:{paddingLeft:15,paddingRight:15,fontWeight:600}},{color:'success',label:formatMessage({id:"".concat(_pluginId["default"],".containers.Edit.submit")}),type:'submit',style:{minWidth:150,fontWeight:600}}];if(!isCreatingEntry){headerActions.unshift({label:formatMessage({id:'app.utils.delete'}),color:'delete',onClick:function onClick(){toggleWarningDelete();},type:'button',style:{paddingLeft:15,paddingRight:15,fontWeight:600}});}return headerActions;};var headerProps={title:{label:headerTitle&&headerTitle.toString()},content:isSingleType?"".concat(formatMessage({id:"".concat(_pluginId["default"],".api.id")})," : ").concat(layout.apiID):'',actions:getHeaderActions()};var toggleWarningCancel=function toggleWarningCancel(){return setWarningCancel(function(prevState){return!prevState;});};var toggleWarningDelete=function toggleWarningDelete(){return setWarningDelete(function(prevState){return!prevState;});};var handleConfirmReset=function handleConfirmReset(){toggleWarningCancel();resetData();};var handleConfirmDelete=/*#__PURE__*/function(){var _ref=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:toggleWarningDelete();setIsSubmitting();_context.prev=2;emitEvent('willDeleteEntry');_context.next=6;return(0,_strapiHelperPlugin.request)(getRequestUrl("".concat(slug,"/").concat(initialData.id)),{method:'DELETE'});case 6:strapi.notification.success("".concat(_pluginId["default"],".success.record.delete"));deleteSuccess();emitEvent('didDeleteEntry');if(!isSingleType){redirectToPreviousPage();}else{clearData();}_context.next=17;break;case 12:_context.prev=12;_context.t0=_context["catch"](2);setIsSubmitting(false);emitEvent('didNotDeleteEntry',{error:_context.t0});strapi.notification.error("".concat(_pluginId["default"],".error.record.delete"));case 17:case"end":return _context.stop();}}},_callee,null,[[2,12]]);}));return function handleConfirmDelete(){return _ref.apply(this,arguments);};}();return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_custom.Header,headerProps),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningCancel,toggleModal:toggleWarningCancel,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.cancelAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:handleConfirmReset}),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningDelete,toggleModal:toggleWarningDelete,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.bodyMessage.contentType.delete"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:handleConfirmDelete}));};var _default=Header;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2251:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _lodash=__webpack_require__(8);function _createForOfIteratorHelper(o){if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(o=_unsupportedIterableToArray(o))){var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var it,normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]();}finally{if(didErr)throw err;}}};}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(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i0;});};var _default=createAttributesLayout;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2252:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.SubWrapper=exports.MainWrapper=exports.LinkWrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  background: #ffffff;\n  border-radius: 2px;\n  box-shadow: 0 2px 4px #e3e9f3;\n  ul {\n    list-style: none;\n    padding: 0;\n  }\n  li {\n    padding: 7px 20px;\n    border-top: 1px solid #f6f6f6;\n    &:first-of-type {\n      border-color: transparent;\n    }\n    &:not(:first-of-type) {\n      margin-top: 0;\n    }\n  }\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  > div {\n    margin-right: 0;\n    margin-left: 0;\n  }\n  padding: 22px 10px;\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  background: #ffffff;\n  border-radius: 2px;\n  box-shadow: 0 2px 4px #e3e9f3;\n"]);_templateObject=function _templateObject(){return data;};return data;}var SubWrapper=_styledComponents["default"].div(_templateObject());exports.SubWrapper=SubWrapper;var MainWrapper=(0,_styledComponents["default"])(SubWrapper)(_templateObject2());exports.MainWrapper=MainWrapper;var LinkWrapper=(0,_styledComponents["default"])(SubWrapper)(_templateObject3());exports.LinkWrapper=LinkWrapper;
    +
    +/***/ }),
    +
    +/***/ 2253:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;function init(initialState){return initialState;}var _default=init;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2254:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _immutable=__webpack_require__(35);var initialState=(0,_immutable.fromJS)({formattedContentTypeLayout:[],isDraggingComponent:false});exports.initialState=initialState;var reducer=function reducer(state,action){switch(action.type){case'SET_IS_DRAGGING_COMPONENT':return state.update('isDraggingComponent',function(){return true;});case'SET_LAYOUT_DATA':return state.update('formattedContentTypeLayout',function(){return(0,_immutable.fromJS)(action.formattedContentTypeLayout);});case'RESET_PROPS':return initialState;case'UNSET_IS_DRAGGING_COMPONENT':return state.update('isDraggingComponent',function(){return false;});default:return state;}};var _default=reducer;exports["default"]=_default;
    +
    +/***/ })
    +
    +}]);
    \ No newline at end of file
    diff --git a/server/build/261d666b0147c6c5cda07265f98b8f8c.eot b/server/build/261d666b0147c6c5cda07265f98b8f8c.eot
    new file mode 100644
    index 00000000..38cf2517
    Binary files /dev/null and b/server/build/261d666b0147c6c5cda07265f98b8f8c.eot differ
    diff --git a/server/build/27bd77b9162d388cb8d4c4217c7c5e2a.woff b/server/build/27bd77b9162d388cb8d4c4217c7c5e2a.woff
    new file mode 100644
    index 00000000..ae1307ff
    Binary files /dev/null and b/server/build/27bd77b9162d388cb8d4c4217c7c5e2a.woff differ
    diff --git a/server/build/2ce4d82354fdf1be1788c526d94eefc1.woff b/server/build/2ce4d82354fdf1be1788c526d94eefc1.woff
    new file mode 100644
    index 00000000..43a3c80f
    Binary files /dev/null and b/server/build/2ce4d82354fdf1be1788c526d94eefc1.woff differ
    diff --git a/server/build/2e1ba5a498b2a46ff0e9130c2cfd3384.svg b/server/build/2e1ba5a498b2a46ff0e9130c2cfd3384.svg
    new file mode 100644
    index 00000000..80a84783
    --- /dev/null
    +++ b/server/build/2e1ba5a498b2a46ff0e9130c2cfd3384.svg
    @@ -0,0 +1 @@
    +✉️
    \ No newline at end of file
    diff --git a/server/build/2e83b03e0d8024cdb30d4ac2e02fcce8.svg b/server/build/2e83b03e0d8024cdb30d4ac2e02fcce8.svg
    new file mode 100644
    index 00000000..a13aa373
    --- /dev/null
    +++ b/server/build/2e83b03e0d8024cdb30d4ac2e02fcce8.svg
    @@ -0,0 +1 @@
    +🏭
    \ No newline at end of file
    diff --git a/server/build/2ff0049a00e47b56bffc059daf9be78b.png b/server/build/2ff0049a00e47b56bffc059daf9be78b.png
    new file mode 100644
    index 00000000..de220f46
    Binary files /dev/null and b/server/build/2ff0049a00e47b56bffc059daf9be78b.png differ
    diff --git a/server/build/3.79d3ee8f.chunk.js b/server/build/3.79d3ee8f.chunk.js
    new file mode 100644
    index 00000000..0076317a
    --- /dev/null
    +++ b/server/build/3.79d3ee8f.chunk.js
    @@ -0,0 +1,241 @@
    +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{
    +
    +/***/ 1957:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var ListViewContext=(0,_react.createContext)();var _default=ListViewContext;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1958:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _defineProperty2=_interopRequireDefault(__webpack_require__(11));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i g {\n    > path {\n      fill: #007eff;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Close=(0,_styledComponents["default"])(_icons.Remove)(_templateObject());var _default=Close;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2017:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 139px;\n  height: 90px;\n  padding-top: 7px;\n  &:focus {\n    outline: 0;\n  }\n\n  div {\n    width: 35px;\n    height: 35px;\n    border-radius: 18px;\n    background-color: #2c3138;\n    display: flex;\n    margin: auto;\n    svg {\n      margin auto;\n      width: 11px;\n      height: 11px;\n    }\n  }\n  p {\n    margin-top: 5px;\n    font-size: 13px;\n    font-weight: bold;\n    color: #2c3138;\n    line-height: normal;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ComponentButton=_styledComponents["default"].button(_templateObject());var _default=ComponentButton;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2018:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _styles=__webpack_require__(21);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  table-layout: fixed;\n\n  tbody {\n    td:first-of-type:not(:last-of-type) {\n      width: 73px;\n      padding-left: 30px;\n      > svg {\n        width: auto;\n        height: 16px;\n        position: absolute;\n        left: -4px;\n        top: 16px;\n        display: none;\n      }\n    }\n    td[colspan='12'] {\n      position: relative;\n      padding: 0 0 0 50px;\n      > div {\n        box-shadow: none;\n      }\n    }\n    tr.component-row {\n      &:not(:first-of-type) {\n        &::before {\n          background-color: transparent;\n        }\n      }\n      table tr td:first-of-type:not(:last-of-type) {\n        width: 79px;\n        padding-left: 36px;\n        svg {\n          display: block;\n        }\n      }\n    }\n    table + div button {\n      position: relative;\n      background-color: transparent;\n      text-transform: initial;\n      color: #9ea7b8;\n      text-align: left;\n      padding-left: 35px;\n      border-color: transparent;\n      svg {\n        position: absolute;\n        top: 0;\n        left: 0;\n      }\n    }\n    tr.dynamiczone-row {\n      &:not(:first-of-type) {\n        &::before {\n          background-color: transparent;\n        }\n      }\n      > td[colspan='12'] {\n        padding-left: 0;\n        padding-right: 0;\n      }\n\n      .tabs-wrapper {\n        display: flex;\n        justify-content: center;\n        align-items: center;\n        width: 100%;\n        // height: 90px;\n        position: absolute;\n        top: 0;\n        left: 0;\n        z-index: 2;\n        padding-top: 18px;\n        padding-left: 86px;\n        padding-right: 30px;\n        .nav-tabs {\n          border-bottom: 0;\n        }\n        ul.nav {\n          width: 100%;\n          // height: 90px;\n          display: flex;\n          flex-wrap: nowrap;\n          overflow-x: auto;\n          overflow-y: hidden;\n          li {\n            margin-right: 9px;\n          }\n        }\n        & + .tab-content {\n          padding-top: 126px;\n          position: relative;\n          z-index: 1;\n        }\n      }\n    }\n  }\n  & + .plus-icon {\n    width: 27px;\n    height: 27px;\n    border-radius: 18px;\n    position: absolute;\n    bottom: 14px;\n    left: 34px;\n    background-color: ",";\n\n    color: transparent;\n    text-align: center;\n    line-height: 27px;\n    display: flex;\n    cursor: pointer;\n    svg {\n      margin: auto;\n      width: 11px;\n      height: 11px;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=(0,_styledComponents["default"])(_styles.List)(_templateObject(),function(_ref){var isFromDynamicZone=_ref.isFromDynamicZone;return isFromDynamicZone?'#AED4FB':'#f3f4f4';});Wrapper.defaultProps={isFromDynamicZone:false};var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2019:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _ListButton=__webpack_require__(2020);var _Title=_interopRequireDefault(__webpack_require__(2021));var _Wrapper=_interopRequireDefault(__webpack_require__(2022));/* eslint-disable react/jsx-one-expression-per-line */function ListHeader(_ref){var actions=_ref.actions,title=_ref.title;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,/*#__PURE__*/_react["default"].createElement("div",{className:"list-header-actions"},actions.map(function(action){var disabled=action.disabled,label=action.label,onClick=action.onClick;return/*#__PURE__*/_react["default"].createElement(_ListButton.ListHeaderButton,(0,_extends2["default"])({key:label,onClick:onClick,disabled:disabled||false},action),label);})),/*#__PURE__*/_react["default"].createElement("div",{className:"list-header-title"},title.map(function(item){return/*#__PURE__*/_react["default"].createElement(_Title["default"],{key:item},item,"\xA0");})));}ListHeader.defaultProps={actions:[],title:[]};ListHeader.propTypes={actions:_propTypes["default"].arrayOf(_propTypes["default"].shape({disabled:_propTypes["default"].bool,onClick:_propTypes["default"].func,title:_propTypes["default"].string})),title:_propTypes["default"].arrayOf(_propTypes["default"].string)};var _default=ListHeader;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2020:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.ListHeaderButton=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _core=__webpack_require__(53);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-left: 15px;\n  padding-right: 15px;\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var ListHeaderButton=(0,_styledComponents["default"])(_core.Button)(_templateObject());exports.ListHeaderButton=ListHeaderButton;
    +
    +/***/ }),
    +
    +/***/ 2021:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-bottom: 0;\n  color: ",";\n  font-family: 'Lato';\n  font-size: 1.8rem;\n  font-weight: bold;\n  line-height: 2.2rem;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Title=_styledComponents["default"].p(_templateObject(),_strapiHelperPlugin.colors.blueTxt);var _default=Title;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2022:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  padding: 2.1rem 6rem 1.7rem 3rem;\n  background-color: white;\n  .list-header-actions {\n    position: absolute;\n    top: 1.8rem;\n    right: 3rem;\n    button {\n      outline: 0;\n      margin-left: 10px;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2023:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactRouterDom=__webpack_require__(30);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(95));var _getTrad=_interopRequireDefault(__webpack_require__(73));var _CustomLink=_interopRequireDefault(__webpack_require__(2024));var _useDataManager2=_interopRequireDefault(__webpack_require__(106));var _makeSearch=_interopRequireDefault(__webpack_require__(353));var _Wrapper=_interopRequireDefault(__webpack_require__(2027));/**
    + *
    + * LeftMenu
    + *
    + */ /* eslint-disable indent */var displayNotificationCTNotSaved=function displayNotificationCTNotSaved(){strapi.notification.info("".concat(_pluginId["default"],".notification.info.creating.notSaved"));};function LeftMenu(_ref){var wait=_ref.wait;var _useDataManager=(0,_useDataManager2["default"])(),components=_useDataManager.components,componentsGroupedByCategory=_useDataManager.componentsGroupedByCategory,contentTypes=_useDataManager.contentTypes,isInDevelopmentMode=_useDataManager.isInDevelopmentMode,sortedContentTypesList=_useDataManager.sortedContentTypesList;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent,formatMessage=_useGlobalContext.formatMessage;var _useHistory=(0,_reactRouterDom.useHistory)(),push=_useHistory.push;var componentsData=(0,_lodash.sortBy)(Object.keys(componentsGroupedByCategory).map(function(category){return{name:category,title:category,isEditable:isInDevelopmentMode,onClickEdit:function onClickEdit(e,data){e.stopPropagation();var search=(0,_makeSearch["default"])({actionType:'edit',modalType:'editCategory',categoryName:data.name,header_label_1:formatMessage({id:(0,_getTrad["default"])('modalForm.header.categories')}),header_icon_name_1:'component',header_icon_isCustom_1:false,header_info_category_1:null,header_info_name_1:null,header_label_2:data.name,header_icon_name_2:null,header_icon_isCustom_2:false,header_info_category_2:null,header_info_name_2:null,settingType:'base'});push({search:search});},links:(0,_lodash.sortBy)(componentsGroupedByCategory[category].map(function(compo){return{name:compo.uid,to:"/plugins/".concat(_pluginId["default"],"/component-categories/").concat(category,"/").concat(compo.uid),title:compo.schema.name};}),function(obj){return obj.title;})};}),function(obj){return obj.title;});var canOpenModalCreateCTorComponent=function canOpenModalCreateCTorComponent(){return!Object.keys(contentTypes).some(function(ct){return contentTypes[ct].isTemporary===true;})&&!Object.keys(components).some(function(component){return components[component].isTemporary===true;});};var handleClickOpenModal=/*#__PURE__*/function(){var _ref2=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(modalType){var kind,type,search,_args=arguments;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:kind=_args.length>1&&_args[1]!==undefined?_args[1]:'';type=kind==='singleType'?kind:modalType;if(!canOpenModalCreateCTorComponent()){_context.next=10;break;}emitEvent("willCreate".concat((0,_lodash.upperFirst)((0,_lodash.camelCase)(type))));_context.next=6;return wait();case 6:search=(0,_makeSearch["default"])({modalType:modalType,kind:kind,actionType:'create',settingType:'base',forTarget:modalType,headerId:(0,_getTrad["default"])("modalForm.".concat(type,".header-create")),header_icon_isCustom_1:'false',header_icon_name_1:type,header_label_1:'null'});push({search:search});_context.next=11;break;case 10:displayNotificationCTNotSaved();case 11:case"end":return _context.stop();}}},_callee);}));return function handleClickOpenModal(_x){return _ref2.apply(this,arguments);};}();var data=[{name:'models',title:{id:"".concat(_pluginId["default"],".menu.section.models.name.")},searchable:true,customLink:isInDevelopmentMode?{Component:_CustomLink["default"],componentProps:{id:"".concat(_pluginId["default"],".button.model.create"),onClick:function onClick(){handleClickOpenModal('contentType','collectionType');}}}:null,links:sortedContentTypesList.filter(function(contentType){return contentType.kind==='collectionType';})},{name:'singleTypes',title:{id:"".concat(_pluginId["default"],".menu.section.single-types.name.")},searchable:true,customLink:isInDevelopmentMode?{Component:_CustomLink["default"],componentProps:{id:"".concat(_pluginId["default"],".button.single-types.create"),onClick:function onClick(){handleClickOpenModal('contentType','singleType');}}}:null,links:sortedContentTypesList.filter(function(singleType){return singleType.kind==='singleType';})},{name:'components',title:{id:"".concat(_pluginId["default"],".menu.section.components.name.")},searchable:true,customLink:isInDevelopmentMode?{Component:_CustomLink["default"],componentProps:{id:"".concat(_pluginId["default"],".button.component.create"),onClick:function onClick(){handleClickOpenModal('component');}}}:null,links:componentsData}];return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{className:"col-md-3"},data.map(function(list){return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LeftMenuList,(0,_extends2["default"])({numberOfVisibleItems:5},list,{key:list.name}));}));}LeftMenu.defaultProps={wait:function wait(){}};LeftMenu.propTypes={wait:_propTypes["default"].func};var _default=LeftMenu;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2024:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports.CustomLink=exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _reactIntl=__webpack_require__(15);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _icons=__webpack_require__(94);var _P=_interopRequireDefault(__webpack_require__(2025));var _StyledCustomLink=_interopRequireDefault(__webpack_require__(2026));var CustomLink=function CustomLink(_ref){var disabled=_ref.disabled,id=_ref.id,onClick=_ref.onClick;return/*#__PURE__*/_react["default"].createElement(_StyledCustomLink["default"],{disabled:disabled},/*#__PURE__*/_react["default"].createElement("button",{onClick:onClick,disabled:disabled,type:"button"},/*#__PURE__*/_react["default"].createElement(_P["default"],null,/*#__PURE__*/_react["default"].createElement(_icons.Plus,{fill:"#007EFF",width:"11px",height:"11px"}),id&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:id}))));};exports.CustomLink=CustomLink;CustomLink.defaultProps={disabled:false,id:null};CustomLink.propTypes={disabled:_propTypes["default"].bool,id:_propTypes["default"].string,onClick:_propTypes["default"].func.isRequired};var _default=(0,_react.memo)(CustomLink);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2025:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  color: ",";\n  font-size: 13px;\n  font-weight: 500;\n  line-height: 18px;\n  text-align: left;\n  > svg {\n    margin-right: 7px;\n    vertical-align: initial;\n    -webkit-font-smoothing: subpixel-antialiased;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var P=_styledComponents["default"].p(_templateObject(),_strapiHelperPlugin.colors.blue);var _default=P;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2026:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-left: 15px;\n  padding-top: 9px;\n  line-height: 0;\n  margin-left: -3px;\n\n  button {\n    cursor: ",";\n    padding: 0;\n    line-height: 16px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var StyledCustomLink=_styledComponents["default"].div(_templateObject(),function(_ref){var disabled=_ref.disabled;return disabled?'not-allowed':'pointer';});var _default=StyledCustomLink;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2027:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 100%;\n  min-height: calc(100vh - ",");\n  background-color: ",";\n  padding-top: 3.1rem;\n  padding-left: 2rem;\n  padding-right: 2rem;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject(),_strapiHelperPlugin.sizes.header.height,_strapiHelperPlugin.colors.leftMenu.mediumGrey);var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2028:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  .button-secondary {\n    &:hover {\n      background-color: #ffffff !important;\n      box-shadow: 0 0 0 #fff;\n    }\n  }\n  .button-submit {\n    min-width: 140px;\n  }\n  .add-button {\n    line-height: 30px;\n    svg {\n      height: 11px;\n      width: 11px;\n      vertical-align: initial;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=(0,_styledComponents["default"])(_strapiHelperPlugin.ViewContainer)(_templateObject());var _default=Wrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 656:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _regenerator=_interopRequireDefault(__webpack_require__(44));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(30);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _strapiHelperPlugin=__webpack_require__(10);var _custom=__webpack_require__(72);var _ListViewContext=_interopRequireDefault(__webpack_require__(1957));var _convertAttrObjToArray=_interopRequireDefault(__webpack_require__(1958));var _getAttributeDisplayedType=_interopRequireDefault(__webpack_require__(1959));var _getTrad=_interopRequireDefault(__webpack_require__(73));var _makeSearch=_interopRequireDefault(__webpack_require__(353));var _ListRow=_interopRequireDefault(__webpack_require__(2009));var _List=_interopRequireDefault(__webpack_require__(1960));var _useDataManager2=_interopRequireDefault(__webpack_require__(106));var _pluginId=_interopRequireDefault(__webpack_require__(95));var _ListHeader=_interopRequireDefault(__webpack_require__(2019));var _LeftMenu=_interopRequireDefault(__webpack_require__(2023));var _Wrapper=_interopRequireDefault(__webpack_require__(2028));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i1?'plural':'singular')},{number:attributesLength})];var addButtonProps={icon:true,className:'add-button',color:'primary',label:formatMessage({id:"".concat(_pluginId["default"],".button.attributes.add.another")}),onClick:function onClick(){var headerDisplayObject={header_label_1:currentDataName,header_icon_name_1:forTarget==='contentType'?contentTypeKind:forTarget,header_icon_isCustom_1:false};handleClickAddField(forTarget,targetUid,headerDisplayObject);}};var goToCMSettingsPage=function goToCMSettingsPage(){var endPoint=isInContentTypeView?"/plugins/content-manager/".concat(contentTypeKind,"/").concat(targetUid,"/ctm-configurations/edit-settings/content-types"):"/plugins/content-manager/ctm-configurations/edit-settings/components/".concat(targetUid,"/");push(endPoint);};var configureButtonProps={icon:/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LayoutIcon,{className:"colored",fill:"#007eff"}),color:'secondary',label:formatMessage({id:"".concat(_pluginId["default"],".form.button.configure-view")}),onClick:goToCMSettingsPage,style:{height:'30px',marginTop:'1px'},className:'button-secondary'};var listActions=isInDevelopmentMode?[_objectSpread({},configureButtonProps),_objectSpread({},addButtonProps)]:[configureButtonProps];var CustomRow=function CustomRow(props){var name=props.name;return/*#__PURE__*/_react["default"].createElement(_ListRow["default"],(0,_extends2["default"])({},props,{attributeName:name,name:name,onClick:handleClickEditField}));};CustomRow.defaultProps={name:null};CustomRow.propTypes={name:_propTypes["default"].string};return/*#__PURE__*/_react["default"].createElement(_ListViewContext["default"].Provider,{value:{openModalAddField:handleClickAddField}},/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.BackHeader,{onClick:goBack}),/*#__PURE__*/_react["default"].createElement(_reactRouterDom.Prompt,{message:formatMessage({id:(0,_getTrad["default"])('prompt.unsaved')}),when:hasModelBeenModified&&enablePrompt}),/*#__PURE__*/_react["default"].createElement("div",{className:"container-fluid"},/*#__PURE__*/_react["default"].createElement("div",{className:"row"},/*#__PURE__*/_react["default"].createElement(_LeftMenu["default"],{wait:wait}),/*#__PURE__*/_react["default"].createElement("div",{className:"col-md-9 content",style:{paddingLeft:'30px',paddingRight:'30px'}},/*#__PURE__*/_react["default"].createElement(_custom.Header,headerProps),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ListWrapper,{style:{marginBottom:80}},/*#__PURE__*/_react["default"].createElement(_ListHeader["default"],{actions:listActions,title:listTitle}),/*#__PURE__*/_react["default"].createElement(_List["default"],{items:(0,_convertAttrObjToArray["default"])(attributes),customRowComponent:function customRowComponent(props){return/*#__PURE__*/_react["default"].createElement(CustomRow,props);},addComponentToDZ:handleClickAddComponentToDZ,targetUid:targetUid,dataType:forTarget,dataTypeName:currentDataName,mainTypeName:currentDataName,editTarget:forTarget,isMain:true})))))));};var _default=ListView;exports["default"]=_default;
    +
    +/***/ })
    +
    +}]);
    \ No newline at end of file
    diff --git a/server/build/314210a4825a7cc8ca7db893dfd9d283.woff2 b/server/build/314210a4825a7cc8ca7db893dfd9d283.woff2
    new file mode 100644
    index 00000000..0c897ce4
    Binary files /dev/null and b/server/build/314210a4825a7cc8ca7db893dfd9d283.woff2 differ
    diff --git a/server/build/33d5f0d956f3fc30bc51f81047a2c47d.woff2 b/server/build/33d5f0d956f3fc30bc51f81047a2c47d.woff2
    new file mode 100644
    index 00000000..3ee7cd44
    Binary files /dev/null and b/server/build/33d5f0d956f3fc30bc51f81047a2c47d.woff2 differ
    diff --git a/server/build/33f80c39ceeee87c63c4ecfaf6430499.svg b/server/build/33f80c39ceeee87c63c4ecfaf6430499.svg
    new file mode 100644
    index 00000000..9edb7238
    --- /dev/null
    +++ b/server/build/33f80c39ceeee87c63c4ecfaf6430499.svg
    @@ -0,0 +1 @@
    +🔐
    \ No newline at end of file
    diff --git a/server/build/353e06eff649d349c57886e7b85c1583.svg b/server/build/353e06eff649d349c57886e7b85c1583.svg
    new file mode 100644
    index 00000000..427a70ad
    --- /dev/null
    +++ b/server/build/353e06eff649d349c57886e7b85c1583.svg
    @@ -0,0 +1 @@
    +☁️⬆︎
    \ No newline at end of file
    diff --git a/server/build/38d2399f6c10d8ba1d8d45ba0c440ad5.woff b/server/build/38d2399f6c10d8ba1d8d45ba0c440ad5.woff
    new file mode 100644
    index 00000000..dbac8a9f
    Binary files /dev/null and b/server/build/38d2399f6c10d8ba1d8d45ba0c440ad5.woff differ
    diff --git a/server/build/3996eea080b78f9e7dc1dd56c6c851c2.svg b/server/build/3996eea080b78f9e7dc1dd56c6c851c2.svg
    new file mode 100644
    index 00000000..2c77b183
    --- /dev/null
    +++ b/server/build/3996eea080b78f9e7dc1dd56c6c851c2.svg
    @@ -0,0 +1 @@
    +
    \ No newline at end of file
    diff --git a/server/build/46f0461b6e19880fe446f094bbe787f4.woff2 b/server/build/46f0461b6e19880fe446f094bbe787f4.woff2
    new file mode 100644
    index 00000000..61989ae0
    Binary files /dev/null and b/server/build/46f0461b6e19880fe446f094bbe787f4.woff2 differ
    diff --git a/server/build/47ffa3adcd8b08b2ea82d3ed6c448f31.png b/server/build/47ffa3adcd8b08b2ea82d3ed6c448f31.png
    new file mode 100644
    index 00000000..04709013
    Binary files /dev/null and b/server/build/47ffa3adcd8b08b2ea82d3ed6c448f31.png differ
    diff --git a/server/build/482fe0a9e92d9c5ff7fec117ca54c8ae.woff b/server/build/482fe0a9e92d9c5ff7fec117ca54c8ae.woff
    new file mode 100644
    index 00000000..2297f436
    Binary files /dev/null and b/server/build/482fe0a9e92d9c5ff7fec117ca54c8ae.woff differ
    diff --git a/server/build/4c4e7d0d5ebd40343f6e1281f0bd9438.ico b/server/build/4c4e7d0d5ebd40343f6e1281f0bd9438.ico
    new file mode 100644
    index 00000000..d7be3ab5
    Binary files /dev/null and b/server/build/4c4e7d0d5ebd40343f6e1281f0bd9438.ico differ
    diff --git a/server/build/4eb103b4d12be57cb1d040ed5e162e9d.woff2 b/server/build/4eb103b4d12be57cb1d040ed5e162e9d.woff2
    new file mode 100644
    index 00000000..3404f37e
    Binary files /dev/null and b/server/build/4eb103b4d12be57cb1d040ed5e162e9d.woff2 differ
    diff --git a/server/build/587bfd5bca999b8d1213603050cb696e.svg b/server/build/587bfd5bca999b8d1213603050cb696e.svg
    new file mode 100644
    index 00000000..c8dc19f9
    --- /dev/null
    +++ b/server/build/587bfd5bca999b8d1213603050cb696e.svg
    @@ -0,0 +1 @@
    +
    diff --git a/server/build/6.eb945aa2.chunk.js b/server/build/6.eb945aa2.chunk.js
    new file mode 100644
    index 00000000..58158b33
    --- /dev/null
    +++ b/server/build/6.eb945aa2.chunk.js
    @@ -0,0 +1,444 @@
    +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[6],{
    +
    +/***/ 1908:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 18px 30px 18px 30px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Container=_styledComponents["default"].div(_templateObject());var _default=Container;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1915:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var _ListView=_interopRequireDefault(__webpack_require__(2000));var useListView=function useListView(){return(0,_react.useContext)(_ListView["default"]);};var _default=useListView;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1928:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Truncated=exports.Truncate=exports.Thead=exports.TableRow=exports.TableEmpty=exports.TableDelete=exports.Table=exports.DeleteSpan=exports.DeletAllSpan=exports.Arrow=exports.ActionContainer=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject12(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: absolute;\n  color: #f64d0a;\n  font-weight: 500;\n  cursor: pointer;\n  &:after {\n    position: relative;\n    top: -1px;\n    content: '\f1f8';\n    margin-left: 7px;\n    font-size: 13px;\n    font-family: FontAwesome;\n    -webkit-font-smoothing: antialiased;\n  }\n"],["\n  position: absolute;\n  color: #f64d0a;\n  font-weight: 500;\n  cursor: pointer;\n  &:after {\n    position: relative;\n    top: -1px;\n    content: '\\f1f8';\n    margin-left: 7px;\n    font-size: 13px;\n    font-family: FontAwesome;\n    -webkit-font-smoothing: antialiased;\n  }\n"]);_templateObject12=function _templateObject12(){return data;};return data;}function _templateObject11(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  font-weight: 600;\n  -webkit-font-smoothing: antialiased;\n  &:after {\n    content: '\u2014';\n    margin: 0 7px;\n    font-size: 13px;\n    font-weight: 600;\n  }\n"]);_templateObject11=function _templateObject11(){return data;};return data;}function _templateObject10(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  text-align: right;\n\n  i,\n  svg {\n    margin-left: 15px;\n    font-size: 1rem;\n    height: 1rem;\n    color: #333740;\n\n    &:first-of-type {\n      margin-left: 0px;\n    }\n  }\n"]);_templateObject10=function _templateObject10(){return data;};return data;}function _templateObject9(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 100%;\n  height: 36px;\n  background: #f7f8f8;\n\n  td {\n    height: 36px;\n    line-height: 36px;\n    font-size: 1.3rem;\n    font-weight: 400;\n    color: #333740;\n    text-align: left;\n    border-collapse: collapse;\n    border-top: 1px solid #f1f1f2 !important;\n  }\n"]);_templateObject9=function _templateObject9(){return data;};return data;}function _templateObject8(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  margin-bottom: 0;\n"]);_templateObject8=function _templateObject8(){return data;};return data;}function _templateObject7(){var data=(0,_taggedTemplateLiteral2["default"])([""]);_templateObject7=function _templateObject7(){return data;};return data;}function _templateObject6(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  &:after {\n    content: '\f0d8';\n    font-family: 'FontAwesome';\n    font-size: 13px;\n    font-weight: 600;\n    position: absolute;\n    top: 0px;\n    right: -12px;\n  }\n  &.isAsc {\n    &:after {\n      transform: rotateZ(180deg);\n    }\n  }\n"],["\n  &:after {\n    content: '\\f0d8';\n    font-family: 'FontAwesome';\n    font-size: 13px;\n    font-weight: 600;\n    position: absolute;\n    top: 0px;\n    right: -12px;\n  }\n  &.isAsc {\n    &:after {\n      transform: rotateZ(180deg);\n    }\n  }\n"]);_templateObject6=function _templateObject6(){return data;};return data;}function _templateObject5(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 54px;\n  background: #ffffff;\n\n  &:hover {\n    cursor: pointer;\n    background: #f7f8f8;\n  }\n\n  td {\n    height: 53px;\n    font-size: 1.3rem;\n    line-height: 1.8rem;\n    font-weight: 400;\n    color: #333740;\n    vertical-align: middle;\n    border-collapse: collapse;\n    border-top: 1px solid #f1f1f2 !important;\n  }\n"]);_templateObject5=function _templateObject5(){return data;};return data;}function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 100%;\n  height: 108px;\n  background: #ffffff;\n\n  td {\n    height: 106px;\n    line-height: 90px;\n    font-size: 1.3rem;\n    font-weight: 400;\n    color: #333740;\n    text-align: center;\n    border-collapse: collapse;\n    border-top: 1px solid #f1f1f2 !important;\n  }\n"]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        > tr {\n          th:first-child {\n            width: 50px;\n          }\n        }\n      "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  background: #f3f3f3;\n  height: 43px;\n  overflow: hidden;\n\n  th {\n    height: 43px;\n    border: none !important;\n    font-size: 1.3rem;\n    vertical-align: middle !important;\n    > span {\n      position: relative;\n      &.sortable {\n        cursor: pointer;\n      }\n    }\n  }\n  ","\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  border-radius: 3px;\n  border-collapse: initial;\n  box-shadow: 0 2px 4px #e3e9f3;\n  table-layout: fixed;\n  margin-bottom: 0;\n\n  tr,\n  th,\n  td {\n    border: none;\n    padding: 0;\n  }\n\n  th,\n  td {\n    padding: 0 25px;\n\n    label {\n      display: inline;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Table=_styledComponents["default"].table(_templateObject());exports.Table=Table;var Thead=_styledComponents["default"].thead(_templateObject2(),function(_ref){var isBulkable=_ref.isBulkable;if(isBulkable){return(0,_styledComponents.css)(_templateObject3());}});exports.Thead=Thead;var TableEmpty=_styledComponents["default"].tr(_templateObject4());exports.TableEmpty=TableEmpty;var TableRow=_styledComponents["default"].tr(_templateObject5());exports.TableRow=TableRow;var Arrow=_styledComponents["default"].span(_templateObject6());exports.Arrow=Arrow;var Truncate=_styledComponents["default"].div(_templateObject7());exports.Truncate=Truncate;var Truncated=_styledComponents["default"].p(_templateObject8());exports.Truncated=Truncated;var TableDelete=_styledComponents["default"].tr(_templateObject9());exports.TableDelete=TableDelete;var ActionContainer=_styledComponents["default"].td(_templateObject10());exports.ActionContainer=ActionContainer;var DeleteSpan=_styledComponents["default"].span(_templateObject11());exports.DeleteSpan=DeleteSpan;var DeletAllSpan=_styledComponents["default"].span(_templateObject12());exports.DeletAllSpan=DeletAllSpan;
    +
    +/***/ }),
    +
    +/***/ 1955:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var getFilters=function getFilters(type){switch(type){case'string':case'text':case'password':case'email':return[{id:'content-manager.components.FilterOptions.FILTER_TYPES.=',value:'='},{id:'content-manager.components.FilterOptions.FILTER_TYPES._ne',value:'_ne'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._lt',value:'_lt'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._lte',value:'_lte'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._gt',value:'_gt'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._gte',value:'_gte'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._contains',value:'_contains'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._containss',value:'_containss'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._in',value:'_in'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._nin',value:'_nin'}];case'integer':case'biginteger':case'float':case'decimal':case'date':case'datetime':case'time':case'timestamp':case'timestampUpdate':return[{id:'content-manager.components.FilterOptions.FILTER_TYPES.=',value:'='},{id:'content-manager.components.FilterOptions.FILTER_TYPES._ne',value:'_ne'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._lt',value:'_lt'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._lte',value:'_lte'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._gt',value:'_gt'},{id:'content-manager.components.FilterOptions.FILTER_TYPES._gte',value:'_gte'}// FIXME: commenting these filters as I am not sure if the UI
    +// corresponds to the filter
    +// {
    +//   id: 'content-manager.components.FilterOptions.FILTER_TYPES._in',
    +//   value: '_in',
    +// },
    +// {
    +//   id: 'content-manager.components.FilterOptions.FILTER_TYPES._nin',
    +//   value: '_nin',
    +// },
    +];default:return[{id:'content-manager.components.FilterOptions.FILTER_TYPES.=',value:'='},{id:'content-manager.components.FilterOptions.FILTER_TYPES._ne',value:'_ne'}];}};var _default=getFilters;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1956:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wrapper=exports.Remove=exports.Separator=exports.FilterWrapper=exports.SelectWrapper=exports.Label=exports.Img=exports.FooterWrapper=exports.FilterIcon=exports.AddFilterCta=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _strapiHelperPlugin=__webpack_require__(10);var _Filter=_interopRequireDefault(__webpack_require__(2004));var _iconCrossBlue=_interopRequireDefault(__webpack_require__(2286));function _templateObject10(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 28px;\n  cursor: pointer;\n  vertical-align: middle;\n\n  &:after {\n    display: inline-block;\n    content: '';\n    width: 8px;\n    height: 8px;\n    margin: auto;\n    margin-top: -3px;\n    background-image: url(",");\n  }\n"]);_templateObject10=function _templateObject10(){return data;};return data;}function _templateObject9(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 30px;\n  margin-left: 10px;\n  margin-right: 10px;\n  line-height: 30px;\n  &:after {\n    content: '';\n    height: 15px;\n    border-left: 1px solid #007eff;\n    opacity: 0.1;\n  }\n"]);_templateObject9=function _templateObject9(){return data;};return data;}function _templateObject8(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: inline-block;\n  height: 30px;\n  margin-bottom: 6px;\n  margin-right: 10px;\n  padding: 0 10px;\n  background: rgba(0, 126, 255, 0.08);\n  border: 1px solid rgba(0, 126, 255, 0.24);\n  border-radius: 2px;\n  line-height: 28px;\n  color: #007eff;\n  font-size: 13px;\n\n  > span {\n    display: inline-block;\n    margin-top: -1px;\n  }\n\n  > span:nth-child(2) {\n    font-weight: 700;\n  }\n\n  > span:nth-child(3) {\n    cursor: pointer;\n  }\n\n  -webkit-font-smoothing: antialiased;\n  font-size: 13px;\n"]);_templateObject8=function _templateObject8(){return data;};return data;}function _templateObject7(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n"]);_templateObject7=function _templateObject7(){return data;};return data;}function _templateObject6(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: inline-block;\n  height: 32px;\n  margin-left: 10px;\n  line-height: 32px;\n  color: #787e8f;\n  font-size: 13px;\n  font-style: italic;\n"]);_templateObject6=function _templateObject6(){return data;};return data;}function _templateObject5(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-top: 3rem;\n"]);_templateObject5=function _templateObject5(){return data;};return data;}function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 7px;\n  margin: auto;\n  margin-right: 0px;\n  font-size: 12px;\n"]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  height: 30px;\n  margin-right: 10px;\n  padding: 0 10px;\n  text-align: center;\n  background-color: #FFFFFF;\n  border: 1px solid #E3E9F3;\n  border-radius: 2px;\n  line-height: 28px;\n  font-size: 13px;\n  font-weight: 500;\n  font-family: Lato;\n  -webkit-font-smoothing-antialiased;\n  cursor: pointer;\n  &:hover {\n    background: #F7F8F8;\n  }\n  &:focus, &:active {\n    outline:0;\n  }\n  > span {\n    margin-left: 10px;\n  }\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 0 !important;\n  margin: auto !important;\n  > g {\n    stroke: #282b2c;\n  }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-top: 1px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var FilterIcon=(0,_styledComponents["default"])(_Filter["default"])(_templateObject2());exports.FilterIcon=FilterIcon;var AddFilterCta=(0,_styledComponents["default"])(_strapiHelperPlugin.Button)(_templateObject3());exports.AddFilterCta=AddFilterCta;var Img=_styledComponents["default"].img(_templateObject4());exports.Img=Img;var FooterWrapper=_styledComponents["default"].div(_templateObject5());exports.FooterWrapper=FooterWrapper;var Label=_styledComponents["default"].label(_templateObject6());exports.Label=Label;var SelectWrapper=_styledComponents["default"].div(_templateObject7());exports.SelectWrapper=SelectWrapper;var FilterWrapper=_styledComponents["default"].div(_templateObject8());exports.FilterWrapper=FilterWrapper;var Separator=_styledComponents["default"].span(_templateObject9());exports.Separator=Separator;var Remove=_styledComponents["default"].span(_templateObject10(),_iconCrossBlue["default"]);exports.Remove=Remove;
    +
    +/***/ }),
    +
    +/***/ 1999:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _reactstrap=__webpack_require__(71);var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 0;\n  &:active,\n  :focus {\n    background-color: #f7f7f9 !important;\n    color: #333740;\n    font-weight: 500;\n    outline: 0;\n  }\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  label {\n    width: 100%;\n    outline: none;\n    &:before {\n      top: 12px;\n    }\n  }\n  .form-check {\n    height: 36px;\n    line-height: 36px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ItemDropdown=(0,_styledComponents["default"])(_reactstrap.DropdownItem)(_templateObject());var _default=ItemDropdown;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2000:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var ListViewContext=(0,_react.createContext)();var _default=ListViewContext;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2001:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _components=__webpack_require__(2267);/**
    + *
    + * CustomInputCheckbox
    + */function CustomInputCheckbox(_ref){var entriesToDelete=_ref.entriesToDelete,isAll=_ref.isAll,name=_ref.name,onChange=_ref.onChange,value=_ref.value;var shouldDisplaySomeChecked=isAll&&entriesToDelete.length>0&&!value;var shouldDisplayAllChecked=isAll&&value;return/*#__PURE__*/_react["default"].createElement("span",{className:"form-check",styles:{marginLeft:'-15px'}},/*#__PURE__*/_react["default"].createElement(_components.Label,{className:"form-check-label",isAll:isAll,shouldDisplaySomeChecked:shouldDisplaySomeChecked,shouldDisplayAllChecked:shouldDisplayAllChecked,isChecked:value&&!isAll,htmlFor:name},/*#__PURE__*/_react["default"].createElement("input",{className:"form-check-input",checked:value,id:name,name:name,onChange:onChange,type:"checkbox"})));}CustomInputCheckbox.defaultProps={entriesToDelete:[],isAll:false,name:'',value:false};CustomInputCheckbox.propTypes={entriesToDelete:_propTypes["default"].array,isAll:_propTypes["default"].bool,name:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string]),onChange:_propTypes["default"].func.isRequired,value:_propTypes["default"].bool};var _default=(0,_react.memo)(CustomInputCheckbox);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2002:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var DATE_FORMATS={date:'dddd, MMMM Do YYYY',datetime:'dddd, MMMM Do YYYY HH:mm',time:'HH:mm A',timestamp:'dddd, MMMM Do YYYY HH:mm'};var _default=DATE_FORMATS;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2003:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Input=exports.InputWrapperDate=exports.Wrapper=exports.InputWrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 3.4rem;\n  margin-top: 0.9rem;\n  padding-left: 1rem;\n  background-size: 0 !important;\n  border: 1px solid #e3e9f3;\n  border-radius: 0.25rem;\n  line-height: 3.4rem;\n  font-size: 1.3rem;\n  font-family: 'Lato' !important;\n  box-shadow: 0px 1px 1px rgba(104, 118, 142, 0.05);\n"]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-right: 10px;\n  span {\n    left: 5px;\n  }\n  .rc-input-number-handler-wrap {\n    right: -5px !important;\n  }\n  .rc-input-number-input-wrap {\n    max-width: 210px;\n    overflow: visible;\n  }\n  > div {\n    width: 210px;\n  }\n\n  ","\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  input,\n  select {\n    margin: 0px 5px !important;\n  }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  min-height: 38px;\n  border-left: ",";\n  padding-left: ",";\n  margin-bottom: 0px !important;\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var Wrapper=_styledComponents["default"].div(_templateObject(),function(props){return props.borderLeft&&'3px solid #007EFF';},function(props){return props.borderLeft?'10px':'13px';});exports.Wrapper=Wrapper;var InputWrapper=_styledComponents["default"].div(_templateObject2());exports.InputWrapper=InputWrapper;var InputWrapperDate=_styledComponents["default"].div(_templateObject3(),function(_ref){var type=_ref.type;if(type==='datetime'){return"\n      > div {\n        width: 300px;\n      }\n\n      ";}});exports.InputWrapperDate=InputWrapperDate;var Input=_styledComponents["default"].input(_templateObject4());exports.Input=Input;
    +
    +/***/ }),
    +
    +/***/ 2004:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var Filter=function Filter(_ref){var fill=_ref.fill,height=_ref.height,width=_ref.width,rest=(0,_objectWithoutProperties2["default"])(_ref,["fill","height","width"]);return/*#__PURE__*/_react["default"].createElement("svg",(0,_extends2["default"])({},rest,{width:width,height:height,xmlns:"http://www.w3.org/2000/svg"}),/*#__PURE__*/_react["default"].createElement("g",{stroke:fill,fill:"none",fillRule:"evenodd",strokeLinecap:"round"},/*#__PURE__*/_react["default"].createElement("path",{d:"M3.5 6.5h2M2.5 4.5h4M1.5 2.5h6M.5.5h8"})));};Filter.defaultProps={fill:'#007EFF',height:'7',width:'9'};Filter.propTypes={fill:_propTypes["default"].string,height:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string]),width:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string])};var _default=Filter;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2005:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports.TOGGLE_MODAL_DELETE=exports.TOGGLE_MODAL_DELETE_ALL=exports.RESET_PROPS=exports.ON_DELETE_SEVERAL_DATA_SUCCEEDED=exports.ON_DELETE_DATA_SUCCEEDED=exports.ON_CHANGE_BULK_SELECT_ALL=exports.ON_CHANGE_BULK=exports.GET_DATA_SUCCEEDED=void 0;var GET_DATA_SUCCEEDED='ContentManager/ListView/GET_DATA_SUCCEEDED';exports.GET_DATA_SUCCEEDED=GET_DATA_SUCCEEDED;var ON_CHANGE_BULK='ContentManager/ListView/ON_CHANGE_BULK';exports.ON_CHANGE_BULK=ON_CHANGE_BULK;var ON_CHANGE_BULK_SELECT_ALL='ContentManager/ListView/ON_CHANGE_BULK_SELECT_ALL';exports.ON_CHANGE_BULK_SELECT_ALL=ON_CHANGE_BULK_SELECT_ALL;var ON_DELETE_DATA_SUCCEEDED='ContentManager/ListView/ON_DELETE_DATA_SUCCEEDED';exports.ON_DELETE_DATA_SUCCEEDED=ON_DELETE_DATA_SUCCEEDED;var ON_DELETE_SEVERAL_DATA_SUCCEEDED='ContentManager/ListView/ON_DELETE_SEVERAL_DATA_SUCCEEDED';exports.ON_DELETE_SEVERAL_DATA_SUCCEEDED=ON_DELETE_SEVERAL_DATA_SUCCEEDED;var RESET_PROPS='ContentManager/ListView/RESET_PROPS';exports.RESET_PROPS=RESET_PROPS;var TOGGLE_MODAL_DELETE_ALL='ContentManager/ListView/TOGGLE_MODAL_DELETE_ALL';exports.TOGGLE_MODAL_DELETE_ALL=TOGGLE_MODAL_DELETE_ALL;var TOGGLE_MODAL_DELETE='ContentManager/ListView/TOGGLE_MODAL_DELETE';exports.TOGGLE_MODAL_DELETE=TOGGLE_MODAL_DELETE;
    +
    +/***/ }),
    +
    +/***/ 2006:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.initialState=void 0;var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);var _constants=__webpack_require__(2005);/**
    + *
    + * listView reducer
    + */var initialState=(0,_immutable.fromJS)({count:0,data:(0,_immutable.List)([]),entriesToDelete:(0,_immutable.List)([]),isLoading:true,shouldRefetchData:false,showWarningDelete:false,showWarningDeleteAll:false});exports.initialState=initialState;function listViewReducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:initialState;var action=arguments.length>1?arguments[1]:undefined;switch(action.type){case _constants.GET_DATA_SUCCEEDED:return state.update('count',function(){return action.count;}).update('data',function(){return(0,_immutable.List)(action.data);}).update('isLoading',function(){return false;});case _constants.ON_CHANGE_BULK:return state.update('entriesToDelete',function(list){var hasElement=list.some(function(el){return el===action.name;});if(hasElement){return list.filter(function(el){return el!==action.name;});}return list.push(action.name);});case _constants.ON_CHANGE_BULK_SELECT_ALL:return state.update('entriesToDelete',function(list){if(list.size!==0){return(0,_immutable.List)([]);}return state.get('data').map(function(value){return(0,_lodash.toString)(value.id);});});case _constants.ON_DELETE_DATA_SUCCEEDED:return state.update('shouldRefetchData',function(v){return!v;}).update('showWarningDelete',function(){return false;});case _constants.ON_DELETE_SEVERAL_DATA_SUCCEEDED:return state.update('shouldRefetchData',function(v){return!v;}).update('showWarningDeleteAll',function(){return false;});case _constants.RESET_PROPS:return initialState;case _constants.TOGGLE_MODAL_DELETE:return state.update('entriesToDelete',function(){return(0,_immutable.List)([]);}).update('showWarningDelete',function(v){return!v;});case _constants.TOGGLE_MODAL_DELETE_ALL:return state.update('showWarningDeleteAll',function(v){return!v;});default:return state;}}var _default=listViewReducer;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2255:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.mapDispatchToProps=mapDispatchToProps;exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactRedux=__webpack_require__(62);var _redux=__webpack_require__(63);var _lodash=__webpack_require__(8);var _reactIntl=__webpack_require__(15);var _custom=__webpack_require__(72);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _DisplayedFieldsDropdown=_interopRequireDefault(__webpack_require__(2256));var _Container=_interopRequireDefault(__webpack_require__(1908));var _CustomTable=_interopRequireDefault(__webpack_require__(2265));var _FilterPicker=_interopRequireDefault(__webpack_require__(2273));var _Search=_interopRequireDefault(__webpack_require__(2280));var _search=__webpack_require__(2284);var _ListViewProvider=_interopRequireDefault(__webpack_require__(2285));var _actions=__webpack_require__(655);var _components=__webpack_require__(1956);var _Filter=_interopRequireDefault(__webpack_require__(2287));var _Footer=_interopRequireDefault(__webpack_require__(2288));var _actions2=__webpack_require__(2289);var _reducer=_interopRequireDefault(__webpack_require__(2006));var _selectors=_interopRequireDefault(__webpack_require__(2290));var _getRequestUrl=_interopRequireDefault(__webpack_require__(645));var _generateSearchFromObject=_interopRequireDefault(__webpack_require__(2291));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i0&&arguments[0]!==undefined?arguments[0]:{};return _objectSpread({_limit:(0,_strapiHelperPlugin.getQueryParameters)(search,'_limit')||getLayoutSettingRef.current('pageSize'),_page:(0,_strapiHelperPlugin.getQueryParameters)(search,'_page')||1,_q:(0,_strapiHelperPlugin.getQueryParameters)(search,'_q')||'',_sort:(0,_strapiHelperPlugin.getQueryParameters)(search,'_sort')||"".concat(getLayoutSettingRef.current('defaultSortBy'),":").concat(getLayoutSettingRef.current('defaultSortOrder')),filters:(0,_search.generateFiltersFromSearch)(search)},updatedParams);},[getLayoutSettingRef,search]);var handleConfirmDeleteData=(0,_react.useCallback)(/*#__PURE__*/(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;emitEvent('willDeleteEntry');_context2.next=4;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("explorer/".concat(slug,"/").concat(idToDelete)),{method:'DELETE'});case 4:strapi.notification.success("".concat(_pluginId["default"],".success.record.delete"));// Close the modal and refetch data
    +onDeleteDataSucceeded();emitEvent('didDeleteEntry');_context2.next=12;break;case 9:_context2.prev=9;_context2.t0=_context2["catch"](0);strapi.notification.error("".concat(_pluginId["default"],".error.record.delete"));case 12:case"end":return _context2.stop();}}},_callee2,null,[[0,9]]);})),[emitEvent,idToDelete,onDeleteDataSucceeded,slug]);var handleConfirmDeleteAllData=(0,_react.useCallback)(/*#__PURE__*/(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(){var params;return _regenerator["default"].wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:params=Object.assign(entriesToDelete);_context3.prev=1;_context3.next=4;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("explorer/deleteAll/".concat(slug)),{method:'DELETE',params:params});case 4:onDeleteSeveralDataSucceeded();_context3.next=10;break;case 7:_context3.prev=7;_context3.t0=_context3["catch"](1);strapi.notification.error("".concat(_pluginId["default"],".error.record.delete"));case 10:case"end":return _context3.stop();}}},_callee3,null,[[1,7]]);})),[entriesToDelete,onDeleteSeveralDataSucceeded,slug]);(0,_react.useEffect)(function(){getDataRef.current(slug,getSearchParams());return function(){resetProps();setFilterPickerState(false);};// eslint-disable-next-line react-hooks/exhaustive-deps
    +},[slug,shouldRefetchData]);var toggleLabelPickerState=function toggleLabelPickerState(){if(!isLabelPickerOpen){emitEvent('willChangeListFieldsSettings');}setLabelPickerState(function(prevState){return!prevState;});};var toggleFilterPickerState=function toggleFilterPickerState(){if(!isFilterPickerOpen){emitEvent('willFilterEntries');}setFilterPickerState(function(prevState){return!prevState;});};// Helpers
    +var getMetaDatas=function getMetaDatas(){var path=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];return(0,_lodash.get)(layouts,[].concat(contentTypePath,['metadatas'],(0,_toConsumableArray2["default"])(path)),{});};var getListLayout=function getListLayout(){return(0,_lodash.get)(layouts,[].concat(contentTypePath,['layouts','list']),[]);};var getListSchema=function getListSchema(){return(0,_lodash.get)(layouts,[].concat(contentTypePath,['schema']),{});};var getName=function getName(){return(0,_lodash.get)(getListSchema(),['info','name'],'');};var getAllLabels=function getAllLabels(){return(0,_lodash.sortBy)(Object.keys(getMetaDatas()).filter(function(key){return!['json','component','dynamiczone','relation','richtext'].includes((0,_lodash.get)(getListSchema(),['attributes',key,'type'],''));}).map(function(label){return{name:label,value:getListLayout().includes(label)};}),['label','name']);};var getFirstSortableElement=function getFirstSortableElement(){var name=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';return(0,_lodash.get)(getListLayout().filter(function(h){return h!==name&&getMetaDatas([h,'list','sortable'])===true;}),['0'],'id');};var getTableHeaders=function getTableHeaders(){return getListLayout().map(function(label){return _objectSpread({},getMetaDatas([label,'list']),{name:label});});};var handleChangeListLabels=function handleChangeListLabels(_ref5){var name=_ref5.name,value=_ref5.value;var currentSort=getSearchParams()._sort;if(value&&getListLayout().length===1){strapi.notification.error('content-manager.notification.error.displayedFields');return;}if(currentSort.split(':')[0]===name&&value){emitEvent('didChangeDisplayedFields');handleChangeParams({target:{name:'_sort',value:"".concat(getFirstSortableElement(name),":ASC")}});}onChangeListLabels({target:{name:name,slug:slug,value:!value}});};var handleChangeParams=function handleChangeParams(_ref6){var _ref6$target=_ref6.target,name=_ref6$target.name,value=_ref6$target.value;var updatedSearch=getSearchParams((0,_defineProperty2["default"])({},name,value));var newSearch=(0,_search.generateSearchFromFilters)(updatedSearch);if(name==='_limit'){emitEvent('willChangeNumberOfEntriesPerPage');}push({search:newSearch});resetProps();getDataRef.current(slug,updatedSearch);};var handleClickDelete=function handleClickDelete(id){setIdToDelete(id);toggleModalDelete();};var handleSubmit=function handleSubmit(){var filters=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];emitEvent('didFilterEntries');toggleFilterPickerState();handleChangeParams({target:{name:'filters',value:filters}});};var filterPickerActions=[{label:"".concat(_pluginId["default"],".components.FiltersPickWrapper.PluginHeader.actions.clearAll"),kind:'secondary',onClick:function onClick(){toggleFilterPickerState();handleChangeParams({target:{name:'filters',value:[]}});}},{label:"".concat(_pluginId["default"],".components.FiltersPickWrapper.PluginHeader.actions.apply"),kind:'primary',type:'submit'}];var headerAction=[{label:formatMessage({id:'content-manager.containers.List.addAnEntry'},{entity:getName()||'Content Manager'}),onClick:function onClick(){emitEvent('willCreateEntry');push({pathname:"".concat(pathname,"/create"),search:"redirectUrl=".concat(pathname).concat(search)});},color:'primary',type:'button',icon:true,style:{paddingLeft:15,paddingRight:15,fontWeight:600}}];var headerProps={title:{label:getName()||'Content Manager'},content:formatMessage({id:count>1?"".concat(_pluginId["default"],".containers.List.pluginHeaderDescription"):"".concat(_pluginId["default"],".containers.List.pluginHeaderDescription.singular")},{label:count}),actions:headerAction};return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_ListViewProvider["default"],{data:data,count:count,entriesToDelete:entriesToDelete,emitEvent:emitEvent,firstSortableElement:getFirstSortableElement(),label:getName(),onChangeBulk:onChangeBulk,onChangeBulkSelectall:onChangeBulkSelectall,onChangeParams:handleChangeParams,onClickDelete:handleClickDelete,schema:getListSchema(),searchParams:getSearchParams(),slug:slug,toggleModalDeleteAll:toggleModalDeleteAll},/*#__PURE__*/_react["default"].createElement(_FilterPicker["default"],{actions:filterPickerActions,isOpen:isFilterPickerOpen,name:getName(),toggleFilterPickerState:toggleFilterPickerState,onSubmit:handleSubmit}),/*#__PURE__*/_react["default"].createElement(_Container["default"],{className:"container-fluid"},!isFilterPickerOpen&&/*#__PURE__*/_react["default"].createElement(_custom.Header,headerProps),getLayoutSettingRef.current('searchable')&&/*#__PURE__*/_react["default"].createElement(_Search["default"],{changeParams:handleChangeParams,initValue:(0,_strapiHelperPlugin.getQueryParameters)(search,'_q')||'',model:getName(),value:(0,_strapiHelperPlugin.getQueryParameters)(search,'_q')||''}),/*#__PURE__*/_react["default"].createElement(_components.Wrapper,null,/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{marginBottom:'5px'}},/*#__PURE__*/_react["default"].createElement("div",{className:"col-10"},/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{marginLeft:0,marginRight:0}},getLayoutSettingRef.current('filterable')&&/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_components.AddFilterCta,{type:"button",onClick:toggleFilterPickerState},/*#__PURE__*/_react["default"].createElement(_components.FilterIcon,null),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.AddFilterCTA.add")})),getSearchParams().filters.map(function(filter,key){return/*#__PURE__*/_react["default"].createElement(_Filter["default"],(0,_extends2["default"])({},filter,{changeParams:handleChangeParams,filters:getSearchParams().filters,index:key,schema:getListSchema(),key:key,toggleFilterPickerState:toggleFilterPickerState,isFilterPickerOpen:isFilterPickerOpen}));})))),/*#__PURE__*/_react["default"].createElement("div",{className:"col-2"},/*#__PURE__*/_react["default"].createElement(_DisplayedFieldsDropdown["default"],{isOpen:isLabelPickerOpen,items:getAllLabels(),onChange:handleChangeListLabels,onClickReset:function onClickReset(){resetListLabels(slug);},slug:slug,toggle:toggleLabelPickerState}))),/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{paddingTop:'12px'}},/*#__PURE__*/_react["default"].createElement("div",{className:"col-12"},/*#__PURE__*/_react["default"].createElement(_CustomTable["default"],{data:data,headers:getTableHeaders(),isBulkable:getLayoutSettingRef.current('bulkable'),onChangeParams:handleChangeParams}),/*#__PURE__*/_react["default"].createElement(_Footer["default"],null))))),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningDelete,toggleModal:toggleModalDelete,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.bodyMessage.contentType.delete"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},onConfirm:handleConfirmDeleteData,popUpWarningType:"danger"}),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningDeleteAll,toggleModal:toggleModalDeleteAll,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.bodyMessage.contentType.delete").concat(entriesToDelete.length>1?'.all':''),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:handleConfirmDeleteAllData})));}ListView.defaultProps={layouts:{}};ListView.propTypes={count:_propTypes["default"].number.isRequired,data:_propTypes["default"].array.isRequired,emitEvent:_propTypes["default"].func.isRequired,entriesToDelete:_propTypes["default"].array.isRequired,layouts:_propTypes["default"].object,location:_propTypes["default"].shape({pathname:_propTypes["default"].string.isRequired,search:_propTypes["default"].string.isRequired}).isRequired,models:_propTypes["default"].array.isRequired,getDataSucceeded:_propTypes["default"].func.isRequired,history:_propTypes["default"].shape({push:_propTypes["default"].func.isRequired}).isRequired,onChangeBulk:_propTypes["default"].func.isRequired,onChangeBulkSelectall:_propTypes["default"].func.isRequired,onChangeListLabels:_propTypes["default"].func.isRequired,onDeleteDataSucceeded:_propTypes["default"].func.isRequired,onDeleteSeveralDataSucceeded:_propTypes["default"].func.isRequired,resetListLabels:_propTypes["default"].func.isRequired,resetProps:_propTypes["default"].func.isRequired,shouldRefetchData:_propTypes["default"].bool.isRequired,showWarningDelete:_propTypes["default"].bool.isRequired,showWarningDeleteAll:_propTypes["default"].bool.isRequired,slug:_propTypes["default"].string.isRequired,toggleModalDelete:_propTypes["default"].func.isRequired,toggleModalDeleteAll:_propTypes["default"].func.isRequired};var mapStateToProps=(0,_selectors["default"])();function mapDispatchToProps(dispatch){return(0,_redux.bindActionCreators)({getDataSucceeded:_actions2.getDataSucceeded,onChangeBulk:_actions2.onChangeBulk,onChangeBulkSelectall:_actions2.onChangeBulkSelectall,onChangeListLabels:_actions.onChangeListLabels,onDeleteDataSucceeded:_actions2.onDeleteDataSucceeded,onDeleteSeveralDataSucceeded:_actions2.onDeleteSeveralDataSucceeded,resetListLabels:_actions.resetListLabels,resetProps:_actions2.resetProps,toggleModalDelete:_actions2.toggleModalDelete,toggleModalDeleteAll:_actions2.toggleModalDeleteAll},dispatch);}var withConnect=(0,_reactRedux.connect)(mapStateToProps,mapDispatchToProps);var _default=(0,_redux.compose)(withConnect,_react.memo)(ListView);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2256:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactstrap=__webpack_require__(71);var _reactIntl=__webpack_require__(15);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _InputCheckbox=_interopRequireDefault(__webpack_require__(2257));var _DropdownItemLink=_interopRequireDefault(__webpack_require__(2259));var _DropdownWrapper=_interopRequireDefault(__webpack_require__(2260));var _ItemDropdown=_interopRequireDefault(__webpack_require__(1999));var _ItemDropdownReset=_interopRequireDefault(__webpack_require__(2261));var _LayoutWrapper=_interopRequireDefault(__webpack_require__(2262));var _MenuDropdown=_interopRequireDefault(__webpack_require__(2263));var _Toggle=_interopRequireDefault(__webpack_require__(2264));var DisplayedFieldsDropdown=function DisplayedFieldsDropdown(_ref){var isOpen=_ref.isOpen,items=_ref.items,_onChange=_ref.onChange,onClickReset=_ref.onClickReset,slug=_ref.slug,toggle=_ref.toggle;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent;return/*#__PURE__*/_react["default"].createElement(_DropdownWrapper["default"],null,/*#__PURE__*/_react["default"].createElement(_reactstrap.ButtonDropdown,{isOpen:isOpen,toggle:toggle,direction:"down"},/*#__PURE__*/_react["default"].createElement(_Toggle["default"],{isopen:isOpen.toString()}),/*#__PURE__*/_react["default"].createElement(_MenuDropdown["default"],{isopen:isOpen.toString()},/*#__PURE__*/_react["default"].createElement(_DropdownItemLink["default"],null,/*#__PURE__*/_react["default"].createElement(_LayoutWrapper["default"],{to:"".concat(slug,"/ctm-configurations/list-settings"),onClick:function onClick(){return emitEvent('willEditListLayout');}},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LayoutIcon,null),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"app.links.configure-view"}))),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".containers.ListPage.displayedFields")},function(msg){return/*#__PURE__*/_react["default"].createElement(_ItemDropdownReset["default"],{onClick:onClickReset},/*#__PURE__*/_react["default"].createElement("div",{style:{display:'flex',justifyContent:'space-between'}},/*#__PURE__*/_react["default"].createElement("span",null,msg),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".containers.Edit.reset")})));}),items.map(function(item){return/*#__PURE__*/_react["default"].createElement(_ItemDropdown["default"],{key:item.name,toggle:false,onClick:function onClick(){return _onChange(item);}},/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement(_InputCheckbox["default"],{onChange:function onChange(){return _onChange(item);},name:item.name,value:item.value})));}))));};DisplayedFieldsDropdown.propTypes={isOpen:_propTypes["default"].bool.isRequired,items:_propTypes["default"].array.isRequired,onChange:_propTypes["default"].func.isRequired,onClickReset:_propTypes["default"].func.isRequired,slug:_propTypes["default"].string.isRequired,toggle:_propTypes["default"].func.isRequired};var _default=DisplayedFieldsDropdown;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2257:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _components=__webpack_require__(2258);/**
    + *
    + * InputCheckbox
    + */function InputCheckbox(_ref){var name=_ref.name,onChange=_ref.onChange,value=_ref.value;return/*#__PURE__*/_react["default"].createElement(_components.Div,{className:"col-12",onClick:function onClick(e){e.stopPropagation();}},/*#__PURE__*/_react["default"].createElement("div",{className:"form-check"},/*#__PURE__*/_react["default"].createElement(_components.Label,{className:"form-check-label",htmlFor:name,value:value},/*#__PURE__*/_react["default"].createElement("input",{className:"form-check-input",defaultChecked:value,id:name,name:name,onChange:onChange,type:"checkbox"}),name)));}InputCheckbox.defaultProps={onChange:function onChange(){},value:false};InputCheckbox.propTypes={name:_propTypes["default"].string.isRequired,onChange:_propTypes["default"].func,value:_propTypes["default"].bool};var _default=(0,_react.memo)(InputCheckbox);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2258:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Label=exports.Div=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        font-weight: 500;\n        &:after {\n          content: '\f00c';\n          position: absolute;\n          top: 1px;\n          left: 17px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n          transition: all 0.2s;\n        }\n      "],["\n        font-weight: 500;\n        &:after {\n          content: '\\f00c';\n          position: absolute;\n          top: 1px;\n          left: 17px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n          transition: all 0.2s;\n        }\n      "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin: 0;\n  margin-left: 9px;\n  color: #333740 !important;\n  cursor: pointer;\n  > input {\n    display: none;\n    margin-right: 9px;\n  }\n\n  &:before {\n    content: '';\n    position: absolute;\n    left: 15px;\n    top: 7px;\n    width: 14px;\n    height: 14px;\n    border: 1px solid rgba(16, 22, 34, 0.15);\n    background-color: #fdfdfd;\n    border-radius: 3px;\n  }\n\n  ","\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-left: 0;\n  font-size: 13px;\n  &:active,\n  :focus {\n    outline: 0 !important;\n  }\n  > div {\n    height: 27px;\n    margin: 0 !important;\n    padding-left: 15px;\n    line-height: 27px;\n    &:active,\n    :focus {\n      outline: 0 !important;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Div=_styledComponents["default"].div(_templateObject());exports.Div=Div;var Label=_styledComponents["default"].label(_templateObject2(),function(_ref){var value=_ref.value;if(value===true){return(0,_styledComponents.css)(_templateObject3());}return'';});exports.Label=Label;
    +
    +/***/ }),
    +
    +/***/ 2259:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _reactstrap=__webpack_require__(71);var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  border-bottom: 1px solid #f7f8f8;\n  padding: 0.3rem 1.5rem 0.8rem 1.5rem;\n  &:hover {\n    background-color: #fff;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var DropdownItemLink=(0,_styledComponents["default"])(_reactstrap.DropdownItem)(_templateObject());var _default=DropdownItemLink;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2260:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  margin-bottom: 6px;\n  justify-content: flex-end;\n  font-family: Lato;\n  -webkit-font-smoothing: antialiased;\n"]);_templateObject=function _templateObject(){return data;};return data;}var DropdownWrapper=_styledComponents["default"].div(_templateObject());var _default=DropdownWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2261:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _ItemDropdown=_interopRequireDefault(__webpack_require__(1999));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-bottom: 6px;\n  padding: 0.8rem 1.5rem 0.2rem 1.5rem;\n  font-weight: 600;\n  font-size: 1.3rem;\n\n  &:hover {\n    background-color: #ffffff !important;\n  }\n  > div {\n    > span:last-child {\n      color: #007eff;\n      font-weight: 400;\n      cursor: pointer;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ItemDropdownReset=(0,_styledComponents["default"])(_ItemDropdown["default"])(_templateObject());var _default=ItemDropdownReset;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2262:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _reactRouterDom=__webpack_require__(30);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: block;\n  width: 100%;\n  text-decoration: none;\n  color: #333740;\n  font-size: 13px;\n  svg {\n    margin-right: 10px;\n    vertical-align: middle;\n  }\n  &:hover {\n    text-decoration: none;\n    span {\n      color: #007eff;\n    }\n    svg {\n      g {\n        fill: #007eff;\n      }\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var LayoutWrapper=(0,_styledComponents["default"])(_reactRouterDom.Link)(_templateObject());var _default=LayoutWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2263:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _reactstrap=__webpack_require__(71);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  min-width: 230px;\n  padding-top: 9px;\n  padding-bottom: 5px !important;\n  border-top-right-radius: 0 !important;\n  border: 1px solid #e3e9f3;\n  box-shadow: 0px 2px 4px rgba(227, 233, 243, 0.5);\n  transform: translate3d(-178px, 28px, 0px) !important;\n\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}var MenuDropdown=(0,_styledComponents["default"])(_reactstrap.DropdownMenu)(_templateObject(),function(_ref){var isopen=_ref.isopen;if(isopen==='true'){return"\n        border-top-color: #aed4fb !important;\n        border-top-right-radius: 0;\n      ";}return'';});var _default=MenuDropdown;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2264:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _reactstrap=__webpack_require__(71);var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  height: 30px;\n  padding: 0 10px;\n\n  &:focus {\n    outline: 0;\n  }\n\n  &:active {\n    border-color: #aed4fb !important;\n  }\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}var Toggle=(0,_styledComponents["default"])(_reactstrap.DropdownToggle)(_templateObject(),function(_ref){var isopen=_ref.isopen;// Fix react warning
    +if(isopen==='true'){return"\n        background: #e6f0fb;\n        border: 1px solid #aed4fb !important;\n        border-radius: 2px;\n        border-bottom-right-radius: 0 !important;\n        border-bottom-left-radius: 0 !important;\n        border-top-right-radius: 2px !important;\n\n        &:before {\n          content: '\f013';\n          font-family: FontAwesome;\n          color: #007eff;\n        }\n\n        &:after {\n          content: '\f0d7';\n          display: inline-block;\n          margin-top: -1px;\n          margin-left: 10px;\n          font-family: FontAwesome;\n          color: #007eff;\n          transform: rotateX(180deg);\n          transition: transform 0.3s ease-out;\n        }\n\n        &:hover,\n        :active,\n        :focus {\n          background: #e6f0fb;\n          border: 1px solid #aed4fb;\n        }\n      ";}return"\n      background: #ffffff !important;\n      border: 1px solid #e3e9f3;\n      border-radius: 2px !important;\n      font-size: 1.4rem;\n\n      &:before {\n        content: '\f013';\n        font-family: FontAwesome;\n        color: #323740;\n      }\n      &:after {\n        content: '\f0d7';\n        display: inline-block;\n        margin-top: -1px;\n        margin-left: 11px;\n        font-family: FontAwesome;\n        color: #323740;\n        transition: transform 0.3s ease-out;\n      }\n      &:hover,\n      :focus,\n      :active {\n        background: #ffffff !important;\n        border: 1px solid #e3e9f3;\n      }\n    ";});var _default=Toggle;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2265:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactRouterDom=__webpack_require__(30);var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _useListView2=_interopRequireDefault(__webpack_require__(1915));var _TableHeader=_interopRequireDefault(__webpack_require__(2266));var _styledComponents=__webpack_require__(1928);var _ActionCollapse=_interopRequireDefault(__webpack_require__(2268));var _Row=_interopRequireDefault(__webpack_require__(2269));var CustomTable=function CustomTable(_ref){var data=_ref.data,headers=_ref.headers,isBulkable=_ref.isBulkable;var _useListView=(0,_useListView2["default"])(),emitEvent=_useListView.emitEvent,entriesToDelete=_useListView.entriesToDelete,label=_useListView.label,_useListView$searchPa=_useListView.searchParams,filters=_useListView$searchPa.filters,_q=_useListView$searchPa._q;var _useLocation=(0,_reactRouterDom.useLocation)(),pathname=_useLocation.pathname,search=_useLocation.search;var _useHistory=(0,_reactRouterDom.useHistory)(),push=_useHistory.push;var redirectUrl="redirectUrl=".concat(pathname).concat(search);var colSpanLength=isBulkable?headers.length+2:headers.length+1;var handleGoTo=function handleGoTo(id){emitEvent('willEditEntryFromList');push({pathname:"".concat(pathname,"/").concat(id),search:redirectUrl});};var values={contentType:(0,_lodash.upperFirst)(label),search:_q};var tableEmptyMsgId=filters.length>0?'withFilters':'withoutFilter';if(_q!==''){tableEmptyMsgId='withSearch';}var content=data.length===0?/*#__PURE__*/_react["default"].createElement(_styledComponents.TableEmpty,null,/*#__PURE__*/_react["default"].createElement("td",{colSpan:colSpanLength},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"content-manager.components.TableEmpty.".concat(tableEmptyMsgId),values:values}))):data.map(function(row){return/*#__PURE__*/_react["default"].createElement(_styledComponents.TableRow,{key:row.id,onClick:function onClick(e){e.preventDefault();e.stopPropagation();handleGoTo(row.id);}},/*#__PURE__*/_react["default"].createElement(_Row["default"],{isBulkable:isBulkable,headers:headers,row:row,goTo:handleGoTo}));});return/*#__PURE__*/_react["default"].createElement(_styledComponents.Table,{className:"table"},/*#__PURE__*/_react["default"].createElement(_TableHeader["default"],{headers:headers,isBulkable:isBulkable}),/*#__PURE__*/_react["default"].createElement("tbody",null,entriesToDelete.length>0&&/*#__PURE__*/_react["default"].createElement(_ActionCollapse["default"],{colSpan:colSpanLength}),content));};CustomTable.defaultProps={data:[],headers:[],isBulkable:true};CustomTable.propTypes={data:_propTypes["default"].array,headers:_propTypes["default"].array,isBulkable:_propTypes["default"].bool};var _default=(0,_react.memo)(CustomTable);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2266:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _useListView2=_interopRequireDefault(__webpack_require__(1915));var _CustomInputCheckbox=_interopRequireDefault(__webpack_require__(2001));var _styledComponents=__webpack_require__(1928);/* eslint-disable jsx-a11y/control-has-associated-label */function TableHeader(_ref){var headers=_ref.headers,isBulkable=_ref.isBulkable;var _useListView=(0,_useListView2["default"])(),data=_useListView.data,entriesToDelete=_useListView.entriesToDelete,firstSortableElement=_useListView.firstSortableElement,onChangeBulkSelectall=_useListView.onChangeBulkSelectall,onChangeParams=_useListView.onChangeParams,_sort=_useListView.searchParams._sort;var _sort$split=_sort.split(':'),_sort$split2=(0,_slicedToArray2["default"])(_sort$split,2),sortBy=_sort$split2[0],sortOrder=_sort$split2[1];return/*#__PURE__*/_react["default"].createElement(_styledComponents.Thead,{isBulkable:isBulkable},/*#__PURE__*/_react["default"].createElement("tr",null,isBulkable&&/*#__PURE__*/_react["default"].createElement("th",null,/*#__PURE__*/_react["default"].createElement(_CustomInputCheckbox["default"],{entriesToDelete:entriesToDelete,isAll:true,name:"all",onChange:onChangeBulkSelectall,value:data.length===entriesToDelete.length&&entriesToDelete.length>0})),headers.map(function(header){return/*#__PURE__*/_react["default"].createElement("th",{key:header.name,onClick:function onClick(){if(header.sortable){var isCurrentSort=header.name===sortBy;var nextOrder=isCurrentSort&&sortOrder==='ASC'?'DESC':'ASC';var value="".concat(header.name,":").concat(nextOrder);if(isCurrentSort&&sortOrder==='DESC'){value="".concat(firstSortableElement,":ASC");}onChangeParams({target:{name:'_sort',value:value}});}}},/*#__PURE__*/_react["default"].createElement("span",{className:header.sortable?'sortable':''},header.label,sortBy===header.name&&/*#__PURE__*/_react["default"].createElement(_styledComponents.Arrow,{className:"".concat(sortOrder==='ASC'&&'isAsc')})));}),/*#__PURE__*/_react["default"].createElement("th",null)));}TableHeader.defaultProps={isBulkable:true,headers:[]};TableHeader.propTypes={headers:_propTypes["default"].array,isBulkable:_propTypes["default"].bool};var _default=(0,_react.memo)(TableHeader);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2267:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Label=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        &:after {\n          content: '\f00c';\n          position: absolute;\n          top: calc(50% - 11px);\n          left: 17px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n          transition: all 0.2s;\n        }\n      "],["\n        &:after {\n          content: '\\f00c';\n          position: absolute;\n          top: calc(50% - 11px);\n          left: 17px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n          transition: all 0.2s;\n        }\n      "]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        &:after {\n          content: '\f00c';\n          position: absolute;\n          top: calc(50% - 9px);\n          left: 17px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n          transition: all 0.2s;\n        }\n      "],["\n        &:after {\n          content: '\\f00c';\n          position: absolute;\n          top: calc(50% - 9px);\n          left: 17px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n          transition: all 0.2s;\n        }\n      "]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n        &:after {\n          content: '\f068';\n          position: absolute;\n          top: calc(50% - 8px);\n          left: 18px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n        }\n      "],["\n        &:after {\n          content: '\\f068';\n          position: absolute;\n          top: calc(50% - 8px);\n          left: 18px;\n          font-size: 10px;\n          font-family: 'FontAwesome';\n          font-weight: 100;\n          color: #1c5de7;\n        }\n      "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  cursor: pointer;\n  position: relative;\n  vertical-align: middle;\n  > input {\n    display: none;\n  }\n  &:before {\n    content: '';\n    position: absolute;\n    left: 15px;\n    top: calc(50% - 8px);\n    width: 14px;\n    height: 14px;\n    border: 1px solid rgba(16, 22, 34, 0.15);\n    background-color: #fdfdfd;\n    border-radius: 3px;\n  }\n\n  ","\n\n  ","\n\n  ","\n"]);_templateObject=function _templateObject(){return data;};return data;}/* eslint-disable */var Label=_styledComponents["default"].label(_templateObject(),function(_ref){var shouldDisplaySomeChecked=_ref.shouldDisplaySomeChecked;if(shouldDisplaySomeChecked){return(0,_styledComponents.css)(_templateObject2());}},function(_ref2){var shouldDisplayAllChecked=_ref2.shouldDisplayAllChecked;if(shouldDisplayAllChecked){return(0,_styledComponents.css)(_templateObject3());}},function(_ref3){var isChecked=_ref3.isChecked;if(isChecked){return(0,_styledComponents.css)(_templateObject4());}});exports.Label=Label;
    +
    +/***/ }),
    +
    +/***/ 2268:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useListView2=_interopRequireDefault(__webpack_require__(1915));var _styledComponents=__webpack_require__(1928);function ActionCollapse(_ref){var colSpan=_ref.colSpan;var _useListView=(0,_useListView2["default"])(),data=_useListView.data,entriesToDelete=_useListView.entriesToDelete,toggleModalDeleteAll=_useListView.toggleModalDeleteAll;var number=entriesToDelete.length;var suffix=number>1?'plural':'singular';var deleteMessageId=number===data.length?'delete':'deleteSelected';return/*#__PURE__*/_react["default"].createElement(_styledComponents.TableDelete,{colSpan:colSpan},/*#__PURE__*/_react["default"].createElement("td",{colSpan:colSpan},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.TableDelete.entries.").concat(suffix),values:{number:number}},function(message){return/*#__PURE__*/_react["default"].createElement(_styledComponents.DeleteSpan,null,message);}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.TableDelete.").concat(deleteMessageId)},function(message){return/*#__PURE__*/_react["default"].createElement(_styledComponents.DeletAllSpan,{onClick:toggleModalDeleteAll},message);})));}ActionCollapse.propTypes={colSpan:_propTypes["default"].number.isRequired};var _default=(0,_react.memo)(ActionCollapse);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2269:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouter=__webpack_require__(646);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _moment=_interopRequireDefault(__webpack_require__(22));var _strapiHelperPlugin=__webpack_require__(10);var _useListView2=_interopRequireDefault(__webpack_require__(1915));var _DATE_FORMATS=_interopRequireDefault(__webpack_require__(2002));var _CustomInputCheckbox=_interopRequireDefault(__webpack_require__(2001));var _MediaPreviewList=_interopRequireDefault(__webpack_require__(2270));var _styledComponents=__webpack_require__(1928);/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */var dateToUtcTime=function dateToUtcTime(date){return _moment["default"].parseZone(date).utc();};var getDisplayedValue=function getDisplayedValue(type,value,name){switch((0,_lodash.toLower)(type)){case'string':case'text':case'email':case'enumeration':case'uid':return value&&!(0,_lodash.isEmpty)((0,_lodash.toString)(value))||name==='id'?(0,_lodash.toString)(value):'-';case'float':case'integer':case'biginteger':case'decimal':return!(0,_lodash.isNull)(value)?(0,_lodash.toString)(value):'-';case'boolean':return value!==null?(0,_lodash.toString)(value):'-';case'date':case'datetime':case'timestamp':{if(value==null){return'-';}var date=value&&(0,_lodash.isObject)(value)&&value._isAMomentObject===true?JSON.stringify(value):value;return dateToUtcTime(date).format(_DATE_FORMATS["default"][type]);}case'password':return'••••••••';case'media':case'file':case'files':return value;case'time':{if(!value){return'-';}var _value$split=value.split(':'),_value$split2=(0,_slicedToArray2["default"])(_value$split,3),hour=_value$split2[0],minute=_value$split2[1],second=_value$split2[2];var timeObj={hour:hour,minute:minute,second:second};var _date=(0,_moment["default"])().set(timeObj);return _date.format(_DATE_FORMATS["default"].time);}default:return'-';}};function Row(_ref){var goTo=_ref.goTo,isBulkable=_ref.isBulkable,row=_ref.row,headers=_ref.headers;var _useListView=(0,_useListView2["default"])(),entriesToDelete=_useListView.entriesToDelete,onChangeBulk=_useListView.onChangeBulk,onClickDelete=_useListView.onClickDelete,schema=_useListView.schema;var memoizedDisplayedValue=(0,_react.useCallback)(function(name){var type=(0,_lodash.get)(schema,['attributes',name,'type'],'string');return getDisplayedValue(type,row[name],name);},[row,schema]);var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent;return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,isBulkable&&/*#__PURE__*/_react["default"].createElement("td",{key:"i",onClick:function onClick(e){return e.stopPropagation();}},/*#__PURE__*/_react["default"].createElement(_CustomInputCheckbox["default"],{name:row.id,onChange:onChangeBulk,value:entriesToDelete.filter(function(id){return(0,_lodash.toString)(id)===(0,_lodash.toString)(row.id);}).length>0})),headers.map(function(header){return/*#__PURE__*/_react["default"].createElement("td",{key:header.name},(0,_lodash.get)(schema,['attributes',header.name,'type'])!=='media'?/*#__PURE__*/_react["default"].createElement(_styledComponents.Truncate,null,/*#__PURE__*/_react["default"].createElement(_styledComponents.Truncated,null,memoizedDisplayedValue(header.name))):/*#__PURE__*/_react["default"].createElement(_MediaPreviewList["default"],{files:memoizedDisplayedValue(header.name)}));}),/*#__PURE__*/_react["default"].createElement(_styledComponents.ActionContainer,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.IcoContainer,{style:{minWidth:'inherit',width:'100%',lineHeight:48},icons:[{icoType:'pencil-alt',onClick:function onClick(){emitEvent('willEditEntryFromList');goTo(row.id);}},{id:row.id,icoType:'trash',onClick:function onClick(){emitEvent('willDeleteEntryFromList');onClickDelete(row.id);}}]})));}Row.propTypes={goTo:_propTypes["default"].func.isRequired,headers:_propTypes["default"].array.isRequired,isBulkable:_propTypes["default"].bool.isRequired,row:_propTypes["default"].object.isRequired};var _default=(0,_reactRouter.withRouter)((0,_react.memo)(Row));exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2270:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _Na=_interopRequireDefault(__webpack_require__(2271));var _StyledMediaPreviewList=__webpack_require__(2272);var IMAGE_PREVIEW_COUNT=3;function MediaPreviewList(_ref){var hoverable=_ref.hoverable,files=_ref.files;var getFileType=function getFileType(fileName){return fileName.split('.').slice(-1)[0];};var getSrc=function getSrc(fileURL){return fileURL.startsWith('/')?"".concat(strapi.backendURL).concat(fileURL):fileURL;};var renderImage=function renderImage(image){var name=image.name,size=image.size,url=image.url;if(size>2000){return renderFile(image);}return/*#__PURE__*/_react["default"].createElement(_StyledMediaPreviewList.MediaPreviewImage,{className:hoverable?'hoverable':''},/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement("img",{src:getSrc(url),alt:"".concat(name)})),/*#__PURE__*/_react["default"].createElement("img",{src:getSrc(url),alt:"".concat(name)}));};var renderFile=function renderFile(file){var mime=file.mime,name=file.name;var fileType=(0,_lodash.includes)(mime,'image')?'image':getFileType(name);return/*#__PURE__*/_react["default"].createElement(_StyledMediaPreviewList.MediaPreviewFile,{className:hoverable?'hoverable':''},/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement("span",null,fileType),/*#__PURE__*/_react["default"].createElement("i",{className:"far fa-file-".concat(fileType)})),/*#__PURE__*/_react["default"].createElement("span",null,name));};var renderItem=function renderItem(file){var mime=file.mime;return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,{key:JSON.stringify(file)},(0,_lodash.includes)(mime,'image')?renderImage(file):renderFile(file));};var renderText=function renderText(count){return/*#__PURE__*/_react["default"].createElement(_StyledMediaPreviewList.MediaPreviewText,null,/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement("span",null,"+",count)));};var renderMultipleItems=function renderMultipleItems(files){return files.map(function(file,index){return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,{key:JSON.stringify(file)},index===IMAGE_PREVIEW_COUNT&&files.length>IMAGE_PREVIEW_COUNT+1?renderText(files.length-IMAGE_PREVIEW_COUNT):renderItem(file));});};return!!files&&!(0,_lodash.isEmpty)(files)?/*#__PURE__*/_react["default"].createElement(_StyledMediaPreviewList.StyledMediaPreviewList,null,!(0,_lodash.isArray)(files)?renderItem(files):renderMultipleItems(files)):/*#__PURE__*/_react["default"].createElement(_StyledMediaPreviewList.MediaPreviewItem,null,/*#__PURE__*/_react["default"].createElement(_Na["default"],null));}MediaPreviewList.defaultProps={hoverable:true,files:null};MediaPreviewList.propTypes={hoverable:_propTypes["default"].bool,files:_propTypes["default"].oneOfType([_propTypes["default"].object,_propTypes["default"].array])};var _default=MediaPreviewList;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2271:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var Na=function Na(_ref){var fill=_ref.fill,fontFamily=_ref.fontFamily,fontSize=_ref.fontSize,fontWeight=_ref.fontWeight,height=_ref.height,textFill=_ref.textFill,width=_ref.width,rest=(0,_objectWithoutProperties2["default"])(_ref,["fill","fontFamily","fontSize","fontWeight","height","textFill","width"]);return/*#__PURE__*/_react["default"].createElement("svg",(0,_extends2["default"])({},rest,{width:width,height:height,xmlns:"http://www.w3.org/2000/svg"}),/*#__PURE__*/_react["default"].createElement("g",{fill:"none",fillRule:"evenodd"},/*#__PURE__*/_react["default"].createElement("rect",{fill:fill,width:width,height:height,rx:"17.5"}),/*#__PURE__*/_react["default"].createElement("text",{fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fill:textFill},/*#__PURE__*/_react["default"].createElement("tspan",{x:"6",y:"22"},"N/A"))));};Na.defaultProps={fill:'#fafafb',fontFamily:'Lato-Medium, Lato',fontSize:'12',fontWeight:'400',height:'35',textFill:'#838383',width:'35'};Na.propTypes={fill:_propTypes["default"].string,fontFamily:_propTypes["default"].string,fontSize:_propTypes["default"].string,fontWeight:_propTypes["default"].string,height:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string]),textFill:_propTypes["default"].string,width:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string])};var _default=Na;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2272:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.StyledMediaPreviewList=exports.MediaPreviewText=exports.MediaPreviewItem=exports.MediaPreviewImage=exports.MediaPreviewFile=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject6(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  img {\n    display: block;\n    object-fit: cover;\n    background-color: #fafafb;\n  }\n  div {\n    position: relative;\n    &::before {\n      content: '-';\n      position: absolute;\n      width: 100%;\n      height: 100%;\n      background: white;\n      color: transparent;\n      opacity: 0;\n    }\n    img {\n      width: 100%;\n      height: 100%;\n    }\n  }\n  div + img {\n    display: none;\n    width: ",";\n    height: ",";\n    border-radius: calc("," / 2);\n    margin-top: calc(-"," - "," - 5px);\n    margin-left: calc((-"," + ",") / 2);\n    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);\n  }\n\n  &.hoverable {\n    :hover {\n      div {\n        &::before {\n          opacity: 0.6;\n        }\n      }\n      div + img {\n        display: block;\n      }\n    }\n  }\n"]);_templateObject6=function _templateObject6(){return data;};return data;}function _templateObject5(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  div {\n    font-size: 13px;\n    color: #333740;\n    text-align: center;\n    line-height: ",";\n    font-weight: 600;\n  }\n"]);_templateObject5=function _templateObject5(){return data;};return data;}function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  span {\n    overflow: hidden;\n    text-overflow: ellipsis;\n    white-space: nowrap;\n  }\n  div {\n    position: relative;\n    background-color: #f3f3f4;\n    color: #333740;\n    text-align: center;\n    line-height: ",";\n    border: 1px solid white;\n    span {\n      display: block;\n      padding: 0 3px;\n      text-transform: uppercase;\n      font-size: 10px;\n      font-weight: 600;\n    }\n    i,\n    svg {\n      position: absolute;\n      left: 1px;\n      top: -1px;\n      font-size: 15px;\n      width: 100%;\n      height: 100%;\n      &:before {\n        width: 100%;\n        height: 100%;\n        padding: 10px;\n        line-height: 35px;\n        background: #f3f3f4;\n      }\n    }\n  }\n  div + span {\n    display: none;\n    position: absolute;\n    left: 120%;\n    bottom: -10px;\n    display: none;\n    max-width: 150px;\n    color: #333740;\n  }\n  &.hoverable {\n    :hover {\n      div + span {\n        display: block;\n      }\n    }\n  }\n"]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: ",";\n  height: ",";\n  div {\n    width: 100%;\n    height: 100%;\n    overflow: hidden;\n    border-radius: calc("," / 2);\n    background-color: #f3f3f4;\n    border: 1px solid #f3f3f4;\n  }\n  &.hoverable {\n    :hover {\n      z-index: ",";\n    }\n  }\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n    ","\n  "]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  height: ",";\n  > div {\n    position: absolute;\n    top: 0;\n    ",";\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var sizes={small:'35px',big:'127px',margin:'20px'};var max=4;var StyledMediaPreviewList=_styledComponents["default"].div(_templateObject(),sizes.small,createCSS());exports.StyledMediaPreviewList=StyledMediaPreviewList;function createCSS(){var styles='';for(var i=0;i<=max;i+=1){styles+="\n      &:nth-of-type(".concat(i,") {\n        left: calc( ").concat(sizes.margin," * ").concat(i-1,");\n        z-index: ").concat(i,";\n      }\n    ");}return(0,_styledComponents.css)(_templateObject2(),styles);}var MediaPreviewItem=_styledComponents["default"].div(_templateObject3(),sizes.small,sizes.small,sizes.small,max+1);exports.MediaPreviewItem=MediaPreviewItem;var MediaPreviewFile=(0,_styledComponents["default"])(MediaPreviewItem)(_templateObject4(),sizes.small);exports.MediaPreviewFile=MediaPreviewFile;var MediaPreviewText=(0,_styledComponents["default"])(MediaPreviewItem)(_templateObject5(),sizes.small);exports.MediaPreviewText=MediaPreviewText;var MediaPreviewImage=(0,_styledComponents["default"])(MediaPreviewItem)(_templateObject6(),sizes.big,sizes.big,sizes.big,sizes.big,sizes.small,sizes.big,sizes.small);exports.MediaPreviewImage=MediaPreviewImage;
    +
    +/***/ }),
    +
    +/***/ 2273:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouter=__webpack_require__(646);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactstrap=__webpack_require__(71);var _reactIntl=__webpack_require__(15);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useListView2=_interopRequireDefault(__webpack_require__(1915));var _Container=_interopRequireDefault(__webpack_require__(1908));var _utils=_interopRequireDefault(__webpack_require__(1955));var _FilterPickerOption=_interopRequireDefault(__webpack_require__(2274));var _components=__webpack_require__(2277);var _init=_interopRequireDefault(__webpack_require__(2278));var _reducer=_interopRequireWildcard(__webpack_require__(2279));var NOT_ALLOWED_FILTERS=['json','component','relation','media','richtext'];function FilterPicker(_ref){var actions=_ref.actions,isOpen=_ref.isOpen,name=_ref.name,_onSubmit=_ref.onSubmit,toggleFilterPickerState=_ref.toggleFilterPickerState;var _useListView=(0,_useListView2["default"])(),schema=_useListView.schema,searchParams=_useListView.searchParams;var allowedAttributes=Object.keys((0,_lodash.get)(schema,['attributes']),{}).filter(function(attr){var current=(0,_lodash.get)(schema,['attributes',attr],{});return!NOT_ALLOWED_FILTERS.includes(current.type)&¤t.type!==undefined;}).sort().map(function(attr){var current=(0,_lodash.get)(schema,['attributes',attr],{});return{name:attr,type:current.type,options:current["enum"]||null};});var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState,function(){return(0,_init["default"])(_reducer.initialState,allowedAttributes[0]);}),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var modifiedData=state.get('modifiedData').toJS();var handleChange=function handleChange(_ref2){var _ref2$target=_ref2.target,name=_ref2$target.name,value=_ref2$target.value;dispatch({type:'ON_CHANGE',keys:name.split('.'),value:value});};var renderTitle=function renderTitle(){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.FiltersPickWrapper.PluginHeader.title.filter")},function(message){return/*#__PURE__*/_react["default"].createElement("span",null,(0,_lodash.capitalize)(name),"\xA0-\xA0",/*#__PURE__*/_react["default"].createElement("span",null,message));});};// Generate the first filter for adding a new one or at initial state
    +var getInitialFilter=function getInitialFilter(){var type=(0,_lodash.get)(allowedAttributes,[0,'type'],'');var _getFilterType=(0,_utils["default"])(type),_getFilterType2=(0,_slicedToArray2["default"])(_getFilterType,1),filter=_getFilterType2[0];var value='';if(type==='boolean'){value='true';}else if(type==='number'){value=0;}else if(type==='enumeration'){value=(0,_lodash.get)(allowedAttributes,[0,'options',0],'');}var initFilter={name:(0,_lodash.get)(allowedAttributes,[0,'name'],''),filter:filter.value,value:value};return initFilter;};// Set the filters when the collapse is opening
    +var handleEntering=function handleEntering(){var currentFilters=searchParams.filters;var initialFilters=currentFilters.length>0?currentFilters:[getInitialFilter()];dispatch({type:'SET_FILTERS',initialFilters:initialFilters,attributes:(0,_lodash.get)(schema,'attributes',{})});};var addFilter=function addFilter(){dispatch({type:'ADD_FILTER',filter:getInitialFilter()});};return/*#__PURE__*/_react["default"].createElement(_reactstrap.Collapse,{isOpen:isOpen,onEntering:handleEntering},/*#__PURE__*/_react["default"].createElement(_Container["default"],{style:{backgroundColor:'white',paddingBottom:0}},/*#__PURE__*/_react["default"].createElement("form",{onSubmit:function onSubmit(e){e.preventDefault();_onSubmit(modifiedData);}},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PluginHeader,{actions:actions,title:renderTitle,description:{id:"".concat(_pluginId["default"],".components.FiltersPickWrapper.PluginHeader.description")}}),/*#__PURE__*/_react["default"].createElement(_components.Wrapper,null,modifiedData.map(function(filter,key){return/*#__PURE__*/_react["default"].createElement(_FilterPickerOption["default"],(0,_extends2["default"])({},filter,{allowedAttributes:allowedAttributes,index:key,modifiedData:modifiedData,onChange:handleChange,onClickAddFilter:addFilter,onRemoveFilter:function onRemoveFilter(index){if(index===0&&modifiedData.length===1){toggleFilterPickerState();return;}dispatch({type:'REMOVE_FILTER',index:index});},type:(0,_lodash.get)(schema,['attributes',filter.name,'type'],''),showAddButton:key===modifiedData.length-1// eslint-disable-next-line react/no-array-index-key
    +,key:key}));})),/*#__PURE__*/_react["default"].createElement(_components.Flex,null,/*#__PURE__*/_react["default"].createElement(_components.Span,{onClick:toggleFilterPickerState},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"content-manager.components.FiltersPickWrapper.hide"}),"\xA0")))));}FilterPicker.defaultProps={actions:[],isOpen:false,name:''};FilterPicker.propTypes={actions:_propTypes["default"].array,isOpen:_propTypes["default"].bool,location:_propTypes["default"].shape({search:_propTypes["default"].string.isRequired}).isRequired,name:_propTypes["default"].string,onSubmit:_propTypes["default"].func.isRequired,toggleFilterPickerState:_propTypes["default"].func.isRequired};var _default=(0,_reactRouter.withRouter)((0,_react.memo)(FilterPicker));exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2274:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireWildcard(__webpack_require__(1));var _lodash=__webpack_require__(8);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _strapiHelperPlugin=__webpack_require__(10);var _core=__webpack_require__(53);var _components=__webpack_require__(2003);var _Input=_interopRequireDefault(__webpack_require__(2275));var _Option=_interopRequireDefault(__webpack_require__(2276));var _utils=_interopRequireDefault(__webpack_require__(1955));var styles={select:{minWidth:'170px',maxWidth:'200px'},selectMiddle:{minWidth:'130px',maxWidth:'200px',marginLeft:'10px',marginRight:'10px'},input:{width:'210px',marginRight:'10px',paddingTop:'4px'}};function FilterPickerOption(_ref){var allowedAttributes=_ref.allowedAttributes,modifiedData=_ref.modifiedData,index=_ref.index,_onChange=_ref.onChange,onClickAddFilter=_ref.onClickAddFilter,onRemoveFilter=_ref.onRemoveFilter,value=_ref.value,showAddButton=_ref.showAddButton,type=_ref.type;var filtersOptions=(0,_utils["default"])(type);var currentFilterName=(0,_lodash.get)(modifiedData,[index,'name']);var currentFilterData=allowedAttributes.find(function(attr){return attr.name===currentFilterName;});var options=(0,_lodash.get)(currentFilterData,['options'],null)||['true','false'];return/*#__PURE__*/_react["default"].createElement(_components.Wrapper,{borderLeft:!(0,_lodash.isEmpty)(value)},/*#__PURE__*/_react["default"].createElement(_components.InputWrapper,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.CircleButton,{type:"button",isRemoveButton:true,onClick:function onClick(){return onRemoveFilter(index);}}),/*#__PURE__*/_react["default"].createElement(_core.Select,{onChange:function onChange(e){// Change the attribute
    +_onChange(e);// Change the default filter so it reset to the common one which is '='
    +_onChange({target:{name:"".concat(index,".filter"),value:'='}});},name:"".concat(index,".name"),value:(0,_lodash.get)(modifiedData,[index,'name'],''),options:allowedAttributes.map(function(attr){return attr.name;}),style:styles.select}),/*#__PURE__*/_react["default"].createElement(_core.Select,{onChange:_onChange,name:"".concat(index,".filter"),options:filtersOptions.map(function(option){return/*#__PURE__*/_react["default"].createElement(_Option["default"],(0,_extends2["default"])({},option,{key:option.value}));}),style:styles.selectMiddle,value:(0,_lodash.get)(modifiedData,[index,'filter'],'')}),/*#__PURE__*/_react["default"].createElement(_Input["default"],{type:type,name:"".concat(index,".value"),value:(0,_lodash.get)(modifiedData,[index,'value'],''),options:options,onChange:_onChange}),showAddButton&&/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.CircleButton,{type:"button",onClick:onClickAddFilter})));}FilterPickerOption.defaultProps={allowedAttributes:[],modifiedData:[],index:-1,onChange:function onChange(){},onClickAddFilter:function onClickAddFilter(){},onRemoveFilter:function onRemoveFilter(){},value:null,type:'string'};FilterPickerOption.propTypes={allowedAttributes:_propTypes["default"].array,modifiedData:_propTypes["default"].array,index:_propTypes["default"].number,onChange:_propTypes["default"].func,onClickAddFilter:_propTypes["default"].func,onRemoveFilter:_propTypes["default"].func,showAddButton:_propTypes["default"].bool.isRequired,type:_propTypes["default"].string,value:_propTypes["default"].any};var _default=(0,_react.memo)(FilterPickerOption);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2275:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _custom=__webpack_require__(72);var _core=__webpack_require__(53);var _components=__webpack_require__(2003);/**
    + *
    + * InputWithAutoFocus that programatically manage the autofocus of another one
    + */var getInputType=function getInputType(attrType){switch(attrType){case'boolean':return _core.Select;case'date':case'timestamp':case'timestampUpdate':return _core.DatePicker;case'datetime':return _custom.DateTime;case'enumeration':return _core.Select;case'integer':case'biginteger':case'decimal':case'float':return _core.InputNumber;case'time':return _core.TimePicker;default:return _core.InputText;}};function Input(_ref){var type=_ref.type,rest=(0,_objectWithoutProperties2["default"])(_ref,["type"]);var Component=getInputType(type);var style=type!=='time'?{width:'210px',paddingTop:'4px'}:{};if(['integer','biginteger','float','decimal'].includes(type)){style={marginRight:'20px'};}var styles=type==='boolean'?{minWidth:'100px',maxWidth:'200px'}:style;var wrapperStyle=type==='boolean'||['date','timestamp','time','datetime'].includes(type)?{marginRight:'20px'}:{marginRight:'10px'};return/*#__PURE__*/_react["default"].createElement(_components.InputWrapperDate,{type:type||'text',style:wrapperStyle},/*#__PURE__*/_react["default"].createElement(Component,(0,_extends2["default"])({},rest,{style:styles,autoComplete:"off"})));}Input.propTypes={type:_propTypes["default"].string.isRequired};var _default=(0,_react.memo)(Input);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2276:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _reactIntl=__webpack_require__(15);var _propTypes=_interopRequireDefault(__webpack_require__(2));var Option=function Option(_ref){var id=_ref.id,value=_ref.value;return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:id},function(msg){return/*#__PURE__*/_react["default"].createElement("option",{value:value},msg);});};Option.propTypes={id:_propTypes["default"].string.isRequired,value:_propTypes["default"].string.isRequired};var _default=Option;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2277:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wrapper=exports.Span=exports.Flex=exports.Div=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: calc(100% + 60px);\n  margin: ",";\n  background: #fff;\n  box-shadow: 3px 2px 4px #e3e9f3;\n  padding: 18px 30px 0px 30px;\n  transition: ",";\n"]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  justify-content: flex-end;\n  padding: 0 0 10px 30px !important;\n  margin-top: -10px;\n  color: #c3c5c8;\n  font-size: 13px;\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  vertical-align: text-top;\n  cursor: pointer;\n\n  &:after {\n    margin-left: 2px;\n    content: '\f077';\n    font-family: FontAwesome;\n    font-size: 10px;\n  }\n"],["\n  vertical-align: text-top;\n  cursor: pointer;\n\n  &:after {\n    margin-left: 2px;\n    content: '\\f077';\n    font-family: FontAwesome;\n    font-size: 10px;\n  }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-top: -6px;\n  > div {\n    padding-top: 2px;\n    &:not(:first-of-type) {\n      padding-top: 9px;\n      padding-bottom: 2px;\n      &:last-of-type:nth-of-type(even) {\n        padding-bottom: 11px;\n      }\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var Span=_styledComponents["default"].span(_templateObject2());exports.Span=Span;var Flex=_styledComponents["default"].div(_templateObject3());exports.Flex=Flex;var Div=_styledComponents["default"].div(_templateObject4(),function(props){return props.show?'-100px -30px 30px':"-".concat(props.number,"px -30px 103px");},function(props){if(props.anim){return props.show?'margin-top .3s ease-out, margin-bottom .2s ease-out':'margin .3s ease-in';}return'';});exports.Div=Div;
    +
    +/***/ }),
    +
    +/***/ 2278:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);var _utils=_interopRequireDefault(__webpack_require__(1955));function init(initialState,_ref){var name=_ref.name,type=_ref.type,options=_ref.options;// Create the first filter
    +var _getFilterType=(0,_utils["default"])(type),_getFilterType2=(0,_slicedToArray2["default"])(_getFilterType,1),filter=_getFilterType2[0];var value='';if(type==='boolean'){value='true';}else if(type==='number'){value=0;}else if(type==='enumeration'){value=(0,_lodash.get)(options,[0],'');}var initialFilter={name:name,filter:filter.value,value:value};return initialState.update('initialData',function(){return(0,_immutable.fromJS)([initialFilter]);}).update('modifiedData',function(){return(0,_immutable.fromJS)([initialFilter]);});}var _default=init;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2279:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _immutable=__webpack_require__(35);var _moment=_interopRequireDefault(__webpack_require__(22));var initialState=(0,_immutable.fromJS)({attributes:{},initialData:[],modifiedData:[]});exports.initialState=initialState;function reducer(state,action){switch(action.type){case'ADD_FILTER':return state.update('modifiedData',function(list){return list.push((0,_immutable.fromJS)(action.filter));});case'ON_CHANGE':{var _action$keys=(0,_slicedToArray2["default"])(action.keys,2),index=_action$keys[0],key=_action$keys[1];return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys)),function(){if(action.value&&action.value._isAMomentObject===true){return(0,_moment["default"])(action.value,'YYYY-MM-DD HH:mm:ss').format();}return action.value;}).updateIn(['modifiedData',index,'value'],function(value){if(key==='name'){var attribute=state.getIn(['attributes',action.value]);var attributeType=attribute.get('type');if(attributeType==='boolean'){return'true';}if(attributeType==='enumeration'){return attribute.getIn(['enum','0'])||'';}return'';}return value;});}case'REMOVE_FILTER':return state.removeIn(['modifiedData',action.index]);case'RESET_FILTERS':return initialState;case'SET_FILTERS':return state.update('attributes',function(){return(0,_immutable.fromJS)(action.attributes);}).update('initialData',function(){return(0,_immutable.fromJS)(action.initialFilters);}).update('modifiedData',function(){return(0,_immutable.fromJS)(action.initialFilters);});default:return state;}}var _default=reducer;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2280:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireWildcard(__webpack_require__(1));var _lodash=__webpack_require__(8);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _Cross=_interopRequireDefault(__webpack_require__(2281));var _Filter=_interopRequireDefault(__webpack_require__(2004));var _Search=_interopRequireDefault(__webpack_require__(2282));var _components=__webpack_require__(2283);function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var WAIT=400;var Search=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(Search,_React$Component);var _super=_createSuper(Search);function Search(){var _this;(0,_classCallCheck2["default"])(this,Search);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"state",{value:_this.props.initValue});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"timer",null);(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"resetState",function(){return _this.setState({value:''});});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleChange",function(_ref){var target=_ref.target;clearTimeout(_this.timer);_this.setState({value:target.value});_this.timer=setTimeout(function(){return _this.triggerChange(target.value);},WAIT);});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"handleClick",function(){_this.setState({value:''});_this.triggerChange('');});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"triggerChange",function(value){return _this.props.changeParams({target:{name:'_q',value:value}});});return _this;}(0,_createClass2["default"])(Search,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){var _this$props=this.props,model=_this$props.model,value=_this$props.value;if(prevProps.model!==model||!(0,_lodash.isEmpty)(prevProps.value)&&(0,_lodash.isEmpty)(value)){this.resetState();}}},{key:"render",value:function render(){var _this2=this;var model=this.props.model;var value=this.state.value;return/*#__PURE__*/_react["default"].createElement(_components.Wrapper,null,/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement(_Search["default"],null)),/*#__PURE__*/_react["default"].createElement("div",null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"content-manager.components.Search.placeholder"},function(message){return/*#__PURE__*/_react["default"].createElement("input",{onChange:_this2.handleChange,placeholder:message,type:"text",value:value});}),value!==''&&/*#__PURE__*/_react["default"].createElement(_components.Clear,{onClick:this.handleClick},/*#__PURE__*/_react["default"].createElement(_Cross["default"],null))),/*#__PURE__*/_react["default"].createElement(_components.Infos,null,/*#__PURE__*/_react["default"].createElement(_Filter["default"],null),(0,_lodash.upperFirst)(model)));}}]);return Search;}(_react["default"].Component);Search.defaultProps={changeParams:function changeParams(){},model:'',value:''};Search.propTypes={changeParams:_propTypes["default"].func,initValue:_propTypes["default"].string.isRequired,model:_propTypes["default"].string,value:_propTypes["default"].string};var _default=(0,_react.memo)(Search);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2281:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var Cross=function Cross(_ref){var fill=_ref.fill,height=_ref.height,width=_ref.width,rest=(0,_objectWithoutProperties2["default"])(_ref,["fill","height","width"]);return/*#__PURE__*/_react["default"].createElement("svg",(0,_extends2["default"])({},rest,{width:width,height:height,xmlns:"http://www.w3.org/2000/svg"}),/*#__PURE__*/_react["default"].createElement("path",{d:"M7.78 6.72L5.06 4l2.72-2.72a.748.748 0 0 0 0-1.06.748.748 0 0 0-1.06 0L4 2.94 1.28.22a.748.748 0 0 0-1.06 0 .748.748 0 0 0 0 1.06L2.94 4 .22 6.72a.748.748 0 0 0 0 1.06.748.748 0 0 0 1.06 0L4 5.06l2.72 2.72a.748.748 0 0 0 1.06 0 .752.752 0 0 0 0-1.06z",fill:fill,fillRule:"evenodd"}));};Cross.defaultProps={fill:'#b3b5b9',height:'8',width:'8'};Cross.propTypes={fill:_propTypes["default"].string,height:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string]),width:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string])};var _default=Cross;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2282:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var Search=function Search(_ref){var fill=_ref.fill,height=_ref.height,width=_ref.width,rest=(0,_objectWithoutProperties2["default"])(_ref,["fill","height","width"]);return/*#__PURE__*/_react["default"].createElement("svg",(0,_extends2["default"])({},rest,{width:width,height:height,xmlns:"http://www.w3.org/2000/svg"}),/*#__PURE__*/_react["default"].createElement("path",{d:"M15.875 13.446l-3.533-3.58a6.531 6.531 0 00.875-3.245C13.217 2.97 10.25 0 6.608 0 2.967 0 0 2.97 0 6.62s2.967 6.622 6.608 6.622c1.163 0 2.313-.321 3.338-.934l3.517 3.567a.422.422 0 00.608 0l1.804-1.825a.428.428 0 000-.604zM6.608 2.579a4.041 4.041 0 014.034 4.042 4.041 4.041 0 01-4.034 4.042A4.041 4.041 0 012.575 6.62a4.041 4.041 0 014.033-4.042z",fill:fill,fillRule:"evenodd"}));};Search.defaultProps={fill:'#b3b5b9',height:'16',width:'16'};Search.propTypes={fill:_propTypes["default"].string,height:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string]),width:_propTypes["default"].oneOfType([_propTypes["default"].number,_propTypes["default"].string])};var _default=Search;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2283:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Infos=exports.Wrapper=exports.Clear=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  height: 13px;\n  margin: 25px auto 0;\n  border-radius: 50%;\n  cursor: pointer;\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  height: 22px;\n  margin: auto;\n  margin-top: 19px;\n  margin-left: 20px;\n  padding-right: 10px;\n  padding-left: 30px;\n  background: rgba(0, 126, 255, 0.08);\n  border: 1px solid rgba(0, 126, 255, 0.24);\n  border-radius: 2px;\n  line-height: 22px;\n  color: #007eff;\n  font-size: 13px;\n  font-weight: 400;\n  line-height: 20px;\n  -webkit-font-smoothing: antialiased;\n  > svg {\n    position: absolute;\n    top: 1px;\n    margin: auto;\n    bottom: 0;\n    left: 11px;\n    height: 7px;\n  }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: fixed;\n  top: 0;\n  display: flex;\n  align-items: center;\n  overflow: hidden;\n  min-width: 44rem;\n  height: 6rem;\n  padding-right: 20px;\n  background-color: #ffffff;\n  border-right: 1px solid #f3f4f4;\n  z-index: 1050;\n  color: #9ea7b8;\n  line-height: 6rem;\n  letter-spacing: 0;\n\n  > div:first-child {\n    height: 100%;\n\n    margin-right: 10px;\n    > svg {\n      color: #b3b5b9;\n      vertical-align: middle;\n    }\n  }\n\n  input {\n    position: relative;\n    width: 100%;\n    outline: 0;\n\n    &::placeholder {\n      color: #9ea7b8 !important;\n      font-size: 13px !important;\n    }\n  }\n\n  > div:nth-child(2) {\n    display: flex;\n    flex: 2;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var Infos=_styledComponents["default"].div(_templateObject2());exports.Infos=Infos;var Clear=_styledComponents["default"].div(_templateObject3());exports.Clear=Clear;
    +
    +/***/ }),
    +
    +/***/ 2284:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.generateSearchFromFilters=exports.generateFiltersFromSearch=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _lodash=__webpack_require__(8);/**
    + * Generate filters object from string
    + * @param  {String} search
    + * @return {Object}
    + */var generateFiltersFromSearch=function generateFiltersFromSearch(search){return search.split('&').filter(function(x){return!x.includes('_limit')&&!x.includes('_page')&&!x.includes('_sort')&&!x.includes('_q=')&&x!=='';}).reduce(function(acc,curr){var _curr$split=curr.split('='),_curr$split2=(0,_slicedToArray2["default"])(_curr$split,2),name=_curr$split2[0],value=_curr$split2[1];var split=name.split('_');var filter="_".concat(split[split.length-1]);if(!['_ne','_lt','_lte','_gt','_gte','_contains','_containss','_in','_nin'].includes(filter)){filter='=';}var toSlice=filter==='='?split.length:split.length-1;acc.push({name:split.slice(0,toSlice).join('_').replace('?',''),filter:filter,value:decodeURIComponent(value)});return acc;},[]);};exports.generateFiltersFromSearch=generateFiltersFromSearch;var generateSearchFromFilters=function generateSearchFromFilters(filters){return Object.keys(filters).filter(function(key){return!(0,_lodash.isEmpty)((0,_lodash.toString)(filters[key]));}).map(function(key){var ret="".concat(key,"=").concat(filters[key]);if(key==='filters'){var formattedFilters=filters[key].reduce(function(acc,curr){var key=curr.filter==='='?curr.name:"".concat(curr.name).concat(curr.filter);acc.push("".concat(key,"=").concat(curr.value));return acc;},[]).join('&');ret=formattedFilters;}return ret;}).join('&');};exports.generateSearchFromFilters=generateSearchFromFilters;
    +
    +/***/ }),
    +
    +/***/ 2285:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _ListView=_interopRequireDefault(__webpack_require__(2000));function ListViewProvider(_ref){var children=_ref.children,rest=(0,_objectWithoutProperties2["default"])(_ref,["children"]);return/*#__PURE__*/_react["default"].createElement(_ListView["default"].Provider,{value:rest},children);}ListViewProvider.propTypes={children:_propTypes["default"].node.isRequired};var _default=ListViewProvider;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2286:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +module.exports = __webpack_require__.p + "3996eea080b78f9e7dc1dd56c6c851c2.svg";
    +
    +/***/ }),
    +
    +/***/ 2287:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _moment=_interopRequireDefault(__webpack_require__(22));var _pluginId=_interopRequireDefault(__webpack_require__(105));var _DATE_FORMATS=_interopRequireDefault(__webpack_require__(2002));var _components=__webpack_require__(1956);function Filter(_ref){var changeParams=_ref.changeParams,filter=_ref.filter,filters=_ref.filters,index=_ref.index,name=_ref.name,schema=_ref.schema,value=_ref.value,toggleFilterPickerState=_ref.toggleFilterPickerState,isFilterPickerOpen=_ref.isFilterPickerOpen;var type=(0,_lodash.get)(schema,['attributes',name,'type'],'string');var displayedValue=(0,_lodash.toString)(value);if(type.includes('date')||type.includes('timestamp')){var date=(0,_moment["default"])(value,_moment["default"].ISO_8601);var format;if(type==='date'||type==='timestamp'){format=_DATE_FORMATS["default"].date;}else{format=_DATE_FORMATS["default"].datetime;}displayedValue=_moment["default"].parseZone(date).utc().format(format);}return/*#__PURE__*/_react["default"].createElement(_components.FilterWrapper,null,/*#__PURE__*/_react["default"].createElement("span",null,(0,_lodash.upperFirst)(name),"\xA0"),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.FilterOptions.FILTER_TYPES.").concat(filter)}),/*#__PURE__*/_react["default"].createElement("span",null,"\xA0",displayedValue),/*#__PURE__*/_react["default"].createElement(_components.Separator,null),/*#__PURE__*/_react["default"].createElement(_components.Remove,{onClick:function onClick(){var updatedFilters=filters.slice().filter(function(_,i){return i!==index;});if(isFilterPickerOpen){toggleFilterPickerState();}changeParams({target:{name:'filters',value:updatedFilters}});}}));}Filter.defaultProps={name:'',value:''};Filter.propTypes={changeParams:_propTypes["default"].func.isRequired,filter:_propTypes["default"].string.isRequired,filters:_propTypes["default"].array.isRequired,index:_propTypes["default"].number.isRequired,isFilterPickerOpen:_propTypes["default"].bool.isRequired,name:_propTypes["default"].string,schema:_propTypes["default"].object.isRequired,toggleFilterPickerState:_propTypes["default"].func.isRequired,value:_propTypes["default"].any};var _default=Filter;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2288:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _reactIntl=__webpack_require__(15);var _strapiHelperPlugin=__webpack_require__(10);var _useListView2=_interopRequireDefault(__webpack_require__(1915));var _components=__webpack_require__(1956);function Footer(){var _useListView=(0,_useListView2["default"])(),count=_useListView.count,_onChangeParams=_useListView.onChangeParams,_useListView$searchPa=_useListView.searchParams,_limit=_useListView$searchPa._limit,_page=_useListView$searchPa._page;return/*#__PURE__*/_react["default"].createElement(_components.FooterWrapper,{className:"row"},/*#__PURE__*/_react["default"].createElement("div",{className:"col-6"},/*#__PURE__*/_react["default"].createElement(_components.SelectWrapper,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.InputSelect,{style:{width:'75px',height:'32px',marginTop:'-1px'},name:"_limit",onChange:_onChangeParams,selectOptions:['10','20','50','100'],value:_limit}),/*#__PURE__*/_react["default"].createElement(_components.Label,{htmlFor:"_limit"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.PageFooter.select"})))),/*#__PURE__*/_react["default"].createElement("div",{className:"col-6"},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.GlobalPagination,{count:count,onChangeParams:function onChangeParams(_ref){var value=_ref.target.value;_onChangeParams({target:{name:'_page',value:value}});},params:{currentPage:parseInt(_page,10),_limit:parseInt(_limit,10),_page:parseInt(_page,10)}})));}var _default=(0,_react.memo)(Footer);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2289:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports.getDataSucceeded=getDataSucceeded;exports.onChangeBulk=onChangeBulk;exports.onChangeBulkSelectall=onChangeBulkSelectall;exports.onDeleteDataSucceeded=onDeleteDataSucceeded;exports.onDeleteSeveralDataSucceeded=onDeleteSeveralDataSucceeded;exports.resetProps=resetProps;exports.toggleModalDeleteAll=toggleModalDeleteAll;exports.toggleModalDelete=toggleModalDelete;var _constants=__webpack_require__(2005);function getDataSucceeded(count,data){return{type:_constants.GET_DATA_SUCCEEDED,count:count,data:data};}function onChangeBulk(_ref){var _ref$target=_ref.target,name=_ref$target.name,value=_ref$target.value;return{type:_constants.ON_CHANGE_BULK,name:name,value:value};}function onChangeBulkSelectall(){return{type:_constants.ON_CHANGE_BULK_SELECT_ALL};}function onDeleteDataSucceeded(){return{type:_constants.ON_DELETE_DATA_SUCCEEDED};}function onDeleteSeveralDataSucceeded(){return{type:_constants.ON_DELETE_SEVERAL_DATA_SUCCEEDED};}function resetProps(){return{type:_constants.RESET_PROPS};}function toggleModalDeleteAll(){return{type:_constants.TOGGLE_MODAL_DELETE_ALL};}function toggleModalDelete(){return{type:_constants.TOGGLE_MODAL_DELETE};}
    +
    +/***/ }),
    +
    +/***/ 2290:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.listViewDomain=exports["default"]=void 0;var _reselect=__webpack_require__(57);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _reducer=__webpack_require__(2006);/**
    + * Direct selector to the listView state domain
    + */var listViewDomain=function listViewDomain(){return function(state){return state.get("".concat(_pluginId["default"],"_listView"))||_reducer.initialState;};};/**
    + * Other specific selectors
    + */ /**
    + * Default selector used by listView
    + */exports.listViewDomain=listViewDomain;var makeSelectListView=function makeSelectListView(){return(0,_reselect.createSelector)(listViewDomain(),function(substate){return substate.toJS();});};var _default=makeSelectListView;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2291:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _lodash=__webpack_require__(8);var generateSearchFromObject=function generateSearchFromObject(params){var clonedParams=(0,_lodash.clone)(params);var _start=(clonedParams._page-1)*parseInt(clonedParams._limit,10);(0,_lodash.set)(clonedParams,'_start',_start);(0,_lodash.unset)(clonedParams,'_page');if(clonedParams._q===''){(0,_lodash.unset)(clonedParams,'_q');}var search=Object.keys(clonedParams).reduce(function(acc,current){if(current!=='filters'){acc.push("".concat(current,"=").concat(clonedParams[current]));}else{var filters=clonedParams[current].reduce(function(acc,curr){var key=curr.filter==='='?curr.name:"".concat(curr.name).concat(curr.filter);acc.push("".concat(key,"=").concat(curr.value));return acc;},[]);if(filters.length>0){acc.push(filters.join('&'));}}return acc;},[]).join('&');return search;};var _default=generateSearchFromObject;exports["default"]=_default;
    +
    +/***/ })
    +
    +}]);
    \ No newline at end of file
    diff --git a/server/build/6301a48360d263198461152504dcd42b.svg b/server/build/6301a48360d263198461152504dcd42b.svg
    new file mode 100644
    index 00000000..fb4851a9
    --- /dev/null
    +++ b/server/build/6301a48360d263198461152504dcd42b.svg
    @@ -0,0 +1 @@
    +
    \ No newline at end of file
    diff --git a/server/build/674f50d287a8c48dc19ba404d20fe713.eot b/server/build/674f50d287a8c48dc19ba404d20fe713.eot
    new file mode 100644
    index 00000000..e9f60ca9
    Binary files /dev/null and b/server/build/674f50d287a8c48dc19ba404d20fe713.eot differ
    diff --git a/server/build/6a7a177d2278b1a672058817a92c2870.png b/server/build/6a7a177d2278b1a672058817a92c2870.png
    new file mode 100644
    index 00000000..2c19c66d
    Binary files /dev/null and b/server/build/6a7a177d2278b1a672058817a92c2870.png differ
    diff --git a/server/build/7.29d14e7a.chunk.js b/server/build/7.29d14e7a.chunk.js
    new file mode 100644
    index 00000000..e1bf155d
    --- /dev/null
    +++ b/server/build/7.29d14e7a.chunk.js
    @@ -0,0 +1,143 @@
    +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{
    +
    +/***/ 1908:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding: 18px 30px 18px 30px;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Container=_styledComponents["default"].div(_templateObject());var _default=Container;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1921:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  .btn-group button {\n    line-height: 28px;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var SortWrapper=_styledComponents["default"].div(_templateObject());var _default=SortWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1931:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _strapiHelperPlugin=__webpack_require__(10);var _reactIntl=__webpack_require__(15);var _lodash=__webpack_require__(8);var _core=__webpack_require__(53);var PopupForm=function PopupForm(_ref){var headerId=_ref.headerId,isOpen=_ref.isOpen,onClosed=_ref.onClosed,onSubmit=_ref.onSubmit,onToggle=_ref.onToggle,renderForm=_ref.renderForm,subHeaderContent=_ref.subHeaderContent,type=_ref.type;var getAttrType=function getAttrType(){if(type==='timestamp'){return'date';}if(['decimal','float','integer','biginter'].includes(type)){return'number';}return type;};return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.Modal,{isOpen:isOpen,onClosed:onClosed,onToggle:onToggle},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModal,null,/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModalTitle,{style:{textTransform:'none'}},/*#__PURE__*/_react["default"].createElement(_core.AttributeIcon,{type:getAttrType(),style:{margin:'auto 20px auto 0'}}),/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:headerId}))),/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.HeaderModalTitle,null,/*#__PURE__*/_react["default"].createElement("span",null,(0,_lodash.upperFirst)(subHeaderContent)),/*#__PURE__*/_react["default"].createElement("hr",null)))),/*#__PURE__*/_react["default"].createElement("form",{onSubmit:onSubmit},/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalForm,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalBody,null,renderForm())),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.ModalFooter,null,/*#__PURE__*/_react["default"].createElement("section",null,/*#__PURE__*/_react["default"].createElement(_core.Button,{onClick:onToggle,color:"cancel"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"components.popUpWarning.button.cancel"})),/*#__PURE__*/_react["default"].createElement(_core.Button,{type:"submit",color:"success"},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"form.button.done"}))))));};PopupForm.defaultProps={isOpen:false,onClosed:function onClosed(){},onSubmit:function onSubmit(){},onToggle:function onToggle(){},renderForm:function renderForm(){},subHeaderContent:'',type:''};PopupForm.propTypes={headerId:_propTypes["default"].string.isRequired,isOpen:_propTypes["default"].bool,onClosed:_propTypes["default"].func,onSubmit:_propTypes["default"].func,onToggle:_propTypes["default"].func,renderForm:_propTypes["default"].func,subHeaderContent:_propTypes["default"].string,type:_propTypes["default"].string};var _default=PopupForm;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1932:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _extends2=_interopRequireDefault(__webpack_require__(14));var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactRouterDom=__webpack_require__(30);var _reactIntl=__webpack_require__(15);var _custom=__webpack_require__(72);var _strapiHelperPlugin=__webpack_require__(10);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _Block=_interopRequireDefault(__webpack_require__(1933));var _Container=_interopRequireDefault(__webpack_require__(1908));var _SectionTitle=_interopRequireDefault(__webpack_require__(1935));var _Separator=_interopRequireDefault(__webpack_require__(1937));var SettingsViewWrapper=function SettingsViewWrapper(_ref){var children=_ref.children,goBack=_ref.history.goBack,getListDisplayedFields=_ref.getListDisplayedFields,inputs=_ref.inputs,initialData=_ref.initialData,isEditSettings=_ref.isEditSettings,isLoading=_ref.isLoading,modifiedData=_ref.modifiedData,onChange=_ref.onChange,onConfirmReset=_ref.onConfirmReset,onConfirmSubmit=_ref.onConfirmSubmit,name=_ref.name;var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent,formatMessage=_useGlobalContext.formatMessage;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),showWarningCancel=_useState2[0],setWarningCancel=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),showWarningSubmit=_useState4[0],setWarningSubmit=_useState4[1];var getAttributes=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','attributes'],{});},[modifiedData]);var toggleWarningCancel=function toggleWarningCancel(){return setWarningCancel(function(prevState){return!prevState;});};var toggleWarningSubmit=function toggleWarningSubmit(){return setWarningSubmit(function(prevState){return!prevState;});};var getPluginHeaderActions=function getPluginHeaderActions(){return[{color:'cancel',onClick:toggleWarningCancel,label:formatMessage({id:"".concat(_pluginId["default"],".popUpWarning.button.cancel")}),type:'button',disabled:(0,_lodash.isEqual)(modifiedData,initialData),style:{fontWeight:600,paddingLeft:15,paddingRight:15}},{color:'success',label:formatMessage({id:"".concat(_pluginId["default"],".containers.Edit.submit")}),type:'submit',disabled:(0,_lodash.isEqual)(modifiedData,initialData),style:{minWidth:150,fontWeight:600}}];};var headerProps={actions:getPluginHeaderActions(),title:{label:formatMessage({id:"".concat(_pluginId["default"],".components.SettingsViewWrapper.pluginHeader.title")},{name:(0,_lodash.upperFirst)(name)})},content:formatMessage({id:"".concat(_pluginId["default"],".components.SettingsViewWrapper.pluginHeader.description.").concat(isEditSettings?'edit':'list',"-settings")})};var getSelectOptions=function getSelectOptions(input){if(input.name==='settings.defaultSortBy'){return['id'].concat((0,_toConsumableArray2["default"])(getListDisplayedFields().filter(function(name){return(0,_lodash.get)(getAttributes,[name,'type'],'')!=='media'&&name!=='id'&&(0,_lodash.get)(getAttributes,[name,'type'],'')!=='richtext';})));}if(input.name==='settings.mainField'){var attributes=getAttributes;var options=Object.keys(attributes).filter(function(attr){var type=(0,_lodash.get)(attributes,[attr,'type'],'');return!['json','text','relation','component','boolean','date','media','richtext'].includes(type)&&!!type;});return options;}return input.options;};var handleSubmit=function handleSubmit(e){e.preventDefault();toggleWarningSubmit();emitEvent('willSaveContentTypeLayout');};if(isLoading){return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicatorPage,null);}return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.BackHeader,{onClick:goBack}),/*#__PURE__*/_react["default"].createElement(_Container["default"],{className:"container-fluid"},/*#__PURE__*/_react["default"].createElement("form",{onSubmit:handleSubmit},/*#__PURE__*/_react["default"].createElement(_custom.Header,headerProps),/*#__PURE__*/_react["default"].createElement("div",{className:"row",style:{paddingTop:'3px'}},/*#__PURE__*/_react["default"].createElement(_Block["default"],{style:{marginBottom:'13px',paddingBottom:'30px',paddingTop:'24px'}},/*#__PURE__*/_react["default"].createElement(_SectionTitle["default"],{isSettings:true}),/*#__PURE__*/_react["default"].createElement("div",{className:"row"},inputs.map(function(input){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{key:input.name,id:input.label.id},function(label){return/*#__PURE__*/_react["default"].createElement("div",{className:input.customBootstrapClass,style:{marginBottom:1}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:(0,_lodash.get)(input,'description.id','app.utils.defaultMessage')},function(description){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,(0,_extends2["default"])({},input,{description:description,label:label===' '?null:label,onChange:onChange,options:getSelectOptions(input),value:(0,_lodash.get)(modifiedData,input.name,'')}));}));});}),/*#__PURE__*/_react["default"].createElement("div",{className:"col-12"},/*#__PURE__*/_react["default"].createElement(_Separator["default"],{style:{marginBottom:23}}))),/*#__PURE__*/_react["default"].createElement(_SectionTitle["default"],null),children)),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningCancel,toggleModal:toggleWarningCancel,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.cancelAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:function onConfirm(){onConfirmReset();toggleWarningCancel();}}),/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.PopUpWarning,{isOpen:showWarningSubmit,toggleModal:toggleWarningSubmit,content:{title:"".concat(_pluginId["default"],".popUpWarning.title"),message:"".concat(_pluginId["default"],".popUpWarning.warning.updateAllSettings"),cancel:"".concat(_pluginId["default"],".popUpWarning.button.cancel"),confirm:"".concat(_pluginId["default"],".popUpWarning.button.confirm")},popUpWarningType:"danger",onConfirm:/*#__PURE__*/(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return onConfirmSubmit();case 2:toggleWarningSubmit();case 3:case"end":return _context.stop();}}},_callee);}))}))));};SettingsViewWrapper.defaultProps={getListDisplayedFields:function getListDisplayedFields(){return[];},inputs:[],initialData:{},isEditSettings:false,modifiedData:{},name:'',onConfirmReset:function onConfirmReset(){},onConfirmSubmit:function(){var _onConfirmSubmit=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:case"end":return _context2.stop();}}},_callee2);}));function onConfirmSubmit(){return _onConfirmSubmit.apply(this,arguments);}return onConfirmSubmit;}(),onSubmit:function onSubmit(){},pluginHeaderProps:{actions:[],description:{id:'app.utils.defaultMessage'},title:{id:'app.utils.defaultMessage',values:{}}}};SettingsViewWrapper.propTypes={children:_propTypes["default"].node.isRequired,getListDisplayedFields:_propTypes["default"].func,history:_propTypes["default"].shape({goBack:_propTypes["default"].func.isRequired}).isRequired,initialData:_propTypes["default"].object,inputs:_propTypes["default"].array,isEditSettings:_propTypes["default"].bool,isLoading:_propTypes["default"].bool.isRequired,modifiedData:_propTypes["default"].object,name:_propTypes["default"].string,onChange:_propTypes["default"].func.isRequired,onConfirmReset:_propTypes["default"].func,onConfirmSubmit:_propTypes["default"].func,onSubmit:_propTypes["default"].func,pluginHeaderProps:_propTypes["default"].shape({actions:_propTypes["default"].array,description:_propTypes["default"].shape({id:_propTypes["default"].string}),title:_propTypes["default"].shape({id:_propTypes["default"].string,values:_propTypes["default"].object})})};var _default=(0,_reactRouterDom.withRouter)(SettingsViewWrapper);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1933:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _components=__webpack_require__(1934);/**
    + *
    + * Block
    + */var renderMsg=function renderMsg(msg){return/*#__PURE__*/_react["default"].createElement("p",null,msg);};var Block=function Block(_ref){var children=_ref.children,description=_ref.description,style=_ref.style,title=_ref.title;return/*#__PURE__*/_react["default"].createElement("div",{className:"col-md-12"},/*#__PURE__*/_react["default"].createElement(_components.Wrapper,{style:style},/*#__PURE__*/_react["default"].createElement(_components.Sub,null,!!title&&/*#__PURE__*/_react["default"].createElement("p",null,/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:title})),!!description&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:description},renderMsg)),children));};Block.defaultProps={children:null,description:null,style:{},title:null};Block.propTypes={children:_propTypes["default"].any,description:_propTypes["default"].string,style:_propTypes["default"].object,title:_propTypes["default"].string};var _default=(0,_react.memo)(Block);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1934:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Sub=exports.Wrapper=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  padding-top: 0px;\n  line-height: 18px;\n  > p:first-child {\n    margin-bottom: 1px;\n    font-weight: 700;\n    color: #333740;\n    font-size: 1.8rem;\n  }\n  > p {\n    color: #787e8f;\n    font-size: 13px;\n  }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-bottom: 35px;\n  background: #ffffff;\n  padding: 22px 28px 18px;\n  padding-bottom: 13px;\n  border-radius: 2px;\n  box-shadow: 0 2px 4px #e3e9f3;\n  -webkit-font-smoothing: antialiased;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Wrapper=_styledComponents["default"].div(_templateObject());exports.Wrapper=Wrapper;var Sub=_styledComponents["default"].div(_templateObject2());exports.Sub=Sub;
    +
    +/***/ }),
    +
    +/***/ 1935:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);var _interopRequireWildcard=__webpack_require__(9);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactIntl=__webpack_require__(15);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _Title=_interopRequireDefault(__webpack_require__(1936));var SectionTitle=function SectionTitle(_ref){var isSettings=_ref.isSettings;var suffix=isSettings?'settings':'view';var msgId="".concat(_pluginId["default"],".containers.SettingPage.").concat(suffix);return/*#__PURE__*/_react["default"].createElement("div",{style:{marginBottom:'18px'}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:msgId},function(msg){return/*#__PURE__*/_react["default"].createElement(_Title["default"],null,msg);}));};SectionTitle.propTypes={isSettings:_propTypes["default"].bool};SectionTitle.defaultProps={isSettings:false};var _default=(0,_react.memo)(SectionTitle);exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1936:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  color: #787e8f;\n  font-size: 11px;\n  font-weight: 700;\n  letter-spacing: 0.77px;\n  text-transform: uppercase;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Title=_styledComponents["default"].div(_templateObject());var _default=Title;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 1937:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  margin-top: 17px;\n  margin-bottom: 24px;\n  border-top: 1px solid #f6f6f6;\n"]);_templateObject=function _templateObject(){return data;};return data;}var Separator=_styledComponents["default"].div(_templateObject());var _default=Separator;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2292:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(__webpack_require__(44));var _asyncToGenerator2=_interopRequireDefault(__webpack_require__(61));var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _strapiHelperPlugin=__webpack_require__(10);var _reactIntl=__webpack_require__(15);var _reactDnd=__webpack_require__(352);var _reactstrap=__webpack_require__(71);var _custom=__webpack_require__(72);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var _getRequestUrl=_interopRequireDefault(__webpack_require__(645));var _PopupForm=_interopRequireDefault(__webpack_require__(1931));var _SettingsViewWrapper=_interopRequireDefault(__webpack_require__(1932));var _SortWrapper=_interopRequireDefault(__webpack_require__(1921));var _LayoutDndProvider=_interopRequireDefault(__webpack_require__(647));var _Label=_interopRequireDefault(__webpack_require__(2293));var _MenuDropdown=_interopRequireDefault(__webpack_require__(2294));var _DropdownButton=_interopRequireDefault(__webpack_require__(2295));var _DragWrapper=_interopRequireDefault(__webpack_require__(2296));var _Toggle=_interopRequireDefault(__webpack_require__(2297));var _reducer=_interopRequireWildcard(__webpack_require__(2298));var _forms=_interopRequireDefault(__webpack_require__(2299));var ListSettingsView=function ListSettingsView(_ref){var deleteLayout=_ref.deleteLayout,slug=_ref.slug;var _useReducer=(0,_react.useReducer)(_reducer["default"],_reducer.initialState),_useReducer2=(0,_slicedToArray2["default"])(_useReducer,2),reducerState=_useReducer2[0],dispatch=_useReducer2[1];var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),isModalFormOpen=_useState4[0],setIsModalFormOpen=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=(0,_slicedToArray2["default"])(_useState5,2),isDraggingSibling=_useState6[0],setIsDraggingSibling=_useState6[1];var _useGlobalContext=(0,_strapiHelperPlugin.useGlobalContext)(),emitEvent=_useGlobalContext.emitEvent;var toggleModalForm=function toggleModalForm(){return setIsModalFormOpen(function(prevState){return!prevState;});};var _reducerState$toJS=reducerState.toJS(),labelForm=_reducerState$toJS.labelForm,labelToEdit=_reducerState$toJS.labelToEdit,initialData=_reducerState$toJS.initialData,modifiedData=_reducerState$toJS.modifiedData,isLoading=_reducerState$toJS.isLoading;var abortController=new AbortController();var signal=abortController.signal;var getAttributes=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','attributes'],{});},[modifiedData]);(0,_react.useEffect)(function(){var getData=/*#__PURE__*/function(){var _ref2=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(){var _yield$request,data;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("content-types/".concat(slug)),{method:'GET',signal:signal});case 3:_yield$request=_context.sent;data=_yield$request.data;dispatch({type:'GET_DATA_SUCCEEDED',data:data.contentType});_context.next=11;break;case 8:_context.prev=8;_context.t0=_context["catch"](0);if(_context.t0.code!==20){strapi.notification.error('notification.error');}case 11:case"end":return _context.stop();}}},_callee,null,[[0,8]]);}));return function getData(){return _ref2.apply(this,arguments);};}();getData();return function(){abortController.abort();};// eslint-disable-next-line react-hooks/exhaustive-deps
    +},[slug]);var getName=(0,_react.useMemo)(function(){return(0,_lodash.get)(modifiedData,['schema','info','name'],'');},[modifiedData]);var getListDisplayedFields=function getListDisplayedFields(){return(0,_lodash.get)(modifiedData,['layouts','list'],[]);};var getListRemainingFields=function getListRemainingFields(){var metadatas=(0,_lodash.get)(modifiedData,['metadatas'],{});var attributes=getAttributes;return Object.keys(metadatas).filter(function(key){var type=(0,_lodash.get)(attributes,[key,'type'],'');return!['json','component','richtext','relation'].includes(type)&&!!type;}).filter(function(field){return!getListDisplayedFields().includes(field);});};var handleClickEditLabel=function handleClickEditLabel(labelToEdit){dispatch({type:'SET_LABEL_TO_EDIT',labelToEdit:labelToEdit});toggleModalForm();};var handleClosed=function handleClosed(){dispatch({type:'UNSET_LABEL_TO_EDIT'});};var handleChange=function handleChange(_ref3){var _ref3$target=_ref3.target,name=_ref3$target.name,value=_ref3$target.value;dispatch({type:'ON_CHANGE',keys:name,value:name==='settings.pageSize'?parseInt(value,10):value});};var handleChangeEditLabel=function handleChangeEditLabel(_ref4){var _ref4$target=_ref4.target,name=_ref4$target.name,value=_ref4$target.value;dispatch({type:'ON_CHANGE_LABEL_METAS',name:name,value:value});};var handleConfirm=/*#__PURE__*/function(){var _ref5=(0,_asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(){var body;return _regenerator["default"].wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;body=(0,_lodash.cloneDeep)(modifiedData);delete body.apiID;delete body.schema;delete body.uid;_context2.next=7;return(0,_strapiHelperPlugin.request)((0,_getRequestUrl["default"])("content-types/".concat(slug)),{method:'PUT',body:body,signal:signal});case 7:dispatch({type:'SUBMIT_SUCCEEDED'});deleteLayout(slug);emitEvent('didEditListSettings');_context2.next=15;break;case 12:_context2.prev=12;_context2.t0=_context2["catch"](0);strapi.notification.error('notification.error');case 15:case"end":return _context2.stop();}}},_callee2,null,[[0,12]]);}));return function handleConfirm(){return _ref5.apply(this,arguments);};}();var move=function move(originalIndex,atIndex){dispatch({type:'MOVE_FIELD',originalIndex:originalIndex,atIndex:atIndex});};var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].FIELD}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var renderForm=function renderForm(){return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement("div",{className:"col-6",style:{marginBottom:4}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".form.Input.label")},function(label){return/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".form.Input.label.inputDescription")},function(description){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,{description:description,label:label,type:"text",name:"label",onBlur:function onBlur(){},value:(0,_lodash.get)(labelForm,'label',''),onChange:handleChangeEditLabel});});})),(0,_lodash.get)(getAttributes,[labelToEdit,'type'],'text')!=='media'&&/*#__PURE__*/_react["default"].createElement("div",{className:"col-6",style:{marginBottom:4}},/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".form.Input.sort.field")},function(label){return/*#__PURE__*/_react["default"].createElement(_custom.Inputs,{label:label,type:"bool",name:"sortable",value:(0,_lodash.get)(labelForm,'sortable',false),onChange:handleChangeEditLabel});})));};return/*#__PURE__*/_react["default"].createElement(_LayoutDndProvider["default"],{isDraggingSibling:isDraggingSibling,setIsDraggingSibling:setIsDraggingSibling},/*#__PURE__*/_react["default"].createElement(_SettingsViewWrapper["default"],{getListDisplayedFields:getListDisplayedFields,inputs:_forms["default"],isLoading:isLoading,initialData:initialData,modifiedData:modifiedData,onChange:handleChange,onConfirmReset:function onConfirmReset(){dispatch({type:'ON_RESET'});},onConfirmSubmit:handleConfirm,name:getName},/*#__PURE__*/_react["default"].createElement(_DragWrapper["default"],null,/*#__PURE__*/_react["default"].createElement("div",{className:"row"},/*#__PURE__*/_react["default"].createElement("div",{className:"col-12"},/*#__PURE__*/_react["default"].createElement(_SortWrapper["default"],{ref:drop,style:{display:'flex',width:'100%'}},getListDisplayedFields().map(function(item,index){var label=(0,_lodash.get)(modifiedData,['metadatas',item,'list','label'],'');return/*#__PURE__*/_react["default"].createElement(_Label["default"],{count:getListDisplayedFields().length,key:item,index:index,isDraggingSibling:isDraggingSibling,label:label,move:move,name:item,onClick:handleClickEditLabel,onRemove:function onRemove(e){e.stopPropagation();if(getListDisplayedFields().length===1){strapi.notification.info("".concat(_pluginId["default"],".notification.info.minimumFields"));}else{dispatch({type:'REMOVE_FIELD',index:index});}},selectedItem:labelToEdit,setIsDraggingSibling:setIsDraggingSibling});})))),/*#__PURE__*/_react["default"].createElement(_DropdownButton["default"],{isOpen:isOpen,toggle:function toggle(){if(getListRemainingFields().length>0){setIsOpen(function(prevState){return!prevState;});}},direction:"down",style:{position:'absolute',top:11,right:10}},/*#__PURE__*/_react["default"].createElement(_Toggle["default"],{disabled:getListRemainingFields().length===0}),/*#__PURE__*/_react["default"].createElement(_MenuDropdown["default"],null,getListRemainingFields().map(function(item){return/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem,{key:item,onClick:function onClick(){dispatch({type:'ADD_FIELD',item:item});}},item);}))))),/*#__PURE__*/_react["default"].createElement(_PopupForm["default"],{headerId:"".concat(_pluginId["default"],".containers.ListSettingsView.modal-form.edit-label"),isOpen:isModalFormOpen,onClosed:handleClosed,onSubmit:function onSubmit(e){e.preventDefault();toggleModalForm();dispatch({type:'SUBMIT_LABEL_FORM'});},onToggle:toggleModalForm,renderForm:renderForm,subHeaderContent:labelToEdit,type:(0,_lodash.get)(getAttributes,[labelToEdit,'type'],'text')}));};ListSettingsView.propTypes={deleteLayout:_propTypes["default"].func.isRequired,location:_propTypes["default"].shape({search:_propTypes["default"].string.isRequired}).isRequired,slug:_propTypes["default"].string.isRequired};var _default=ListSettingsView;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2293:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactDnd=__webpack_require__(352);var _reactDndHtml5Backend=__webpack_require__(644);var _ItemTypes=_interopRequireDefault(__webpack_require__(642));var _DraggedField=_interopRequireDefault(__webpack_require__(649));var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(643));var Label=function Label(_ref){var count=_ref.count,index=_ref.index,label=_ref.label,move=_ref.move,name=_ref.name,onClick=_ref.onClick,onRemove=_ref.onRemove,selectedItem=_ref.selectedItem;var ref=(0,_react.useRef)(null);var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),setIsDraggingSibling=_useLayoutDnd.setIsDraggingSibling;var _useDrop=(0,_reactDnd.useDrop)({accept:_ItemTypes["default"].FIELD,hover:function hover(item){if(!ref.current){return;}var dragIndex=item.index;var hoverIndex=index;// Don't replace items with themselves
    +if(dragIndex===hoverIndex){return;}move(dragIndex,hoverIndex);item.index=hoverIndex;}}),_useDrop2=(0,_slicedToArray2["default"])(_useDrop,2),drop=_useDrop2[1];var _useDrag=(0,_reactDnd.useDrag)({begin:function begin(){setIsDraggingSibling(true);},end:function end(){setIsDraggingSibling(false);},item:{type:_ItemTypes["default"].FIELD,id:name,name:name,index:index},collect:function collect(monitor){return{isDragging:monitor.isDragging()};}}),_useDrag2=(0,_slicedToArray2["default"])(_useDrag,3),isDragging=_useDrag2[0].isDragging,drag=_useDrag2[1],preview=_useDrag2[2];(0,_react.useEffect)(function(){preview((0,_reactDndHtml5Backend.getEmptyImage)(),{captureDraggingState:false});},[preview]);drag(drop(ref));return/*#__PURE__*/_react["default"].createElement(_DraggedField["default"],{count:count,ref:ref,isDragging:isDragging,label:label,name:name,onClick:onClick,onRemove:onRemove,selectedItem:selectedItem});};Label.defaultProps={index:0,label:'',selectedItem:''};Label.propTypes={count:_propTypes["default"].number.isRequired,index:_propTypes["default"].number,label:_propTypes["default"].string,move:_propTypes["default"].func.isRequired,name:_propTypes["default"].string.isRequired,onClick:_propTypes["default"].func.isRequired,onRemove:_propTypes["default"].func.isRequired,selectedItem:_propTypes["default"].string};var _default=Label;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2294:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _reactstrap=__webpack_require__(71);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  max-height: 180px;\n  // min-width: calc(100% + 2px);\n  min-width: 230px;\n  margin-left: -1px;\n  margin-top: -1px;\n  padding: 0;\n  border-top-left-radius: 0 !important;\n  border-top-right-radius: 0;\n  border-color: #e3e9f3 !important;\n  border-top-color: #aed4fb !important;\n  box-shadow: 0 2px 3px rgba(227, 233, 245, 0.5);\n  transform: translate3d(-199px, 30px, 0px) !important;\n\n  overflow: scroll;\n\n  button {\n    height: 30px;\n    padding-left: 10px !important;\n    line-height: 26px;\n    cursor: pointer;\n    font-size: 13px !important;\n    &:focus,\n    &:active,\n    &:hover,\n    &:hover {\n      background-color: #fafafb !important;\n      color: #333740;\n      outline: 0;\n    }\n    div {\n      margin: 0;\n      white-space: nowrap;\n      overflow: hidden;\n      text-overflow: ellipsis;\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var MenuDropdown=(0,_styledComponents["default"])(_reactstrap.DropdownMenu)(_templateObject());var _default=MenuDropdown;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2295:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _reactstrap=__webpack_require__(71);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  display: table-cell;\n"]);_templateObject=function _templateObject(){return data;};return data;}var DropdownButton=(0,_styledComponents["default"])(_reactstrap.ButtonDropdown)(_templateObject());var _default=DropdownButton;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2296:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  position: relative;\n  padding: 11px 40px 11px 11px;\n  margin-top: 19px;\n  margin-bottom: 10px;\n  border: 1px dashed #e3e9f3;\n  border-radius: 2px;\n  > div,\n  > div > div {\n    margin: 0;\n    padding: 0;\n  }\n  > div > div {\n    overflow-x: auto;\n    overflow-y: scroll;\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var DragWrapper=_styledComponents["default"].div(_templateObject());var _default=DragWrapper;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2297:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _reactstrap=__webpack_require__(71);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n  width: 30px;\n  height: 30px;\n  background: #fafafb;\n  border: 1px solid #e3e9f3;\n  border-radius: 2px;\n  border-top-right-radius: 2px !important;\n  border-bottom-right-radius: 2px !important;\n  color: #b3b5b9;\n\n  &:disabled {\n    cursor: not-allowed !important;\n\n    background: #fafafb;\n    border: 1px solid #e3e9f3;\n    border-radius: 2px;\n    color: #b3b5b9;\n  }\n\n  &:before {\n    ","\n  }\n\n  &:hover,\n  :active,\n  :focus {\n    ","\n\n    &:before {\n      ","\n    }\n  }\n"]);_templateObject=function _templateObject(){return data;};return data;}var openedStyle="\n  background-color: #e6f0fb !important;\n  border: 1px solid #aed4fb !important;\n  color: #007eff !important;\n";var beforeStyle="\n  content: '\f067';\n  font-family: FontAwesome;\n  font-size: 13px;\n  -webkit-font-smoothing: antialiased;\n";var Toggle=(0,_styledComponents["default"])(_reactstrap.DropdownToggle)(_templateObject(),beforeStyle,openedStyle,beforeStyle);var _default=Toggle;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2298:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.initialState=exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _immutable=__webpack_require__(35);var initialState=(0,_immutable.fromJS)({labelForm:{},labelToEdit:'',initialData:{},isLoading:true,modifiedData:{}});exports.initialState=initialState;var reducer=function reducer(state,action){var layoutPath=['modifiedData','layouts','list'];switch(action.type){case'ADD_FIELD':return state.updateIn(layoutPath,function(list){return list.push(action.item);});case'GET_DATA_SUCCEEDED':return state.update('initialData',function(){return(0,_immutable.fromJS)(action.data);}).update('isLoading',function(){return false;}).update('modifiedData',function(){return(0,_immutable.fromJS)(action.data);});case'MOVE_FIELD':return state.updateIn(['modifiedData','layouts','list'],function(list){return list["delete"](action.originalIndex).insert(action.atIndex,list.get(action.originalIndex));});case'ON_CHANGE':return state.updateIn(['modifiedData'].concat((0,_toConsumableArray2["default"])(action.keys.split('.'))),function(){return action.value;});case'ON_CHANGE_LABEL_METAS':return state.updateIn(['labelForm',action.name],function(){return action.value;});case'ON_RESET':return state.update('modifiedData',function(){return state.get('initialData');});case'REMOVE_FIELD':{var defaultSortByPath=['modifiedData','settings','defaultSortBy'];var defaultSortBy=state.getIn(defaultSortByPath);var attrPath=['modifiedData','layouts','list',action.index];var attrToBeRemoved=state.getIn(attrPath);var firstAttr=state.getIn(['modifiedData','layouts','list',1]);var firstAttrType=state.getIn(['modifiedData','schema','attributes',firstAttr,'type']);var attrToSelect=firstAttrType!=='media'&&firstAttrType!=='richtext'?firstAttr:'id';return state.removeIn(['modifiedData','layouts','list',action.index]).updateIn(defaultSortByPath,function(){if(attrToBeRemoved===defaultSortBy){return attrToSelect;}return defaultSortBy;});}case'SET_LABEL_TO_EDIT':return state.update('labelToEdit',function(){return action.labelToEdit;}).updateIn(['labelForm','label'],function(){return state.getIn(['modifiedData','metadatas',action.labelToEdit,'list','label']);}).updateIn(['labelForm','sortable'],function(){return state.getIn(['modifiedData','metadatas',action.labelToEdit,'list','sortable']);});case'UNSET_LABEL_TO_EDIT':return state.update('labelToEdit',function(){return'';}).update('labelForm',function(){return(0,_immutable.fromJS)({});});case'SUBMIT_LABEL_FORM':{var metaPath=['modifiedData','metadatas',state.get('labelToEdit'),'list'];return state.updateIn([].concat(metaPath,['label']),function(){return state.getIn(['labelForm','label']);}).updateIn([].concat(metaPath,['sortable']),function(){return state.getIn(['labelForm','sortable']);});}case'SUBMIT_SUCCEEDED':return state.update('initialData',function(){return state.get('modifiedData');});default:return state;}};var _default=reducer;exports["default"]=_default;
    +
    +/***/ }),
    +
    +/***/ 2299:
    +/***/ (function(module) {
    +
    +module.exports = JSON.parse("[{\"label\":{\"id\":\"content-manager.form.Input.search\"},\"customBootstrapClass\":\"col-md-4\",\"didCheckErrors\":false,\"errors\":[],\"name\":\"settings.searchable\",\"type\":\"bool\",\"validations\":{}},{\"label\":{\"id\":\"content-manager.form.Input.filters\"},\"customBootstrapClass\":\"col-md-4\",\"didCheckErrors\":false,\"errors\":[],\"name\":\"settings.filterable\",\"type\":\"bool\",\"validations\":{}},{\"label\":{\"id\":\"content-manager.form.Input.bulkActions\"},\"customBootstrapClass\":\"col-md-4\",\"didCheckErrors\":false,\"errors\":[],\"name\":\"settings.bulkable\",\"type\":\"bool\",\"validations\":{}},{\"label\":{\"id\":\"content-manager.form.Input.pageEntries\"},\"customBootstrapClass\":\"col-md-4\",\"didCheckErrors\":false,\"errors\":[],\"description\":{\"id\":\"content-manager.form.Input.pageEntries.inputDescription\"},\"name\":\"settings.pageSize\",\"options\":[10,20,50,100],\"type\":\"select\",\"validations\":{}},{\"label\":{\"id\":\"content-manager.form.Input.defaultSort\"},\"customBootstrapClass\":\"col-md-4 ml-md-auto\",\"didCheckErrors\":false,\"errors\":[],\"style\":{\"marginRight\":\"-20px\"},\"name\":\"settings.defaultSortBy\",\"options\":[\"id\"],\"type\":\"select\",\"validations\":{}},{\"label\":{\"id\":\"app.utils.defaultMessage\"},\"customBootstrapClass\":\"col-md-2\",\"didCheckErrors\":false,\"errors\":[],\"name\":\"settings.defaultSortOrder\",\"options\":[\"ASC\",\"DESC\"],\"type\":\"select\",\"validations\":{}}]");
    +
    +/***/ })
    +
    +}]);
    \ No newline at end of file
    diff --git a/server/build/7244318390cc4d36aac4a613ff42d308.woff2 b/server/build/7244318390cc4d36aac4a613ff42d308.woff2
    new file mode 100644
    index 00000000..ce49f822
    Binary files /dev/null and b/server/build/7244318390cc4d36aac4a613ff42d308.woff2 differ
    diff --git a/server/build/75a60ac7a1a65ca23365ddab1d9da73e.png b/server/build/75a60ac7a1a65ca23365ddab1d9da73e.png
    new file mode 100644
    index 00000000..e6156126
    Binary files /dev/null and b/server/build/75a60ac7a1a65ca23365ddab1d9da73e.png differ
    diff --git a/server/build/798eafdd87dc8f3174f76164f0685e02.woff b/server/build/798eafdd87dc8f3174f76164f0685e02.woff
    new file mode 100644
    index 00000000..30f2c71c
    Binary files /dev/null and b/server/build/798eafdd87dc8f3174f76164f0685e02.woff differ
    diff --git a/server/build/8.969eea87.chunk.js b/server/build/8.969eea87.chunk.js
    new file mode 100644
    index 00000000..fb4c3765
    --- /dev/null
    +++ b/server/build/8.969eea87.chunk.js
    @@ -0,0 +1,4385 @@
    +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[8],{
    +
    +/***/ 1894:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +/* WEBPACK VAR INJECTION */(function(global) {// Expose `IntlPolyfill` as global to add locale data into runtime later on.
    +global.IntlPolyfill = __webpack_require__(2007);
    +
    +// Require all locale data for `Intl`. This module will be
    +// ignored when bundling for the browser with Browserify/Webpack.
    +__webpack_require__(2008);
    +
    +// hack to export the polyfill as global Intl if needed
    +if (!global.Intl) {
    +    global.Intl = global.IntlPolyfill;
    +    global.IntlPolyfill.__applyLocaleSensitivePrototypes();
    +}
    +
    +// providing an idiomatic api for the nodejs version of this module
    +module.exports = global.IntlPolyfill;
    +
    +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49)))
    +
    +/***/ }),
    +
    +/***/ 2007:
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +/* WEBPACK VAR INJECTION */(function(global) {
    +
    +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
    +  return typeof obj;
    +} : function (obj) {
    +  return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
    +};
    +
    +var jsx = function () {
    +  var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
    +  return function createRawReactElement(type, props, key, children) {
    +    var defaultProps = type && type.defaultProps;
    +    var childrenLength = arguments.length - 3;
    +
    +    if (!props && childrenLength !== 0) {
    +      props = {};
    +    }
    +
    +    if (props && defaultProps) {
    +      for (var propName in defaultProps) {
    +        if (props[propName] === void 0) {
    +          props[propName] = defaultProps[propName];
    +        }
    +      }
    +    } else if (!props) {
    +      props = defaultProps || {};
    +    }
    +
    +    if (childrenLength === 1) {
    +      props.children = children;
    +    } else if (childrenLength > 1) {
    +      var childArray = Array(childrenLength);
    +
    +      for (var i = 0; i < childrenLength; i++) {
    +        childArray[i] = arguments[i + 3];
    +      }
    +
    +      props.children = childArray;
    +    }
    +
    +    return {
    +      $$typeof: REACT_ELEMENT_TYPE,
    +      type: type,
    +      key: key === undefined ? null : '' + key,
    +      ref: null,
    +      props: props,
    +      _owner: null
    +    };
    +  };
    +}();
    +
    +var asyncToGenerator = function (fn) {
    +  return function () {
    +    var gen = fn.apply(this, arguments);
    +    return new Promise(function (resolve, reject) {
    +      function step(key, arg) {
    +        try {
    +          var info = gen[key](arg);
    +          var value = info.value;
    +        } catch (error) {
    +          reject(error);
    +          return;
    +        }
    +
    +        if (info.done) {
    +          resolve(value);
    +        } else {
    +          return Promise.resolve(value).then(function (value) {
    +            return step("next", value);
    +          }, function (err) {
    +            return step("throw", err);
    +          });
    +        }
    +      }
    +
    +      return step("next");
    +    });
    +  };
    +};
    +
    +var classCallCheck = function (instance, Constructor) {
    +  if (!(instance instanceof Constructor)) {
    +    throw new TypeError("Cannot call a class as a function");
    +  }
    +};
    +
    +var createClass = function () {
    +  function defineProperties(target, props) {
    +    for (var i = 0; i < props.length; i++) {
    +      var descriptor = props[i];
    +      descriptor.enumerable = descriptor.enumerable || false;
    +      descriptor.configurable = true;
    +      if ("value" in descriptor) descriptor.writable = true;
    +      Object.defineProperty(target, descriptor.key, descriptor);
    +    }
    +  }
    +
    +  return function (Constructor, protoProps, staticProps) {
    +    if (protoProps) defineProperties(Constructor.prototype, protoProps);
    +    if (staticProps) defineProperties(Constructor, staticProps);
    +    return Constructor;
    +  };
    +}();
    +
    +var defineEnumerableProperties = function (obj, descs) {
    +  for (var key in descs) {
    +    var desc = descs[key];
    +    desc.configurable = desc.enumerable = true;
    +    if ("value" in desc) desc.writable = true;
    +    Object.defineProperty(obj, key, desc);
    +  }
    +
    +  return obj;
    +};
    +
    +var defaults = function (obj, defaults) {
    +  var keys = Object.getOwnPropertyNames(defaults);
    +
    +  for (var i = 0; i < keys.length; i++) {
    +    var key = keys[i];
    +    var value = Object.getOwnPropertyDescriptor(defaults, key);
    +
    +    if (value && value.configurable && obj[key] === undefined) {
    +      Object.defineProperty(obj, key, value);
    +    }
    +  }
    +
    +  return obj;
    +};
    +
    +var defineProperty$1 = function (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 _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;
    +};
    +
    +var get = function get(object, property, receiver) {
    +  if (object === null) object = Function.prototype;
    +  var desc = Object.getOwnPropertyDescriptor(object, property);
    +
    +  if (desc === undefined) {
    +    var parent = Object.getPrototypeOf(object);
    +
    +    if (parent === null) {
    +      return undefined;
    +    } else {
    +      return get(parent, property, receiver);
    +    }
    +  } else if ("value" in desc) {
    +    return desc.value;
    +  } else {
    +    var getter = desc.get;
    +
    +    if (getter === undefined) {
    +      return undefined;
    +    }
    +
    +    return getter.call(receiver);
    +  }
    +};
    +
    +var inherits = function (subClass, superClass) {
    +  if (typeof superClass !== "function" && superClass !== null) {
    +    throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
    +  }
    +
    +  subClass.prototype = Object.create(superClass && superClass.prototype, {
    +    constructor: {
    +      value: subClass,
    +      enumerable: false,
    +      writable: true,
    +      configurable: true
    +    }
    +  });
    +  if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    +};
    +
    +var _instanceof = function (left, right) {
    +  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
    +    return right[Symbol.hasInstance](left);
    +  } else {
    +    return left instanceof right;
    +  }
    +};
    +
    +var interopRequireDefault = function (obj) {
    +  return obj && obj.__esModule ? obj : {
    +    default: obj
    +  };
    +};
    +
    +var interopRequireWildcard = function (obj) {
    +  if (obj && obj.__esModule) {
    +    return obj;
    +  } else {
    +    var newObj = {};
    +
    +    if (obj != null) {
    +      for (var key in obj) {
    +        if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
    +      }
    +    }
    +
    +    newObj.default = obj;
    +    return newObj;
    +  }
    +};
    +
    +var newArrowCheck = function (innerThis, boundThis) {
    +  if (innerThis !== boundThis) {
    +    throw new TypeError("Cannot instantiate an arrow function");
    +  }
    +};
    +
    +var objectDestructuringEmpty = function (obj) {
    +  if (obj == null) throw new TypeError("Cannot destructure undefined");
    +};
    +
    +var objectWithoutProperties = function (obj, keys) {
    +  var target = {};
    +
    +  for (var i in obj) {
    +    if (keys.indexOf(i) >= 0) continue;
    +    if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
    +    target[i] = obj[i];
    +  }
    +
    +  return target;
    +};
    +
    +var possibleConstructorReturn = function (self, call) {
    +  if (!self) {
    +    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    +  }
    +
    +  return call && (typeof call === "object" || typeof call === "function") ? call : self;
    +};
    +
    +var selfGlobal = typeof global === "undefined" ? self : global;
    +
    +var set = function set(object, property, value, receiver) {
    +  var desc = Object.getOwnPropertyDescriptor(object, property);
    +
    +  if (desc === undefined) {
    +    var parent = Object.getPrototypeOf(object);
    +
    +    if (parent !== null) {
    +      set(parent, property, value, receiver);
    +    }
    +  } else if ("value" in desc && desc.writable) {
    +    desc.value = value;
    +  } else {
    +    var setter = desc.set;
    +
    +    if (setter !== undefined) {
    +      setter.call(receiver, value);
    +    }
    +  }
    +
    +  return value;
    +};
    +
    +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 slicedToArrayLoose = function (arr, i) {
    +  if (Array.isArray(arr)) {
    +    return arr;
    +  } else if (Symbol.iterator in Object(arr)) {
    +    var _arr = [];
    +
    +    for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
    +      _arr.push(_step.value);
    +
    +      if (i && _arr.length === i) break;
    +    }
    +
    +    return _arr;
    +  } else {
    +    throw new TypeError("Invalid attempt to destructure non-iterable instance");
    +  }
    +};
    +
    +var taggedTemplateLiteral = function (strings, raw) {
    +  return Object.freeze(Object.defineProperties(strings, {
    +    raw: {
    +      value: Object.freeze(raw)
    +    }
    +  }));
    +};
    +
    +var taggedTemplateLiteralLoose = function (strings, raw) {
    +  strings.raw = raw;
    +  return strings;
    +};
    +
    +var temporalRef = function (val, name, undef) {
    +  if (val === undef) {
    +    throw new ReferenceError(name + " is not defined - temporal dead zone");
    +  } else {
    +    return val;
    +  }
    +};
    +
    +var temporalUndefined = {};
    +
    +var toArray = function (arr) {
    +  return Array.isArray(arr) ? arr : Array.from(arr);
    +};
    +
    +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);
    +  }
    +};
    +
    +
    +
    +var babelHelpers$1 = Object.freeze({
    +  jsx: jsx,
    +  asyncToGenerator: asyncToGenerator,
    +  classCallCheck: classCallCheck,
    +  createClass: createClass,
    +  defineEnumerableProperties: defineEnumerableProperties,
    +  defaults: defaults,
    +  defineProperty: defineProperty$1,
    +  get: get,
    +  inherits: inherits,
    +  interopRequireDefault: interopRequireDefault,
    +  interopRequireWildcard: interopRequireWildcard,
    +  newArrowCheck: newArrowCheck,
    +  objectDestructuringEmpty: objectDestructuringEmpty,
    +  objectWithoutProperties: objectWithoutProperties,
    +  possibleConstructorReturn: possibleConstructorReturn,
    +  selfGlobal: selfGlobal,
    +  set: set,
    +  slicedToArray: slicedToArray,
    +  slicedToArrayLoose: slicedToArrayLoose,
    +  taggedTemplateLiteral: taggedTemplateLiteral,
    +  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
    +  temporalRef: temporalRef,
    +  temporalUndefined: temporalUndefined,
    +  toArray: toArray,
    +  toConsumableArray: toConsumableArray,
    +  typeof: _typeof,
    +  extends: _extends,
    +  instanceof: _instanceof
    +});
    +
    +var realDefineProp = function () {
    +    var sentinel = function sentinel() {};
    +    try {
    +        Object.defineProperty(sentinel, 'a', {
    +            get: function get() {
    +                return 1;
    +            }
    +        });
    +        Object.defineProperty(sentinel, 'prototype', { writable: false });
    +        return sentinel.a === 1 && sentinel.prototype instanceof Object;
    +    } catch (e) {
    +        return false;
    +    }
    +}();
    +
    +// Need a workaround for getters in ES3
    +var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
    +
    +// We use this a lot (and need it for proto-less objects)
    +var hop = Object.prototype.hasOwnProperty;
    +
    +// Naive defineProperty for compatibility
    +var defineProperty = realDefineProp ? Object.defineProperty : function (obj, name, desc) {
    +    if ('get' in desc && obj.__defineGetter__) obj.__defineGetter__(name, desc.get);else if (!hop.call(obj, name) || 'value' in desc) obj[name] = desc.value;
    +};
    +
    +// Array.prototype.indexOf, as good as we need it to be
    +var arrIndexOf = Array.prototype.indexOf || function (search) {
    +    /*jshint validthis:true */
    +    var t = this;
    +    if (!t.length) return -1;
    +
    +    for (var i = arguments[1] || 0, max = t.length; i < max; i++) {
    +        if (t[i] === search) return i;
    +    }
    +
    +    return -1;
    +};
    +
    +// Create an object with the specified prototype (2nd arg required for Record)
    +var objCreate = Object.create || function (proto, props) {
    +    var obj = void 0;
    +
    +    function F() {}
    +    F.prototype = proto;
    +    obj = new F();
    +
    +    for (var k in props) {
    +        if (hop.call(props, k)) defineProperty(obj, k, props[k]);
    +    }
    +
    +    return obj;
    +};
    +
    +// Snapshot some (hopefully still) native built-ins
    +var arrSlice = Array.prototype.slice;
    +var arrConcat = Array.prototype.concat;
    +var arrPush = Array.prototype.push;
    +var arrJoin = Array.prototype.join;
    +var arrShift = Array.prototype.shift;
    +
    +// Naive Function.prototype.bind for compatibility
    +var fnBind = Function.prototype.bind || function (thisObj) {
    +    var fn = this,
    +        args = arrSlice.call(arguments, 1);
    +
    +    // All our (presently) bound functions have either 1 or 0 arguments. By returning
    +    // different function signatures, we can pass some tests in ES3 environments
    +    if (fn.length === 1) {
    +        return function () {
    +            return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
    +        };
    +    }
    +    return function () {
    +        return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
    +    };
    +};
    +
    +// Object housing internal properties for constructors
    +var internals = objCreate(null);
    +
    +// Keep internal properties internal
    +var secret = Math.random();
    +
    +// Helper functions
    +// ================
    +
    +/**
    + * A function to deal with the inaccuracy of calculating log10 in pre-ES6
    + * JavaScript environments. Math.log(num) / Math.LN10 was responsible for
    + * causing issue #62.
    + */
    +function log10Floor(n) {
    +    // ES6 provides the more accurate Math.log10
    +    if (typeof Math.log10 === 'function') return Math.floor(Math.log10(n));
    +
    +    var x = Math.round(Math.log(n) * Math.LOG10E);
    +    return x - (Number('1e' + x) > n);
    +}
    +
    +/**
    + * A map that doesn't contain Object in its prototype chain
    + */
    +function Record(obj) {
    +    // Copy only own properties over unless this object is already a Record instance
    +    for (var k in obj) {
    +        if (obj instanceof Record || hop.call(obj, k)) defineProperty(this, k, { value: obj[k], enumerable: true, writable: true, configurable: true });
    +    }
    +}
    +Record.prototype = objCreate(null);
    +
    +/**
    + * An ordered list
    + */
    +function List() {
    +    defineProperty(this, 'length', { writable: true, value: 0 });
    +
    +    if (arguments.length) arrPush.apply(this, arrSlice.call(arguments));
    +}
    +List.prototype = objCreate(null);
    +
    +/**
    + * Constructs a regular expression to restore tainted RegExp properties
    + */
    +function createRegExpRestore() {
    +    if (internals.disableRegExpRestore) {
    +        return function () {/* no-op */};
    +    }
    +
    +    var regExpCache = {
    +        lastMatch: RegExp.lastMatch || '',
    +        leftContext: RegExp.leftContext,
    +        multiline: RegExp.multiline,
    +        input: RegExp.input
    +    },
    +        has = false;
    +
    +    // Create a snapshot of all the 'captured' properties
    +    for (var i = 1; i <= 9; i++) {
    +        has = (regExpCache['$' + i] = RegExp['$' + i]) || has;
    +    }return function () {
    +        // Now we've snapshotted some properties, escape the lastMatch string
    +        var esc = /[.?*+^$[\]\\(){}|-]/g,
    +            lm = regExpCache.lastMatch.replace(esc, '\\$&'),
    +            reg = new List();
    +
    +        // If any of the captured strings were non-empty, iterate over them all
    +        if (has) {
    +            for (var _i = 1; _i <= 9; _i++) {
    +                var m = regExpCache['$' + _i];
    +
    +                // If it's empty, add an empty capturing group
    +                if (!m) lm = '()' + lm;
    +
    +                // Else find the string in lm and escape & wrap it to capture it
    +                else {
    +                        m = m.replace(esc, '\\$&');
    +                        lm = lm.replace(m, '(' + m + ')');
    +                    }
    +
    +                // Push it to the reg and chop lm to make sure further groups come after
    +                arrPush.call(reg, lm.slice(0, lm.indexOf('(') + 1));
    +                lm = lm.slice(lm.indexOf('(') + 1);
    +            }
    +        }
    +
    +        var exprStr = arrJoin.call(reg, '') + lm;
    +
    +        // Shorten the regex by replacing each part of the expression with a match
    +        // for a string of that exact length.  This is safe for the type of
    +        // expressions generated above, because the expression matches the whole
    +        // match string, so we know each group and each segment between capturing
    +        // groups can be matched by its length alone.
    +        exprStr = exprStr.replace(/(\\\(|\\\)|[^()])+/g, function (match) {
    +            return '[\\s\\S]{' + match.replace('\\', '').length + '}';
    +        });
    +
    +        // Create the regular expression that will reconstruct the RegExp properties
    +        var expr = new RegExp(exprStr, regExpCache.multiline ? 'gm' : 'g');
    +
    +        // Set the lastIndex of the generated expression to ensure that the match
    +        // is found in the correct index.
    +        expr.lastIndex = regExpCache.leftContext.length;
    +
    +        expr.exec(regExpCache.input);
    +    };
    +}
    +
    +/**
    + * Mimics ES5's abstract ToObject() function
    + */
    +function toObject(arg) {
    +    if (arg === null) throw new TypeError('Cannot convert null or undefined to object');
    +
    +    if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;
    +    return Object(arg);
    +}
    +
    +function toNumber(arg) {
    +    if (typeof arg === 'number') return arg;
    +    return Number(arg);
    +}
    +
    +function toInteger(arg) {
    +    var number = toNumber(arg);
    +    if (isNaN(number)) return 0;
    +    if (number === +0 || number === -0 || number === +Infinity || number === -Infinity) return number;
    +    if (number < 0) return Math.floor(Math.abs(number)) * -1;
    +    return Math.floor(Math.abs(number));
    +}
    +
    +function toLength(arg) {
    +    var len = toInteger(arg);
    +    if (len <= 0) return 0;
    +    if (len === Infinity) return Math.pow(2, 53) - 1;
    +    return Math.min(len, Math.pow(2, 53) - 1);
    +}
    +
    +/**
    + * Returns "internal" properties for an object
    + */
    +function getInternalProperties(obj) {
    +    if (hop.call(obj, '__getInternalProperties')) return obj.__getInternalProperties(secret);
    +
    +    return objCreate(null);
    +}
    +
    +/**
    +* Defines regular expressions for various operations related to the BCP 47 syntax,
    +* as defined at http://tools.ietf.org/html/bcp47#section-2.1
    +*/
    +
    +// extlang       = 3ALPHA              ; selected ISO 639 codes
    +//                 *2("-" 3ALPHA)      ; permanently reserved
    +var extlang = '[a-z]{3}(?:-[a-z]{3}){0,2}';
    +
    +// language      = 2*3ALPHA            ; shortest ISO 639 code
    +//                 ["-" extlang]       ; sometimes followed by
    +//                                     ; extended language subtags
    +//               / 4ALPHA              ; or reserved for future use
    +//               / 5*8ALPHA            ; or registered language subtag
    +var language = '(?:[a-z]{2,3}(?:-' + extlang + ')?|[a-z]{4}|[a-z]{5,8})';
    +
    +// script        = 4ALPHA              ; ISO 15924 code
    +var script = '[a-z]{4}';
    +
    +// region        = 2ALPHA              ; ISO 3166-1 code
    +//               / 3DIGIT              ; UN M.49 code
    +var region = '(?:[a-z]{2}|\\d{3})';
    +
    +// variant       = 5*8alphanum         ; registered variants
    +//               / (DIGIT 3alphanum)
    +var variant = '(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})';
    +
    +//                                     ; Single alphanumerics
    +//                                     ; "x" reserved for private use
    +// singleton     = DIGIT               ; 0 - 9
    +//               / %x41-57             ; A - W
    +//               / %x59-5A             ; Y - Z
    +//               / %x61-77             ; a - w
    +//               / %x79-7A             ; y - z
    +var singleton = '[0-9a-wy-z]';
    +
    +// extension     = singleton 1*("-" (2*8alphanum))
    +var extension = singleton + '(?:-[a-z0-9]{2,8})+';
    +
    +// privateuse    = "x" 1*("-" (1*8alphanum))
    +var privateuse = 'x(?:-[a-z0-9]{1,8})+';
    +
    +// irregular     = "en-GB-oed"         ; irregular tags do not match
    +//               / "i-ami"             ; the 'langtag' production and
    +//               / "i-bnn"             ; would not otherwise be
    +//               / "i-default"         ; considered 'well-formed'
    +//               / "i-enochian"        ; These tags are all valid,
    +//               / "i-hak"             ; but most are deprecated
    +//               / "i-klingon"         ; in favor of more modern
    +//               / "i-lux"             ; subtags or subtag
    +//               / "i-mingo"           ; combination
    +//               / "i-navajo"
    +//               / "i-pwn"
    +//               / "i-tao"
    +//               / "i-tay"
    +//               / "i-tsu"
    +//               / "sgn-BE-FR"
    +//               / "sgn-BE-NL"
    +//               / "sgn-CH-DE"
    +var irregular = '(?:en-GB-oed' + '|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)' + '|sgn-(?:BE-FR|BE-NL|CH-DE))';
    +
    +// regular       = "art-lojban"        ; these tags match the 'langtag'
    +//               / "cel-gaulish"       ; production, but their subtags
    +//               / "no-bok"            ; are not extended language
    +//               / "no-nyn"            ; or variant subtags: their meaning
    +//               / "zh-guoyu"          ; is defined by their registration
    +//               / "zh-hakka"          ; and all of these are deprecated
    +//               / "zh-min"            ; in favor of a more modern
    +//               / "zh-min-nan"        ; subtag or sequence of subtags
    +//               / "zh-xiang"
    +var regular = '(?:art-lojban|cel-gaulish|no-bok|no-nyn' + '|zh-(?:guoyu|hakka|min|min-nan|xiang))';
    +
    +// grandfathered = irregular           ; non-redundant tags registered
    +//               / regular             ; during the RFC 3066 era
    +var grandfathered = '(?:' + irregular + '|' + regular + ')';
    +
    +// langtag       = language
    +//                 ["-" script]
    +//                 ["-" region]
    +//                 *("-" variant)
    +//                 *("-" extension)
    +//                 ["-" privateuse]
    +var langtag = language + '(?:-' + script + ')?(?:-' + region + ')?(?:-' + variant + ')*(?:-' + extension + ')*(?:-' + privateuse + ')?';
    +
    +// Language-Tag  = langtag             ; normal language tags
    +//               / privateuse          ; private use tag
    +//               / grandfathered       ; grandfathered tags
    +var expBCP47Syntax = RegExp('^(?:' + langtag + '|' + privateuse + '|' + grandfathered + ')$', 'i');
    +
    +// Match duplicate variants in a language tag
    +var expVariantDupes = RegExp('^(?!x).*?-(' + variant + ')-(?:\\w{4,8}-(?!x-))*\\1\\b', 'i');
    +
    +// Match duplicate singletons in a language tag (except in private use)
    +var expSingletonDupes = RegExp('^(?!x).*?-(' + singleton + ')-(?:\\w+-(?!x-))*\\1\\b', 'i');
    +
    +// Match all extension sequences
    +var expExtSequences = RegExp('-' + extension, 'ig');
    +
    +// Default locale is the first-added locale data for us
    +var defaultLocale = void 0;
    +function setDefaultLocale(locale) {
    +    defaultLocale = locale;
    +}
    +
    +// IANA Subtag Registry redundant tag and subtag maps
    +var redundantTags = {
    +    tags: {
    +        "art-lojban": "jbo",
    +        "i-ami": "ami",
    +        "i-bnn": "bnn",
    +        "i-hak": "hak",
    +        "i-klingon": "tlh",
    +        "i-lux": "lb",
    +        "i-navajo": "nv",
    +        "i-pwn": "pwn",
    +        "i-tao": "tao",
    +        "i-tay": "tay",
    +        "i-tsu": "tsu",
    +        "no-bok": "nb",
    +        "no-nyn": "nn",
    +        "sgn-BE-FR": "sfb",
    +        "sgn-BE-NL": "vgt",
    +        "sgn-CH-DE": "sgg",
    +        "zh-guoyu": "cmn",
    +        "zh-hakka": "hak",
    +        "zh-min-nan": "nan",
    +        "zh-xiang": "hsn",
    +        "sgn-BR": "bzs",
    +        "sgn-CO": "csn",
    +        "sgn-DE": "gsg",
    +        "sgn-DK": "dsl",
    +        "sgn-ES": "ssp",
    +        "sgn-FR": "fsl",
    +        "sgn-GB": "bfi",
    +        "sgn-GR": "gss",
    +        "sgn-IE": "isg",
    +        "sgn-IT": "ise",
    +        "sgn-JP": "jsl",
    +        "sgn-MX": "mfs",
    +        "sgn-NI": "ncs",
    +        "sgn-NL": "dse",
    +        "sgn-NO": "nsl",
    +        "sgn-PT": "psr",
    +        "sgn-SE": "swl",
    +        "sgn-US": "ase",
    +        "sgn-ZA": "sfs",
    +        "zh-cmn": "cmn",
    +        "zh-cmn-Hans": "cmn-Hans",
    +        "zh-cmn-Hant": "cmn-Hant",
    +        "zh-gan": "gan",
    +        "zh-wuu": "wuu",
    +        "zh-yue": "yue"
    +    },
    +    subtags: {
    +        BU: "MM",
    +        DD: "DE",
    +        FX: "FR",
    +        TP: "TL",
    +        YD: "YE",
    +        ZR: "CD",
    +        heploc: "alalc97",
    +        'in': "id",
    +        iw: "he",
    +        ji: "yi",
    +        jw: "jv",
    +        mo: "ro",
    +        ayx: "nun",
    +        bjd: "drl",
    +        ccq: "rki",
    +        cjr: "mom",
    +        cka: "cmr",
    +        cmk: "xch",
    +        drh: "khk",
    +        drw: "prs",
    +        gav: "dev",
    +        hrr: "jal",
    +        ibi: "opa",
    +        kgh: "kml",
    +        lcq: "ppr",
    +        mst: "mry",
    +        myt: "mry",
    +        sca: "hle",
    +        tie: "ras",
    +        tkk: "twm",
    +        tlw: "weo",
    +        tnf: "prs",
    +        ybd: "rki",
    +        yma: "lrr"
    +    },
    +    extLang: {
    +        aao: ["aao", "ar"],
    +        abh: ["abh", "ar"],
    +        abv: ["abv", "ar"],
    +        acm: ["acm", "ar"],
    +        acq: ["acq", "ar"],
    +        acw: ["acw", "ar"],
    +        acx: ["acx", "ar"],
    +        acy: ["acy", "ar"],
    +        adf: ["adf", "ar"],
    +        ads: ["ads", "sgn"],
    +        aeb: ["aeb", "ar"],
    +        aec: ["aec", "ar"],
    +        aed: ["aed", "sgn"],
    +        aen: ["aen", "sgn"],
    +        afb: ["afb", "ar"],
    +        afg: ["afg", "sgn"],
    +        ajp: ["ajp", "ar"],
    +        apc: ["apc", "ar"],
    +        apd: ["apd", "ar"],
    +        arb: ["arb", "ar"],
    +        arq: ["arq", "ar"],
    +        ars: ["ars", "ar"],
    +        ary: ["ary", "ar"],
    +        arz: ["arz", "ar"],
    +        ase: ["ase", "sgn"],
    +        asf: ["asf", "sgn"],
    +        asp: ["asp", "sgn"],
    +        asq: ["asq", "sgn"],
    +        asw: ["asw", "sgn"],
    +        auz: ["auz", "ar"],
    +        avl: ["avl", "ar"],
    +        ayh: ["ayh", "ar"],
    +        ayl: ["ayl", "ar"],
    +        ayn: ["ayn", "ar"],
    +        ayp: ["ayp", "ar"],
    +        bbz: ["bbz", "ar"],
    +        bfi: ["bfi", "sgn"],
    +        bfk: ["bfk", "sgn"],
    +        bjn: ["bjn", "ms"],
    +        bog: ["bog", "sgn"],
    +        bqn: ["bqn", "sgn"],
    +        bqy: ["bqy", "sgn"],
    +        btj: ["btj", "ms"],
    +        bve: ["bve", "ms"],
    +        bvl: ["bvl", "sgn"],
    +        bvu: ["bvu", "ms"],
    +        bzs: ["bzs", "sgn"],
    +        cdo: ["cdo", "zh"],
    +        cds: ["cds", "sgn"],
    +        cjy: ["cjy", "zh"],
    +        cmn: ["cmn", "zh"],
    +        coa: ["coa", "ms"],
    +        cpx: ["cpx", "zh"],
    +        csc: ["csc", "sgn"],
    +        csd: ["csd", "sgn"],
    +        cse: ["cse", "sgn"],
    +        csf: ["csf", "sgn"],
    +        csg: ["csg", "sgn"],
    +        csl: ["csl", "sgn"],
    +        csn: ["csn", "sgn"],
    +        csq: ["csq", "sgn"],
    +        csr: ["csr", "sgn"],
    +        czh: ["czh", "zh"],
    +        czo: ["czo", "zh"],
    +        doq: ["doq", "sgn"],
    +        dse: ["dse", "sgn"],
    +        dsl: ["dsl", "sgn"],
    +        dup: ["dup", "ms"],
    +        ecs: ["ecs", "sgn"],
    +        esl: ["esl", "sgn"],
    +        esn: ["esn", "sgn"],
    +        eso: ["eso", "sgn"],
    +        eth: ["eth", "sgn"],
    +        fcs: ["fcs", "sgn"],
    +        fse: ["fse", "sgn"],
    +        fsl: ["fsl", "sgn"],
    +        fss: ["fss", "sgn"],
    +        gan: ["gan", "zh"],
    +        gds: ["gds", "sgn"],
    +        gom: ["gom", "kok"],
    +        gse: ["gse", "sgn"],
    +        gsg: ["gsg", "sgn"],
    +        gsm: ["gsm", "sgn"],
    +        gss: ["gss", "sgn"],
    +        gus: ["gus", "sgn"],
    +        hab: ["hab", "sgn"],
    +        haf: ["haf", "sgn"],
    +        hak: ["hak", "zh"],
    +        hds: ["hds", "sgn"],
    +        hji: ["hji", "ms"],
    +        hks: ["hks", "sgn"],
    +        hos: ["hos", "sgn"],
    +        hps: ["hps", "sgn"],
    +        hsh: ["hsh", "sgn"],
    +        hsl: ["hsl", "sgn"],
    +        hsn: ["hsn", "zh"],
    +        icl: ["icl", "sgn"],
    +        ils: ["ils", "sgn"],
    +        inl: ["inl", "sgn"],
    +        ins: ["ins", "sgn"],
    +        ise: ["ise", "sgn"],
    +        isg: ["isg", "sgn"],
    +        isr: ["isr", "sgn"],
    +        jak: ["jak", "ms"],
    +        jax: ["jax", "ms"],
    +        jcs: ["jcs", "sgn"],
    +        jhs: ["jhs", "sgn"],
    +        jls: ["jls", "sgn"],
    +        jos: ["jos", "sgn"],
    +        jsl: ["jsl", "sgn"],
    +        jus: ["jus", "sgn"],
    +        kgi: ["kgi", "sgn"],
    +        knn: ["knn", "kok"],
    +        kvb: ["kvb", "ms"],
    +        kvk: ["kvk", "sgn"],
    +        kvr: ["kvr", "ms"],
    +        kxd: ["kxd", "ms"],
    +        lbs: ["lbs", "sgn"],
    +        lce: ["lce", "ms"],
    +        lcf: ["lcf", "ms"],
    +        liw: ["liw", "ms"],
    +        lls: ["lls", "sgn"],
    +        lsg: ["lsg", "sgn"],
    +        lsl: ["lsl", "sgn"],
    +        lso: ["lso", "sgn"],
    +        lsp: ["lsp", "sgn"],
    +        lst: ["lst", "sgn"],
    +        lsy: ["lsy", "sgn"],
    +        ltg: ["ltg", "lv"],
    +        lvs: ["lvs", "lv"],
    +        lzh: ["lzh", "zh"],
    +        max: ["max", "ms"],
    +        mdl: ["mdl", "sgn"],
    +        meo: ["meo", "ms"],
    +        mfa: ["mfa", "ms"],
    +        mfb: ["mfb", "ms"],
    +        mfs: ["mfs", "sgn"],
    +        min: ["min", "ms"],
    +        mnp: ["mnp", "zh"],
    +        mqg: ["mqg", "ms"],
    +        mre: ["mre", "sgn"],
    +        msd: ["msd", "sgn"],
    +        msi: ["msi", "ms"],
    +        msr: ["msr", "sgn"],
    +        mui: ["mui", "ms"],
    +        mzc: ["mzc", "sgn"],
    +        mzg: ["mzg", "sgn"],
    +        mzy: ["mzy", "sgn"],
    +        nan: ["nan", "zh"],
    +        nbs: ["nbs", "sgn"],
    +        ncs: ["ncs", "sgn"],
    +        nsi: ["nsi", "sgn"],
    +        nsl: ["nsl", "sgn"],
    +        nsp: ["nsp", "sgn"],
    +        nsr: ["nsr", "sgn"],
    +        nzs: ["nzs", "sgn"],
    +        okl: ["okl", "sgn"],
    +        orn: ["orn", "ms"],
    +        ors: ["ors", "ms"],
    +        pel: ["pel", "ms"],
    +        pga: ["pga", "ar"],
    +        pks: ["pks", "sgn"],
    +        prl: ["prl", "sgn"],
    +        prz: ["prz", "sgn"],
    +        psc: ["psc", "sgn"],
    +        psd: ["psd", "sgn"],
    +        pse: ["pse", "ms"],
    +        psg: ["psg", "sgn"],
    +        psl: ["psl", "sgn"],
    +        pso: ["pso", "sgn"],
    +        psp: ["psp", "sgn"],
    +        psr: ["psr", "sgn"],
    +        pys: ["pys", "sgn"],
    +        rms: ["rms", "sgn"],
    +        rsi: ["rsi", "sgn"],
    +        rsl: ["rsl", "sgn"],
    +        sdl: ["sdl", "sgn"],
    +        sfb: ["sfb", "sgn"],
    +        sfs: ["sfs", "sgn"],
    +        sgg: ["sgg", "sgn"],
    +        sgx: ["sgx", "sgn"],
    +        shu: ["shu", "ar"],
    +        slf: ["slf", "sgn"],
    +        sls: ["sls", "sgn"],
    +        sqk: ["sqk", "sgn"],
    +        sqs: ["sqs", "sgn"],
    +        ssh: ["ssh", "ar"],
    +        ssp: ["ssp", "sgn"],
    +        ssr: ["ssr", "sgn"],
    +        svk: ["svk", "sgn"],
    +        swc: ["swc", "sw"],
    +        swh: ["swh", "sw"],
    +        swl: ["swl", "sgn"],
    +        syy: ["syy", "sgn"],
    +        tmw: ["tmw", "ms"],
    +        tse: ["tse", "sgn"],
    +        tsm: ["tsm", "sgn"],
    +        tsq: ["tsq", "sgn"],
    +        tss: ["tss", "sgn"],
    +        tsy: ["tsy", "sgn"],
    +        tza: ["tza", "sgn"],
    +        ugn: ["ugn", "sgn"],
    +        ugy: ["ugy", "sgn"],
    +        ukl: ["ukl", "sgn"],
    +        uks: ["uks", "sgn"],
    +        urk: ["urk", "ms"],
    +        uzn: ["uzn", "uz"],
    +        uzs: ["uzs", "uz"],
    +        vgt: ["vgt", "sgn"],
    +        vkk: ["vkk", "ms"],
    +        vkt: ["vkt", "ms"],
    +        vsi: ["vsi", "sgn"],
    +        vsl: ["vsl", "sgn"],
    +        vsv: ["vsv", "sgn"],
    +        wuu: ["wuu", "zh"],
    +        xki: ["xki", "sgn"],
    +        xml: ["xml", "sgn"],
    +        xmm: ["xmm", "ms"],
    +        xms: ["xms", "sgn"],
    +        yds: ["yds", "sgn"],
    +        ysl: ["ysl", "sgn"],
    +        yue: ["yue", "zh"],
    +        zib: ["zib", "sgn"],
    +        zlm: ["zlm", "ms"],
    +        zmi: ["zmi", "ms"],
    +        zsl: ["zsl", "sgn"],
    +        zsm: ["zsm", "ms"]
    +    }
    +};
    +
    +/**
    + * Convert only a-z to uppercase as per section 6.1 of the spec
    + */
    +function toLatinUpperCase(str) {
    +    var i = str.length;
    +
    +    while (i--) {
    +        var ch = str.charAt(i);
    +
    +        if (ch >= "a" && ch <= "z") str = str.slice(0, i) + ch.toUpperCase() + str.slice(i + 1);
    +    }
    +
    +    return str;
    +}
    +
    +/**
    + * The IsStructurallyValidLanguageTag abstract operation verifies that the locale
    + * argument (which must be a String value)
    + *
    + * - represents a well-formed BCP 47 language tag as specified in RFC 5646 section
    + *   2.1, or successor,
    + * - does not include duplicate variant subtags, and
    + * - does not include duplicate singleton subtags.
    + *
    + * The abstract operation returns true if locale can be generated from the ABNF
    + * grammar in section 2.1 of the RFC, starting with Language-Tag, and does not
    + * contain duplicate variant or singleton subtags (other than as a private use
    + * subtag). It returns false otherwise. Terminal value characters in the grammar are
    + * interpreted as the Unicode equivalents of the ASCII octet values given.
    + */
    +function /* 6.2.2 */IsStructurallyValidLanguageTag(locale) {
    +    // represents a well-formed BCP 47 language tag as specified in RFC 5646
    +    if (!expBCP47Syntax.test(locale)) return false;
    +
    +    // does not include duplicate variant subtags, and
    +    if (expVariantDupes.test(locale)) return false;
    +
    +    // does not include duplicate singleton subtags.
    +    if (expSingletonDupes.test(locale)) return false;
    +
    +    return true;
    +}
    +
    +/**
    + * The CanonicalizeLanguageTag abstract operation returns the canonical and case-
    + * regularized form of the locale argument (which must be a String value that is
    + * a structurally valid BCP 47 language tag as verified by the
    + * IsStructurallyValidLanguageTag abstract operation). It takes the steps
    + * specified in RFC 5646 section 4.5, or successor, to bring the language tag
    + * into canonical form, and to regularize the case of the subtags, but does not
    + * take the steps to bring a language tag into “extlang form” and to reorder
    + * variant subtags.
    +
    + * The specifications for extensions to BCP 47 language tags, such as RFC 6067,
    + * may include canonicalization rules for the extension subtag sequences they
    + * define that go beyond the canonicalization rules of RFC 5646 section 4.5.
    + * Implementations are allowed, but not required, to apply these additional rules.
    + */
    +function /* 6.2.3 */CanonicalizeLanguageTag(locale) {
    +    var match = void 0,
    +        parts = void 0;
    +
    +    // A language tag is in 'canonical form' when the tag is well-formed
    +    // according to the rules in Sections 2.1 and 2.2
    +
    +    // Section 2.1 says all subtags use lowercase...
    +    locale = locale.toLowerCase();
    +
    +    // ...with 2 exceptions: 'two-letter and four-letter subtags that neither
    +    // appear at the start of the tag nor occur after singletons.  Such two-letter
    +    // subtags are all uppercase (as in the tags "en-CA-x-ca" or "sgn-BE-FR") and
    +    // four-letter subtags are titlecase (as in the tag "az-Latn-x-latn").
    +    parts = locale.split('-');
    +    for (var i = 1, max = parts.length; i < max; i++) {
    +        // Two-letter subtags are all uppercase
    +        if (parts[i].length === 2) parts[i] = parts[i].toUpperCase();
    +
    +        // Four-letter subtags are titlecase
    +        else if (parts[i].length === 4) parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);
    +
    +            // Is it a singleton?
    +            else if (parts[i].length === 1 && parts[i] !== 'x') break;
    +    }
    +    locale = arrJoin.call(parts, '-');
    +
    +    // The steps laid out in RFC 5646 section 4.5 are as follows:
    +
    +    // 1.  Extension sequences are ordered into case-insensitive ASCII order
    +    //     by singleton subtag.
    +    if ((match = locale.match(expExtSequences)) && match.length > 1) {
    +        // The built-in sort() sorts by ASCII order, so use that
    +        match.sort();
    +
    +        // Replace all extensions with the joined, sorted array
    +        locale = locale.replace(RegExp('(?:' + expExtSequences.source + ')+', 'i'), arrJoin.call(match, ''));
    +    }
    +
    +    // 2.  Redundant or grandfathered tags are replaced by their 'Preferred-
    +    //     Value', if there is one.
    +    if (hop.call(redundantTags.tags, locale)) locale = redundantTags.tags[locale];
    +
    +    // 3.  Subtags are replaced by their 'Preferred-Value', if there is one.
    +    //     For extlangs, the original primary language subtag is also
    +    //     replaced if there is a primary language subtag in the 'Preferred-
    +    //     Value'.
    +    parts = locale.split('-');
    +
    +    for (var _i = 1, _max = parts.length; _i < _max; _i++) {
    +        if (hop.call(redundantTags.subtags, parts[_i])) parts[_i] = redundantTags.subtags[parts[_i]];else if (hop.call(redundantTags.extLang, parts[_i])) {
    +            parts[_i] = redundantTags.extLang[parts[_i]][0];
    +
    +            // For extlang tags, the prefix needs to be removed if it is redundant
    +            if (_i === 1 && redundantTags.extLang[parts[1]][1] === parts[0]) {
    +                parts = arrSlice.call(parts, _i++);
    +                _max -= 1;
    +            }
    +        }
    +    }
    +
    +    return arrJoin.call(parts, '-');
    +}
    +
    +/**
    + * The DefaultLocale abstract operation returns a String value representing the
    + * structurally valid (6.2.2) and canonicalized (6.2.3) BCP 47 language tag for the
    + * host environment’s current locale.
    + */
    +function /* 6.2.4 */DefaultLocale() {
    +    return defaultLocale;
    +}
    +
    +// Sect 6.3 Currency Codes
    +// =======================
    +
    +var expCurrencyCode = /^[A-Z]{3}$/;
    +
    +/**
    + * The IsWellFormedCurrencyCode abstract operation verifies that the currency argument
    + * (after conversion to a String value) represents a well-formed 3-letter ISO currency
    + * code. The following steps are taken:
    + */
    +function /* 6.3.1 */IsWellFormedCurrencyCode(currency) {
    +    // 1. Let `c` be ToString(currency)
    +    var c = String(currency);
    +
    +    // 2. Let `normalized` be the result of mapping c to upper case as described
    +    //    in 6.1.
    +    var normalized = toLatinUpperCase(c);
    +
    +    // 3. If the string length of normalized is not 3, return false.
    +    // 4. If normalized contains any character that is not in the range "A" to "Z"
    +    //    (U+0041 to U+005A), return false.
    +    if (expCurrencyCode.test(normalized) === false) return false;
    +
    +    // 5. Return true
    +    return true;
    +}
    +
    +var expUnicodeExSeq = /-u(?:-[0-9a-z]{2,8})+/gi; // See `extension` below
    +
    +function /* 9.2.1 */CanonicalizeLocaleList(locales) {
    +    // The abstract operation CanonicalizeLocaleList takes the following steps:
    +
    +    // 1. If locales is undefined, then a. Return a new empty List
    +    if (locales === undefined) return new List();
    +
    +    // 2. Let seen be a new empty List.
    +    var seen = new List();
    +
    +    // 3. If locales is a String value, then
    +    //    a. Let locales be a new array created as if by the expression new
    +    //    Array(locales) where Array is the standard built-in constructor with
    +    //    that name and locales is the value of locales.
    +    locales = typeof locales === 'string' ? [locales] : locales;
    +
    +    // 4. Let O be ToObject(locales).
    +    var O = toObject(locales);
    +
    +    // 5. Let lenValue be the result of calling the [[Get]] internal method of
    +    //    O with the argument "length".
    +    // 6. Let len be ToUint32(lenValue).
    +    var len = toLength(O.length);
    +
    +    // 7. Let k be 0.
    +    var k = 0;
    +
    +    // 8. Repeat, while k < len
    +    while (k < len) {
    +        // a. Let Pk be ToString(k).
    +        var Pk = String(k);
    +
    +        // b. Let kPresent be the result of calling the [[HasProperty]] internal
    +        //    method of O with argument Pk.
    +        var kPresent = Pk in O;
    +
    +        // c. If kPresent is true, then
    +        if (kPresent) {
    +            // i. Let kValue be the result of calling the [[Get]] internal
    +            //     method of O with argument Pk.
    +            var kValue = O[Pk];
    +
    +            // ii. If the type of kValue is not String or Object, then throw a
    +            //     TypeError exception.
    +            if (kValue === null || typeof kValue !== 'string' && (typeof kValue === "undefined" ? "undefined" : babelHelpers$1["typeof"](kValue)) !== 'object') throw new TypeError('String or Object type expected');
    +
    +            // iii. Let tag be ToString(kValue).
    +            var tag = String(kValue);
    +
    +            // iv. If the result of calling the abstract operation
    +            //     IsStructurallyValidLanguageTag (defined in 6.2.2), passing tag as
    +            //     the argument, is false, then throw a RangeError exception.
    +            if (!IsStructurallyValidLanguageTag(tag)) throw new RangeError("'" + tag + "' is not a structurally valid language tag");
    +
    +            // v. Let tag be the result of calling the abstract operation
    +            //    CanonicalizeLanguageTag (defined in 6.2.3), passing tag as the
    +            //    argument.
    +            tag = CanonicalizeLanguageTag(tag);
    +
    +            // vi. If tag is not an element of seen, then append tag as the last
    +            //     element of seen.
    +            if (arrIndexOf.call(seen, tag) === -1) arrPush.call(seen, tag);
    +        }
    +
    +        // d. Increase k by 1.
    +        k++;
    +    }
    +
    +    // 9. Return seen.
    +    return seen;
    +}
    +
    +/**
    + * The BestAvailableLocale abstract operation compares the provided argument
    + * locale, which must be a String value with a structurally valid and
    + * canonicalized BCP 47 language tag, against the locales in availableLocales and
    + * returns either the longest non-empty prefix of locale that is an element of
    + * availableLocales, or undefined if there is no such element. It uses the
    + * fallback mechanism of RFC 4647, section 3.4. The following steps are taken:
    + */
    +function /* 9.2.2 */BestAvailableLocale(availableLocales, locale) {
    +    // 1. Let candidate be locale
    +    var candidate = locale;
    +
    +    // 2. Repeat
    +    while (candidate) {
    +        // a. If availableLocales contains an element equal to candidate, then return
    +        // candidate.
    +        if (arrIndexOf.call(availableLocales, candidate) > -1) return candidate;
    +
    +        // b. Let pos be the character index of the last occurrence of "-"
    +        // (U+002D) within candidate. If that character does not occur, return
    +        // undefined.
    +        var pos = candidate.lastIndexOf('-');
    +
    +        if (pos < 0) return;
    +
    +        // c. If pos ≥ 2 and the character "-" occurs at index pos-2 of candidate,
    +        //    then decrease pos by 2.
    +        if (pos >= 2 && candidate.charAt(pos - 2) === '-') pos -= 2;
    +
    +        // d. Let candidate be the substring of candidate from position 0, inclusive,
    +        //    to position pos, exclusive.
    +        candidate = candidate.substring(0, pos);
    +    }
    +}
    +
    +/**
    + * The LookupMatcher abstract operation compares requestedLocales, which must be
    + * a List as returned by CanonicalizeLocaleList, against the locales in
    + * availableLocales and determines the best available language to meet the
    + * request. The following steps are taken:
    + */
    +function /* 9.2.3 */LookupMatcher(availableLocales, requestedLocales) {
    +    // 1. Let i be 0.
    +    var i = 0;
    +
    +    // 2. Let len be the number of elements in requestedLocales.
    +    var len = requestedLocales.length;
    +
    +    // 3. Let availableLocale be undefined.
    +    var availableLocale = void 0;
    +
    +    var locale = void 0,
    +        noExtensionsLocale = void 0;
    +
    +    // 4. Repeat while i < len and availableLocale is undefined:
    +    while (i < len && !availableLocale) {
    +        // a. Let locale be the element of requestedLocales at 0-origined list
    +        //    position i.
    +        locale = requestedLocales[i];
    +
    +        // b. Let noExtensionsLocale be the String value that is locale with all
    +        //    Unicode locale extension sequences removed.
    +        noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');
    +
    +        // c. Let availableLocale be the result of calling the
    +        //    BestAvailableLocale abstract operation (defined in 9.2.2) with
    +        //    arguments availableLocales and noExtensionsLocale.
    +        availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);
    +
    +        // d. Increase i by 1.
    +        i++;
    +    }
    +
    +    // 5. Let result be a new Record.
    +    var result = new Record();
    +
    +    // 6. If availableLocale is not undefined, then
    +    if (availableLocale !== undefined) {
    +        // a. Set result.[[locale]] to availableLocale.
    +        result['[[locale]]'] = availableLocale;
    +
    +        // b. If locale and noExtensionsLocale are not the same String value, then
    +        if (String(locale) !== String(noExtensionsLocale)) {
    +            // i. Let extension be the String value consisting of the first
    +            //    substring of locale that is a Unicode locale extension sequence.
    +            var extension = locale.match(expUnicodeExSeq)[0];
    +
    +            // ii. Let extensionIndex be the character position of the initial
    +            //     "-" of the first Unicode locale extension sequence within locale.
    +            var extensionIndex = locale.indexOf('-u-');
    +
    +            // iii. Set result.[[extension]] to extension.
    +            result['[[extension]]'] = extension;
    +
    +            // iv. Set result.[[extensionIndex]] to extensionIndex.
    +            result['[[extensionIndex]]'] = extensionIndex;
    +        }
    +    }
    +    // 7. Else
    +    else
    +        // a. Set result.[[locale]] to the value returned by the DefaultLocale abstract
    +        //    operation (defined in 6.2.4).
    +        result['[[locale]]'] = DefaultLocale();
    +
    +    // 8. Return result
    +    return result;
    +}
    +
    +/**
    + * The BestFitMatcher abstract operation compares requestedLocales, which must be
    + * a List as returned by CanonicalizeLocaleList, against the locales in
    + * availableLocales and determines the best available language to meet the
    + * request. The algorithm is implementation dependent, but should produce results
    + * that a typical user of the requested locales would perceive as at least as
    + * good as those produced by the LookupMatcher abstract operation. Options
    + * specified through Unicode locale extension sequences must be ignored by the
    + * algorithm. Information about such subsequences is returned separately.
    + * The abstract operation returns a record with a [[locale]] field, whose value
    + * is the language tag of the selected locale, which must be an element of
    + * availableLocales. If the language tag of the request locale that led to the
    + * selected locale contained a Unicode locale extension sequence, then the
    + * returned record also contains an [[extension]] field whose value is the first
    + * Unicode locale extension sequence, and an [[extensionIndex]] field whose value
    + * is the index of the first Unicode locale extension sequence within the request
    + * locale language tag.
    + */
    +function /* 9.2.4 */BestFitMatcher(availableLocales, requestedLocales) {
    +    return LookupMatcher(availableLocales, requestedLocales);
    +}
    +
    +/**
    + * The ResolveLocale abstract operation compares a BCP 47 language priority list
    + * requestedLocales against the locales in availableLocales and determines the
    + * best available language to meet the request. availableLocales and
    + * requestedLocales must be provided as List values, options as a Record.
    + */
    +function /* 9.2.5 */ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) {
    +    if (availableLocales.length === 0) {
    +        throw new ReferenceError('No locale data has been provided for this object yet.');
    +    }
    +
    +    // The following steps are taken:
    +    // 1. Let matcher be the value of options.[[localeMatcher]].
    +    var matcher = options['[[localeMatcher]]'];
    +
    +    var r = void 0;
    +
    +    // 2. If matcher is "lookup", then
    +    if (matcher === 'lookup')
    +        // a. Let r be the result of calling the LookupMatcher abstract operation
    +        //    (defined in 9.2.3) with arguments availableLocales and
    +        //    requestedLocales.
    +        r = LookupMatcher(availableLocales, requestedLocales);
    +
    +        // 3. Else
    +    else
    +        // a. Let r be the result of calling the BestFitMatcher abstract
    +        //    operation (defined in 9.2.4) with arguments availableLocales and
    +        //    requestedLocales.
    +        r = BestFitMatcher(availableLocales, requestedLocales);
    +
    +    // 4. Let foundLocale be the value of r.[[locale]].
    +    var foundLocale = r['[[locale]]'];
    +
    +    var extensionSubtags = void 0,
    +        extensionSubtagsLength = void 0;
    +
    +    // 5. If r has an [[extension]] field, then
    +    if (hop.call(r, '[[extension]]')) {
    +        // a. Let extension be the value of r.[[extension]].
    +        var extension = r['[[extension]]'];
    +        // b. Let split be the standard built-in function object defined in ES5,
    +        //    15.5.4.14.
    +        var split = String.prototype.split;
    +        // c. Let extensionSubtags be the result of calling the [[Call]] internal
    +        //    method of split with extension as the this value and an argument
    +        //    list containing the single item "-".
    +        extensionSubtags = split.call(extension, '-');
    +        // d. Let extensionSubtagsLength be the result of calling the [[Get]]
    +        //    internal method of extensionSubtags with argument "length".
    +        extensionSubtagsLength = extensionSubtags.length;
    +    }
    +
    +    // 6. Let result be a new Record.
    +    var result = new Record();
    +
    +    // 7. Set result.[[dataLocale]] to foundLocale.
    +    result['[[dataLocale]]'] = foundLocale;
    +
    +    // 8. Let supportedExtension be "-u".
    +    var supportedExtension = '-u';
    +    // 9. Let i be 0.
    +    var i = 0;
    +    // 10. Let len be the result of calling the [[Get]] internal method of
    +    //     relevantExtensionKeys with argument "length".
    +    var len = relevantExtensionKeys.length;
    +
    +    // 11 Repeat while i < len:
    +    while (i < len) {
    +        // a. Let key be the result of calling the [[Get]] internal method of
    +        //    relevantExtensionKeys with argument ToString(i).
    +        var key = relevantExtensionKeys[i];
    +        // b. Let foundLocaleData be the result of calling the [[Get]] internal
    +        //    method of localeData with the argument foundLocale.
    +        var foundLocaleData = localeData[foundLocale];
    +        // c. Let keyLocaleData be the result of calling the [[Get]] internal
    +        //    method of foundLocaleData with the argument key.
    +        var keyLocaleData = foundLocaleData[key];
    +        // d. Let value be the result of calling the [[Get]] internal method of
    +        //    keyLocaleData with argument "0".
    +        var value = keyLocaleData['0'];
    +        // e. Let supportedExtensionAddition be "".
    +        var supportedExtensionAddition = '';
    +        // f. Let indexOf be the standard built-in function object defined in
    +        //    ES5, 15.4.4.14.
    +        var indexOf = arrIndexOf;
    +
    +        // g. If extensionSubtags is not undefined, then
    +        if (extensionSubtags !== undefined) {
    +            // i. Let keyPos be the result of calling the [[Call]] internal
    +            //    method of indexOf with extensionSubtags as the this value and
    +            // an argument list containing the single item key.
    +            var keyPos = indexOf.call(extensionSubtags, key);
    +
    +            // ii. If keyPos ≠ -1, then
    +            if (keyPos !== -1) {
    +                // 1. If keyPos + 1 < extensionSubtagsLength and the length of the
    +                //    result of calling the [[Get]] internal method of
    +                //    extensionSubtags with argument ToString(keyPos +1) is greater
    +                //    than 2, then
    +                if (keyPos + 1 < extensionSubtagsLength && extensionSubtags[keyPos + 1].length > 2) {
    +                    // a. Let requestedValue be the result of calling the [[Get]]
    +                    //    internal method of extensionSubtags with argument
    +                    //    ToString(keyPos + 1).
    +                    var requestedValue = extensionSubtags[keyPos + 1];
    +                    // b. Let valuePos be the result of calling the [[Call]]
    +                    //    internal method of indexOf with keyLocaleData as the
    +                    //    this value and an argument list containing the single
    +                    //    item requestedValue.
    +                    var valuePos = indexOf.call(keyLocaleData, requestedValue);
    +
    +                    // c. If valuePos ≠ -1, then
    +                    if (valuePos !== -1) {
    +                        // i. Let value be requestedValue.
    +                        value = requestedValue,
    +                        // ii. Let supportedExtensionAddition be the
    +                        //     concatenation of "-", key, "-", and value.
    +                        supportedExtensionAddition = '-' + key + '-' + value;
    +                    }
    +                }
    +                // 2. Else
    +                else {
    +                        // a. Let valuePos be the result of calling the [[Call]]
    +                        // internal method of indexOf with keyLocaleData as the this
    +                        // value and an argument list containing the single item
    +                        // "true".
    +                        var _valuePos = indexOf(keyLocaleData, 'true');
    +
    +                        // b. If valuePos ≠ -1, then
    +                        if (_valuePos !== -1)
    +                            // i. Let value be "true".
    +                            value = 'true';
    +                    }
    +            }
    +        }
    +        // h. If options has a field [[]], then
    +        if (hop.call(options, '[[' + key + ']]')) {
    +            // i. Let optionsValue be the value of options.[[]].
    +            var optionsValue = options['[[' + key + ']]'];
    +
    +            // ii. If the result of calling the [[Call]] internal method of indexOf
    +            //     with keyLocaleData as the this value and an argument list
    +            //     containing the single item optionsValue is not -1, then
    +            if (indexOf.call(keyLocaleData, optionsValue) !== -1) {
    +                // 1. If optionsValue is not equal to value, then
    +                if (optionsValue !== value) {
    +                    // a. Let value be optionsValue.
    +                    value = optionsValue;
    +                    // b. Let supportedExtensionAddition be "".
    +                    supportedExtensionAddition = '';
    +                }
    +            }
    +        }
    +        // i. Set result.[[]] to value.
    +        result['[[' + key + ']]'] = value;
    +
    +        // j. Append supportedExtensionAddition to supportedExtension.
    +        supportedExtension += supportedExtensionAddition;
    +
    +        // k. Increase i by 1.
    +        i++;
    +    }
    +    // 12. If the length of supportedExtension is greater than 2, then
    +    if (supportedExtension.length > 2) {
    +        // a.
    +        var privateIndex = foundLocale.indexOf("-x-");
    +        // b.
    +        if (privateIndex === -1) {
    +            // i.
    +            foundLocale = foundLocale + supportedExtension;
    +        }
    +        // c.
    +        else {
    +                // i.
    +                var preExtension = foundLocale.substring(0, privateIndex);
    +                // ii.
    +                var postExtension = foundLocale.substring(privateIndex);
    +                // iii.
    +                foundLocale = preExtension + supportedExtension + postExtension;
    +            }
    +        // d. asserting - skipping
    +        // e.
    +        foundLocale = CanonicalizeLanguageTag(foundLocale);
    +    }
    +    // 13. Set result.[[locale]] to foundLocale.
    +    result['[[locale]]'] = foundLocale;
    +
    +    // 14. Return result.
    +    return result;
    +}
    +
    +/**
    + * The LookupSupportedLocales abstract operation returns the subset of the
    + * provided BCP 47 language priority list requestedLocales for which
    + * availableLocales has a matching locale when using the BCP 47 Lookup algorithm.
    + * Locales appear in the same order in the returned list as in requestedLocales.
    + * The following steps are taken:
    + */
    +function /* 9.2.6 */LookupSupportedLocales(availableLocales, requestedLocales) {
    +    // 1. Let len be the number of elements in requestedLocales.
    +    var len = requestedLocales.length;
    +    // 2. Let subset be a new empty List.
    +    var subset = new List();
    +    // 3. Let k be 0.
    +    var k = 0;
    +
    +    // 4. Repeat while k < len
    +    while (k < len) {
    +        // a. Let locale be the element of requestedLocales at 0-origined list
    +        //    position k.
    +        var locale = requestedLocales[k];
    +        // b. Let noExtensionsLocale be the String value that is locale with all
    +        //    Unicode locale extension sequences removed.
    +        var noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');
    +        // c. Let availableLocale be the result of calling the
    +        //    BestAvailableLocale abstract operation (defined in 9.2.2) with
    +        //    arguments availableLocales and noExtensionsLocale.
    +        var availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);
    +
    +        // d. If availableLocale is not undefined, then append locale to the end of
    +        //    subset.
    +        if (availableLocale !== undefined) arrPush.call(subset, locale);
    +
    +        // e. Increment k by 1.
    +        k++;
    +    }
    +
    +    // 5. Let subsetArray be a new Array object whose elements are the same
    +    //    values in the same order as the elements of subset.
    +    var subsetArray = arrSlice.call(subset);
    +
    +    // 6. Return subsetArray.
    +    return subsetArray;
    +}
    +
    +/**
    + * The BestFitSupportedLocales abstract operation returns the subset of the
    + * provided BCP 47 language priority list requestedLocales for which
    + * availableLocales has a matching locale when using the Best Fit Matcher
    + * algorithm. Locales appear in the same order in the returned list as in
    + * requestedLocales. The steps taken are implementation dependent.
    + */
    +function /*9.2.7 */BestFitSupportedLocales(availableLocales, requestedLocales) {
    +    // ###TODO: implement this function as described by the specification###
    +    return LookupSupportedLocales(availableLocales, requestedLocales);
    +}
    +
    +/**
    + * The SupportedLocales abstract operation returns the subset of the provided BCP
    + * 47 language priority list requestedLocales for which availableLocales has a
    + * matching locale. Two algorithms are available to match the locales: the Lookup
    + * algorithm described in RFC 4647 section 3.4, and an implementation dependent
    + * best-fit algorithm. Locales appear in the same order in the returned list as
    + * in requestedLocales. The following steps are taken:
    + */
    +function /*9.2.8 */SupportedLocales(availableLocales, requestedLocales, options) {
    +    var matcher = void 0,
    +        subset = void 0;
    +
    +    // 1. If options is not undefined, then
    +    if (options !== undefined) {
    +        // a. Let options be ToObject(options).
    +        options = new Record(toObject(options));
    +        // b. Let matcher be the result of calling the [[Get]] internal method of
    +        //    options with argument "localeMatcher".
    +        matcher = options.localeMatcher;
    +
    +        // c. If matcher is not undefined, then
    +        if (matcher !== undefined) {
    +            // i. Let matcher be ToString(matcher).
    +            matcher = String(matcher);
    +
    +            // ii. If matcher is not "lookup" or "best fit", then throw a RangeError
    +            //     exception.
    +            if (matcher !== 'lookup' && matcher !== 'best fit') throw new RangeError('matcher should be "lookup" or "best fit"');
    +        }
    +    }
    +    // 2. If matcher is undefined or "best fit", then
    +    if (matcher === undefined || matcher === 'best fit')
    +        // a. Let subset be the result of calling the BestFitSupportedLocales
    +        //    abstract operation (defined in 9.2.7) with arguments
    +        //    availableLocales and requestedLocales.
    +        subset = BestFitSupportedLocales(availableLocales, requestedLocales);
    +        // 3. Else
    +    else
    +        // a. Let subset be the result of calling the LookupSupportedLocales
    +        //    abstract operation (defined in 9.2.6) with arguments
    +        //    availableLocales and requestedLocales.
    +        subset = LookupSupportedLocales(availableLocales, requestedLocales);
    +
    +    // 4. For each named own property name P of subset,
    +    for (var P in subset) {
    +        if (!hop.call(subset, P)) continue;
    +
    +        // a. Let desc be the result of calling the [[GetOwnProperty]] internal
    +        //    method of subset with P.
    +        // b. Set desc.[[Writable]] to false.
    +        // c. Set desc.[[Configurable]] to false.
    +        // d. Call the [[DefineOwnProperty]] internal method of subset with P, desc,
    +        //    and true as arguments.
    +        defineProperty(subset, P, {
    +            writable: false, configurable: false, value: subset[P]
    +        });
    +    }
    +    // "Freeze" the array so no new elements can be added
    +    defineProperty(subset, 'length', { writable: false });
    +
    +    // 5. Return subset
    +    return subset;
    +}
    +
    +/**
    + * The GetOption abstract operation extracts the value of the property named
    + * property from the provided options object, converts it to the required type,
    + * checks whether it is one of a List of allowed values, and fills in a fallback
    + * value if necessary.
    + */
    +function /*9.2.9 */GetOption(options, property, type, values, fallback) {
    +    // 1. Let value be the result of calling the [[Get]] internal method of
    +    //    options with argument property.
    +    var value = options[property];
    +
    +    // 2. If value is not undefined, then
    +    if (value !== undefined) {
    +        // a. Assert: type is "boolean" or "string".
    +        // b. If type is "boolean", then let value be ToBoolean(value).
    +        // c. If type is "string", then let value be ToString(value).
    +        value = type === 'boolean' ? Boolean(value) : type === 'string' ? String(value) : value;
    +
    +        // d. If values is not undefined, then
    +        if (values !== undefined) {
    +            // i. If values does not contain an element equal to value, then throw a
    +            //    RangeError exception.
    +            if (arrIndexOf.call(values, value) === -1) throw new RangeError("'" + value + "' is not an allowed value for `" + property + '`');
    +        }
    +
    +        // e. Return value.
    +        return value;
    +    }
    +    // Else return fallback.
    +    return fallback;
    +}
    +
    +/**
    + * The GetNumberOption abstract operation extracts a property value from the
    + * provided options object, converts it to a Number value, checks whether it is
    + * in the allowed range, and fills in a fallback value if necessary.
    + */
    +function /* 9.2.10 */GetNumberOption(options, property, minimum, maximum, fallback) {
    +    // 1. Let value be the result of calling the [[Get]] internal method of
    +    //    options with argument property.
    +    var value = options[property];
    +
    +    // 2. If value is not undefined, then
    +    if (value !== undefined) {
    +        // a. Let value be ToNumber(value).
    +        value = Number(value);
    +
    +        // b. If value is NaN or less than minimum or greater than maximum, throw a
    +        //    RangeError exception.
    +        if (isNaN(value) || value < minimum || value > maximum) throw new RangeError('Value is not a number or outside accepted range');
    +
    +        // c. Return floor(value).
    +        return Math.floor(value);
    +    }
    +    // 3. Else return fallback.
    +    return fallback;
    +}
    +
    +// 8 The Intl Object
    +var Intl = {};
    +
    +// 8.2 Function Properties of the Intl Object
    +
    +// 8.2.1
    +// @spec[tc39/ecma402/master/spec/intl.html]
    +// @clause[sec-intl.getcanonicallocales]
    +function getCanonicalLocales(locales) {
    +    // 1. Let ll be ? CanonicalizeLocaleList(locales).
    +    var ll = CanonicalizeLocaleList(locales);
    +    // 2. Return CreateArrayFromList(ll).
    +    {
    +        var result = [];
    +
    +        var len = ll.length;
    +        var k = 0;
    +
    +        while (k < len) {
    +            result[k] = ll[k];
    +            k++;
    +        }
    +        return result;
    +    }
    +}
    +
    +Object.defineProperty(Intl, 'getCanonicalLocales', {
    +    enumerable: false,
    +    configurable: true,
    +    writable: true,
    +    value: getCanonicalLocales
    +});
    +
    +// Currency minor units output from get-4217 grunt task, formatted
    +var currencyMinorUnits = {
    +    BHD: 3, BYR: 0, XOF: 0, BIF: 0, XAF: 0, CLF: 4, CLP: 0, KMF: 0, DJF: 0,
    +    XPF: 0, GNF: 0, ISK: 0, IQD: 3, JPY: 0, JOD: 3, KRW: 0, KWD: 3, LYD: 3,
    +    OMR: 3, PYG: 0, RWF: 0, TND: 3, UGX: 0, UYI: 0, VUV: 0, VND: 0
    +};
    +
    +// Define the NumberFormat constructor internally so it cannot be tainted
    +function NumberFormatConstructor() {
    +    var locales = arguments[0];
    +    var options = arguments[1];
    +
    +    if (!this || this === Intl) {
    +        return new Intl.NumberFormat(locales, options);
    +    }
    +
    +    return InitializeNumberFormat(toObject(this), locales, options);
    +}
    +
    +defineProperty(Intl, 'NumberFormat', {
    +    configurable: true,
    +    writable: true,
    +    value: NumberFormatConstructor
    +});
    +
    +// Must explicitly set prototypes as unwritable
    +defineProperty(Intl.NumberFormat, 'prototype', {
    +    writable: false
    +});
    +
    +/**
    + * The abstract operation InitializeNumberFormat accepts the arguments
    + * numberFormat (which must be an object), locales, and options. It initializes
    + * numberFormat as a NumberFormat object.
    + */
    +function /*11.1.1.1 */InitializeNumberFormat(numberFormat, locales, options) {
    +    // This will be a internal properties object if we're not already initialized
    +    var internal = getInternalProperties(numberFormat);
    +
    +    // Create an object whose props can be used to restore the values of RegExp props
    +    var regexpRestore = createRegExpRestore();
    +
    +    // 1. If numberFormat has an [[initializedIntlObject]] internal property with
    +    // value true, throw a TypeError exception.
    +    if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');
    +
    +    // Need this to access the `internal` object
    +    defineProperty(numberFormat, '__getInternalProperties', {
    +        value: function value() {
    +            // NOTE: Non-standard, for internal use only
    +            if (arguments[0] === secret) return internal;
    +        }
    +    });
    +
    +    // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.
    +    internal['[[initializedIntlObject]]'] = true;
    +
    +    // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
    +    //    abstract operation (defined in 9.2.1) with argument locales.
    +    var requestedLocales = CanonicalizeLocaleList(locales);
    +
    +    // 4. If options is undefined, then
    +    if (options === undefined)
    +        // a. Let options be the result of creating a new object as if by the
    +        // expression new Object() where Object is the standard built-in constructor
    +        // with that name.
    +        options = {};
    +
    +        // 5. Else
    +    else
    +        // a. Let options be ToObject(options).
    +        options = toObject(options);
    +
    +    // 6. Let opt be a new Record.
    +    var opt = new Record(),
    +
    +
    +    // 7. Let matcher be the result of calling the GetOption abstract operation
    +    //    (defined in 9.2.9) with the arguments options, "localeMatcher", "string",
    +    //    a List containing the two String values "lookup" and "best fit", and
    +    //    "best fit".
    +    matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');
    +
    +    // 8. Set opt.[[localeMatcher]] to matcher.
    +    opt['[[localeMatcher]]'] = matcher;
    +
    +    // 9. Let NumberFormat be the standard built-in object that is the initial value
    +    //    of Intl.NumberFormat.
    +    // 10. Let localeData be the value of the [[localeData]] internal property of
    +    //     NumberFormat.
    +    var localeData = internals.NumberFormat['[[localeData]]'];
    +
    +    // 11. Let r be the result of calling the ResolveLocale abstract operation
    +    //     (defined in 9.2.5) with the [[availableLocales]] internal property of
    +    //     NumberFormat, requestedLocales, opt, the [[relevantExtensionKeys]]
    +    //     internal property of NumberFormat, and localeData.
    +    var r = ResolveLocale(internals.NumberFormat['[[availableLocales]]'], requestedLocales, opt, internals.NumberFormat['[[relevantExtensionKeys]]'], localeData);
    +
    +    // 12. Set the [[locale]] internal property of numberFormat to the value of
    +    //     r.[[locale]].
    +    internal['[[locale]]'] = r['[[locale]]'];
    +
    +    // 13. Set the [[numberingSystem]] internal property of numberFormat to the value
    +    //     of r.[[nu]].
    +    internal['[[numberingSystem]]'] = r['[[nu]]'];
    +
    +    // The specification doesn't tell us to do this, but it's helpful later on
    +    internal['[[dataLocale]]'] = r['[[dataLocale]]'];
    +
    +    // 14. Let dataLocale be the value of r.[[dataLocale]].
    +    var dataLocale = r['[[dataLocale]]'];
    +
    +    // 15. Let s be the result of calling the GetOption abstract operation with the
    +    //     arguments options, "style", "string", a List containing the three String
    +    //     values "decimal", "percent", and "currency", and "decimal".
    +    var s = GetOption(options, 'style', 'string', new List('decimal', 'percent', 'currency'), 'decimal');
    +
    +    // 16. Set the [[style]] internal property of numberFormat to s.
    +    internal['[[style]]'] = s;
    +
    +    // 17. Let c be the result of calling the GetOption abstract operation with the
    +    //     arguments options, "currency", "string", undefined, and undefined.
    +    var c = GetOption(options, 'currency', 'string');
    +
    +    // 18. If c is not undefined and the result of calling the
    +    //     IsWellFormedCurrencyCode abstract operation (defined in 6.3.1) with
    +    //     argument c is false, then throw a RangeError exception.
    +    if (c !== undefined && !IsWellFormedCurrencyCode(c)) throw new RangeError("'" + c + "' is not a valid currency code");
    +
    +    // 19. If s is "currency" and c is undefined, throw a TypeError exception.
    +    if (s === 'currency' && c === undefined) throw new TypeError('Currency code is required when style is currency');
    +
    +    var cDigits = void 0;
    +
    +    // 20. If s is "currency", then
    +    if (s === 'currency') {
    +        // a. Let c be the result of converting c to upper case as specified in 6.1.
    +        c = c.toUpperCase();
    +
    +        // b. Set the [[currency]] internal property of numberFormat to c.
    +        internal['[[currency]]'] = c;
    +
    +        // c. Let cDigits be the result of calling the CurrencyDigits abstract
    +        //    operation (defined below) with argument c.
    +        cDigits = CurrencyDigits(c);
    +    }
    +
    +    // 21. Let cd be the result of calling the GetOption abstract operation with the
    +    //     arguments options, "currencyDisplay", "string", a List containing the
    +    //     three String values "code", "symbol", and "name", and "symbol".
    +    var cd = GetOption(options, 'currencyDisplay', 'string', new List('code', 'symbol', 'name'), 'symbol');
    +
    +    // 22. If s is "currency", then set the [[currencyDisplay]] internal property of
    +    //     numberFormat to cd.
    +    if (s === 'currency') internal['[[currencyDisplay]]'] = cd;
    +
    +    // 23. Let mnid be the result of calling the GetNumberOption abstract operation
    +    //     (defined in 9.2.10) with arguments options, "minimumIntegerDigits", 1, 21,
    +    //     and 1.
    +    var mnid = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1);
    +
    +    // 24. Set the [[minimumIntegerDigits]] internal property of numberFormat to mnid.
    +    internal['[[minimumIntegerDigits]]'] = mnid;
    +
    +    // 25. If s is "currency", then let mnfdDefault be cDigits; else let mnfdDefault
    +    //     be 0.
    +    var mnfdDefault = s === 'currency' ? cDigits : 0;
    +
    +    // 26. Let mnfd be the result of calling the GetNumberOption abstract operation
    +    //     with arguments options, "minimumFractionDigits", 0, 20, and mnfdDefault.
    +    var mnfd = GetNumberOption(options, 'minimumFractionDigits', 0, 20, mnfdDefault);
    +
    +    // 27. Set the [[minimumFractionDigits]] internal property of numberFormat to mnfd.
    +    internal['[[minimumFractionDigits]]'] = mnfd;
    +
    +    // 28. If s is "currency", then let mxfdDefault be max(mnfd, cDigits); else if s
    +    //     is "percent", then let mxfdDefault be max(mnfd, 0); else let mxfdDefault
    +    //     be max(mnfd, 3).
    +    var mxfdDefault = s === 'currency' ? Math.max(mnfd, cDigits) : s === 'percent' ? Math.max(mnfd, 0) : Math.max(mnfd, 3);
    +
    +    // 29. Let mxfd be the result of calling the GetNumberOption abstract operation
    +    //     with arguments options, "maximumFractionDigits", mnfd, 20, and mxfdDefault.
    +    var mxfd = GetNumberOption(options, 'maximumFractionDigits', mnfd, 20, mxfdDefault);
    +
    +    // 30. Set the [[maximumFractionDigits]] internal property of numberFormat to mxfd.
    +    internal['[[maximumFractionDigits]]'] = mxfd;
    +
    +    // 31. Let mnsd be the result of calling the [[Get]] internal method of options
    +    //     with argument "minimumSignificantDigits".
    +    var mnsd = options.minimumSignificantDigits;
    +
    +    // 32. Let mxsd be the result of calling the [[Get]] internal method of options
    +    //     with argument "maximumSignificantDigits".
    +    var mxsd = options.maximumSignificantDigits;
    +
    +    // 33. If mnsd is not undefined or mxsd is not undefined, then:
    +    if (mnsd !== undefined || mxsd !== undefined) {
    +        // a. Let mnsd be the result of calling the GetNumberOption abstract
    +        //    operation with arguments options, "minimumSignificantDigits", 1, 21,
    +        //    and 1.
    +        mnsd = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1);
    +
    +        // b. Let mxsd be the result of calling the GetNumberOption abstract
    +        //     operation with arguments options, "maximumSignificantDigits", mnsd,
    +        //     21, and 21.
    +        mxsd = GetNumberOption(options, 'maximumSignificantDigits', mnsd, 21, 21);
    +
    +        // c. Set the [[minimumSignificantDigits]] internal property of numberFormat
    +        //    to mnsd, and the [[maximumSignificantDigits]] internal property of
    +        //    numberFormat to mxsd.
    +        internal['[[minimumSignificantDigits]]'] = mnsd;
    +        internal['[[maximumSignificantDigits]]'] = mxsd;
    +    }
    +    // 34. Let g be the result of calling the GetOption abstract operation with the
    +    //     arguments options, "useGrouping", "boolean", undefined, and true.
    +    var g = GetOption(options, 'useGrouping', 'boolean', undefined, true);
    +
    +    // 35. Set the [[useGrouping]] internal property of numberFormat to g.
    +    internal['[[useGrouping]]'] = g;
    +
    +    // 36. Let dataLocaleData be the result of calling the [[Get]] internal method of
    +    //     localeData with argument dataLocale.
    +    var dataLocaleData = localeData[dataLocale];
    +
    +    // 37. Let patterns be the result of calling the [[Get]] internal method of
    +    //     dataLocaleData with argument "patterns".
    +    var patterns = dataLocaleData.patterns;
    +
    +    // 38. Assert: patterns is an object (see 11.2.3)
    +
    +    // 39. Let stylePatterns be the result of calling the [[Get]] internal method of
    +    //     patterns with argument s.
    +    var stylePatterns = patterns[s];
    +
    +    // 40. Set the [[positivePattern]] internal property of numberFormat to the
    +    //     result of calling the [[Get]] internal method of stylePatterns with the
    +    //     argument "positivePattern".
    +    internal['[[positivePattern]]'] = stylePatterns.positivePattern;
    +
    +    // 41. Set the [[negativePattern]] internal property of numberFormat to the
    +    //     result of calling the [[Get]] internal method of stylePatterns with the
    +    //     argument "negativePattern".
    +    internal['[[negativePattern]]'] = stylePatterns.negativePattern;
    +
    +    // 42. Set the [[boundFormat]] internal property of numberFormat to undefined.
    +    internal['[[boundFormat]]'] = undefined;
    +
    +    // 43. Set the [[initializedNumberFormat]] internal property of numberFormat to
    +    //     true.
    +    internal['[[initializedNumberFormat]]'] = true;
    +
    +    // In ES3, we need to pre-bind the format() function
    +    if (es3) numberFormat.format = GetFormatNumber.call(numberFormat);
    +
    +    // Restore the RegExp properties
    +    regexpRestore();
    +
    +    // Return the newly initialised object
    +    return numberFormat;
    +}
    +
    +function CurrencyDigits(currency) {
    +    // When the CurrencyDigits abstract operation is called with an argument currency
    +    // (which must be an upper case String value), the following steps are taken:
    +
    +    // 1. If the ISO 4217 currency and funds code list contains currency as an
    +    // alphabetic code, then return the minor unit value corresponding to the
    +    // currency from the list; else return 2.
    +    return currencyMinorUnits[currency] !== undefined ? currencyMinorUnits[currency] : 2;
    +}
    +
    +/* 11.2.3 */internals.NumberFormat = {
    +    '[[availableLocales]]': [],
    +    '[[relevantExtensionKeys]]': ['nu'],
    +    '[[localeData]]': {}
    +};
    +
    +/**
    + * When the supportedLocalesOf method of Intl.NumberFormat is called, the
    + * following steps are taken:
    + */
    +/* 11.2.2 */
    +defineProperty(Intl.NumberFormat, 'supportedLocalesOf', {
    +    configurable: true,
    +    writable: true,
    +    value: fnBind.call(function (locales) {
    +        // Bound functions only have the `this` value altered if being used as a constructor,
    +        // this lets us imitate a native function that has no constructor
    +        if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');
    +
    +        // Create an object whose props can be used to restore the values of RegExp props
    +        var regexpRestore = createRegExpRestore(),
    +
    +
    +        // 1. If options is not provided, then let options be undefined.
    +        options = arguments[1],
    +
    +
    +        // 2. Let availableLocales be the value of the [[availableLocales]] internal
    +        //    property of the standard built-in object that is the initial value of
    +        //    Intl.NumberFormat.
    +
    +        availableLocales = this['[[availableLocales]]'],
    +
    +
    +        // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
    +        //    abstract operation (defined in 9.2.1) with argument locales.
    +        requestedLocales = CanonicalizeLocaleList(locales);
    +
    +        // Restore the RegExp properties
    +        regexpRestore();
    +
    +        // 4. Return the result of calling the SupportedLocales abstract operation
    +        //    (defined in 9.2.8) with arguments availableLocales, requestedLocales,
    +        //    and options.
    +        return SupportedLocales(availableLocales, requestedLocales, options);
    +    }, internals.NumberFormat)
    +});
    +
    +/**
    + * This named accessor property returns a function that formats a number
    + * according to the effective locale and the formatting options of this
    + * NumberFormat object.
    + */
    +/* 11.3.2 */defineProperty(Intl.NumberFormat.prototype, 'format', {
    +    configurable: true,
    +    get: GetFormatNumber
    +});
    +
    +function GetFormatNumber() {
    +    var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
    +
    +    // Satisfy test 11.3_b
    +    if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.NumberFormat object.');
    +
    +    // The value of the [[Get]] attribute is a function that takes the following
    +    // steps:
    +
    +    // 1. If the [[boundFormat]] internal property of this NumberFormat object
    +    //    is undefined, then:
    +    if (internal['[[boundFormat]]'] === undefined) {
    +        // a. Let F be a Function object, with internal properties set as
    +        //    specified for built-in functions in ES5, 15, or successor, and the
    +        //    length property set to 1, that takes the argument value and
    +        //    performs the following steps:
    +        var F = function F(value) {
    +            // i. If value is not provided, then let value be undefined.
    +            // ii. Let x be ToNumber(value).
    +            // iii. Return the result of calling the FormatNumber abstract
    +            //      operation (defined below) with arguments this and x.
    +            return FormatNumber(this, /* x = */Number(value));
    +        };
    +
    +        // b. Let bind be the standard built-in function object defined in ES5,
    +        //    15.3.4.5.
    +        // c. Let bf be the result of calling the [[Call]] internal method of
    +        //    bind with F as the this value and an argument list containing
    +        //    the single item this.
    +        var bf = fnBind.call(F, this);
    +
    +        // d. Set the [[boundFormat]] internal property of this NumberFormat
    +        //    object to bf.
    +        internal['[[boundFormat]]'] = bf;
    +    }
    +    // Return the value of the [[boundFormat]] internal property of this
    +    // NumberFormat object.
    +    return internal['[[boundFormat]]'];
    +}
    +
    +function formatToParts() {
    +    var value = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
    +
    +    var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
    +    if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.NumberFormat object.');
    +
    +    var x = Number(value);
    +    return FormatNumberToParts(this, x);
    +}
    +
    +Object.defineProperty(Intl.NumberFormat.prototype, 'formatToParts', {
    +    configurable: true,
    +    enumerable: false,
    +    writable: true,
    +    value: formatToParts
    +});
    +
    +/*
    + * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
    + * @clause[sec-formatnumbertoparts]
    + */
    +function FormatNumberToParts(numberFormat, x) {
    +    // 1. Let parts be ? PartitionNumberPattern(numberFormat, x).
    +    var parts = PartitionNumberPattern(numberFormat, x);
    +    // 2. Let result be ArrayCreate(0).
    +    var result = [];
    +    // 3. Let n be 0.
    +    var n = 0;
    +    // 4. For each part in parts, do:
    +    for (var i = 0; parts.length > i; i++) {
    +        var part = parts[i];
    +        // a. Let O be ObjectCreate(%ObjectPrototype%).
    +        var O = {};
    +        // a. Perform ? CreateDataPropertyOrThrow(O, "type", part.[[type]]).
    +        O.type = part['[[type]]'];
    +        // a. Perform ? CreateDataPropertyOrThrow(O, "value", part.[[value]]).
    +        O.value = part['[[value]]'];
    +        // a. Perform ? CreateDataPropertyOrThrow(result, ? ToString(n), O).
    +        result[n] = O;
    +        // a. Increment n by 1.
    +        n += 1;
    +    }
    +    // 5. Return result.
    +    return result;
    +}
    +
    +/*
    + * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
    + * @clause[sec-partitionnumberpattern]
    + */
    +function PartitionNumberPattern(numberFormat, x) {
    +
    +    var internal = getInternalProperties(numberFormat),
    +        locale = internal['[[dataLocale]]'],
    +        nums = internal['[[numberingSystem]]'],
    +        data = internals.NumberFormat['[[localeData]]'][locale],
    +        ild = data.symbols[nums] || data.symbols.latn,
    +        pattern = void 0;
    +
    +    // 1. If x is not NaN and x < 0, then:
    +    if (!isNaN(x) && x < 0) {
    +        // a. Let x be -x.
    +        x = -x;
    +        // a. Let pattern be the value of numberFormat.[[negativePattern]].
    +        pattern = internal['[[negativePattern]]'];
    +    }
    +    // 2. Else,
    +    else {
    +            // a. Let pattern be the value of numberFormat.[[positivePattern]].
    +            pattern = internal['[[positivePattern]]'];
    +        }
    +    // 3. Let result be a new empty List.
    +    var result = new List();
    +    // 4. Let beginIndex be Call(%StringProto_indexOf%, pattern, "{", 0).
    +    var beginIndex = pattern.indexOf('{', 0);
    +    // 5. Let endIndex be 0.
    +    var endIndex = 0;
    +    // 6. Let nextIndex be 0.
    +    var nextIndex = 0;
    +    // 7. Let length be the number of code units in pattern.
    +    var length = pattern.length;
    +    // 8. Repeat while beginIndex is an integer index into pattern:
    +    while (beginIndex > -1 && beginIndex < length) {
    +        // a. Set endIndex to Call(%StringProto_indexOf%, pattern, "}", beginIndex)
    +        endIndex = pattern.indexOf('}', beginIndex);
    +        // a. If endIndex = -1, throw new Error exception.
    +        if (endIndex === -1) throw new Error();
    +        // a. If beginIndex is greater than nextIndex, then:
    +        if (beginIndex > nextIndex) {
    +            // i. Let literal be a substring of pattern from position nextIndex, inclusive, to position beginIndex, exclusive.
    +            var literal = pattern.substring(nextIndex, beginIndex);
    +            // ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
    +            arrPush.call(result, { '[[type]]': 'literal', '[[value]]': literal });
    +        }
    +        // a. Let p be the substring of pattern from position beginIndex, exclusive, to position endIndex, exclusive.
    +        var p = pattern.substring(beginIndex + 1, endIndex);
    +        // a. If p is equal "number", then:
    +        if (p === "number") {
    +            // i. If x is NaN,
    +            if (isNaN(x)) {
    +                // 1. Let n be an ILD String value indicating the NaN value.
    +                var n = ild.nan;
    +                // 2. Add new part record { [[type]]: "nan", [[value]]: n } as a new element of the list result.
    +                arrPush.call(result, { '[[type]]': 'nan', '[[value]]': n });
    +            }
    +            // ii. Else if isFinite(x) is false,
    +            else if (!isFinite(x)) {
    +                    // 1. Let n be an ILD String value indicating infinity.
    +                    var _n = ild.infinity;
    +                    // 2. Add new part record { [[type]]: "infinity", [[value]]: n } as a new element of the list result.
    +                    arrPush.call(result, { '[[type]]': 'infinity', '[[value]]': _n });
    +                }
    +                // iii. Else,
    +                else {
    +                        // 1. If the value of numberFormat.[[style]] is "percent" and isFinite(x), let x be 100 × x.
    +                        if (internal['[[style]]'] === 'percent' && isFinite(x)) x *= 100;
    +
    +                        var _n2 = void 0;
    +                        // 2. If the numberFormat.[[minimumSignificantDigits]] and numberFormat.[[maximumSignificantDigits]] are present, then
    +                        if (hop.call(internal, '[[minimumSignificantDigits]]') && hop.call(internal, '[[maximumSignificantDigits]]')) {
    +                            // a. Let n be ToRawPrecision(x, numberFormat.[[minimumSignificantDigits]], numberFormat.[[maximumSignificantDigits]]).
    +                            _n2 = ToRawPrecision(x, internal['[[minimumSignificantDigits]]'], internal['[[maximumSignificantDigits]]']);
    +                        }
    +                        // 3. Else,
    +                        else {
    +                                // a. Let n be ToRawFixed(x, numberFormat.[[minimumIntegerDigits]], numberFormat.[[minimumFractionDigits]], numberFormat.[[maximumFractionDigits]]).
    +                                _n2 = ToRawFixed(x, internal['[[minimumIntegerDigits]]'], internal['[[minimumFractionDigits]]'], internal['[[maximumFractionDigits]]']);
    +                            }
    +                        // 4. If the value of the numberFormat.[[numberingSystem]] matches one of the values in the "Numbering System" column of Table 2 below, then
    +                        if (numSys[nums]) {
    +                            (function () {
    +                                // a. Let digits be an array whose 10 String valued elements are the UTF-16 string representations of the 10 digits specified in the "Digits" column of the matching row in Table 2.
    +                                var digits = numSys[nums];
    +                                // a. Replace each digit in n with the value of digits[digit].
    +                                _n2 = String(_n2).replace(/\d/g, function (digit) {
    +                                    return digits[digit];
    +                                });
    +                            })();
    +                        }
    +                        // 5. Else use an implementation dependent algorithm to map n to the appropriate representation of n in the given numbering system.
    +                        else _n2 = String(_n2); // ###TODO###
    +
    +                        var integer = void 0;
    +                        var fraction = void 0;
    +                        // 6. Let decimalSepIndex be Call(%StringProto_indexOf%, n, ".", 0).
    +                        var decimalSepIndex = _n2.indexOf('.', 0);
    +                        // 7. If decimalSepIndex > 0, then:
    +                        if (decimalSepIndex > 0) {
    +                            // a. Let integer be the substring of n from position 0, inclusive, to position decimalSepIndex, exclusive.
    +                            integer = _n2.substring(0, decimalSepIndex);
    +                            // a. Let fraction be the substring of n from position decimalSepIndex, exclusive, to the end of n.
    +                            fraction = _n2.substring(decimalSepIndex + 1, decimalSepIndex.length);
    +                        }
    +                        // 8. Else:
    +                        else {
    +                                // a. Let integer be n.
    +                                integer = _n2;
    +                                // a. Let fraction be undefined.
    +                                fraction = undefined;
    +                            }
    +                        // 9. If the value of the numberFormat.[[useGrouping]] is true,
    +                        if (internal['[[useGrouping]]'] === true) {
    +                            // a. Let groupSepSymbol be the ILND String representing the grouping separator.
    +                            var groupSepSymbol = ild.group;
    +                            // a. Let groups be a List whose elements are, in left to right order, the substrings defined by ILND set of locations within the integer.
    +                            var groups = [];
    +                            // ----> implementation:
    +                            // Primary group represents the group closest to the decimal
    +                            var pgSize = data.patterns.primaryGroupSize || 3;
    +                            // Secondary group is every other group
    +                            var sgSize = data.patterns.secondaryGroupSize || pgSize;
    +                            // Group only if necessary
    +                            if (integer.length > pgSize) {
    +                                // Index of the primary grouping separator
    +                                var end = integer.length - pgSize;
    +                                // Starting index for our loop
    +                                var idx = end % sgSize;
    +                                var start = integer.slice(0, idx);
    +                                if (start.length) arrPush.call(groups, start);
    +                                // Loop to separate into secondary grouping digits
    +                                while (idx < end) {
    +                                    arrPush.call(groups, integer.slice(idx, idx + sgSize));
    +                                    idx += sgSize;
    +                                }
    +                                // Add the primary grouping digits
    +                                arrPush.call(groups, integer.slice(end));
    +                            } else {
    +                                arrPush.call(groups, integer);
    +                            }
    +                            // a. Assert: The number of elements in groups List is greater than 0.
    +                            if (groups.length === 0) throw new Error();
    +                            // a. Repeat, while groups List is not empty:
    +                            while (groups.length) {
    +                                // i. Remove the first element from groups and let integerGroup be the value of that element.
    +                                var integerGroup = arrShift.call(groups);
    +                                // ii. Add new part record { [[type]]: "integer", [[value]]: integerGroup } as a new element of the list result.
    +                                arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integerGroup });
    +                                // iii. If groups List is not empty, then:
    +                                if (groups.length) {
    +                                    // 1. Add new part record { [[type]]: "group", [[value]]: groupSepSymbol } as a new element of the list result.
    +                                    arrPush.call(result, { '[[type]]': 'group', '[[value]]': groupSepSymbol });
    +                                }
    +                            }
    +                        }
    +                        // 10. Else,
    +                        else {
    +                                // a. Add new part record { [[type]]: "integer", [[value]]: integer } as a new element of the list result.
    +                                arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integer });
    +                            }
    +                        // 11. If fraction is not undefined, then:
    +                        if (fraction !== undefined) {
    +                            // a. Let decimalSepSymbol be the ILND String representing the decimal separator.
    +                            var decimalSepSymbol = ild.decimal;
    +                            // a. Add new part record { [[type]]: "decimal", [[value]]: decimalSepSymbol } as a new element of the list result.
    +                            arrPush.call(result, { '[[type]]': 'decimal', '[[value]]': decimalSepSymbol });
    +                            // a. Add new part record { [[type]]: "fraction", [[value]]: fraction } as a new element of the list result.
    +                            arrPush.call(result, { '[[type]]': 'fraction', '[[value]]': fraction });
    +                        }
    +                    }
    +        }
    +        // a. Else if p is equal "plusSign", then:
    +        else if (p === "plusSign") {
    +                // i. Let plusSignSymbol be the ILND String representing the plus sign.
    +                var plusSignSymbol = ild.plusSign;
    +                // ii. Add new part record { [[type]]: "plusSign", [[value]]: plusSignSymbol } as a new element of the list result.
    +                arrPush.call(result, { '[[type]]': 'plusSign', '[[value]]': plusSignSymbol });
    +            }
    +            // a. Else if p is equal "minusSign", then:
    +            else if (p === "minusSign") {
    +                    // i. Let minusSignSymbol be the ILND String representing the minus sign.
    +                    var minusSignSymbol = ild.minusSign;
    +                    // ii. Add new part record { [[type]]: "minusSign", [[value]]: minusSignSymbol } as a new element of the list result.
    +                    arrPush.call(result, { '[[type]]': 'minusSign', '[[value]]': minusSignSymbol });
    +                }
    +                // a. Else if p is equal "percentSign" and numberFormat.[[style]] is "percent", then:
    +                else if (p === "percentSign" && internal['[[style]]'] === "percent") {
    +                        // i. Let percentSignSymbol be the ILND String representing the percent sign.
    +                        var percentSignSymbol = ild.percentSign;
    +                        // ii. Add new part record { [[type]]: "percentSign", [[value]]: percentSignSymbol } as a new element of the list result.
    +                        arrPush.call(result, { '[[type]]': 'literal', '[[value]]': percentSignSymbol });
    +                    }
    +                    // a. Else if p is equal "currency" and numberFormat.[[style]] is "currency", then:
    +                    else if (p === "currency" && internal['[[style]]'] === "currency") {
    +                            // i. Let currency be the value of numberFormat.[[currency]].
    +                            var currency = internal['[[currency]]'];
    +
    +                            var cd = void 0;
    +
    +                            // ii. If numberFormat.[[currencyDisplay]] is "code", then
    +                            if (internal['[[currencyDisplay]]'] === "code") {
    +                                // 1. Let cd be currency.
    +                                cd = currency;
    +                            }
    +                            // iii. Else if numberFormat.[[currencyDisplay]] is "symbol", then
    +                            else if (internal['[[currencyDisplay]]'] === "symbol") {
    +                                    // 1. Let cd be an ILD string representing currency in short form. If the implementation does not have such a representation of currency, use currency itself.
    +                                    cd = data.currencies[currency] || currency;
    +                                }
    +                                // iv. Else if numberFormat.[[currencyDisplay]] is "name", then
    +                                else if (internal['[[currencyDisplay]]'] === "name") {
    +                                        // 1. Let cd be an ILD string representing currency in long form. If the implementation does not have such a representation of currency, then use currency itself.
    +                                        cd = currency;
    +                                    }
    +                            // v. Add new part record { [[type]]: "currency", [[value]]: cd } as a new element of the list result.
    +                            arrPush.call(result, { '[[type]]': 'currency', '[[value]]': cd });
    +                        }
    +                        // a. Else,
    +                        else {
    +                                // i. Let literal be the substring of pattern from position beginIndex, inclusive, to position endIndex, inclusive.
    +                                var _literal = pattern.substring(beginIndex, endIndex);
    +                                // ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
    +                                arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal });
    +                            }
    +        // a. Set nextIndex to endIndex + 1.
    +        nextIndex = endIndex + 1;
    +        // a. Set beginIndex to Call(%StringProto_indexOf%, pattern, "{", nextIndex)
    +        beginIndex = pattern.indexOf('{', nextIndex);
    +    }
    +    // 9. If nextIndex is less than length, then:
    +    if (nextIndex < length) {
    +        // a. Let literal be the substring of pattern from position nextIndex, inclusive, to position length, exclusive.
    +        var _literal2 = pattern.substring(nextIndex, length);
    +        // a. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
    +        arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal2 });
    +    }
    +    // 10. Return result.
    +    return result;
    +}
    +
    +/*
    + * @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
    + * @clause[sec-formatnumber]
    + */
    +function FormatNumber(numberFormat, x) {
    +    // 1. Let parts be ? PartitionNumberPattern(numberFormat, x).
    +    var parts = PartitionNumberPattern(numberFormat, x);
    +    // 2. Let result be an empty String.
    +    var result = '';
    +    // 3. For each part in parts, do:
    +    for (var i = 0; parts.length > i; i++) {
    +        var part = parts[i];
    +        // a. Set result to a String value produced by concatenating result and part.[[value]].
    +        result += part['[[value]]'];
    +    }
    +    // 4. Return result.
    +    return result;
    +}
    +
    +/**
    + * When the ToRawPrecision abstract operation is called with arguments x (which
    + * must be a finite non-negative number), minPrecision, and maxPrecision (both
    + * must be integers between 1 and 21) the following steps are taken:
    + */
    +function ToRawPrecision(x, minPrecision, maxPrecision) {
    +    // 1. Let p be maxPrecision.
    +    var p = maxPrecision;
    +
    +    var m = void 0,
    +        e = void 0;
    +
    +    // 2. If x = 0, then
    +    if (x === 0) {
    +        // a. Let m be the String consisting of p occurrences of the character "0".
    +        m = arrJoin.call(Array(p + 1), '0');
    +        // b. Let e be 0.
    +        e = 0;
    +    }
    +    // 3. Else
    +    else {
    +            // a. Let e and n be integers such that 10ᵖ⁻¹ ≤ n < 10ᵖ and for which the
    +            //    exact mathematical value of n × 10ᵉ⁻ᵖ⁺¹ – x is as close to zero as
    +            //    possible. If there are two such sets of e and n, pick the e and n for
    +            //    which n × 10ᵉ⁻ᵖ⁺¹ is larger.
    +            e = log10Floor(Math.abs(x));
    +
    +            // Easier to get to m from here
    +            var f = Math.round(Math.exp(Math.abs(e - p + 1) * Math.LN10));
    +
    +            // b. Let m be the String consisting of the digits of the decimal
    +            //    representation of n (in order, with no leading zeroes)
    +            m = String(Math.round(e - p + 1 < 0 ? x * f : x / f));
    +        }
    +
    +    // 4. If e ≥ p, then
    +    if (e >= p)
    +        // a. Return the concatenation of m and e-p+1 occurrences of the character "0".
    +        return m + arrJoin.call(Array(e - p + 1 + 1), '0');
    +
    +        // 5. If e = p-1, then
    +    else if (e === p - 1)
    +            // a. Return m.
    +            return m;
    +
    +            // 6. If e ≥ 0, then
    +        else if (e >= 0)
    +                // a. Let m be the concatenation of the first e+1 characters of m, the character
    +                //    ".", and the remaining p–(e+1) characters of m.
    +                m = m.slice(0, e + 1) + '.' + m.slice(e + 1);
    +
    +                // 7. If e < 0, then
    +            else if (e < 0)
    +                    // a. Let m be the concatenation of the String "0.", –(e+1) occurrences of the
    +                    //    character "0", and the string m.
    +                    m = '0.' + arrJoin.call(Array(-(e + 1) + 1), '0') + m;
    +
    +    // 8. If m contains the character ".", and maxPrecision > minPrecision, then
    +    if (m.indexOf(".") >= 0 && maxPrecision > minPrecision) {
    +        // a. Let cut be maxPrecision – minPrecision.
    +        var cut = maxPrecision - minPrecision;
    +
    +        // b. Repeat while cut > 0 and the last character of m is "0":
    +        while (cut > 0 && m.charAt(m.length - 1) === '0') {
    +            //  i. Remove the last character from m.
    +            m = m.slice(0, -1);
    +
    +            //  ii. Decrease cut by 1.
    +            cut--;
    +        }
    +
    +        // c. If the last character of m is ".", then
    +        if (m.charAt(m.length - 1) === '.')
    +            //    i. Remove the last character from m.
    +            m = m.slice(0, -1);
    +    }
    +    // 9. Return m.
    +    return m;
    +}
    +
    +/**
    + * @spec[tc39/ecma402/master/spec/numberformat.html]
    + * @clause[sec-torawfixed]
    + * When the ToRawFixed abstract operation is called with arguments x (which must
    + * be a finite non-negative number), minInteger (which must be an integer between
    + * 1 and 21), minFraction, and maxFraction (which must be integers between 0 and
    + * 20) the following steps are taken:
    + */
    +function ToRawFixed(x, minInteger, minFraction, maxFraction) {
    +    // 1. Let f be maxFraction.
    +    var f = maxFraction;
    +    // 2. Let n be an integer for which the exact mathematical value of n ÷ 10f – x is as close to zero as possible. If there are two such n, pick the larger n.
    +    var n = Math.pow(10, f) * x; // diverging...
    +    // 3. If n = 0, let m be the String "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
    +    var m = n === 0 ? "0" : n.toFixed(0); // divering...
    +
    +    {
    +        // this diversion is needed to take into consideration big numbers, e.g.:
    +        // 1.2344501e+37 -> 12344501000000000000000000000000000000
    +        var idx = void 0;
    +        var exp = (idx = m.indexOf('e')) > -1 ? m.slice(idx + 1) : 0;
    +        if (exp) {
    +            m = m.slice(0, idx).replace('.', '');
    +            m += arrJoin.call(Array(exp - (m.length - 1) + 1), '0');
    +        }
    +    }
    +
    +    var int = void 0;
    +    // 4. If f ≠ 0, then
    +    if (f !== 0) {
    +        // a. Let k be the number of characters in m.
    +        var k = m.length;
    +        // a. If k ≤ f, then
    +        if (k <= f) {
    +            // i. Let z be the String consisting of f+1–k occurrences of the character "0".
    +            var z = arrJoin.call(Array(f + 1 - k + 1), '0');
    +            // ii. Let m be the concatenation of Strings z and m.
    +            m = z + m;
    +            // iii. Let k be f+1.
    +            k = f + 1;
    +        }
    +        // a. Let a be the first k–f characters of m, and let b be the remaining f characters of m.
    +        var a = m.substring(0, k - f),
    +            b = m.substring(k - f, m.length);
    +        // a. Let m be the concatenation of the three Strings a, ".", and b.
    +        m = a + "." + b;
    +        // a. Let int be the number of characters in a.
    +        int = a.length;
    +    }
    +    // 5. Else, let int be the number of characters in m.
    +    else int = m.length;
    +    // 6. Let cut be maxFraction – minFraction.
    +    var cut = maxFraction - minFraction;
    +    // 7. Repeat while cut > 0 and the last character of m is "0":
    +    while (cut > 0 && m.slice(-1) === "0") {
    +        // a. Remove the last character from m.
    +        m = m.slice(0, -1);
    +        // a. Decrease cut by 1.
    +        cut--;
    +    }
    +    // 8. If the last character of m is ".", then
    +    if (m.slice(-1) === ".") {
    +        // a. Remove the last character from m.
    +        m = m.slice(0, -1);
    +    }
    +    // 9. If int < minInteger, then
    +    if (int < minInteger) {
    +        // a. Let z be the String consisting of minInteger–int occurrences of the character "0".
    +        var _z = arrJoin.call(Array(minInteger - int + 1), '0');
    +        // a. Let m be the concatenation of Strings z and m.
    +        m = _z + m;
    +    }
    +    // 10. Return m.
    +    return m;
    +}
    +
    +// Sect 11.3.2 Table 2, Numbering systems
    +// ======================================
    +var numSys = {
    +    arab: ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"],
    +    arabext: ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"],
    +    bali: ["᭐", "᭑", "᭒", "᭓", "᭔", "᭕", "᭖", "᭗", "᭘", "᭙"],
    +    beng: ["০", "১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯"],
    +    deva: ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"],
    +    fullwide: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
    +    gujr: ["૦", "૧", "૨", "૩", "૪", "૫", "૬", "૭", "૮", "૯"],
    +    guru: ["੦", "੧", "੨", "੩", "੪", "੫", "੬", "੭", "੮", "੯"],
    +    hanidec: ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"],
    +    khmr: ["០", "១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩"],
    +    knda: ["೦", "೧", "೨", "೩", "೪", "೫", "೬", "೭", "೮", "೯"],
    +    laoo: ["໐", "໑", "໒", "໓", "໔", "໕", "໖", "໗", "໘", "໙"],
    +    latn: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
    +    limb: ["᥆", "᥇", "᥈", "᥉", "᥊", "᥋", "᥌", "᥍", "᥎", "᥏"],
    +    mlym: ["൦", "൧", "൨", "൩", "൪", "൫", "൬", "൭", "൮", "൯"],
    +    mong: ["᠐", "᠑", "᠒", "᠓", "᠔", "᠕", "᠖", "᠗", "᠘", "᠙"],
    +    mymr: ["၀", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉"],
    +    orya: ["୦", "୧", "୨", "୩", "୪", "୫", "୬", "୭", "୮", "୯"],
    +    tamldec: ["௦", "௧", "௨", "௩", "௪", "௫", "௬", "௭", "௮", "௯"],
    +    telu: ["౦", "౧", "౨", "౩", "౪", "౫", "౬", "౭", "౮", "౯"],
    +    thai: ["๐", "๑", "๒", "๓", "๔", "๕", "๖", "๗", "๘", "๙"],
    +    tibt: ["༠", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩"]
    +};
    +
    +/**
    + * This function provides access to the locale and formatting options computed
    + * during initialization of the object.
    + *
    + * The function returns a new object whose properties and attributes are set as
    + * if constructed by an object literal assigning to each of the following
    + * properties the value of the corresponding internal property of this
    + * NumberFormat object (see 11.4): locale, numberingSystem, style, currency,
    + * currencyDisplay, minimumIntegerDigits, minimumFractionDigits,
    + * maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, and
    + * useGrouping. Properties whose corresponding internal properties are not present
    + * are not assigned.
    + */
    +/* 11.3.3 */defineProperty(Intl.NumberFormat.prototype, 'resolvedOptions', {
    +    configurable: true,
    +    writable: true,
    +    value: function value() {
    +        var prop = void 0,
    +            descs = new Record(),
    +            props = ['locale', 'numberingSystem', 'style', 'currency', 'currencyDisplay', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits', 'useGrouping'],
    +            internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
    +
    +        // Satisfy test 11.3_b
    +        if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.');
    +
    +        for (var i = 0, max = props.length; i < max; i++) {
    +            if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = { value: internal[prop], writable: true, configurable: true, enumerable: true };
    +        }
    +
    +        return objCreate({}, descs);
    +    }
    +});
    +
    +/* jslint esnext: true */
    +
    +// Match these datetime components in a CLDR pattern, except those in single quotes
    +var expDTComponents = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
    +// trim patterns after transformations
    +var expPatternTrimmer = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
    +// Skip over patterns with these datetime components because we don't have data
    +// to back them up:
    +// timezone, weekday, amoung others
    +var unwantedDTCs = /[rqQASjJgwWIQq]/; // xXVO were removed from this list in favor of computing matches with timeZoneName values but printing as empty string
    +
    +var dtKeys = ["era", "year", "month", "day", "weekday", "quarter"];
    +var tmKeys = ["hour", "minute", "second", "hour12", "timeZoneName"];
    +
    +function isDateFormatOnly(obj) {
    +    for (var i = 0; i < tmKeys.length; i += 1) {
    +        if (obj.hasOwnProperty(tmKeys[i])) {
    +            return false;
    +        }
    +    }
    +    return true;
    +}
    +
    +function isTimeFormatOnly(obj) {
    +    for (var i = 0; i < dtKeys.length; i += 1) {
    +        if (obj.hasOwnProperty(dtKeys[i])) {
    +            return false;
    +        }
    +    }
    +    return true;
    +}
    +
    +function joinDateAndTimeFormats(dateFormatObj, timeFormatObj) {
    +    var o = { _: {} };
    +    for (var i = 0; i < dtKeys.length; i += 1) {
    +        if (dateFormatObj[dtKeys[i]]) {
    +            o[dtKeys[i]] = dateFormatObj[dtKeys[i]];
    +        }
    +        if (dateFormatObj._[dtKeys[i]]) {
    +            o._[dtKeys[i]] = dateFormatObj._[dtKeys[i]];
    +        }
    +    }
    +    for (var j = 0; j < tmKeys.length; j += 1) {
    +        if (timeFormatObj[tmKeys[j]]) {
    +            o[tmKeys[j]] = timeFormatObj[tmKeys[j]];
    +        }
    +        if (timeFormatObj._[tmKeys[j]]) {
    +            o._[tmKeys[j]] = timeFormatObj._[tmKeys[j]];
    +        }
    +    }
    +    return o;
    +}
    +
    +function computeFinalPatterns(formatObj) {
    +    // From http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns:
    +    //  'In patterns, two single quotes represents a literal single quote, either
    +    //   inside or outside single quotes. Text within single quotes is not
    +    //   interpreted in any way (except for two adjacent single quotes).'
    +    formatObj.pattern12 = formatObj.extendedPattern.replace(/'([^']*)'/g, function ($0, literal) {
    +        return literal ? literal : "'";
    +    });
    +
    +    // pattern 12 is always the default. we can produce the 24 by removing {ampm}
    +    formatObj.pattern = formatObj.pattern12.replace('{ampm}', '').replace(expPatternTrimmer, '');
    +    return formatObj;
    +}
    +
    +function expDTComponentsMeta($0, formatObj) {
    +    switch ($0.charAt(0)) {
    +        // --- Era
    +        case 'G':
    +            formatObj.era = ['short', 'short', 'short', 'long', 'narrow'][$0.length - 1];
    +            return '{era}';
    +
    +        // --- Year
    +        case 'y':
    +        case 'Y':
    +        case 'u':
    +        case 'U':
    +        case 'r':
    +            formatObj.year = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{year}';
    +
    +        // --- Quarter (not supported in this polyfill)
    +        case 'Q':
    +        case 'q':
    +            formatObj.quarter = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];
    +            return '{quarter}';
    +
    +        // --- Month
    +        case 'M':
    +        case 'L':
    +            formatObj.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];
    +            return '{month}';
    +
    +        // --- Week (not supported in this polyfill)
    +        case 'w':
    +            // week of the year
    +            formatObj.week = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{weekday}';
    +        case 'W':
    +            // week of the month
    +            formatObj.week = 'numeric';
    +            return '{weekday}';
    +
    +        // --- Day
    +        case 'd':
    +            // day of the month
    +            formatObj.day = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{day}';
    +        case 'D': // day of the year
    +        case 'F': // day of the week
    +        case 'g':
    +            // 1..n: Modified Julian day
    +            formatObj.day = 'numeric';
    +            return '{day}';
    +
    +        // --- Week Day
    +        case 'E':
    +            // day of the week
    +            formatObj.weekday = ['short', 'short', 'short', 'long', 'narrow', 'short'][$0.length - 1];
    +            return '{weekday}';
    +        case 'e':
    +            // local day of the week
    +            formatObj.weekday = ['numeric', '2-digit', 'short', 'long', 'narrow', 'short'][$0.length - 1];
    +            return '{weekday}';
    +        case 'c':
    +            // stand alone local day of the week
    +            formatObj.weekday = ['numeric', undefined, 'short', 'long', 'narrow', 'short'][$0.length - 1];
    +            return '{weekday}';
    +
    +        // --- Period
    +        case 'a': // AM, PM
    +        case 'b': // am, pm, noon, midnight
    +        case 'B':
    +            // flexible day periods
    +            formatObj.hour12 = true;
    +            return '{ampm}';
    +
    +        // --- Hour
    +        case 'h':
    +        case 'H':
    +            formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{hour}';
    +        case 'k':
    +        case 'K':
    +            formatObj.hour12 = true; // 12-hour-cycle time formats (using h or K)
    +            formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{hour}';
    +
    +        // --- Minute
    +        case 'm':
    +            formatObj.minute = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{minute}';
    +
    +        // --- Second
    +        case 's':
    +            formatObj.second = $0.length === 2 ? '2-digit' : 'numeric';
    +            return '{second}';
    +        case 'S':
    +        case 'A':
    +            formatObj.second = 'numeric';
    +            return '{second}';
    +
    +        // --- Timezone
    +        case 'z': // 1..3, 4: specific non-location format
    +        case 'Z': // 1..3, 4, 5: The ISO8601 varios formats
    +        case 'O': // 1, 4: miliseconds in day short, long
    +        case 'v': // 1, 4: generic non-location format
    +        case 'V': // 1, 2, 3, 4: time zone ID or city
    +        case 'X': // 1, 2, 3, 4: The ISO8601 varios formats
    +        case 'x':
    +            // 1, 2, 3, 4: The ISO8601 varios formats
    +            // this polyfill only supports much, for now, we are just doing something dummy
    +            formatObj.timeZoneName = $0.length < 4 ? 'short' : 'long';
    +            return '{timeZoneName}';
    +    }
    +}
    +
    +/**
    + * Converts the CLDR availableFormats into the objects and patterns required by
    + * the ECMAScript Internationalization API specification.
    + */
    +function createDateTimeFormat(skeleton, pattern) {
    +    // we ignore certain patterns that are unsupported to avoid this expensive op.
    +    if (unwantedDTCs.test(pattern)) return undefined;
    +
    +    var formatObj = {
    +        originalPattern: pattern,
    +        _: {}
    +    };
    +
    +    // Replace the pattern string with the one required by the specification, whilst
    +    // at the same time evaluating it for the subsets and formats
    +    formatObj.extendedPattern = pattern.replace(expDTComponents, function ($0) {
    +        // See which symbol we're dealing with
    +        return expDTComponentsMeta($0, formatObj._);
    +    });
    +
    +    // Match the skeleton string with the one required by the specification
    +    // this implementation is based on the Date Field Symbol Table:
    +    // http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
    +    // Note: we are adding extra data to the formatObject even though this polyfill
    +    //       might not support it.
    +    skeleton.replace(expDTComponents, function ($0) {
    +        // See which symbol we're dealing with
    +        return expDTComponentsMeta($0, formatObj);
    +    });
    +
    +    return computeFinalPatterns(formatObj);
    +}
    +
    +/**
    + * Processes DateTime formats from CLDR to an easier-to-parse format.
    + * the result of this operation should be cached the first time a particular
    + * calendar is analyzed.
    + *
    + * The specification requires we support at least the following subsets of
    + * date/time components:
    + *
    + *   - 'weekday', 'year', 'month', 'day', 'hour', 'minute', 'second'
    + *   - 'weekday', 'year', 'month', 'day'
    + *   - 'year', 'month', 'day'
    + *   - 'year', 'month'
    + *   - 'month', 'day'
    + *   - 'hour', 'minute', 'second'
    + *   - 'hour', 'minute'
    + *
    + * We need to cherry pick at least these subsets from the CLDR data and convert
    + * them into the pattern objects used in the ECMA-402 API.
    + */
    +function createDateTimeFormats(formats) {
    +    var availableFormats = formats.availableFormats;
    +    var timeFormats = formats.timeFormats;
    +    var dateFormats = formats.dateFormats;
    +    var result = [];
    +    var skeleton = void 0,
    +        pattern = void 0,
    +        computed = void 0,
    +        i = void 0,
    +        j = void 0;
    +    var timeRelatedFormats = [];
    +    var dateRelatedFormats = [];
    +
    +    // Map available (custom) formats into a pattern for createDateTimeFormats
    +    for (skeleton in availableFormats) {
    +        if (availableFormats.hasOwnProperty(skeleton)) {
    +            pattern = availableFormats[skeleton];
    +            computed = createDateTimeFormat(skeleton, pattern);
    +            if (computed) {
    +                result.push(computed);
    +                // in some cases, the format is only displaying date specific props
    +                // or time specific props, in which case we need to also produce the
    +                // combined formats.
    +                if (isDateFormatOnly(computed)) {
    +                    dateRelatedFormats.push(computed);
    +                } else if (isTimeFormatOnly(computed)) {
    +                    timeRelatedFormats.push(computed);
    +                }
    +            }
    +        }
    +    }
    +
    +    // Map time formats into a pattern for createDateTimeFormats
    +    for (skeleton in timeFormats) {
    +        if (timeFormats.hasOwnProperty(skeleton)) {
    +            pattern = timeFormats[skeleton];
    +            computed = createDateTimeFormat(skeleton, pattern);
    +            if (computed) {
    +                result.push(computed);
    +                timeRelatedFormats.push(computed);
    +            }
    +        }
    +    }
    +
    +    // Map date formats into a pattern for createDateTimeFormats
    +    for (skeleton in dateFormats) {
    +        if (dateFormats.hasOwnProperty(skeleton)) {
    +            pattern = dateFormats[skeleton];
    +            computed = createDateTimeFormat(skeleton, pattern);
    +            if (computed) {
    +                result.push(computed);
    +                dateRelatedFormats.push(computed);
    +            }
    +        }
    +    }
    +
    +    // combine custom time and custom date formats when they are orthogonals to complete the
    +    // formats supported by CLDR.
    +    // This Algo is based on section "Missing Skeleton Fields" from:
    +    // http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
    +    for (i = 0; i < timeRelatedFormats.length; i += 1) {
    +        for (j = 0; j < dateRelatedFormats.length; j += 1) {
    +            if (dateRelatedFormats[j].month === 'long') {
    +                pattern = dateRelatedFormats[j].weekday ? formats.full : formats.long;
    +            } else if (dateRelatedFormats[j].month === 'short') {
    +                pattern = formats.medium;
    +            } else {
    +                pattern = formats.short;
    +            }
    +            computed = joinDateAndTimeFormats(dateRelatedFormats[j], timeRelatedFormats[i]);
    +            computed.originalPattern = pattern;
    +            computed.extendedPattern = pattern.replace('{0}', timeRelatedFormats[i].extendedPattern).replace('{1}', dateRelatedFormats[j].extendedPattern).replace(/^[,\s]+|[,\s]+$/gi, '');
    +            result.push(computeFinalPatterns(computed));
    +        }
    +    }
    +
    +    return result;
    +}
    +
    +// this represents the exceptions of the rule that are not covered by CLDR availableFormats
    +// for single property configurations, they play no role when using multiple properties, and
    +// those that are not in this table, are not exceptions or are not covered by the data we
    +// provide.
    +var validSyntheticProps = {
    +    second: {
    +        numeric: 's',
    +        '2-digit': 'ss'
    +    },
    +    minute: {
    +        numeric: 'm',
    +        '2-digit': 'mm'
    +    },
    +    year: {
    +        numeric: 'y',
    +        '2-digit': 'yy'
    +    },
    +    day: {
    +        numeric: 'd',
    +        '2-digit': 'dd'
    +    },
    +    month: {
    +        numeric: 'L',
    +        '2-digit': 'LL',
    +        narrow: 'LLLLL',
    +        short: 'LLL',
    +        long: 'LLLL'
    +    },
    +    weekday: {
    +        narrow: 'ccccc',
    +        short: 'ccc',
    +        long: 'cccc'
    +    }
    +};
    +
    +function generateSyntheticFormat(propName, propValue) {
    +    if (validSyntheticProps[propName] && validSyntheticProps[propName][propValue]) {
    +        var _ref2;
    +
    +        return _ref2 = {
    +            originalPattern: validSyntheticProps[propName][propValue],
    +            _: defineProperty$1({}, propName, propValue),
    +            extendedPattern: "{" + propName + "}"
    +        }, defineProperty$1(_ref2, propName, propValue), defineProperty$1(_ref2, "pattern12", "{" + propName + "}"), defineProperty$1(_ref2, "pattern", "{" + propName + "}"), _ref2;
    +    }
    +}
    +
    +// An object map of date component keys, saves using a regex later
    +var dateWidths = objCreate(null, { narrow: {}, short: {}, long: {} });
    +
    +/**
    + * Returns a string for a date component, resolved using multiple inheritance as specified
    + * as specified in the Unicode Technical Standard 35.
    + */
    +function resolveDateString(data, ca, component, width, key) {
    +    // From http://www.unicode.org/reports/tr35/tr35.html#Multiple_Inheritance:
    +    // 'In clearly specified instances, resources may inherit from within the same locale.
    +    //  For example, ... the Buddhist calendar inherits from the Gregorian calendar.'
    +    var obj = data[ca] && data[ca][component] ? data[ca][component] : data.gregory[component],
    +
    +
    +    // "sideways" inheritance resolves strings when a key doesn't exist
    +    alts = {
    +        narrow: ['short', 'long'],
    +        short: ['long', 'narrow'],
    +        long: ['short', 'narrow']
    +    },
    +
    +
    +    //
    +    resolved = hop.call(obj, width) ? obj[width] : hop.call(obj, alts[width][0]) ? obj[alts[width][0]] : obj[alts[width][1]];
    +
    +    // `key` wouldn't be specified for components 'dayPeriods'
    +    return key !== null ? resolved[key] : resolved;
    +}
    +
    +// Define the DateTimeFormat constructor internally so it cannot be tainted
    +function DateTimeFormatConstructor() {
    +    var locales = arguments[0];
    +    var options = arguments[1];
    +
    +    if (!this || this === Intl) {
    +        return new Intl.DateTimeFormat(locales, options);
    +    }
    +    return InitializeDateTimeFormat(toObject(this), locales, options);
    +}
    +
    +defineProperty(Intl, 'DateTimeFormat', {
    +    configurable: true,
    +    writable: true,
    +    value: DateTimeFormatConstructor
    +});
    +
    +// Must explicitly set prototypes as unwritable
    +defineProperty(DateTimeFormatConstructor, 'prototype', {
    +    writable: false
    +});
    +
    +/**
    + * The abstract operation InitializeDateTimeFormat accepts the arguments dateTimeFormat
    + * (which must be an object), locales, and options. It initializes dateTimeFormat as a
    + * DateTimeFormat object.
    + */
    +function /* 12.1.1.1 */InitializeDateTimeFormat(dateTimeFormat, locales, options) {
    +    // This will be a internal properties object if we're not already initialized
    +    var internal = getInternalProperties(dateTimeFormat);
    +
    +    // Create an object whose props can be used to restore the values of RegExp props
    +    var regexpRestore = createRegExpRestore();
    +
    +    // 1. If dateTimeFormat has an [[initializedIntlObject]] internal property with
    +    //    value true, throw a TypeError exception.
    +    if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');
    +
    +    // Need this to access the `internal` object
    +    defineProperty(dateTimeFormat, '__getInternalProperties', {
    +        value: function value() {
    +            // NOTE: Non-standard, for internal use only
    +            if (arguments[0] === secret) return internal;
    +        }
    +    });
    +
    +    // 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.
    +    internal['[[initializedIntlObject]]'] = true;
    +
    +    // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
    +    //    abstract operation (defined in 9.2.1) with argument locales.
    +    var requestedLocales = CanonicalizeLocaleList(locales);
    +
    +    // 4. Let options be the result of calling the ToDateTimeOptions abstract
    +    //    operation (defined below) with arguments options, "any", and "date".
    +    options = ToDateTimeOptions(options, 'any', 'date');
    +
    +    // 5. Let opt be a new Record.
    +    var opt = new Record();
    +
    +    // 6. Let matcher be the result of calling the GetOption abstract operation
    +    //    (defined in 9.2.9) with arguments options, "localeMatcher", "string", a List
    +    //    containing the two String values "lookup" and "best fit", and "best fit".
    +    var matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');
    +
    +    // 7. Set opt.[[localeMatcher]] to matcher.
    +    opt['[[localeMatcher]]'] = matcher;
    +
    +    // 8. Let DateTimeFormat be the standard built-in object that is the initial
    +    //    value of Intl.DateTimeFormat.
    +    var DateTimeFormat = internals.DateTimeFormat; // This is what we *really* need
    +
    +    // 9. Let localeData be the value of the [[localeData]] internal property of
    +    //    DateTimeFormat.
    +    var localeData = DateTimeFormat['[[localeData]]'];
    +
    +    // 10. Let r be the result of calling the ResolveLocale abstract operation
    +    //     (defined in 9.2.5) with the [[availableLocales]] internal property of
    +    //      DateTimeFormat, requestedLocales, opt, the [[relevantExtensionKeys]]
    +    //      internal property of DateTimeFormat, and localeData.
    +    var r = ResolveLocale(DateTimeFormat['[[availableLocales]]'], requestedLocales, opt, DateTimeFormat['[[relevantExtensionKeys]]'], localeData);
    +
    +    // 11. Set the [[locale]] internal property of dateTimeFormat to the value of
    +    //     r.[[locale]].
    +    internal['[[locale]]'] = r['[[locale]]'];
    +
    +    // 12. Set the [[calendar]] internal property of dateTimeFormat to the value of
    +    //     r.[[ca]].
    +    internal['[[calendar]]'] = r['[[ca]]'];
    +
    +    // 13. Set the [[numberingSystem]] internal property of dateTimeFormat to the value of
    +    //     r.[[nu]].
    +    internal['[[numberingSystem]]'] = r['[[nu]]'];
    +
    +    // The specification doesn't tell us to do this, but it's helpful later on
    +    internal['[[dataLocale]]'] = r['[[dataLocale]]'];
    +
    +    // 14. Let dataLocale be the value of r.[[dataLocale]].
    +    var dataLocale = r['[[dataLocale]]'];
    +
    +    // 15. Let tz be the result of calling the [[Get]] internal method of options with
    +    //     argument "timeZone".
    +    var tz = options.timeZone;
    +
    +    // 16. If tz is not undefined, then
    +    if (tz !== undefined) {
    +        // a. Let tz be ToString(tz).
    +        // b. Convert tz to upper case as described in 6.1.
    +        //    NOTE: If an implementation accepts additional time zone values, as permitted
    +        //          under certain conditions by the Conformance clause, different casing
    +        //          rules apply.
    +        tz = toLatinUpperCase(tz);
    +
    +        // c. If tz is not "UTC", then throw a RangeError exception.
    +        // ###TODO: accept more time zones###
    +        if (tz !== 'UTC') throw new RangeError('timeZone is not supported.');
    +    }
    +
    +    // 17. Set the [[timeZone]] internal property of dateTimeFormat to tz.
    +    internal['[[timeZone]]'] = tz;
    +
    +    // 18. Let opt be a new Record.
    +    opt = new Record();
    +
    +    // 19. For each row of Table 3, except the header row, do:
    +    for (var prop in dateTimeComponents) {
    +        if (!hop.call(dateTimeComponents, prop)) continue;
    +
    +        // 20. Let prop be the name given in the Property column of the row.
    +        // 21. Let value be the result of calling the GetOption abstract operation,
    +        //     passing as argument options, the name given in the Property column of the
    +        //     row, "string", a List containing the strings given in the Values column of
    +        //     the row, and undefined.
    +        var value = GetOption(options, prop, 'string', dateTimeComponents[prop]);
    +
    +        // 22. Set opt.[[]] to value.
    +        opt['[[' + prop + ']]'] = value;
    +    }
    +
    +    // Assigned a value below
    +    var bestFormat = void 0;
    +
    +    // 23. Let dataLocaleData be the result of calling the [[Get]] internal method of
    +    //     localeData with argument dataLocale.
    +    var dataLocaleData = localeData[dataLocale];
    +
    +    // 24. Let formats be the result of calling the [[Get]] internal method of
    +    //     dataLocaleData with argument "formats".
    +    //     Note: we process the CLDR formats into the spec'd structure
    +    var formats = ToDateTimeFormats(dataLocaleData.formats);
    +
    +    // 25. Let matcher be the result of calling the GetOption abstract operation with
    +    //     arguments options, "formatMatcher", "string", a List containing the two String
    +    //     values "basic" and "best fit", and "best fit".
    +    matcher = GetOption(options, 'formatMatcher', 'string', new List('basic', 'best fit'), 'best fit');
    +
    +    // Optimization: caching the processed formats as a one time operation by
    +    // replacing the initial structure from localeData
    +    dataLocaleData.formats = formats;
    +
    +    // 26. If matcher is "basic", then
    +    if (matcher === 'basic') {
    +        // 27. Let bestFormat be the result of calling the BasicFormatMatcher abstract
    +        //     operation (defined below) with opt and formats.
    +        bestFormat = BasicFormatMatcher(opt, formats);
    +
    +        // 28. Else
    +    } else {
    +        {
    +            // diverging
    +            var _hr = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);
    +            opt.hour12 = _hr === undefined ? dataLocaleData.hour12 : _hr;
    +        }
    +        // 29. Let bestFormat be the result of calling the BestFitFormatMatcher
    +        //     abstract operation (defined below) with opt and formats.
    +        bestFormat = BestFitFormatMatcher(opt, formats);
    +    }
    +
    +    // 30. For each row in Table 3, except the header row, do
    +    for (var _prop in dateTimeComponents) {
    +        if (!hop.call(dateTimeComponents, _prop)) continue;
    +
    +        // a. Let prop be the name given in the Property column of the row.
    +        // b. Let pDesc be the result of calling the [[GetOwnProperty]] internal method of
    +        //    bestFormat with argument prop.
    +        // c. If pDesc is not undefined, then
    +        if (hop.call(bestFormat, _prop)) {
    +            // i. Let p be the result of calling the [[Get]] internal method of bestFormat
    +            //    with argument prop.
    +            var p = bestFormat[_prop];
    +            {
    +                // diverging
    +                p = bestFormat._ && hop.call(bestFormat._, _prop) ? bestFormat._[_prop] : p;
    +            }
    +
    +            // ii. Set the [[]] internal property of dateTimeFormat to p.
    +            internal['[[' + _prop + ']]'] = p;
    +        }
    +    }
    +
    +    var pattern = void 0; // Assigned a value below
    +
    +    // 31. Let hr12 be the result of calling the GetOption abstract operation with
    +    //     arguments options, "hour12", "boolean", undefined, and undefined.
    +    var hr12 = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);
    +
    +    // 32. If dateTimeFormat has an internal property [[hour]], then
    +    if (internal['[[hour]]']) {
    +        // a. If hr12 is undefined, then let hr12 be the result of calling the [[Get]]
    +        //    internal method of dataLocaleData with argument "hour12".
    +        hr12 = hr12 === undefined ? dataLocaleData.hour12 : hr12;
    +
    +        // b. Set the [[hour12]] internal property of dateTimeFormat to hr12.
    +        internal['[[hour12]]'] = hr12;
    +
    +        // c. If hr12 is true, then
    +        if (hr12 === true) {
    +            // i. Let hourNo0 be the result of calling the [[Get]] internal method of
    +            //    dataLocaleData with argument "hourNo0".
    +            var hourNo0 = dataLocaleData.hourNo0;
    +
    +            // ii. Set the [[hourNo0]] internal property of dateTimeFormat to hourNo0.
    +            internal['[[hourNo0]]'] = hourNo0;
    +
    +            // iii. Let pattern be the result of calling the [[Get]] internal method of
    +            //      bestFormat with argument "pattern12".
    +            pattern = bestFormat.pattern12;
    +        }
    +
    +        // d. Else
    +        else
    +            // i. Let pattern be the result of calling the [[Get]] internal method of
    +            //    bestFormat with argument "pattern".
    +            pattern = bestFormat.pattern;
    +    }
    +
    +    // 33. Else
    +    else
    +        // a. Let pattern be the result of calling the [[Get]] internal method of
    +        //    bestFormat with argument "pattern".
    +        pattern = bestFormat.pattern;
    +
    +    // 34. Set the [[pattern]] internal property of dateTimeFormat to pattern.
    +    internal['[[pattern]]'] = pattern;
    +
    +    // 35. Set the [[boundFormat]] internal property of dateTimeFormat to undefined.
    +    internal['[[boundFormat]]'] = undefined;
    +
    +    // 36. Set the [[initializedDateTimeFormat]] internal property of dateTimeFormat to
    +    //     true.
    +    internal['[[initializedDateTimeFormat]]'] = true;
    +
    +    // In ES3, we need to pre-bind the format() function
    +    if (es3) dateTimeFormat.format = GetFormatDateTime.call(dateTimeFormat);
    +
    +    // Restore the RegExp properties
    +    regexpRestore();
    +
    +    // Return the newly initialised object
    +    return dateTimeFormat;
    +}
    +
    +/**
    + * Several DateTimeFormat algorithms use values from the following table, which provides
    + * property names and allowable values for the components of date and time formats:
    + */
    +var dateTimeComponents = {
    +    weekday: ["narrow", "short", "long"],
    +    era: ["narrow", "short", "long"],
    +    year: ["2-digit", "numeric"],
    +    month: ["2-digit", "numeric", "narrow", "short", "long"],
    +    day: ["2-digit", "numeric"],
    +    hour: ["2-digit", "numeric"],
    +    minute: ["2-digit", "numeric"],
    +    second: ["2-digit", "numeric"],
    +    timeZoneName: ["short", "long"]
    +};
    +
    +/**
    + * When the ToDateTimeOptions abstract operation is called with arguments options,
    + * required, and defaults, the following steps are taken:
    + */
    +function ToDateTimeFormats(formats) {
    +    if (Object.prototype.toString.call(formats) === '[object Array]') {
    +        return formats;
    +    }
    +    return createDateTimeFormats(formats);
    +}
    +
    +/**
    + * When the ToDateTimeOptions abstract operation is called with arguments options,
    + * required, and defaults, the following steps are taken:
    + */
    +function ToDateTimeOptions(options, required, defaults) {
    +    // 1. If options is undefined, then let options be null, else let options be
    +    //    ToObject(options).
    +    if (options === undefined) options = null;else {
    +        // (#12) options needs to be a Record, but it also needs to inherit properties
    +        var opt2 = toObject(options);
    +        options = new Record();
    +
    +        for (var k in opt2) {
    +            options[k] = opt2[k];
    +        }
    +    }
    +
    +    // 2. Let create be the standard built-in function object defined in ES5, 15.2.3.5.
    +    var create = objCreate;
    +
    +    // 3. Let options be the result of calling the [[Call]] internal method of create with
    +    //    undefined as the this value and an argument list containing the single item
    +    //    options.
    +    options = create(options);
    +
    +    // 4. Let needDefaults be true.
    +    var needDefaults = true;
    +
    +    // 5. If required is "date" or "any", then
    +    if (required === 'date' || required === 'any') {
    +        // a. For each of the property names "weekday", "year", "month", "day":
    +        // i. If the result of calling the [[Get]] internal method of options with the
    +        //    property name is not undefined, then let needDefaults be false.
    +        if (options.weekday !== undefined || options.year !== undefined || options.month !== undefined || options.day !== undefined) needDefaults = false;
    +    }
    +
    +    // 6. If required is "time" or "any", then
    +    if (required === 'time' || required === 'any') {
    +        // a. For each of the property names "hour", "minute", "second":
    +        // i. If the result of calling the [[Get]] internal method of options with the
    +        //    property name is not undefined, then let needDefaults be false.
    +        if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) needDefaults = false;
    +    }
    +
    +    // 7. If needDefaults is true and defaults is either "date" or "all", then
    +    if (needDefaults && (defaults === 'date' || defaults === 'all'))
    +        // a. For each of the property names "year", "month", "day":
    +        // i. Call the [[DefineOwnProperty]] internal method of options with the
    +        //    property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]:
    +        //    true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
    +        options.year = options.month = options.day = 'numeric';
    +
    +    // 8. If needDefaults is true and defaults is either "time" or "all", then
    +    if (needDefaults && (defaults === 'time' || defaults === 'all'))
    +        // a. For each of the property names "hour", "minute", "second":
    +        // i. Call the [[DefineOwnProperty]] internal method of options with the
    +        //    property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]:
    +        //    true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
    +        options.hour = options.minute = options.second = 'numeric';
    +
    +    // 9. Return options.
    +    return options;
    +}
    +
    +/**
    + * When the BasicFormatMatcher abstract operation is called with two arguments options and
    + * formats, the following steps are taken:
    + */
    +function BasicFormatMatcher(options, formats) {
    +    // 1. Let removalPenalty be 120.
    +    var removalPenalty = 120;
    +
    +    // 2. Let additionPenalty be 20.
    +    var additionPenalty = 20;
    +
    +    // 3. Let longLessPenalty be 8.
    +    var longLessPenalty = 8;
    +
    +    // 4. Let longMorePenalty be 6.
    +    var longMorePenalty = 6;
    +
    +    // 5. Let shortLessPenalty be 6.
    +    var shortLessPenalty = 6;
    +
    +    // 6. Let shortMorePenalty be 3.
    +    var shortMorePenalty = 3;
    +
    +    // 7. Let bestScore be -Infinity.
    +    var bestScore = -Infinity;
    +
    +    // 8. Let bestFormat be undefined.
    +    var bestFormat = void 0;
    +
    +    // 9. Let i be 0.
    +    var i = 0;
    +
    +    // 10. Assert: formats is an Array object.
    +
    +    // 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length".
    +    var len = formats.length;
    +
    +    // 12. Repeat while i < len:
    +    while (i < len) {
    +        // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).
    +        var format = formats[i];
    +
    +        // b. Let score be 0.
    +        var score = 0;
    +
    +        // c. For each property shown in Table 3:
    +        for (var property in dateTimeComponents) {
    +            if (!hop.call(dateTimeComponents, property)) continue;
    +
    +            // i. Let optionsProp be options.[[]].
    +            var optionsProp = options['[[' + property + ']]'];
    +
    +            // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format
    +            //     with argument property.
    +            // iii. If formatPropDesc is not undefined, then
    +            //     1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.
    +            var formatProp = hop.call(format, property) ? format[property] : undefined;
    +
    +            // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by
    +            //     additionPenalty.
    +            if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;
    +
    +            // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by
    +            //    removalPenalty.
    +            else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;
    +
    +                // vi. Else
    +                else {
    +                        // 1. Let values be the array ["2-digit", "numeric", "narrow", "short",
    +                        //    "long"].
    +                        var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];
    +
    +                        // 2. Let optionsPropIndex be the index of optionsProp within values.
    +                        var optionsPropIndex = arrIndexOf.call(values, optionsProp);
    +
    +                        // 3. Let formatPropIndex be the index of formatProp within values.
    +                        var formatPropIndex = arrIndexOf.call(values, formatProp);
    +
    +                        // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).
    +                        var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);
    +
    +                        // 5. If delta = 2, decrease score by longMorePenalty.
    +                        if (delta === 2) score -= longMorePenalty;
    +
    +                        // 6. Else if delta = 1, decrease score by shortMorePenalty.
    +                        else if (delta === 1) score -= shortMorePenalty;
    +
    +                            // 7. Else if delta = -1, decrease score by shortLessPenalty.
    +                            else if (delta === -1) score -= shortLessPenalty;
    +
    +                                // 8. Else if delta = -2, decrease score by longLessPenalty.
    +                                else if (delta === -2) score -= longLessPenalty;
    +                    }
    +        }
    +
    +        // d. If score > bestScore, then
    +        if (score > bestScore) {
    +            // i. Let bestScore be score.
    +            bestScore = score;
    +
    +            // ii. Let bestFormat be format.
    +            bestFormat = format;
    +        }
    +
    +        // e. Increase i by 1.
    +        i++;
    +    }
    +
    +    // 13. Return bestFormat.
    +    return bestFormat;
    +}
    +
    +/**
    + * When the BestFitFormatMatcher abstract operation is called with two arguments options
    + * and formats, it performs implementation dependent steps, which should return a set of
    + * component representations that a typical user of the selected locale would perceive as
    + * at least as good as the one returned by BasicFormatMatcher.
    + *
    + * This polyfill defines the algorithm to be the same as BasicFormatMatcher,
    + * with the addition of bonus points awarded where the requested format is of
    + * the same data type as the potentially matching format.
    + *
    + * This algo relies on the concept of closest distance matching described here:
    + * http://unicode.org/reports/tr35/tr35-dates.html#Matching_Skeletons
    + * Typically a “best match” is found using a closest distance match, such as:
    + *
    + * Symbols requesting a best choice for the locale are replaced.
    + *      j → one of {H, k, h, K}; C → one of {a, b, B}
    + * -> Covered by cldr.js matching process
    + *
    + * For fields with symbols representing the same type (year, month, day, etc):
    + *     Most symbols have a small distance from each other.
    + *         M ≅ L; E ≅ c; a ≅ b ≅ B; H ≅ k ≅ h ≅ K; ...
    + *     -> Covered by cldr.js matching process
    + *
    + *     Width differences among fields, other than those marking text vs numeric, are given small distance from each other.
    + *         MMM ≅ MMMM
    + *         MM ≅ M
    + *     Numeric and text fields are given a larger distance from each other.
    + *         MMM ≈ MM
    + *     Symbols representing substantial differences (week of year vs week of month) are given much larger a distances from each other.
    + *         d ≋ D; ...
    + *     Missing or extra fields cause a match to fail. (But see Missing Skeleton Fields).
    + *
    + *
    + * For example,
    + *
    + *     { month: 'numeric', day: 'numeric' }
    + *
    + * should match
    + *
    + *     { month: '2-digit', day: '2-digit' }
    + *
    + * rather than
    + *
    + *     { month: 'short', day: 'numeric' }
    + *
    + * This makes sense because a user requesting a formatted date with numeric parts would
    + * not expect to see the returned format containing narrow, short or long part names
    + */
    +function BestFitFormatMatcher(options, formats) {
    +    /** Diverging: this block implements the hack for single property configuration, eg.:
    +     *
    +     *      `new Intl.DateTimeFormat('en', {day: 'numeric'})`
    +     *
    +     * should produce a single digit with the day of the month. This is needed because
    +     * CLDR `availableFormats` data structure doesn't cover these cases.
    +     */
    +    {
    +        var optionsPropNames = [];
    +        for (var property in dateTimeComponents) {
    +            if (!hop.call(dateTimeComponents, property)) continue;
    +
    +            if (options['[[' + property + ']]'] !== undefined) {
    +                optionsPropNames.push(property);
    +            }
    +        }
    +        if (optionsPropNames.length === 1) {
    +            var _bestFormat = generateSyntheticFormat(optionsPropNames[0], options['[[' + optionsPropNames[0] + ']]']);
    +            if (_bestFormat) {
    +                return _bestFormat;
    +            }
    +        }
    +    }
    +
    +    // 1. Let removalPenalty be 120.
    +    var removalPenalty = 120;
    +
    +    // 2. Let additionPenalty be 20.
    +    var additionPenalty = 20;
    +
    +    // 3. Let longLessPenalty be 8.
    +    var longLessPenalty = 8;
    +
    +    // 4. Let longMorePenalty be 6.
    +    var longMorePenalty = 6;
    +
    +    // 5. Let shortLessPenalty be 6.
    +    var shortLessPenalty = 6;
    +
    +    // 6. Let shortMorePenalty be 3.
    +    var shortMorePenalty = 3;
    +
    +    var patternPenalty = 2;
    +
    +    var hour12Penalty = 1;
    +
    +    // 7. Let bestScore be -Infinity.
    +    var bestScore = -Infinity;
    +
    +    // 8. Let bestFormat be undefined.
    +    var bestFormat = void 0;
    +
    +    // 9. Let i be 0.
    +    var i = 0;
    +
    +    // 10. Assert: formats is an Array object.
    +
    +    // 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length".
    +    var len = formats.length;
    +
    +    // 12. Repeat while i < len:
    +    while (i < len) {
    +        // a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).
    +        var format = formats[i];
    +
    +        // b. Let score be 0.
    +        var score = 0;
    +
    +        // c. For each property shown in Table 3:
    +        for (var _property in dateTimeComponents) {
    +            if (!hop.call(dateTimeComponents, _property)) continue;
    +
    +            // i. Let optionsProp be options.[[]].
    +            var optionsProp = options['[[' + _property + ']]'];
    +
    +            // ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format
    +            //     with argument property.
    +            // iii. If formatPropDesc is not undefined, then
    +            //     1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.
    +            var formatProp = hop.call(format, _property) ? format[_property] : undefined;
    +
    +            // Diverging: using the default properties produced by the pattern/skeleton
    +            // to match it with user options, and apply a penalty
    +            var patternProp = hop.call(format._, _property) ? format._[_property] : undefined;
    +            if (optionsProp !== patternProp) {
    +                score -= patternPenalty;
    +            }
    +
    +            // iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by
    +            //     additionPenalty.
    +            if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;
    +
    +            // v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by
    +            //    removalPenalty.
    +            else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;
    +
    +                // vi. Else
    +                else {
    +                        // 1. Let values be the array ["2-digit", "numeric", "narrow", "short",
    +                        //    "long"].
    +                        var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];
    +
    +                        // 2. Let optionsPropIndex be the index of optionsProp within values.
    +                        var optionsPropIndex = arrIndexOf.call(values, optionsProp);
    +
    +                        // 3. Let formatPropIndex be the index of formatProp within values.
    +                        var formatPropIndex = arrIndexOf.call(values, formatProp);
    +
    +                        // 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).
    +                        var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);
    +
    +                        {
    +                            // diverging from spec
    +                            // When the bestFit argument is true, subtract additional penalty where data types are not the same
    +                            if (formatPropIndex <= 1 && optionsPropIndex >= 2 || formatPropIndex >= 2 && optionsPropIndex <= 1) {
    +                                // 5. If delta = 2, decrease score by longMorePenalty.
    +                                if (delta > 0) score -= longMorePenalty;else if (delta < 0) score -= longLessPenalty;
    +                            } else {
    +                                // 5. If delta = 2, decrease score by longMorePenalty.
    +                                if (delta > 1) score -= shortMorePenalty;else if (delta < -1) score -= shortLessPenalty;
    +                            }
    +                        }
    +                    }
    +        }
    +
    +        {
    +            // diverging to also take into consideration differences between 12 or 24 hours
    +            // which is special for the best fit only.
    +            if (format._.hour12 !== options.hour12) {
    +                score -= hour12Penalty;
    +            }
    +        }
    +
    +        // d. If score > bestScore, then
    +        if (score > bestScore) {
    +            // i. Let bestScore be score.
    +            bestScore = score;
    +            // ii. Let bestFormat be format.
    +            bestFormat = format;
    +        }
    +
    +        // e. Increase i by 1.
    +        i++;
    +    }
    +
    +    // 13. Return bestFormat.
    +    return bestFormat;
    +}
    +
    +/* 12.2.3 */internals.DateTimeFormat = {
    +    '[[availableLocales]]': [],
    +    '[[relevantExtensionKeys]]': ['ca', 'nu'],
    +    '[[localeData]]': {}
    +};
    +
    +/**
    + * When the supportedLocalesOf method of Intl.DateTimeFormat is called, the
    + * following steps are taken:
    + */
    +/* 12.2.2 */
    +defineProperty(Intl.DateTimeFormat, 'supportedLocalesOf', {
    +    configurable: true,
    +    writable: true,
    +    value: fnBind.call(function (locales) {
    +        // Bound functions only have the `this` value altered if being used as a constructor,
    +        // this lets us imitate a native function that has no constructor
    +        if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');
    +
    +        // Create an object whose props can be used to restore the values of RegExp props
    +        var regexpRestore = createRegExpRestore(),
    +
    +
    +        // 1. If options is not provided, then let options be undefined.
    +        options = arguments[1],
    +
    +
    +        // 2. Let availableLocales be the value of the [[availableLocales]] internal
    +        //    property of the standard built-in object that is the initial value of
    +        //    Intl.NumberFormat.
    +
    +        availableLocales = this['[[availableLocales]]'],
    +
    +
    +        // 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
    +        //    abstract operation (defined in 9.2.1) with argument locales.
    +        requestedLocales = CanonicalizeLocaleList(locales);
    +
    +        // Restore the RegExp properties
    +        regexpRestore();
    +
    +        // 4. Return the result of calling the SupportedLocales abstract operation
    +        //    (defined in 9.2.8) with arguments availableLocales, requestedLocales,
    +        //    and options.
    +        return SupportedLocales(availableLocales, requestedLocales, options);
    +    }, internals.NumberFormat)
    +});
    +
    +/**
    + * This named accessor property returns a function that formats a number
    + * according to the effective locale and the formatting options of this
    + * DateTimeFormat object.
    + */
    +/* 12.3.2 */defineProperty(Intl.DateTimeFormat.prototype, 'format', {
    +    configurable: true,
    +    get: GetFormatDateTime
    +});
    +
    +function GetFormatDateTime() {
    +    var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
    +
    +    // Satisfy test 12.3_b
    +    if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.DateTimeFormat object.');
    +
    +    // The value of the [[Get]] attribute is a function that takes the following
    +    // steps:
    +
    +    // 1. If the [[boundFormat]] internal property of this DateTimeFormat object
    +    //    is undefined, then:
    +    if (internal['[[boundFormat]]'] === undefined) {
    +        // a. Let F be a Function object, with internal properties set as
    +        //    specified for built-in functions in ES5, 15, or successor, and the
    +        //    length property set to 0, that takes the argument date and
    +        //    performs the following steps:
    +        var F = function F() {
    +            var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
    +
    +            //   i. If date is not provided or is undefined, then let x be the
    +            //      result as if by the expression Date.now() where Date.now is
    +            //      the standard built-in function defined in ES5, 15.9.4.4.
    +            //  ii. Else let x be ToNumber(date).
    +            // iii. Return the result of calling the FormatDateTime abstract
    +            //      operation (defined below) with arguments this and x.
    +            var x = date === undefined ? Date.now() : toNumber(date);
    +            return FormatDateTime(this, x);
    +        };
    +        // b. Let bind be the standard built-in function object defined in ES5,
    +        //    15.3.4.5.
    +        // c. Let bf be the result of calling the [[Call]] internal method of
    +        //    bind with F as the this value and an argument list containing
    +        //    the single item this.
    +        var bf = fnBind.call(F, this);
    +        // d. Set the [[boundFormat]] internal property of this NumberFormat
    +        //    object to bf.
    +        internal['[[boundFormat]]'] = bf;
    +    }
    +    // Return the value of the [[boundFormat]] internal property of this
    +    // NumberFormat object.
    +    return internal['[[boundFormat]]'];
    +}
    +
    +function formatToParts$1() {
    +    var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
    +
    +    var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
    +
    +    if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.');
    +
    +    var x = date === undefined ? Date.now() : toNumber(date);
    +    return FormatToPartsDateTime(this, x);
    +}
    +
    +Object.defineProperty(Intl.DateTimeFormat.prototype, 'formatToParts', {
    +    enumerable: false,
    +    writable: true,
    +    configurable: true,
    +    value: formatToParts$1
    +});
    +
    +function CreateDateTimeParts(dateTimeFormat, x) {
    +    // 1. If x is not a finite Number, then throw a RangeError exception.
    +    if (!isFinite(x)) throw new RangeError('Invalid valid date passed to format');
    +
    +    var internal = dateTimeFormat.__getInternalProperties(secret);
    +
    +    // Creating restore point for properties on the RegExp object... please wait
    +    /* let regexpRestore = */createRegExpRestore(); // ###TODO: review this
    +
    +    // 2. Let locale be the value of the [[locale]] internal property of dateTimeFormat.
    +    var locale = internal['[[locale]]'];
    +
    +    // 3. Let nf be the result of creating a new NumberFormat object as if by the
    +    // expression new Intl.NumberFormat([locale], {useGrouping: false}) where
    +    // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.
    +    var nf = new Intl.NumberFormat([locale], { useGrouping: false });
    +
    +    // 4. Let nf2 be the result of creating a new NumberFormat object as if by the
    +    // expression new Intl.NumberFormat([locale], {minimumIntegerDigits: 2, useGrouping:
    +    // false}) where Intl.NumberFormat is the standard built-in constructor defined in
    +    // 11.1.3.
    +    var nf2 = new Intl.NumberFormat([locale], { minimumIntegerDigits: 2, useGrouping: false });
    +
    +    // 5. Let tm be the result of calling the ToLocalTime abstract operation (defined
    +    // below) with x, the value of the [[calendar]] internal property of dateTimeFormat,
    +    // and the value of the [[timeZone]] internal property of dateTimeFormat.
    +    var tm = ToLocalTime(x, internal['[[calendar]]'], internal['[[timeZone]]']);
    +
    +    // 6. Let result be the value of the [[pattern]] internal property of dateTimeFormat.
    +    var pattern = internal['[[pattern]]'];
    +
    +    // 7.
    +    var result = new List();
    +
    +    // 8.
    +    var index = 0;
    +
    +    // 9.
    +    var beginIndex = pattern.indexOf('{');
    +
    +    // 10.
    +    var endIndex = 0;
    +
    +    // Need the locale minus any extensions
    +    var dataLocale = internal['[[dataLocale]]'];
    +
    +    // Need the calendar data from CLDR
    +    var localeData = internals.DateTimeFormat['[[localeData]]'][dataLocale].calendars;
    +    var ca = internal['[[calendar]]'];
    +
    +    // 11.
    +    while (beginIndex !== -1) {
    +        var fv = void 0;
    +        // a.
    +        endIndex = pattern.indexOf('}', beginIndex);
    +        // b.
    +        if (endIndex === -1) {
    +            throw new Error('Unclosed pattern');
    +        }
    +        // c.
    +        if (beginIndex > index) {
    +            arrPush.call(result, {
    +                type: 'literal',
    +                value: pattern.substring(index, beginIndex)
    +            });
    +        }
    +        // d.
    +        var p = pattern.substring(beginIndex + 1, endIndex);
    +        // e.
    +        if (dateTimeComponents.hasOwnProperty(p)) {
    +            //   i. Let f be the value of the [[

    ]] internal property of dateTimeFormat. + var f = internal['[[' + p + ']]']; + // ii. Let v be the value of tm.[[

    ]]. + var v = tm['[[' + p + ']]']; + // iii. If p is "year" and v ≤ 0, then let v be 1 - v. + if (p === 'year' && v <= 0) { + v = 1 - v; + } + // iv. If p is "month", then increase v by 1. + else if (p === 'month') { + v++; + } + // v. If p is "hour" and the value of the [[hour12]] internal property of + // dateTimeFormat is true, then + else if (p === 'hour' && internal['[[hour12]]'] === true) { + // 1. Let v be v modulo 12. + v = v % 12; + // 2. If v is 0 and the value of the [[hourNo0]] internal property of + // dateTimeFormat is true, then let v be 12. + if (v === 0 && internal['[[hourNo0]]'] === true) { + v = 12; + } + } + + // vi. If f is "numeric", then + if (f === 'numeric') { + // 1. Let fv be the result of calling the FormatNumber abstract operation + // (defined in 11.3.2) with arguments nf and v. + fv = FormatNumber(nf, v); + } + // vii. Else if f is "2-digit", then + else if (f === '2-digit') { + // 1. Let fv be the result of calling the FormatNumber abstract operation + // with arguments nf2 and v. + fv = FormatNumber(nf2, v); + // 2. If the length of fv is greater than 2, let fv be the substring of fv + // containing the last two characters. + if (fv.length > 2) { + fv = fv.slice(-2); + } + } + // viii. Else if f is "narrow", "short", or "long", then let fv be a String + // value representing f in the desired form; the String value depends upon + // the implementation and the effective locale and calendar of + // dateTimeFormat. If p is "month", then the String value may also depend + // on whether dateTimeFormat has a [[day]] internal property. If p is + // "timeZoneName", then the String value may also depend on the value of + // the [[inDST]] field of tm. + else if (f in dateWidths) { + switch (p) { + case 'month': + fv = resolveDateString(localeData, ca, 'months', f, tm['[[' + p + ']]']); + break; + + case 'weekday': + try { + fv = resolveDateString(localeData, ca, 'days', f, tm['[[' + p + ']]']); + // fv = resolveDateString(ca.days, f)[tm['[['+ p +']]']]; + } catch (e) { + throw new Error('Could not find weekday data for locale ' + locale); + } + break; + + case 'timeZoneName': + fv = ''; // ###TODO + break; + + case 'era': + try { + fv = resolveDateString(localeData, ca, 'eras', f, tm['[[' + p + ']]']); + } catch (e) { + throw new Error('Could not find era data for locale ' + locale); + } + break; + + default: + fv = tm['[[' + p + ']]']; + } + } + // ix + arrPush.call(result, { + type: p, + value: fv + }); + // f. + } else if (p === 'ampm') { + // i. + var _v = tm['[[hour]]']; + // ii./iii. + fv = resolveDateString(localeData, ca, 'dayPeriods', _v > 11 ? 'pm' : 'am', null); + // iv. + arrPush.call(result, { + type: 'dayPeriod', + value: fv + }); + // g. + } else { + arrPush.call(result, { + type: 'literal', + value: pattern.substring(beginIndex, endIndex + 1) + }); + } + // h. + index = endIndex + 1; + // i. + beginIndex = pattern.indexOf('{', index); + } + // 12. + if (endIndex < pattern.length - 1) { + arrPush.call(result, { + type: 'literal', + value: pattern.substr(endIndex + 1) + }); + } + // 13. + return result; +} + +/** + * When the FormatDateTime abstract operation is called with arguments dateTimeFormat + * (which must be an object initialized as a DateTimeFormat) and x (which must be a Number + * value), it returns a String value representing x (interpreted as a time value as + * specified in ES5, 15.9.1.1) according to the effective locale and the formatting + * options of dateTimeFormat. + */ +function FormatDateTime(dateTimeFormat, x) { + var parts = CreateDateTimeParts(dateTimeFormat, x); + var result = ''; + + for (var i = 0; parts.length > i; i++) { + var part = parts[i]; + result += part.value; + } + return result; +} + +function FormatToPartsDateTime(dateTimeFormat, x) { + var parts = CreateDateTimeParts(dateTimeFormat, x); + var result = []; + for (var i = 0; parts.length > i; i++) { + var part = parts[i]; + result.push({ + type: part.type, + value: part.value + }); + } + return result; +} + +/** + * When the ToLocalTime abstract operation is called with arguments date, calendar, and + * timeZone, the following steps are taken: + */ +function ToLocalTime(date, calendar, timeZone) { + // 1. Apply calendrical calculations on date for the given calendar and time zone to + // produce weekday, era, year, month, day, hour, minute, second, and inDST values. + // The calculations should use best available information about the specified + // calendar and time zone. If the calendar is "gregory", then the calculations must + // match the algorithms specified in ES5, 15.9.1, except that calculations are not + // bound by the restrictions on the use of best available information on time zones + // for local time zone adjustment and daylight saving time adjustment imposed by + // ES5, 15.9.1.7 and 15.9.1.8. + // ###TODO### + var d = new Date(date), + m = 'get' + (timeZone || ''); + + // 2. Return a Record with fields [[weekday]], [[era]], [[year]], [[month]], [[day]], + // [[hour]], [[minute]], [[second]], and [[inDST]], each with the corresponding + // calculated value. + return new Record({ + '[[weekday]]': d[m + 'Day'](), + '[[era]]': +(d[m + 'FullYear']() >= 0), + '[[year]]': d[m + 'FullYear'](), + '[[month]]': d[m + 'Month'](), + '[[day]]': d[m + 'Date'](), + '[[hour]]': d[m + 'Hours'](), + '[[minute]]': d[m + 'Minutes'](), + '[[second]]': d[m + 'Seconds'](), + '[[inDST]]': false // ###TODO### + }); +} + +/** + * The function returns a new object whose properties and attributes are set as if + * constructed by an object literal assigning to each of the following properties the + * value of the corresponding internal property of this DateTimeFormat object (see 12.4): + * locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day, + * hour, minute, second, and timeZoneName. Properties whose corresponding internal + * properties are not present are not assigned. + */ +/* 12.3.3 */defineProperty(Intl.DateTimeFormat.prototype, 'resolvedOptions', { + writable: true, + configurable: true, + value: function value() { + var prop = void 0, + descs = new Record(), + props = ['locale', 'calendar', 'numberingSystem', 'timeZone', 'hour12', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName'], + internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this); + + // Satisfy test 12.3_b + if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.'); + + for (var i = 0, max = props.length; i < max; i++) { + if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = { value: internal[prop], writable: true, configurable: true, enumerable: true }; + } + + return objCreate({}, descs); + } +}); + +var ls = Intl.__localeSensitiveProtos = { + Number: {}, + Date: {} +}; + +/** + * When the toLocaleString method is called with optional arguments locales and options, + * the following steps are taken: + */ +/* 13.2.1 */ls.Number.toLocaleString = function () { + // Satisfy test 13.2.1_1 + if (Object.prototype.toString.call(this) !== '[object Number]') throw new TypeError('`this` value must be a number for Number.prototype.toLocaleString()'); + + // 1. Let x be this Number value (as defined in ES5, 15.7.4). + // 2. If locales is not provided, then let locales be undefined. + // 3. If options is not provided, then let options be undefined. + // 4. Let numberFormat be the result of creating a new object as if by the + // expression new Intl.NumberFormat(locales, options) where + // Intl.NumberFormat is the standard built-in constructor defined in 11.1.3. + // 5. Return the result of calling the FormatNumber abstract operation + // (defined in 11.3.2) with arguments numberFormat and x. + return FormatNumber(new NumberFormatConstructor(arguments[0], arguments[1]), this); +}; + +/** + * When the toLocaleString method is called with optional arguments locales and options, + * the following steps are taken: + */ +/* 13.3.1 */ls.Date.toLocaleString = function () { + // Satisfy test 13.3.0_1 + if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleString()'); + + // 1. Let x be this time value (as defined in ES5, 15.9.5). + var x = +this; + + // 2. If x is NaN, then return "Invalid Date". + if (isNaN(x)) return 'Invalid Date'; + + // 3. If locales is not provided, then let locales be undefined. + var locales = arguments[0]; + + // 4. If options is not provided, then let options be undefined. + var options = arguments[1]; + + // 5. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined in 12.1.1) with arguments options, "any", and "all". + options = ToDateTimeOptions(options, 'any', 'all'); + + // 6. Let dateTimeFormat be the result of creating a new object as if by the + // expression new Intl.DateTimeFormat(locales, options) where + // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3. + var dateTimeFormat = new DateTimeFormatConstructor(locales, options); + + // 7. Return the result of calling the FormatDateTime abstract operation (defined + // in 12.3.2) with arguments dateTimeFormat and x. + return FormatDateTime(dateTimeFormat, x); +}; + +/** + * When the toLocaleDateString method is called with optional arguments locales and + * options, the following steps are taken: + */ +/* 13.3.2 */ls.Date.toLocaleDateString = function () { + // Satisfy test 13.3.0_1 + if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleDateString()'); + + // 1. Let x be this time value (as defined in ES5, 15.9.5). + var x = +this; + + // 2. If x is NaN, then return "Invalid Date". + if (isNaN(x)) return 'Invalid Date'; + + // 3. If locales is not provided, then let locales be undefined. + var locales = arguments[0], + + + // 4. If options is not provided, then let options be undefined. + options = arguments[1]; + + // 5. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined in 12.1.1) with arguments options, "date", and "date". + options = ToDateTimeOptions(options, 'date', 'date'); + + // 6. Let dateTimeFormat be the result of creating a new object as if by the + // expression new Intl.DateTimeFormat(locales, options) where + // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3. + var dateTimeFormat = new DateTimeFormatConstructor(locales, options); + + // 7. Return the result of calling the FormatDateTime abstract operation (defined + // in 12.3.2) with arguments dateTimeFormat and x. + return FormatDateTime(dateTimeFormat, x); +}; + +/** + * When the toLocaleTimeString method is called with optional arguments locales and + * options, the following steps are taken: + */ +/* 13.3.3 */ls.Date.toLocaleTimeString = function () { + // Satisfy test 13.3.0_1 + if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleTimeString()'); + + // 1. Let x be this time value (as defined in ES5, 15.9.5). + var x = +this; + + // 2. If x is NaN, then return "Invalid Date". + if (isNaN(x)) return 'Invalid Date'; + + // 3. If locales is not provided, then let locales be undefined. + var locales = arguments[0]; + + // 4. If options is not provided, then let options be undefined. + var options = arguments[1]; + + // 5. Let options be the result of calling the ToDateTimeOptions abstract + // operation (defined in 12.1.1) with arguments options, "time", and "time". + options = ToDateTimeOptions(options, 'time', 'time'); + + // 6. Let dateTimeFormat be the result of creating a new object as if by the + // expression new Intl.DateTimeFormat(locales, options) where + // Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3. + var dateTimeFormat = new DateTimeFormatConstructor(locales, options); + + // 7. Return the result of calling the FormatDateTime abstract operation (defined + // in 12.3.2) with arguments dateTimeFormat and x. + return FormatDateTime(dateTimeFormat, x); +}; + +defineProperty(Intl, '__applyLocaleSensitivePrototypes', { + writable: true, + configurable: true, + value: function value() { + defineProperty(Number.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Number.toLocaleString }); + // Need this here for IE 8, to avoid the _DontEnum_ bug + defineProperty(Date.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Date.toLocaleString }); + + for (var k in ls.Date) { + if (hop.call(ls.Date, k)) defineProperty(Date.prototype, k, { writable: true, configurable: true, value: ls.Date[k] }); + } + } +}); + +/** + * Can't really ship a single script with data for hundreds of locales, so we provide + * this __addLocaleData method as a means for the developer to add the data on an + * as-needed basis + */ +defineProperty(Intl, '__addLocaleData', { + value: function value(data) { + if (!IsStructurallyValidLanguageTag(data.locale)) throw new Error("Object passed doesn't identify itself with a valid language tag"); + + addLocaleData(data, data.locale); + } +}); + +function addLocaleData(data, tag) { + // Both NumberFormat and DateTimeFormat require number data, so throw if it isn't present + if (!data.number) throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat"); + + var locale = void 0, + locales = [tag], + parts = tag.split('-'); + + // Create fallbacks for locale data with scripts, e.g. Latn, Hans, Vaii, etc + if (parts.length > 2 && parts[1].length === 4) arrPush.call(locales, parts[0] + '-' + parts[2]); + + while (locale = arrShift.call(locales)) { + // Add to NumberFormat internal properties as per 11.2.3 + arrPush.call(internals.NumberFormat['[[availableLocales]]'], locale); + internals.NumberFormat['[[localeData]]'][locale] = data.number; + + // ...and DateTimeFormat internal properties as per 12.2.3 + if (data.date) { + data.date.nu = data.number.nu; + arrPush.call(internals.DateTimeFormat['[[availableLocales]]'], locale); + internals.DateTimeFormat['[[localeData]]'][locale] = data.date; + } + } + + // If this is the first set of locale data added, make it the default + if (defaultLocale === undefined) setDefaultLocale(tag); +} + +defineProperty(Intl, '__disableRegExpRestore', { + value: function value() { + internals.disableRegExpRestore = true; + } +}); + +module.exports = Intl; +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/80f6811f6c30735dab68a01372d8b78f.woff2 b/server/build/80f6811f6c30735dab68a01372d8b78f.woff2 new file mode 100644 index 00000000..5e6ac271 Binary files /dev/null and b/server/build/80f6811f6c30735dab68a01372d8b78f.woff2 differ diff --git a/server/build/880cffe4febaa7476b6aee71db68b7e4.woff2 b/server/build/880cffe4febaa7476b6aee71db68b7e4.woff2 new file mode 100644 index 00000000..e15214fd Binary files /dev/null and b/server/build/880cffe4febaa7476b6aee71db68b7e4.woff2 differ diff --git a/server/build/89ffa3aba80d30ee0a9371b25c968bbb.svg b/server/build/89ffa3aba80d30ee0a9371b25c968bbb.svg new file mode 100644 index 00000000..48634a9a --- /dev/null +++ b/server/build/89ffa3aba80d30ee0a9371b25c968bbb.svg @@ -0,0 +1,803 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/build/8b4f872c5de19974857328d06d3fe48f.woff2 b/server/build/8b4f872c5de19974857328d06d3fe48f.woff2 new file mode 100644 index 00000000..59169254 Binary files /dev/null and b/server/build/8b4f872c5de19974857328d06d3fe48f.woff2 differ diff --git a/server/build/9.23356f32.chunk.js b/server/build/9.23356f32.chunk.js new file mode 100644 index 00000000..2d1f52e9 --- /dev/null +++ b/server/build/9.23356f32.chunk.js @@ -0,0 +1,11 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[9],{ + +/***/ 1897: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(__webpack_require__(14));var _react=_interopRequireWildcard(__webpack_require__(1));var _reactRouterDom=__webpack_require__(30);var _strapiHelperPlugin=__webpack_require__(10);var EditView=(0,_react.lazy)(function(){return Promise.all(/* import() */[__webpack_require__.e(1), __webpack_require__.e(2)]).then(__webpack_require__.t.bind(null, 1966, 7));});var EditSettingsView=(0,_react.lazy)(function(){return __webpack_require__.e(/* import() */ 0).then(__webpack_require__.t.bind(null, 1893, 7));});var ListView=(0,_react.lazy)(function(){return __webpack_require__.e(/* import() */ 6).then(__webpack_require__.t.bind(null, 2255, 7));});var ListSettingsView=(0,_react.lazy)(function(){return __webpack_require__.e(/* import() */ 7).then(__webpack_require__.t.bind(null, 2292, 7));});var CollectionTypeRecursivePath=function CollectionTypeRecursivePath(props){var _useRouteMatch=(0,_reactRouterDom.useRouteMatch)(),url=_useRouteMatch.url;var _useParams=(0,_reactRouterDom.useParams)(),slug=_useParams.slug;var renderRoute=function renderRoute(routeProps,Component){return/*#__PURE__*/_react["default"].createElement(Component,(0,_extends2["default"])({},props,routeProps,{slug:slug}));};var routes=[{path:'ctm-configurations/list-settings',comp:ListSettingsView},{path:'ctm-configurations/edit-settings/:type',comp:EditSettingsView},{path:':id',comp:EditView},{path:'',comp:ListView}].map(function(_ref){var path=_ref.path,comp=_ref.comp;return/*#__PURE__*/_react["default"].createElement(_reactRouterDom.Route,{key:path,path:"".concat(url,"/").concat(path),render:function render(props){return renderRoute(props,comp);}});});return/*#__PURE__*/_react["default"].createElement(_react.Suspense,{fallback:/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.LoadingIndicatorPage,null)},/*#__PURE__*/_react["default"].createElement(_reactRouterDom.Switch,null,routes));};var _default=CollectionTypeRecursivePath;exports["default"]=_default; + +/***/ }) + +}]); \ No newline at end of file diff --git a/server/build/90301aa07d780a09812229d6375c3b28.woff b/server/build/90301aa07d780a09812229d6375c3b28.woff new file mode 100644 index 00000000..77b4e148 Binary files /dev/null and b/server/build/90301aa07d780a09812229d6375c3b28.woff differ diff --git a/server/build/912ec66d7572ff821749319396470bde.svg b/server/build/912ec66d7572ff821749319396470bde.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/server/build/912ec66d7572ff821749319396470bde.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/build/9c7e4e9eb485b4a121c760e61bc3707c.woff b/server/build/9c7e4e9eb485b4a121c760e61bc3707c.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/server/build/9c7e4e9eb485b4a121c760e61bc3707c.woff differ diff --git a/server/build/9fcec04cdba9253e002e740a7cd743fe.woff b/server/build/9fcec04cdba9253e002e740a7cd743fe.woff new file mode 100644 index 00000000..d1df7676 Binary files /dev/null and b/server/build/9fcec04cdba9253e002e740a7cd743fe.woff differ diff --git a/server/build/a0369ea57eb6d3843d6474c035111f29.eot b/server/build/a0369ea57eb6d3843d6474c035111f29.eot new file mode 100644 index 00000000..d3b77c22 Binary files /dev/null and b/server/build/a0369ea57eb6d3843d6474c035111f29.eot differ diff --git a/server/build/a06da7f0950f9dd366fc9db9d56d618a.woff2 b/server/build/a06da7f0950f9dd366fc9db9d56d618a.woff2 new file mode 100644 index 00000000..141a90a9 Binary files /dev/null and b/server/build/a06da7f0950f9dd366fc9db9d56d618a.woff2 differ diff --git a/server/build/a24612a87a8170fee74de4eb86e3cf02.svg b/server/build/a24612a87a8170fee74de4eb86e3cf02.svg new file mode 100644 index 00000000..594f1479 --- /dev/null +++ b/server/build/a24612a87a8170fee74de4eb86e3cf02.svg @@ -0,0 +1,19 @@ + + + + Icon remove + Created with Sketch. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/server/build/a4a1722f025b53b089ca2f6408abf0b7.png b/server/build/a4a1722f025b53b089ca2f6408abf0b7.png new file mode 100644 index 00000000..944fb2b4 Binary files /dev/null and b/server/build/a4a1722f025b53b089ca2f6408abf0b7.png differ diff --git a/server/build/ada4458b361d5e72bcbd19da105afdc5.woff2 b/server/build/ada4458b361d5e72bcbd19da105afdc5.woff2 new file mode 100644 index 00000000..34ca2fad Binary files /dev/null and b/server/build/ada4458b361d5e72bcbd19da105afdc5.woff2 differ diff --git a/server/build/af7ae505a9eed503f8b8e6982036873e.woff2 b/server/build/af7ae505a9eed503f8b8e6982036873e.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/server/build/af7ae505a9eed503f8b8e6982036873e.woff2 differ diff --git a/server/build/b06871f281fee6b241d60582ae9369b9.ttf b/server/build/b06871f281fee6b241d60582ae9369b9.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/server/build/b06871f281fee6b241d60582ae9369b9.ttf differ diff --git a/server/build/b15db15f746f29ffa02638cb455b8ec0.woff2 b/server/build/b15db15f746f29ffa02638cb455b8ec0.woff2 new file mode 100644 index 00000000..978a681a Binary files /dev/null and b/server/build/b15db15f746f29ffa02638cb455b8ec0.woff2 differ diff --git a/server/build/b4da0df63131b83ddeec1febb5b15374.woff b/server/build/b4da0df63131b83ddeec1febb5b15374.woff new file mode 100644 index 00000000..7ac0a146 Binary files /dev/null and b/server/build/b4da0df63131b83ddeec1febb5b15374.woff differ diff --git a/server/build/b55e385f24f0f9f724dac935fe292ecf.woff b/server/build/b55e385f24f0f9f724dac935fe292ecf.woff new file mode 100644 index 00000000..da3dfa30 Binary files /dev/null and b/server/build/b55e385f24f0f9f724dac935fe292ecf.woff differ diff --git a/server/build/bd03a2cc277bbbc338d464e679fe9942.woff2 b/server/build/bd03a2cc277bbbc338d464e679fe9942.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/server/build/bd03a2cc277bbbc338d464e679fe9942.woff2 differ diff --git a/server/build/bea989e82b07e9687c26fc58a4805021.woff b/server/build/bea989e82b07e9687c26fc58a4805021.woff new file mode 100644 index 00000000..beec7917 Binary files /dev/null and b/server/build/bea989e82b07e9687c26fc58a4805021.woff differ diff --git a/server/build/c1868c9545d2de1cf8488f1dadd8c9d0.eot b/server/build/c1868c9545d2de1cf8488f1dadd8c9d0.eot new file mode 100644 index 00000000..a1bc094a Binary files /dev/null and b/server/build/c1868c9545d2de1cf8488f1dadd8c9d0.eot differ diff --git a/server/build/c20b5b7362d8d7bb7eddf94344ace33e.woff2 b/server/build/c20b5b7362d8d7bb7eddf94344ace33e.woff2 new file mode 100644 index 00000000..7e0118e5 Binary files /dev/null and b/server/build/c20b5b7362d8d7bb7eddf94344ace33e.woff2 differ diff --git a/server/build/c2b50f4a7d908c8d06f5b05ec135e166.woff b/server/build/c2b50f4a7d908c8d06f5b05ec135e166.woff new file mode 100644 index 00000000..794417f6 Binary files /dev/null and b/server/build/c2b50f4a7d908c8d06f5b05ec135e166.woff differ diff --git a/server/build/c9cbbdc3762c340d5d37073a54971487.woff2 b/server/build/c9cbbdc3762c340d5d37073a54971487.woff2 new file mode 100644 index 00000000..8a243657 Binary files /dev/null and b/server/build/c9cbbdc3762c340d5d37073a54971487.woff2 differ diff --git a/server/build/cccb897485813c7c256901dbca54ecf2.woff2 b/server/build/cccb897485813c7c256901dbca54ecf2.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/server/build/cccb897485813c7c256901dbca54ecf2.woff2 differ diff --git a/server/build/cdbd13088f280c86c5f5621f0fa1b857.svg b/server/build/cdbd13088f280c86c5f5621f0fa1b857.svg new file mode 100644 index 00000000..e38533fc --- /dev/null +++ b/server/build/cdbd13088f280c86c5f5621f0fa1b857.svg @@ -0,0 +1 @@ +📖 \ No newline at end of file diff --git a/server/build/d6d70dd7cb470ff10ecc619493ae7205.png b/server/build/d6d70dd7cb470ff10ecc619493ae7205.png new file mode 100644 index 00000000..7e004246 Binary files /dev/null and b/server/build/d6d70dd7cb470ff10ecc619493ae7205.png differ diff --git a/server/build/d878b6c29b10beca227e9eef4246111b.woff b/server/build/d878b6c29b10beca227e9eef4246111b.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/server/build/d878b6c29b10beca227e9eef4246111b.woff differ diff --git a/server/build/d9cf517802956cd88eadcb9158aa6dec.woff2 b/server/build/d9cf517802956cd88eadcb9158aa6dec.woff2 new file mode 100644 index 00000000..b5fceba0 Binary files /dev/null and b/server/build/d9cf517802956cd88eadcb9158aa6dec.woff2 differ diff --git a/server/build/db78b9359171f24936b16d84f63af378.ttf b/server/build/db78b9359171f24936b16d84f63af378.ttf new file mode 100644 index 00000000..abe99e20 Binary files /dev/null and b/server/build/db78b9359171f24936b16d84f63af378.ttf differ diff --git a/server/build/ec3cfddedb8bebd2d7a3fdf511f7c1cc.woff b/server/build/ec3cfddedb8bebd2d7a3fdf511f7c1cc.woff new file mode 100644 index 00000000..2a89d521 Binary files /dev/null and b/server/build/ec3cfddedb8bebd2d7a3fdf511f7c1cc.woff differ diff --git a/server/build/ec763292e583294612f124c0b0def500.svg b/server/build/ec763292e583294612f124c0b0def500.svg new file mode 100644 index 00000000..7742838b --- /dev/null +++ b/server/build/ec763292e583294612f124c0b0def500.svg @@ -0,0 +1,4938 @@ + + + + + +Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020 + By Robert Madole +Copyright (c) Font Awesome + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/build/f28f2d6482446544ef1ea1ccc6dd5892.woff b/server/build/f28f2d6482446544ef1ea1ccc6dd5892.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/server/build/f28f2d6482446544ef1ea1ccc6dd5892.woff differ diff --git a/server/build/f80bda6afd19534368443a3d0323a140.woff b/server/build/f80bda6afd19534368443a3d0323a140.woff new file mode 100644 index 00000000..a0ab25e9 Binary files /dev/null and b/server/build/f80bda6afd19534368443a3d0323a140.woff differ diff --git a/server/build/f89ea91ecd1ca2db7e09baa2c4b156d1.woff b/server/build/f89ea91ecd1ca2db7e09baa2c4b156d1.woff new file mode 100644 index 00000000..24de566a Binary files /dev/null and b/server/build/f89ea91ecd1ca2db7e09baa2c4b156d1.woff differ diff --git a/server/build/fb30313e62e3a932b32e5e1eef0f2ed6.png b/server/build/fb30313e62e3a932b32e5e1eef0f2ed6.png new file mode 100644 index 00000000..2156f7e2 Binary files /dev/null and b/server/build/fb30313e62e3a932b32e5e1eef0f2ed6.png differ diff --git a/server/build/fd508c879644dd6827313d801776d714.png b/server/build/fd508c879644dd6827313d801776d714.png new file mode 100644 index 00000000..ff163abb Binary files /dev/null and b/server/build/fd508c879644dd6827313d801776d714.png differ diff --git a/server/build/fee66e712a8a08eef5805a46892932ad.woff b/server/build/fee66e712a8a08eef5805a46892932ad.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/server/build/fee66e712a8a08eef5805a46892932ad.woff differ diff --git a/server/build/index.html b/server/build/index.html new file mode 100644 index 00000000..3919a134 --- /dev/null +++ b/server/build/index.html @@ -0,0 +1,16 @@ + + + + + + + + + Strapi Admin + + + +

    + + + diff --git a/server/build/main.cd2970b9.chunk.js b/server/build/main.cd2970b9.chunk.js new file mode 100644 index 00000000..5382d739 --- /dev/null +++ b/server/build/main.cd2970b9.chunk.js @@ -0,0 +1,150894 @@ +(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[4],[ +/* 0 */ +/***/ (function(module, exports) { + +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} + +module.exports = _interopRequireDefault; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(855); +} else {} + + +/***/ }), +/* 2 */ +/***/ (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__(860)(); +} + + +/***/ }), +/* 3 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return sym; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return TASK; }); +/* unused harmony export HELPER */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MATCH; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CANCEL; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SAGA_ACTION; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SELF_CANCELLATION; }); +/* unused harmony export konst */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return kTrue; }); +/* unused harmony export kFalse */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return noop; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return ident; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return check; }); +/* unused harmony export hasOwn */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return is; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return object; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return remove; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return array; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return deferred; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return arrayOfDeffered; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return delay; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return createMockTask; }); +/* unused harmony export autoInc */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return uid; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return makeIterator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return log; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return deprecate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return updateIncentive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return internalErr; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return createSetContextWarning; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return wrapSagaDispatch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return cloneableGenerator; }); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +var sym = function sym(id) { + return '@@redux-saga/' + id; +}; + +var TASK = /*#__PURE__*/sym('TASK'); +var HELPER = /*#__PURE__*/sym('HELPER'); +var MATCH = /*#__PURE__*/sym('MATCH'); +var CANCEL = /*#__PURE__*/sym('CANCEL_PROMISE'); +var SAGA_ACTION = /*#__PURE__*/sym('SAGA_ACTION'); +var SELF_CANCELLATION = /*#__PURE__*/sym('SELF_CANCELLATION'); +var konst = function konst(v) { + return function () { + return v; + }; +}; +var kTrue = /*#__PURE__*/konst(true); +var kFalse = /*#__PURE__*/konst(false); +var noop = function noop() {}; +var ident = function ident(v) { + return v; +}; + +function check(value, predicate, error) { + if (!predicate(value)) { + log('error', 'uncaught at check', error); + throw new Error(error); + } +} + +var hasOwnProperty = Object.prototype.hasOwnProperty; +function hasOwn(object, property) { + return is.notUndef(object) && hasOwnProperty.call(object, property); +} + +var is = { + undef: function undef(v) { + return v === null || v === undefined; + }, + notUndef: function notUndef(v) { + return v !== null && v !== undefined; + }, + func: function func(f) { + return typeof f === 'function'; + }, + number: function number(n) { + return typeof n === 'number'; + }, + string: function string(s) { + return typeof s === 'string'; + }, + array: Array.isArray, + object: function object(obj) { + return obj && !is.array(obj) && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; + }, + promise: function promise(p) { + return p && is.func(p.then); + }, + iterator: function iterator(it) { + return it && is.func(it.next) && is.func(it.throw); + }, + iterable: function iterable(it) { + return it && is.func(Symbol) ? is.func(it[Symbol.iterator]) : is.array(it); + }, + task: function task(t) { + return t && t[TASK]; + }, + observable: function observable(ob) { + return ob && is.func(ob.subscribe); + }, + buffer: function buffer(buf) { + return buf && is.func(buf.isEmpty) && is.func(buf.take) && is.func(buf.put); + }, + pattern: function pattern(pat) { + return pat && (is.string(pat) || (typeof pat === 'undefined' ? 'undefined' : _typeof(pat)) === 'symbol' || is.func(pat) || is.array(pat)); + }, + channel: function channel(ch) { + return ch && is.func(ch.take) && is.func(ch.close); + }, + helper: function helper(it) { + return it && it[HELPER]; + }, + stringableFunc: function stringableFunc(f) { + return is.func(f) && hasOwn(f, 'toString'); + } +}; + +var object = { + assign: function assign(target, source) { + for (var i in source) { + if (hasOwn(source, i)) { + target[i] = source[i]; + } + } + } +}; + +function remove(array, item) { + var index = array.indexOf(item); + if (index >= 0) { + array.splice(index, 1); + } +} + +var array = { + from: function from(obj) { + var arr = Array(obj.length); + for (var i in obj) { + if (hasOwn(obj, i)) { + arr[i] = obj[i]; + } + } + return arr; + } +}; + +function deferred() { + var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var def = _extends({}, props); + var promise = new Promise(function (resolve, reject) { + def.resolve = resolve; + def.reject = reject; + }); + def.promise = promise; + return def; +} + +function arrayOfDeffered(length) { + var arr = []; + for (var i = 0; i < length; i++) { + arr.push(deferred()); + } + return arr; +} + +function delay(ms) { + var val = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + var timeoutId = void 0; + var promise = new Promise(function (resolve) { + timeoutId = setTimeout(function () { + return resolve(val); + }, ms); + }); + + promise[CANCEL] = function () { + return clearTimeout(timeoutId); + }; + + return promise; +} + +function createMockTask() { + var _ref; + + var running = true; + var _result = void 0, + _error = void 0; + + return _ref = {}, _ref[TASK] = true, _ref.isRunning = function isRunning() { + return running; + }, _ref.result = function result() { + return _result; + }, _ref.error = function error() { + return _error; + }, _ref.setRunning = function setRunning(b) { + return running = b; + }, _ref.setResult = function setResult(r) { + return _result = r; + }, _ref.setError = function setError(e) { + return _error = e; + }, _ref; +} + +function autoInc() { + var seed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + + return function () { + return ++seed; + }; +} + +var uid = /*#__PURE__*/autoInc(); + +var kThrow = function kThrow(err) { + throw err; +}; +var kReturn = function kReturn(value) { + return { value: value, done: true }; +}; +function makeIterator(next) { + var thro = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kThrow; + var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + var isHelper = arguments[3]; + + var iterator = { name: name, next: next, throw: thro, return: kReturn }; + + if (isHelper) { + iterator[HELPER] = true; + } + if (typeof Symbol !== 'undefined') { + iterator[Symbol.iterator] = function () { + return iterator; + }; + } + return iterator; +} + +/** + Print error in a useful way whether in a browser environment + (with expandable error stack traces), or in a node.js environment + (text-only log output) + **/ +function log(level, message) { + var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + + /*eslint-disable no-console*/ + if (typeof window === 'undefined') { + console.log('redux-saga ' + level + ': ' + message + '\n' + (error && error.stack || error)); + } else { + console[level](message, error); + } +} + +function deprecate(fn, deprecationWarning) { + return function () { + if (false) {} + return fn.apply(undefined, arguments); + }; +} + +var updateIncentive = function updateIncentive(deprecated, preferred) { + return deprecated + ' has been deprecated in favor of ' + preferred + ', please update your code'; +}; + +var internalErr = function internalErr(err) { + return new Error('\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project\'s github repo.\n Error: ' + err + '\n'); +}; + +var createSetContextWarning = function createSetContextWarning(ctx, props) { + return (ctx ? ctx + '.' : '') + 'setContext(props): argument ' + props + ' is not a plain object'; +}; + +var wrapSagaDispatch = function wrapSagaDispatch(dispatch) { + return function (action) { + return dispatch(Object.defineProperty(action, SAGA_ACTION, { value: true })); + }; +}; + +var cloneableGenerator = function cloneableGenerator(generatorFunc) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var history = []; + var gen = generatorFunc.apply(undefined, args); + return { + next: function next(arg) { + history.push(arg); + return gen.next(arg); + }, + clone: function clone() { + var clonedGen = cloneableGenerator(generatorFunc).apply(undefined, args); + history.forEach(function (arg) { + return clonedGen.next(arg); + }); + return clonedGen; + }, + return: function _return(value) { + return gen.return(value); + }, + throw: function _throw(exception) { + return gen.throw(exception); + } + }; + }; +}; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var reactIs = __webpack_require__(178); +var React = __webpack_require__(1); +var React__default = _interopDefault(React); +var shallowequal = _interopDefault(__webpack_require__(55)); +var Stylis = _interopDefault(__webpack_require__(404)); +var unitless = _interopDefault(__webpack_require__(405)); +var validAttr = _interopDefault(__webpack_require__(886)); +var hoist = _interopDefault(__webpack_require__(70)); + +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 _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 interleave = (function (strings, interpolations) { + var result = [strings[0]]; + + for (var i = 0, len = interpolations.length; i < len; i += 1) { + result.push(interpolations[i], strings[i + 1]); + } + + return result; +}); + +// +var isPlainObject = (function (x) { + return typeof x === 'object' && x.constructor === Object; +}); + +// +var EMPTY_ARRAY = Object.freeze([]); +var EMPTY_OBJECT = Object.freeze({}); + +// +function isFunction(test) { + return typeof test === 'function'; +} + +// +function getComponentName(target) { + return ( false) || // $FlowFixMe + target.displayName || // $FlowFixMe + target.name || 'Component'; +} + +// +function isStatelessFunction(test) { + return typeof test === 'function' && !(test.prototype && test.prototype.isReactComponent); +} + +// +function isStyledComponent(target) { + return target && typeof target.styledComponentId === 'string'; +} + +// +var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled'; +var SC_ATTR_ACTIVE = 'active'; +var SC_ATTR_VERSION = 'data-styled-version'; +var SC_VERSION = "5.0.1"; +var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window; +var DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY || typeof process !== 'undefined' && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || "production" !== 'production'; // Shared empty execution context when generating static styles + +var STATIC_EXECUTION_CONTEXT = {}; + +// + +/* eslint-disable camelcase, no-undef */ +var getNonce = function getNonce() { + return true ? __webpack_require__.nc : undefined; +}; + +var errorMap = { + "1": "Cannot create styled-component for component: %s.\n\n", + "2": "Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n", + "3": "Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n", + "4": "The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n", + "5": "The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n", + "6": "Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n", + "7": "ThemeProvider: Please return an object from your \"theme\" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n", + "8": "ThemeProvider: Please make your \"theme\" prop an object.\n\n", + "9": "Missing document ``\n\n", + "10": "Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n", + "11": "_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n", + "12": "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", + "13": "%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n", + "14": "ThemeProvider: \"theme\" prop is required.\n\n", + "15": "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", + "16": "Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n", + "17": "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n" +}; + +// +var ERRORS = false ? undefined : {}; +/** + * super basic version of sprintf + */ + +function format() { + var a = arguments.length <= 0 ? undefined : arguments[0]; + var b = []; + + for (var c = 1, len = arguments.length; c < len; c += 1) { + b.push(c < 0 || arguments.length <= c ? undefined : arguments[c]); + } + + b.forEach(function (d) { + a = a.replace(/%[a-z]/, d); + }); + return a; +} +/** + * Create an error file out of errors.md for development and a simple web link to the full errors + * in production mode. + */ + + +function throwStyledComponentsError(code) { + for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + interpolations[_key - 1] = arguments[_key]; + } + + if (true) { + throw new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/master/packages/styled-components/src/utils/errors.md#" + code + " for more information." + (interpolations.length > 0 ? " Additional arguments: " + interpolations.join(', ') : '')); + } else {} +} + +// +var ELEMENT_TYPE = 1; +/* Node.ELEMENT_TYPE */ + +/** Find last style element if any inside target */ + +var findLastStyleTag = function findLastStyleTag(target) { + var childNodes = target.childNodes; + + for (var i = childNodes.length; i >= 0; i--) { + var child = childNodes[i]; + + if (child && child.nodeType === ELEMENT_TYPE && child.hasAttribute(SC_ATTR)) { + return child; + } + } + + return undefined; +}; +/** Create a style element inside `target` or after the last */ + + +var makeStyleTag = function makeStyleTag(target) { + var head = document.head; + var parent = target || head; + var style = document.createElement('style'); + var prevStyle = findLastStyleTag(parent); + var nextSibling = prevStyle !== undefined ? prevStyle.nextSibling : null; + style.setAttribute(SC_ATTR, SC_ATTR_ACTIVE); + style.setAttribute(SC_ATTR_VERSION, SC_VERSION); + var nonce = getNonce(); + if (nonce) style.setAttribute('nonce', nonce); + parent.insertBefore(style, nextSibling); + return style; +}; +/** Get the CSSStyleSheet instance for a given style element */ + +var getSheet = function getSheet(tag) { + if (tag.sheet) { + return tag.sheet; + } // Avoid Firefox quirk where the style element might not have a sheet property + + + var _document = document, + styleSheets = _document.styleSheets; + + for (var i = 0, l = styleSheets.length; i < l; i++) { + var sheet = styleSheets[i]; + + if (sheet.ownerNode === tag) { + return sheet; + } + } + + throwStyledComponentsError(17); + return undefined; +}; + +// +/** Create a CSSStyleSheet-like tag depending on the environment */ + +var makeTag = function makeTag(_ref) { + var isServer = _ref.isServer, + useCSSOMInjection = _ref.useCSSOMInjection, + target = _ref.target; + + if (isServer) { + return new VirtualTag(target); + } else if (useCSSOMInjection) { + return new CSSOMTag(target); + } else { + return new TextTag(target); + } +}; +var CSSOMTag = +/*#__PURE__*/ +function () { + function CSSOMTag(target) { + var element = this.element = makeStyleTag(target); // Avoid Edge bug where empty style elements don't create sheets + + element.appendChild(document.createTextNode('')); + this.sheet = getSheet(element); + this.length = 0; + } + + var _proto = CSSOMTag.prototype; + + _proto.insertRule = function insertRule(index, rule) { + try { + this.sheet.insertRule(rule, index); + this.length++; + return true; + } catch (_error) { + return false; + } + }; + + _proto.deleteRule = function deleteRule(index) { + this.sheet.deleteRule(index); + this.length--; + }; + + _proto.getRule = function getRule(index) { + var rule = this.sheet.cssRules[index]; // Avoid IE11 quirk where cssText is inaccessible on some invalid rules + + if (rule !== undefined && typeof rule.cssText === 'string') { + return rule.cssText; + } else { + return ''; + } + }; + + return CSSOMTag; +}(); +/** A Tag that emulates the CSSStyleSheet API but uses text nodes */ + +var TextTag = +/*#__PURE__*/ +function () { + function TextTag(target) { + var element = this.element = makeStyleTag(target); + this.nodes = element.childNodes; + this.length = 0; + } + + var _proto2 = TextTag.prototype; + + _proto2.insertRule = function insertRule(index, rule) { + if (index <= this.length && index >= 0) { + var node = document.createTextNode(rule); + var refNode = this.nodes[index]; + this.element.insertBefore(node, refNode || null); + this.length++; + return true; + } else { + return false; + } + }; + + _proto2.deleteRule = function deleteRule(index) { + this.element.removeChild(this.nodes[index]); + this.length--; + }; + + _proto2.getRule = function getRule(index) { + if (index < this.length) { + return this.nodes[index].textContent; + } else { + return ''; + } + }; + + return TextTag; +}(); +/** A completely virtual (server-side) Tag that doesn't manipulate the DOM */ + +var VirtualTag = +/*#__PURE__*/ +function () { + function VirtualTag(_target) { + this.rules = []; + this.length = 0; + } + + var _proto3 = VirtualTag.prototype; + + _proto3.insertRule = function insertRule(index, rule) { + if (index <= this.length) { + this.rules.splice(index, 0, rule); + this.length++; + return true; + } else { + return false; + } + }; + + _proto3.deleteRule = function deleteRule(index) { + this.rules.splice(index, 1); + this.length--; + }; + + _proto3.getRule = function getRule(index) { + if (index < this.length) { + return this.rules[index]; + } else { + return ''; + } + }; + + return VirtualTag; +}(); + +// +/** Create a GroupedTag with an underlying Tag implementation */ + +var makeGroupedTag = function makeGroupedTag(tag) { + return new DefaultGroupedTag(tag); +}; +var BASE_SIZE = 1 << 9; + +var DefaultGroupedTag = +/*#__PURE__*/ +function () { + function DefaultGroupedTag(tag) { + this.groupSizes = new Uint32Array(BASE_SIZE); + this.length = BASE_SIZE; + this.tag = tag; + } + + var _proto = DefaultGroupedTag.prototype; + + _proto.indexOfGroup = function indexOfGroup(group) { + var index = 0; + + for (var i = 0; i < group; i++) { + index += this.groupSizes[i]; + } + + return index; + }; + + _proto.insertRules = function insertRules(group, rules) { + if (group >= this.groupSizes.length) { + var oldBuffer = this.groupSizes; + var oldSize = oldBuffer.length; + var newSize = oldSize; + + while (group >= newSize) { + newSize <<= 1; + + if (newSize < 0) { + throwStyledComponentsError(16, "" + group); + } + } + + this.groupSizes = new Uint32Array(newSize); + this.groupSizes.set(oldBuffer); + this.length = newSize; + + for (var i = oldSize; i < newSize; i++) { + this.groupSizes[i] = 0; + } + } + + var ruleIndex = this.indexOfGroup(group + 1); + + for (var _i = 0, l = rules.length; _i < l; _i++) { + if (this.tag.insertRule(ruleIndex, rules[_i])) { + this.groupSizes[group]++; + ruleIndex++; + } + } + }; + + _proto.clearGroup = function clearGroup(group) { + if (group < this.length) { + var length = this.groupSizes[group]; + var startIndex = this.indexOfGroup(group); + var endIndex = startIndex + length; + this.groupSizes[group] = 0; + + for (var i = startIndex; i < endIndex; i++) { + this.tag.deleteRule(startIndex); + } + } + }; + + _proto.getGroup = function getGroup(group) { + var css = ''; + + if (group >= this.length || this.groupSizes[group] === 0) { + return css; + } + + var length = this.groupSizes[group]; + var startIndex = this.indexOfGroup(group); + var endIndex = startIndex + length; + + for (var i = startIndex; i < endIndex; i++) { + css += this.tag.getRule(i) + "\n"; + } + + return css; + }; + + return DefaultGroupedTag; +}(); + +// +var MAX_SMI = 1 << 31 - 1; +var groupIDRegister = new Map(); +var reverseRegister = new Map(); +var nextFreeGroup = 1; +var getGroupForId = function getGroupForId(id) { + if (groupIDRegister.has(id)) { + return groupIDRegister.get(id); + } + + var group = nextFreeGroup++; + + if (false) {} + + groupIDRegister.set(id, group); + reverseRegister.set(group, id); + return group; +}; +var getIdForGroup = function getIdForGroup(group) { + return reverseRegister.get(group); +}; +var setGroupForId = function setGroupForId(id, group) { + if (group >= nextFreeGroup) { + nextFreeGroup = group + 1; + } + + groupIDRegister.set(id, group); + reverseRegister.set(group, id); +}; + +// +var SELECTOR = "style[" + SC_ATTR + "][" + SC_ATTR_VERSION + "=\"" + SC_VERSION + "\"]"; +var RULE_RE = /(?:\s*)?(.*?){((?:{[^}]*}|(?!{).*?)*)}/g; +var MARKER_RE = new RegExp("^" + SC_ATTR + "\\.g(\\d+)\\[id=\"([\\w\\d-]+)\"\\]"); +var outputSheet = function outputSheet(sheet) { + var tag = sheet.getTag(); + var length = tag.length; + var css = ''; + + for (var group = 0; group < length; group++) { + var id = getIdForGroup(group); + if (id === undefined) continue; + var names = sheet.names.get(id); + var rules = tag.getGroup(group); + if (names === undefined || rules.length === 0) continue; + var selector = SC_ATTR + ".g" + group + "[id=\"" + id + "\"]"; + var content = ''; + + if (names !== undefined) { + names.forEach(function (name) { + if (name.length > 0) { + content += name + ","; + } + }); + } // NOTE: It's easier to collect rules and have the marker + // after the actual rules to simplify the rehydration + + + css += "" + rules + selector + "{content:\"" + content + "\"}\n"; + } + + return css; +}; + +var rehydrateNamesFromContent = function rehydrateNamesFromContent(sheet, id, content) { + var names = content.split(','); + var name; + + for (var i = 0, l = names.length; i < l; i++) { + // eslint-disable-next-line + if (name = names[i]) { + sheet.registerName(id, name); + } + } +}; + +var rehydrateSheetFromTag = function rehydrateSheetFromTag(sheet, style) { + var rawHTML = style.innerHTML; + var rules = []; + var parts; // parts = [match, selector, content] + // eslint-disable-next-line no-cond-assign + + while (parts = RULE_RE.exec(rawHTML)) { + var marker = parts[1].match(MARKER_RE); + + if (marker) { + var group = parseInt(marker[1], 10) | 0; + var id = marker[2]; + + if (group !== 0) { + // Rehydrate componentId to group index mapping + setGroupForId(id, group); // Rehydrate names and rules + // looks like: data-styled.g11[id="idA"]{content:"nameA,"} + + rehydrateNamesFromContent(sheet, id, parts[2].split('"')[1]); + sheet.getTag().insertRules(group, rules); + } + + rules.length = 0; + } else { + rules.push(parts[0].trim()); + } + } +}; + +var rehydrateSheet = function rehydrateSheet(sheet) { + var nodes = document.querySelectorAll(SELECTOR); + + for (var i = 0, l = nodes.length; i < l; i++) { + var node = nodes[i]; + + if (node && node.getAttribute(SC_ATTR) !== SC_ATTR_ACTIVE) { + rehydrateSheetFromTag(sheet, node); + + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } + } +}; + +var SHOULD_REHYDRATE = IS_BROWSER; +var defaultOptions = { + isServer: !IS_BROWSER, + useCSSOMInjection: !DISABLE_SPEEDY +}; +/** Contains the main stylesheet logic for stringification and caching */ + +var StyleSheet = +/*#__PURE__*/ +function () { + /** Register a group ID to give it an index */ + StyleSheet.registerId = function registerId(id) { + return getGroupForId(id); + }; + + function StyleSheet(options, globalStyles, names) { + if (options === void 0) { + options = defaultOptions; + } + + if (globalStyles === void 0) { + globalStyles = {}; + } + + this.options = _extends({}, defaultOptions, {}, options); + this.gs = globalStyles; + this.names = new Map(names); // We rehydrate only once and use the sheet that is created first + + if (!this.options.isServer && IS_BROWSER && SHOULD_REHYDRATE) { + SHOULD_REHYDRATE = false; + rehydrateSheet(this); + } + } + + var _proto = StyleSheet.prototype; + + _proto.reconstructWithOptions = function reconstructWithOptions(options) { + return new StyleSheet(_extends({}, this.options, {}, options), this.gs, this.names); + }; + + _proto.allocateGSInstance = function allocateGSInstance(id) { + return this.gs[id] = (this.gs[id] || 0) + 1; + } + /** Lazily initialises a GroupedTag for when it's actually needed */ + ; + + _proto.getTag = function getTag() { + return this.tag || (this.tag = makeGroupedTag(makeTag(this.options))); + } + /** Check whether a name is known for caching */ + ; + + _proto.hasNameForId = function hasNameForId(id, name) { + return this.names.has(id) && this.names.get(id).has(name); + } + /** Mark a group's name as known for caching */ + ; + + _proto.registerName = function registerName(id, name) { + getGroupForId(id); + + if (!this.names.has(id)) { + var groupNames = new Set(); + groupNames.add(name); + this.names.set(id, groupNames); + } else { + this.names.get(id).add(name); + } + } + /** Insert new rules which also marks the name as known */ + ; + + _proto.insertRules = function insertRules(id, name, rules) { + this.registerName(id, name); + this.getTag().insertRules(getGroupForId(id), rules); + } + /** Clears all cached names for a given group ID */ + ; + + _proto.clearNames = function clearNames(id) { + if (this.names.has(id)) { + this.names.get(id).clear(); + } + } + /** Clears all rules for a given group ID */ + ; + + _proto.clearRules = function clearRules(id) { + this.getTag().clearGroup(getGroupForId(id)); + this.clearNames(id); + } + /** Clears the entire tag which deletes all rules but not its names */ + ; + + _proto.clearTag = function clearTag() { + // NOTE: This does not clear the names, since it's only used during SSR + // so that we can continuously output only new rules + this.tag = undefined; + } + /** Outputs the current sheet as a CSS string with markers for SSR */ + ; + + _proto.toString = function toString() { + return outputSheet(this); + }; + + return StyleSheet; +}(); + +// + +/* eslint-disable */ +var SEED = 5381; // When we have separate strings it's useful to run a progressive +// version of djb2 where we pretend that we're still looping over +// the same string + +var phash = function phash(h, x) { + var i = x.length; + + while (i) { + h = h * 33 ^ x.charCodeAt(--i); + } + + return h; +}; // This is a djb2 hashing function + +var hash = function hash(x) { + return phash(SEED, x); +}; + +/** + * MIT License + * + * Copyright (c) 2016 Sultan Tarimo + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR + * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* eslint-disable */ +function insertRulePlugin (insertRule) { + var delimiter = '/*|*/'; + var needle = delimiter + "}"; + + function toSheet(block) { + if (block) { + try { + insertRule(block + "}"); + } catch (e) {} + } + } + + return function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) { + switch (context) { + // property + case 1: + // @import + if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content + ";"), ''; + break; + // selector + + case 2: + if (ns === 0) return content + delimiter; + break; + // at-rule + + case 3: + switch (ns) { + // @font-face, @page + case 102: + case 112: + return insertRule(selectors[0] + content), ''; + + default: + return content + (at === 0 ? delimiter : ''); + } + + case -2: + content.split(needle).forEach(toSheet); + } + }; +} + +var COMMENT_REGEX = /^\s*\/\/.*$/gm; +function createStylisInstance(_temp) { + var _ref = _temp === void 0 ? EMPTY_OBJECT : _temp, + _ref$options = _ref.options, + options = _ref$options === void 0 ? EMPTY_OBJECT : _ref$options, + _ref$plugins = _ref.plugins, + plugins = _ref$plugins === void 0 ? EMPTY_ARRAY : _ref$plugins; + + var stylis = new Stylis(options); // Wrap `insertRulePlugin to build a list of rules, + // and then make our own plugin to return the rules. This + // makes it easier to hook into the existing SSR architecture + + var parsingRules = []; // eslint-disable-next-line consistent-return + + var returnRulesPlugin = function returnRulesPlugin(context) { + if (context === -2) { + var parsedRules = parsingRules; + parsingRules = []; + return parsedRules; + } + }; + + var parseRulesPlugin = insertRulePlugin(function (rule) { + parsingRules.push(rule); + }); + + var _componentId; + + var _selector; + + var _selectorRegexp; + + var selfReferenceReplacer = function selfReferenceReplacer(match, offset, string) { + if ( // the first self-ref is always untouched + offset > 0 && // there should be at least two self-refs to do a replacement (.b > .b) + string.slice(0, offset).indexOf(_selector) !== -1 && // no consecutive self refs (.b.b); that is a precedence boost and treated differently + string.slice(offset - _selector.length, offset) !== _selector) { + return "." + _componentId; + } + + return match; + }; + /** + * When writing a style like + * + * & + & { + * color: red; + * } + * + * The second ampersand should be a reference to the static component class. stylis + * has no knowledge of static class so we have to intelligently replace the base selector. + * + * https://github.com/thysultan/stylis.js#plugins <- more info about the context phase values + * "2" means this plugin is taking effect at the very end after all other processing is complete + */ + + + var selfReferenceReplacementPlugin = function selfReferenceReplacementPlugin(context, _, selectors) { + if (context === 2 && selectors.length && selectors[0].lastIndexOf(_selector) > 0) { + // eslint-disable-next-line no-param-reassign + selectors[0] = selectors[0].replace(_selectorRegexp, selfReferenceReplacer); + } + }; + + stylis.use([].concat(plugins, [selfReferenceReplacementPlugin, parseRulesPlugin, returnRulesPlugin])); + + function stringifyRules(css, selector, prefix, componentId) { + if (componentId === void 0) { + componentId = '&'; + } + + var flatCSS = css.replace(COMMENT_REGEX, ''); + var cssStr = selector && prefix ? prefix + " " + selector + " { " + flatCSS + " }" : flatCSS; // stylis has no concept of state to be passed to plugins + // but since JS is single=threaded, we can rely on that to ensure + // these properties stay in sync with the current stylis run + + _componentId = componentId; + _selector = selector; + _selectorRegexp = new RegExp("\\" + _selector + "\\b", 'g'); + return stylis(prefix || !selector ? '' : selector, cssStr); + } + + stringifyRules.hash = plugins.length ? plugins.reduce(function (acc, plugin) { + if (!plugin.name) { + throwStyledComponentsError(15); + } + + return phash(acc, plugin.name); + }, SEED).toString() : ''; + return stringifyRules; +} + +// +var StyleSheetContext = React__default.createContext(); +var StyleSheetConsumer = StyleSheetContext.Consumer; +var StylisContext = React__default.createContext(); +var StylisConsumer = StylisContext.Consumer; +var masterSheet = new StyleSheet(); +var masterStylis = createStylisInstance(); +function useStyleSheet() { + return React.useContext(StyleSheetContext) || masterSheet; +} +function useStylis() { + return React.useContext(StylisContext) || masterStylis; +} +function StyleSheetManager(props) { + var _useState = React.useState(props.stylisPlugins), + plugins = _useState[0], + setPlugins = _useState[1]; + + var contextStyleSheet = useStyleSheet(); + var styleSheet = React.useMemo(function () { + var sheet = contextStyleSheet; + + if (props.sheet) { + // eslint-disable-next-line prefer-destructuring + sheet = props.sheet; + } else if (props.target) { + sheet = sheet.reconstructWithOptions({ + target: props.target + }); + } + + if (props.disableCSSOMInjection) { + sheet = sheet.reconstructWithOptions({ + useCSSOMInjection: false + }); + } + + return sheet; + }, [props.disableCSSOMInjection, props.sheet, props.target]); + var stylis = React.useMemo(function () { + return createStylisInstance({ + options: { + prefix: !props.disableVendorPrefixes + }, + plugins: plugins + }); + }, [props.disableVendorPrefixes, plugins]); + React.useEffect(function () { + if (!shallowequal(plugins, props.stylisPlugins)) setPlugins(props.stylisPlugins); + }, [props.stylisPlugins]); + return React__default.createElement(StyleSheetContext.Provider, { + value: styleSheet + }, React__default.createElement(StylisContext.Provider, { + value: stylis + }, false ? undefined : props.children)); +} + +// + +var Keyframes = +/*#__PURE__*/ +function () { + function Keyframes(name, stringifyArgs) { + var _this = this; + + this.inject = function (styleSheet) { + if (!styleSheet.hasNameForId(_this.id, _this.name)) { + styleSheet.insertRules(_this.id, _this.name, masterStylis.apply(void 0, _this.stringifyArgs)); + } + }; + + this.toString = function () { + return throwStyledComponentsError(12, String(_this.name)); + }; + + this.name = name; + this.id = "sc-keyframes-" + name; + this.stringifyArgs = stringifyArgs; + } + + var _proto = Keyframes.prototype; + + _proto.getName = function getName() { + return this.name; + }; + + return Keyframes; +}(); + +// + +/** + * inlined version of + * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js + */ +var uppercasePattern = /([A-Z])/g; +var msPattern = /^ms-/; +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ + +function hyphenateStyleName(string) { + return string.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); +} + +// + +function addUnitIfNeeded(name, value) { + // https://github.com/amilajack/eslint-plugin-flowtype-errors/issues/133 + // $FlowFixMe + if (value == null || typeof value === 'boolean' || value === '') { + return ''; + } + + if (typeof value === 'number' && value !== 0 && !(name in unitless)) { + return value + "px"; // Presumes implicit 'px' suffix for unitless numbers + } + + return String(value).trim(); +} + +// +/** + * It's falsish not falsy because 0 is allowed. + */ + +var isFalsish = function isFalsish(chunk) { + return chunk === undefined || chunk === null || chunk === false || chunk === ''; +}; + +var objToCssArray = function objToCssArray(obj, prevKey) { + var rules = []; + var keys = Object.keys(obj); + keys.forEach(function (key) { + if (!isFalsish(obj[key])) { + if (isPlainObject(obj[key])) { + rules.push.apply(rules, objToCssArray(obj[key], key)); + return rules; + } else if (isFunction(obj[key])) { + rules.push(hyphenateStyleName(key) + ":", obj[key], ';'); + return rules; + } + + rules.push(hyphenateStyleName(key) + ": " + addUnitIfNeeded(key, obj[key]) + ";"); + } + + return rules; + }); + return prevKey ? [prevKey + " {"].concat(rules, ['}']) : rules; +}; +function flatten(chunk, executionContext, styleSheet) { + if (Array.isArray(chunk)) { + var ruleSet = []; + + for (var i = 0, len = chunk.length, result; i < len; i += 1) { + result = flatten(chunk[i], executionContext, styleSheet); + if (result === '') continue;else if (Array.isArray(result)) ruleSet.push.apply(ruleSet, result);else ruleSet.push(result); + } + + return ruleSet; + } + + if (isFalsish(chunk)) { + return ''; + } + /* Handle other components */ + + + if (isStyledComponent(chunk)) { + return "." + chunk.styledComponentId; + } + /* Either execute or defer the function */ + + + if (isFunction(chunk)) { + if (isStatelessFunction(chunk) && executionContext) { + var _result = chunk(executionContext); + + if (false) {} + + return flatten(_result, executionContext, styleSheet); + } else return chunk; + } + + if (chunk instanceof Keyframes) { + if (styleSheet) { + chunk.inject(styleSheet); + return chunk.getName(); + } else return chunk; + } + /* Handle objects */ + + + return isPlainObject(chunk) ? objToCssArray(chunk) : chunk.toString(); +} + +// +function css(styles) { + for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + interpolations[_key - 1] = arguments[_key]; + } + + if (isFunction(styles) || isPlainObject(styles)) { + // $FlowFixMe + return flatten(interleave(EMPTY_ARRAY, [styles].concat(interpolations))); + } + + if (interpolations.length === 0 && styles.length === 1 && typeof styles[0] === "string") { + // $FlowFixMe + return styles; + } // $FlowFixMe + + + return flatten(interleave(styles, interpolations)); +} + +function constructWithOptions(componentConstructor, tag, options) { + if (options === void 0) { + options = EMPTY_OBJECT; + } + + if (!reactIs.isValidElementType(tag)) { + return throwStyledComponentsError(1, String(tag)); + } + /* This is callable directly as a template function */ + // $FlowFixMe: Not typed to avoid destructuring arguments + + + var templateFunction = function templateFunction() { + return componentConstructor(tag, options, css.apply(void 0, arguments)); + }; + /* If config methods are called, wrap up a new template function and merge options */ + + + templateFunction.withConfig = function (config) { + return constructWithOptions(componentConstructor, tag, _extends({}, options, {}, config)); + }; + /* Modify/inject new props at runtime */ + + + templateFunction.attrs = function (attrs) { + return constructWithOptions(componentConstructor, tag, _extends({}, options, { + attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean) + })); + }; + + return templateFunction; +} + +/* eslint-disable */ + +/** + mixin-deep; https://github.com/jonschlinkert/mixin-deep + Inlined such that it will be consistently transpiled to an IE-compatible syntax. + + The MIT License (MIT) + + Copyright (c) 2014-present, Jon Schlinkert. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ +var isObject = function isObject(val) { + return typeof val === 'function' || typeof val === 'object' && val !== null && !Array.isArray(val); +}; + +var isValidKey = function isValidKey(key) { + return key !== '__proto__' && key !== 'constructor' && key !== 'prototype'; +}; + +function mixin(target, val, key) { + var obj = target[key]; + + if (isObject(val) && isObject(obj)) { + mixinDeep(obj, val); + } else { + target[key] = val; + } +} + +function mixinDeep(target) { + for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + rest[_key - 1] = arguments[_key]; + } + + for (var _i = 0, _rest = rest; _i < _rest.length; _i++) { + var obj = _rest[_i]; + + if (isObject(obj)) { + for (var key in obj) { + if (isValidKey(key)) { + mixin(target, obj[key], key); + } + } + } + } + + return target; +} + +// + +/* eslint-disable no-bitwise */ +var AD_REPLACER_R = /(a)(d)/gi; +/* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised + * counterparts */ + +var charsLength = 52; +/* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */ + +var getAlphabeticChar = function getAlphabeticChar(code) { + return String.fromCharCode(code + (code > 25 ? 39 : 97)); +}; +/* input a number, usually a hash and convert it to base-52 */ + + +function generateAlphabeticName(code) { + var name = ''; + var x; + /* get a char and divide by alphabet-length */ + + for (x = Math.abs(code); x > charsLength; x = x / charsLength | 0) { + name = getAlphabeticChar(x % charsLength) + name; + } + + return (getAlphabeticChar(x % charsLength) + name).replace(AD_REPLACER_R, '$1-$2'); +} + +// +function isStaticRules(rules) { + for (var i = 0; i < rules.length; i += 1) { + var rule = rules[i]; + + if (isFunction(rule) && !isStyledComponent(rule)) { + // functions are allowed to be static if they're just being + // used to get the classname of a nested styled component + return false; + } + } + + return true; +} + +// +/* + ComponentStyle is all the CSS-specific stuff, not + the React-specific stuff. + */ + +var ComponentStyle = +/*#__PURE__*/ +function () { + function ComponentStyle(rules, componentId) { + this.rules = rules; + this.staticRulesId = ''; + this.isStatic = true && isStaticRules(rules); + this.componentId = componentId; + this.baseHash = hash(componentId); // NOTE: This registers the componentId, which ensures a consistent order + // for this component's styles compared to others + + StyleSheet.registerId(componentId); + } + /* + * Flattens a rule set into valid CSS + * Hashes it, wraps the whole chunk in a .hash1234 {} + * Returns the hash to be injected on render() + * */ + + + var _proto = ComponentStyle.prototype; + + _proto.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet, stylis) { + var componentId = this.componentId; // force dynamic classnames if user-supplied stylis plugins are in use + + if (this.isStatic && !stylis.hash) { + if (this.staticRulesId && styleSheet.hasNameForId(componentId, this.staticRulesId)) { + return this.staticRulesId; + } + + var cssStatic = flatten(this.rules, executionContext, styleSheet).join(''); + var name = generateAlphabeticName(phash(this.baseHash, cssStatic.length) >>> 0); + + if (!styleSheet.hasNameForId(componentId, name)) { + var cssStaticFormatted = stylis(cssStatic, "." + name, undefined, componentId); + styleSheet.insertRules(componentId, name, cssStaticFormatted); + } + + this.staticRulesId = name; + return name; + } else { + var length = this.rules.length; + var dynamicHash = phash(this.baseHash, stylis.hash); + var css = ''; + + for (var i = 0; i < length; i++) { + var partRule = this.rules[i]; + + if (typeof partRule === 'string') { + css += partRule; + if (false) {} + } else { + var partChunk = flatten(partRule, executionContext, styleSheet); + var partString = Array.isArray(partChunk) ? partChunk.join('') : partChunk; + dynamicHash = phash(dynamicHash, partString + i); + css += partString; + } + } + + var _name = generateAlphabeticName(dynamicHash >>> 0); + + if (!styleSheet.hasNameForId(componentId, _name)) { + var cssFormatted = stylis(css, "." + _name, undefined, componentId); + styleSheet.insertRules(componentId, _name, cssFormatted); + } + + return _name; + } + }; + + return ComponentStyle; +}(); + +// +var LIMIT = 200; +var createWarnTooManyClasses = (function (displayName, componentId) { + var generatedClasses = {}; + var warningSeen = false; + return function (className) { + if (!warningSeen) { + generatedClasses[className] = true; + + if (Object.keys(generatedClasses).length >= LIMIT) { + // Unable to find latestRule in test environment. + + /* eslint-disable no-console, prefer-template */ + var parsedIdString = componentId ? " with the id of \"" + componentId + "\"" : ''; + console.warn("Over " + LIMIT + " classes were generated for component " + displayName + parsedIdString + ".\n" + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs(props => ({\n' + ' style: {\n' + ' background: props.background,\n' + ' },\n' + ' }))`width: 100%;`\n\n' + ' '); + warningSeen = true; + generatedClasses = {}; + } + } + }; +}); + +// +var invalidHookCallRe = /invalid hook call/i; +var seen = new Set(); +var checkDynamicCreation = function checkDynamicCreation(displayName, componentId) { + if (false) { var message, parsedIdString; } +}; + +// +var determineTheme = (function (props, providedTheme, defaultProps) { + if (defaultProps === void 0) { + defaultProps = EMPTY_OBJECT; + } + + return props.theme !== defaultProps.theme && props.theme || providedTheme || defaultProps.theme; +}); + +// +var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g; +var dashesAtEnds = /(^-|-$)/g; +/** + * TODO: Explore using CSS.escape when it becomes more available + * in evergreen browsers. + */ + +function escape(str) { + return str // Replace all possible CSS selectors + .replace(escapeRegex, '-') // Remove extraneous hyphens at the start and end + .replace(dashesAtEnds, ''); +} + +// +function isTag(target) { + return typeof target === 'string' && ( false ? undefined : true); +} + +// +function generateDisplayName(target) { + // $FlowFixMe + return isTag(target) ? "styled." + target : "Styled(" + getComponentName(target) + ")"; +} + +// +var generateComponentId = (function (str) { + return generateAlphabeticName(hash(str) >>> 0); +}); + +/** + * Convenience function for joining strings to form className chains + */ +function joinStrings(a, b) { + return a && b ? a + " " + b : a || b; +} + +var ThemeContext = React__default.createContext(); +var ThemeConsumer = ThemeContext.Consumer; + +function mergeTheme(theme, outerTheme) { + if (!theme) { + return throwStyledComponentsError(14); + } + + if (isFunction(theme)) { + var mergedTheme = theme(outerTheme); + + if (false) {} + + return mergedTheme; + } + + if (Array.isArray(theme) || typeof theme !== 'object') { + return throwStyledComponentsError(8); + } + + return outerTheme ? _extends({}, outerTheme, {}, theme) : theme; +} +/** + * Provide a theme to an entire react component tree via context + */ + + +function ThemeProvider(props) { + var outerTheme = React.useContext(ThemeContext); + var themeContext = React.useMemo(function () { + return mergeTheme(props.theme, outerTheme); + }, [props.theme, outerTheme]); + + if (!props.children) { + return null; + } + + return React__default.createElement(ThemeContext.Provider, { + value: themeContext + }, props.children); +} + +/* global $Call */ + +var identifiers = {}; +/* We depend on components having unique IDs */ + +function generateId(displayName, parentComponentId) { + var name = typeof displayName !== 'string' ? 'sc' : escape(displayName); // Ensure that no displayName can lead to duplicate componentIds + + identifiers[name] = (identifiers[name] || 0) + 1; + var componentId = name + "-" + generateComponentId(name + identifiers[name]); + return parentComponentId ? parentComponentId + "-" + componentId : componentId; +} + +function useResolvedAttrs(theme, props, attrs) { + if (theme === void 0) { + theme = EMPTY_OBJECT; + } + + // NOTE: can't memoize this + // returns [context, resolvedAttrs] + // where resolvedAttrs is only the things injected by the attrs themselves + var context = _extends({}, props, { + theme: theme + }); + + var resolvedAttrs = {}; + attrs.forEach(function (attrDef) { + var resolvedAttrDef = attrDef; + var key; + + if (isFunction(resolvedAttrDef)) { + resolvedAttrDef = resolvedAttrDef(context); + } + /* eslint-disable guard-for-in */ + + + for (key in resolvedAttrDef) { + context[key] = resolvedAttrs[key] = key === 'className' ? joinStrings(resolvedAttrs[key], resolvedAttrDef[key]) : resolvedAttrDef[key]; + } + /* eslint-enable guard-for-in */ + + }); + return [context, resolvedAttrs]; +} + +function useInjectedStyle(componentStyle, hasAttrs, resolvedAttrs, warnTooManyClasses) { + var styleSheet = useStyleSheet(); + var stylis = useStylis(); // statically styled-components don't need to build an execution context object, + // and shouldn't be increasing the number of class names + + var isStatic = componentStyle.isStatic && !hasAttrs; + var className = isStatic ? componentStyle.generateAndInjectStyles(EMPTY_OBJECT, styleSheet, stylis) : componentStyle.generateAndInjectStyles(resolvedAttrs, styleSheet, stylis); + React.useDebugValue(className); + + if (false) {} + + return className; +} + +function useStyledComponentImpl(forwardedComponent, props, forwardedRef) { + var componentAttrs = forwardedComponent.attrs, + componentStyle = forwardedComponent.componentStyle, + defaultProps = forwardedComponent.defaultProps, + foldedComponentIds = forwardedComponent.foldedComponentIds, + styledComponentId = forwardedComponent.styledComponentId, + target = forwardedComponent.target; + React.useDebugValue(styledComponentId); // NOTE: the non-hooks version only subscribes to this when !componentStyle.isStatic, + // but that'd be against the rules-of-hooks. We could be naughty and do it anyway as it + // should be an immutable value, but behave for now. + + var theme = determineTheme(props, React.useContext(ThemeContext), defaultProps); + + var _useResolvedAttrs = useResolvedAttrs(theme || EMPTY_OBJECT, props, componentAttrs), + context = _useResolvedAttrs[0], + attrs = _useResolvedAttrs[1]; + + var generatedClassName = useInjectedStyle(componentStyle, componentAttrs.length > 0, context, false ? undefined : undefined); + var refToForward = forwardedRef; + var elementToBeCreated = attrs.as || props.as || target; + var isTargetTag = isTag(elementToBeCreated); + var computedProps = attrs !== props ? _extends({}, props, {}, attrs) : props; + var shouldFilterProps = isTargetTag || 'as' in computedProps || 'forwardedAs' in computedProps; + var propsForElement = shouldFilterProps ? {} : _extends({}, computedProps); + + if (shouldFilterProps) { + // eslint-disable-next-line guard-for-in + for (var key in computedProps) { + if (key === 'forwardedAs') { + propsForElement.as = computedProps[key]; + } else if (key !== 'as' && key !== 'forwardedAs' && (!isTargetTag || validAttr(key))) { + // Don't pass through non HTML tags through to HTML elements + propsForElement[key] = computedProps[key]; + } + } + } + + if (props.style && attrs.style !== props.style) { + propsForElement.style = _extends({}, props.style, {}, attrs.style); + } + + propsForElement.className = Array.prototype.concat(foldedComponentIds, styledComponentId, generatedClassName !== styledComponentId ? generatedClassName : null, props.className, attrs.className).filter(Boolean).join(' '); + propsForElement.ref = refToForward; + return React.createElement(elementToBeCreated, propsForElement); +} + +function createStyledComponent(target, options, rules) { + var isTargetStyledComp = isStyledComponent(target); + var isCompositeComponent = !isTag(target); + var _options$displayName = options.displayName, + displayName = _options$displayName === void 0 ? generateDisplayName(target) : _options$displayName, + _options$componentId = options.componentId, + componentId = _options$componentId === void 0 ? generateId(options.displayName, options.parentComponentId) : _options$componentId, + _options$attrs = options.attrs, + attrs = _options$attrs === void 0 ? EMPTY_ARRAY : _options$attrs; + var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + "-" + options.componentId : options.componentId || componentId; // fold the underlying StyledComponent attrs up (implicit extend) + + var finalAttrs = // $FlowFixMe + isTargetStyledComp && target.attrs ? Array.prototype.concat(target.attrs, attrs).filter(Boolean) : attrs; + var componentStyle = new ComponentStyle(isTargetStyledComp ? // fold the underlying StyledComponent rules up (implicit extend) + // $FlowFixMe + target.componentStyle.rules.concat(rules) : rules, styledComponentId); + /** + * forwardRef creates a new interim component, which we'll take advantage of + * instead of extending ParentComponent to create _another_ interim class + */ + + var WrappedStyledComponent; // eslint-disable-next-line react-hooks/rules-of-hooks + + var forwardRef = function forwardRef(props, ref) { + return useStyledComponentImpl(WrappedStyledComponent, props, ref); + }; + + forwardRef.displayName = displayName; // $FlowFixMe this is a forced cast to merge it StyledComponentWrapperProperties + + WrappedStyledComponent = React__default.forwardRef(forwardRef); + WrappedStyledComponent.attrs = finalAttrs; + WrappedStyledComponent.componentStyle = componentStyle; + WrappedStyledComponent.displayName = displayName; // this static is used to preserve the cascade of static classes for component selector + // purposes; this is especially important with usage of the css prop + + WrappedStyledComponent.foldedComponentIds = isTargetStyledComp ? // $FlowFixMe + Array.prototype.concat(target.foldedComponentIds, target.styledComponentId) : EMPTY_ARRAY; + WrappedStyledComponent.styledComponentId = styledComponentId; // fold the underlying StyledComponent target up since we folded the styles + + WrappedStyledComponent.target = isTargetStyledComp ? // $FlowFixMe + target.target : target; // $FlowFixMe + + WrappedStyledComponent.withComponent = function withComponent(tag) { + var previousComponentId = options.componentId, + optionsToCopy = _objectWithoutPropertiesLoose(options, ["componentId"]); + + var newComponentId = previousComponentId && previousComponentId + "-" + (isTag(tag) ? tag : escape(getComponentName(tag))); + + var newOptions = _extends({}, optionsToCopy, { + attrs: finalAttrs, + componentId: newComponentId + }); + + return createStyledComponent(tag, newOptions, rules); + }; // $FlowFixMe + + + Object.defineProperty(WrappedStyledComponent, 'defaultProps', { + get: function get() { + return this._foldedDefaultProps; + }, + set: function set(obj) { + // $FlowFixMe + this._foldedDefaultProps = isTargetStyledComp ? mixinDeep({}, target.defaultProps, obj) : obj; + } + }); + + if (false) {} // $FlowFixMe + + + WrappedStyledComponent.toString = function () { + return "." + WrappedStyledComponent.styledComponentId; + }; + + if (isCompositeComponent) { + hoist(WrappedStyledComponent, target, { + // all SC-specific things should not be hoisted + attrs: true, + componentStyle: true, + displayName: true, + foldedComponentIds: true, + self: true, + styledComponentId: true, + target: true, + withComponent: true + }); + } + + return WrappedStyledComponent; +} + +// +// Thanks to ReactDOMFactories for this handy list! +var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG +'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; + +// + +var styled = function styled(tag) { + return constructWithOptions(createStyledComponent, tag); +}; // Shorthands for all valid HTML Elements + + +domElements.forEach(function (domElement) { + styled[domElement] = styled(domElement); +}); + +// + +var GlobalStyle = +/*#__PURE__*/ +function () { + function GlobalStyle(rules, componentId) { + this.rules = rules; + this.componentId = componentId; + this.isStatic = isStaticRules(rules); + } + + var _proto = GlobalStyle.prototype; + + _proto.createStyles = function createStyles(instance, executionContext, styleSheet, stylis) { + var flatCSS = flatten(this.rules, executionContext, styleSheet); + var css = stylis(flatCSS.join(''), ''); + var id = this.componentId + instance; // NOTE: We use the id as a name as well, since these rules never change + + styleSheet.insertRules(id, id, css); + }; + + _proto.removeStyles = function removeStyles(instance, styleSheet) { + styleSheet.clearRules(this.componentId + instance); + }; + + _proto.renderStyles = function renderStyles(instance, executionContext, styleSheet, stylis) { + StyleSheet.registerId(this.componentId + instance); // NOTE: Remove old styles, then inject the new ones + + this.removeStyles(instance, styleSheet); + this.createStyles(instance, executionContext, styleSheet, stylis); + }; + + return GlobalStyle; +}(); + +function createGlobalStyle(strings) { + for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + interpolations[_key - 1] = arguments[_key]; + } + + var rules = css.apply(void 0, [strings].concat(interpolations)); + var styledComponentId = "sc-global-" + generateComponentId(JSON.stringify(rules)); + var globalStyle = new GlobalStyle(rules, styledComponentId); + + if (false) {} + + function GlobalStyleComponent(props) { + var styleSheet = useStyleSheet(); + var stylis = useStylis(); + var theme = React.useContext(ThemeContext); + var instanceRef = React.useRef(null); + + if (instanceRef.current === null) { + instanceRef.current = styleSheet.allocateGSInstance(styledComponentId); + } + + var instance = instanceRef.current; + + if (false) {} + + if (false) {} + + if (globalStyle.isStatic) { + globalStyle.renderStyles(instance, STATIC_EXECUTION_CONTEXT, styleSheet, stylis); + } else { + var context = _extends({}, props, { + theme: determineTheme(props, theme, GlobalStyleComponent.defaultProps) + }); + + globalStyle.renderStyles(instance, context, styleSheet, stylis); + } + + React.useEffect(function () { + return function () { + return globalStyle.removeStyles(instance, styleSheet); + }; + }, EMPTY_ARRAY); + return null; + } // $FlowFixMe + + + return React__default.memo(GlobalStyleComponent); +} + +// +function keyframes(strings) { + /* Warning if you've used keyframes on React Native */ + if (false) {} + + for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + interpolations[_key - 1] = arguments[_key]; + } + + var rules = css.apply(void 0, [strings].concat(interpolations)).join(''); + var name = generateComponentId(rules); + return new Keyframes(name, [rules, name, '@keyframes']); +} + +var ServerStyleSheet = +/*#__PURE__*/ +function () { + function ServerStyleSheet() { + var _this = this; + + this._emitSheetCSS = function () { + var css = _this.instance.toString(); + + var nonce = getNonce(); + var attrs = [nonce && "nonce=\"" + nonce + "\"", SC_ATTR + "=\"true\"", SC_ATTR_VERSION + "=\"" + SC_VERSION + "\""]; + var htmlAttr = attrs.filter(Boolean).join(' '); + return ""; + }; + + this.getStyleTags = function () { + if (_this.sealed) { + return throwStyledComponentsError(2); + } + + return _this._emitSheetCSS(); + }; + + this.getStyleElement = function () { + var _props; + + if (_this.sealed) { + return throwStyledComponentsError(2); + } + + var props = (_props = {}, _props[SC_ATTR] = '', _props[SC_ATTR_VERSION] = SC_VERSION, _props.dangerouslySetInnerHTML = { + __html: _this.instance.toString() + }, _props); + var nonce = getNonce(); + + if (nonce) { + props.nonce = nonce; + } // v4 returned an array for this fn, so we'll do the same for v5 for backward compat + + + return [React__default.createElement("style", _extends({}, props, { + key: "sc-0-0" + }))]; + }; + + this.seal = function () { + _this.sealed = true; + }; + + this.instance = new StyleSheet({ + isServer: true + }); + this.sealed = false; + } + + var _proto = ServerStyleSheet.prototype; + + _proto.collectStyles = function collectStyles(children) { + if (this.sealed) { + return throwStyledComponentsError(2); + } + + return React__default.createElement(StyleSheetManager, { + sheet: this.instance + }, children); + }; + + // eslint-disable-next-line consistent-return + _proto.interleaveWithNodeStream = function interleaveWithNodeStream(input) { + { + return throwStyledComponentsError(3); + } + }; + + return ServerStyleSheet; +}(); + +// export default ( +// Component: AbstractComponent +// ): AbstractComponent<$Diff & { theme?: any }, Instance> +// +// but the old build system tooling doesn't support the syntax + +var withTheme = (function (Component) { + // $FlowFixMe This should be React.forwardRef + var WithTheme = React__default.forwardRef(function (props, ref) { + var theme = React.useContext(ThemeContext); // $FlowFixMe defaultProps isn't declared so it can be inferrable + + var defaultProps = Component.defaultProps; + var themeProp = determineTheme(props, theme, defaultProps); + + if (false) {} + + return React__default.createElement(Component, _extends({}, props, { + theme: themeProp, + ref: ref + })); + }); + hoist(WithTheme, Component); + WithTheme.displayName = "WithTheme(" + getComponentName(Component) + ")"; + return WithTheme; +}); + +// + +var useTheme = function useTheme() { + return React.useContext(ThemeContext); +}; + +// +var __PRIVATE__ = { + StyleSheet: StyleSheet, + masterSheet: masterSheet +}; + +// +/* Define bundle version for export */ + +var version = "5.0.1"; +/* Warning if you've imported this file on React Native */ + +if (false) {} +/* Warning if there are several instances of styled-components */ + + +if (false) {} + +exports.ServerStyleSheet = ServerStyleSheet; +exports.StyleSheetConsumer = StyleSheetConsumer; +exports.StyleSheetContext = StyleSheetContext; +exports.StyleSheetManager = StyleSheetManager; +exports.ThemeConsumer = ThemeConsumer; +exports.ThemeContext = ThemeContext; +exports.ThemeProvider = ThemeProvider; +exports.__PRIVATE__ = __PRIVATE__; +exports.createGlobalStyle = createGlobalStyle; +exports.css = css; +exports.default = styled; +exports.isStyledComponent = isStyledComponent; +exports.keyframes = keyframes; +exports.useTheme = useTheme; +exports.version = version; +exports.withTheme = withTheme; +//# sourceMappingURL=styled-components.browser.cjs.js.map + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(215))) + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +function _taggedTemplateLiteral(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + return Object.freeze(Object.defineProperties(strings, { + raw: { + value: Object.freeze(raw) + } + })); +} + +module.exports = _taggedTemplateLiteral; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(26); +var core = __webpack_require__(42); +var hide = __webpack_require__(75); +var redefine = __webpack_require__(66); +var ctx = __webpack_require__(85); +var PROTOTYPE = 'prototype'; + +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 target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); + var key, own, out, exp; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if (target) redefine(target, key, out, type & $export.U); + // export + if (exports[key] != out) hide(exports, key, exp); + if (IS_PROTO && expProto[key] != out) expProto[key] = out; + } +}; +global.core = core; +// 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; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var NODE_ENV = "production"; + +var invariant = function(condition, format, a, b, c, d, e, f) { + if (NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '4.17.15'; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; + + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; + + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; + + 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 match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); + + /** Used to match leading and trailing whitespace. */ + var reTrim = /^\s+|\s+$/g, + reTrimStart = /^\s+/, + reTrimEnd = /\s+$/; + + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; + + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** 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 host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); + + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); + + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); + + /** 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 + ']'); + + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** 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; + + /** 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; + + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); + + /** 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; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; + + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; + + /** 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; + } + + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); + + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + + /*--------------------------------------------------------------------------*/ + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @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`. + */ + 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); + } + + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + + /** + * 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; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` 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 arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` 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 all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * 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 = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @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`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @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`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + + /** + * 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; + } + + /** + * 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; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; + + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * 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; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); + + /** + * 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(''); + } + + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } + + /** + * 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; + } + + /** + * 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); + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } + + /** + * 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]; + }; + } + + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * 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; + } + return array; + } + + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; + + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } + + /** + * 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); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + + /** + * 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); + }; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + + /** + * 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); + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; + + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } + + /** + * 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); + } + + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; + + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + + /** + * 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); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + + /** + * 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); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + + /** + * 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; + } + } + return -1; + } + + /** + * A specialized version of `_.lastIndexOf` 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 strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + + /** + * 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); + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + + /** + * 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) || []; + } + + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + + /** 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 generate unique IDs. */ + var idCounter = 0; + + /** 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) : ''; + }()); + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; + + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; + + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /** 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 convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * 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; + }; + }()); + + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; + + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + + /*------------------------------------------------------------------------*/ + + /** + * 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]); + } + } + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * 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); + } + + /** + * 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; + } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + + /** + * 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; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + /** + * 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; + } + + /** + * 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]; + } + + /** + * 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; + } + + /** + * 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; + } + return this; + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * 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; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + /** + * 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 + }; + } + + /** + * 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; + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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; + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + + /*------------------------------------------------------------------------*/ + + /** + * + * 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; + + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } + + /** + * 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; + } + + /** + * 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); + } + + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + + /*------------------------------------------------------------------------*/ + + /** + * 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; + } + + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } + + /** + * 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); + + this.size = data.size; + return result; + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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; + } + + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + + /*------------------------------------------------------------------------*/ + + /** + * 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; + + 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); + } + } + return result; + } + + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } + + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @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 assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, 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 {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); + } + } + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @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 assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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; + } + } + + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; + + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } + + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } + + /** + * 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 (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; + + 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 (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 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; + } + + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; + + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } + + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * 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; + } + + /** + * 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); + + /** + * The base implementation of `_.forEachRight` 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 baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * 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; + + predicate || (predicate = isFlattenable); + result || (result = []); + + 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; + } + + /** + * 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(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @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 baseForRight = createBaseFor(true); + + /** + * 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); + } + + /** + * The base implementation of `_.forOwnRight` 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 baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + + /** + * 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); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + /** + * 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)); + } + + /** + * 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); + } + + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; + } + + /** + * The base implementation of `_.has` 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 baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + + /** + * 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); + } + + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + + /** + * 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 baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; + + 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]; + + var index = -1, + seen = caches[0]; + + 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; + } + + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; + } + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); + } + + /** + * 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; + } + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + + /** + * 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; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + + /** + * 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; + + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + 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__'); + + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; + + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + + /** + * 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; + } + + /** + * 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; + + 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; + } + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + + /** + * 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; + } + + /** + * 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)]; + } + + /** + * 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); + } + + /** + * The base implementation of `_.keys` 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 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); + } + } + return result; + } + + /** + * 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 = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } + + /** + * 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; + } + + /** + * 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); + }; + } + + /** + * 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); + } + 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); + }; + } + + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @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. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + 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); + } + + /** + * 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); + } + + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } + + /** + * 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) { + var index = -1; + iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee())); + + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + + /** + * 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, + length = paths.length, + result = {}; + + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); + + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } + } + return result; + } + + /** + * 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); + }; + } + + /** + * 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; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); + + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } + + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + + return result; + } + + /** + * 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 + ''); + } + + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } + + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + + /** + * 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; + + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; + + 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]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * 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 + }); + }; + + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + + /** + * 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); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection 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 baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + + /** + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function baseSortedIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array == null ? 0 : array.length, + valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); + + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + */ + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; + } + + /** + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. + * + * @private + * @param {*} value The value to process. + * @returns {number} Returns the number. + */ + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + + /** + * 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; + } + + /** + * 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; + + 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], + 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); + } + } + return result; + } + + /** + * The base implementation of `_.unset`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + */ + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + + /** + * The base implementation of `_.update`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + + /** + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); + } + + /** + * The base implementation of methods like `_.xor`, 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 values. + */ + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); + + while (++index < length) { + var array = arrays[index], + othIndex = -1; + + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } + + /** + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * + * @private + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. + */ + function baseZipObject(props, values, assignFunc) { + var index = -1, + length = props.length, + valsLength = values.length, + result = {}; + + while (++index < length) { + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); + } + return result; + } + + /** + * 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 castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + + /** + * 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; + } + + /** + * 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)); + } + + /** + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. + * + * @private + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. + */ + var castRest = baseRest; + + /** + * 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); + } + + /** + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). + * + * @private + * @param {number|Object} id The timer id or timeout object of the timer to clear. + */ + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + + /** + * 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); + + buffer.copy(result); + return result; + } + + /** + * 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; + } + + /** + * 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); + } + + /** + * 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; + } + + /** + * 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)) : {}; + } + + /** + * 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); + } + + /** + * 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); + + 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; + } + + /** + * 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); + } + } + // 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; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; + + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result; + } + + /** + * 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; + } + + /** + * 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 index = -1, + length = props.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); + } + } + return object; + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * Creates a function like `_.groupBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; + } + + /** + * 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; + }); + } + + /** + * 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; + }; + } + + /** + * 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; + }; + } + + /** + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + + /** + * Creates a function like `_.lowerFirst`. + * + * @private + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. + */ + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; + } + + /** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a function that wraps `func` to enable currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. + */ + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; + + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }); + } + + /** + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); + + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; + + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates a function like `_.invertBy`. + * + * @private + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. + */ + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; + } + + /** + * Creates a function that performs a mathematical operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. + */ + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; + } + if (value !== undefined) { + result = value; + } + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; + } + + /** + * Creates a function like `_.over`. + * + * @private + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. + */ + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); + }); + } + + /** + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. + * + * @private + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. + */ + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); + + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); + } + + /** + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. + */ + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.range` or `_.rangeRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. + */ + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; + } + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + + /** + * Creates a function that performs a relational operation on two values. + * + * @private + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. + */ + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + + /** + * Creates a function that wraps `func` to continue currying. + * + * @private + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; + + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } + + /** + * Creates a function like `_.round`. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; + } + + /** + * 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); + }; + + /** + * Creates a `_.toPairs` or `_.toPairsIn` function. + * + * @private + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. + */ + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func); + + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; + + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); + + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); + } + + /** + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. + * + * @private + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. + */ + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; + } + + /** + * 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; + } + + /** + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. + * + * @private + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + */ + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; + } + + /** + * 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; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + 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); + } + 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; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @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`. + */ + 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; + + 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); + + case errorTag: + return object.name == other.name && object.message == other.message; + + 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; + + 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; + + // 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; + } + + /** + * 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) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + 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; + + // 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; + } + + /** + * 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 + ''); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the argument placeholder value for `func`. + * + * @private + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. + */ + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; + } + + /** + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. + * + * @private + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. + */ + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; + } + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + /** + * 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]; + + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + + /** + * 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; + } + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + 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; + } + + /** + * 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 []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + + /** + * 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; + }; + + /** + * Gets the `toStringTag` of `value`. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + 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; + }; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Extracts wrapper details from the `source` body comment. + * + * @private + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. + */ + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + + /** + * 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; + } + 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)); + } + + /** + * 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); + + // 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; + } + + /** + * 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)) + : {}; + } + + /** + * 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); + } + } + + /** + * Inserts wrapper `details` in a comment at the top of the `source` body. + * + * @private + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. + */ + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); + } + + /** + * 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]); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @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`. + */ + 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); + } + + /** + * 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; + } + + /** + * 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)); + } + + /** + * 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); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + /** + * Checks if `func` is capable of being masked. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. + */ + var isMaskable = coreJsData ? isFunction : stubFalse; + + /** + * 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; + + return value === proto; + } + + /** + * 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); + } + + /** + * 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))); + }; + } + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + 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; + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * 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; + } + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + /** + * 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); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + + /** + * Gets the parent value at `path` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. + */ + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * 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 safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = shortOut(baseSetData); + + /** + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. + */ + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + + /** + * 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`. + */ + var setToString = shortOut(baseSetToString); + + /** + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. + * + * @private + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. + */ + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + + /** + * 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]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; + } + + /** + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. + * + * @private + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. + */ + function shuffleSelf(array, size) { + var index = -1, + length = array.length, + lastIndex = length - 1; + + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; + } + array.length = size; + return array; + } + + /** + * 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(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + /** + * 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; + } + + /** + * Converts `func` to its source code. + * + * @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) {} + } + return ''; + } + + /** + * Updates wrapper `details` based on `bitmask` flags. + * + * @private + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. + */ + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } + return result; + } + + /** + * Creates a new array concatenating `array` with any additional arrays + * and/or values. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + + /** + * Creates an array of `array` values not included in the other 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. + * + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] + */ + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); + + /** + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] + */ + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] + */ + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 + */ + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + + /** + * 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, getIteratee(predicate, 3), index, true); + } + + /** + * 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 flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + + /** + * 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) : []; + } + + /** + * Recursively flatten `array` up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] + */ + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + + /** + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } + */ + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; + + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; + } + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined + */ + function head(array) { + return (array && array.length) ? array[0] : undefined; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + */ + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + + /** + * 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) + : []; + }); + + /** + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] + */ + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); + + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); + + /** + * 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); + + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); + + /** + * Converts all elements in `array` into a string separated by `separator`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' + */ + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); + } + + /** + * 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; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); + } + + /** + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. + * + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; + */ + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + } + + /** + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] + */ + var pull = baseRest(pullAll); + + /** + * 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; + } + + /** + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). + * + * **Note:** Unlike `_.differenceBy`, 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. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] + */ + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } + + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; + } + + /** + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] + */ + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); + + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). + * + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. + * + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @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 slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + */ + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + + /** + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 + */ + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } + + /** + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 + */ + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 + */ + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + + /** + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 + */ + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + } + + /** + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 + */ + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + + /** + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] + */ + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; + } + + /** + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] + */ + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.tail([1, 2, 3]); + * // => [2, 3] + */ + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] + */ + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] + */ + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; + } + + /** + * 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 method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. 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 combined values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); + + /** + * 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) : []; + } + + /** + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + } + + /** + * 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 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] + */ + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + + /** + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee) { + if (!(array && array.length)) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); + }); + } + + /** + * 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) + : []; + }); + + /** + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] + */ + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + + /** + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] + */ + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); + + /** + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. 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 filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + */ + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); + + /** + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + */ + var zip = baseRest(unzip); + + /** + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. + * + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } + */ + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); + } + + /** + * This method is like `_.zipObject` except that it supports property paths. + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + */ + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); + } + + /** + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). + * + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] + */ + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; + + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. + * + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor) { + interceptor(value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor) { + return interceptor(value); + } + + /** + * This method is the wrapper version of `_.at`. + * + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] + */ + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; + + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); + + /** + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } + * + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chain sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped.next(); + * // => { 'done': false, 'value': 1 } + * + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } + */ + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); + } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; + + return { 'done': done, 'value': value }; + } + + /** + * Enables the wrapper to be iterable. + * + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example + * + * var wrapped = _([1, 2]); + * + * wrapped[Symbol.iterator]() === wrapped; + * // => true + * + * Array.from(wrapped); + * // => [1, 2] + */ + function wrapperToIterator() { + return this; + } + + /** + * Creates a clone of the chain sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * This method is the wrapper version of `_.reverse`. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + + /** + * Executes the chain sequence to resolve the unwrapped value. + * + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } + * + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; + } else { + baseAssignValue(result, key, 1); + } + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + */ + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' + * + * // The `_.property` iteratee shorthand. + * _.find(users, 'active'); + * // => object for 'barney' + */ + var find = createFind(findIndex); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(findLastIndex); + + /** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); + } + + /** + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. + * + * @static + * @memberOf _ + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [[[n, n]]]; + * } + * + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] + */ + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); + } + + /** + * 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, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @alias eachRight + * @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 _.forEach + * @example + * + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. + */ + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } + * + * // The `_.property` iteratee shorthand. + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); + } + }); + + /** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + } + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + */ + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); + + /** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. 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. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + */ + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight + * @example + * + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + */ + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + } + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] + * + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.reject(users, 'active'); + * // => objects for ['barney'] + */ + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + + /** + * Gets a random element from `collection`. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + */ + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + + /** + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. + * @example + * + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] + */ + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); + } + + /** + * 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': 40 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['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), []); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. + */ + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + + /** + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; + } + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; + } + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. + */ + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. + */ + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + + /** + * Creates a function that invokes `func` with arguments reversed. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. + * @example + * + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] + */ + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + + /** + * 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; + + 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; + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with its arguments transformed. + * + * @static + * @since 4.0.0 + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); + * + * func(9, 3); + * // => [81, 6] + * + * func(10, 5); + * // => [100, 10] + */ + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + + /** + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + }); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + }); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + */ + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. + * + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @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. + * @example + * + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); + } + + /** + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); + } + + /** + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + * @example + * + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] + */ + function unary(func) { + return ary(func, 1); + } + + /** + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

    ' + func(text) + '

    '; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

    fred, barney, & pebbles

    ' + */ + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Casts `value` as an array if it's not one. + * + * @static + * @memberOf _ + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. + * @example + * + * _.castArray(1); + * // => [1] + * + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] + * + * _.castArray('abc'); + * // => ['abc'] + * + * _.castArray(null); + * // => [null] + * + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true + */ + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + + /** + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep + * @example + * + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true + */ + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + + /** + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 + */ + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * 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); + } + + /** + * This method is like `_.cloneWith` except that it recursively clones `value`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith + * @example + * + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 + */ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + + /** + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. + * + * @static + * @memberOf _ + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + + /** + * 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); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + var gt = createRelationalOperation(baseGt); + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + + /** + * 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'); + }; + + /** + * 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; + + /** + * Checks if `value` is classified as an `ArrayBuffer` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @example + * + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true + * + * _.isArrayBuffer(new Array(2)); + * // => false + */ + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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; + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + + /** + * Checks if `value` is likely a DOM element. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + + /** + * 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; + } + + /** + * 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); + } + + /** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; + } + + /** + * 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 + * + * _.isError(Error); + * // => false + */ + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + } + + /** + * Checks if `value` is a finite primitive number. + * + * **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 isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * 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; + } + + /** + * 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); + } + + /** + * 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; + } + + /** + * 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 + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + /** + * 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 + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + /** + * 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; + + /** + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. + * + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * + * _.isMatch(object, { 'b': 2 }); + * // => true + * + * _.isMatch(object, { 'b': 1 }); + * // => false + */ + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + + /** + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true + */ + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a pristine native function. + * + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + + /** + * 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; + } + + /** + * Checks if `value` is `null` or `undefined`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @example + * + * _.isNil(null); + * // => true + * + * _.isNil(void 0); + * // => true + * + * _.isNil(NaN); + * // => false + */ + function isNil(value) { + return value == null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. + * @example + * + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); + } + + /** + * 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 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; + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + + /** + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @example + * + * _.isSafeInteger(3); + * // => true + * + * _.isSafeInteger(Number.MIN_VALUE); + * // => false + * + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false + */ + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + + /** + * 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; + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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; + + /** + * 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 + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is classified as a `WeakMap` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @example + * + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false + */ + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + + /** + * Checks if `value` is classified as a `WeakSet` object. + * + * @static + * @memberOf _ + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @example + * + * _.isWeakSet(new WeakSet); + * // => true + * + * _.isWeakSet(new Set); + * // => false + */ + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + var lt = createRelationalOperation(baseLt); + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + + /** + * Converts `value` to an array. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] + * + * _.toArray('abc'); + * // => ['a', 'b', 'c'] + * + * _.toArray(1); + * // => [] + * + * _.toArray(null); + * // => [] + */ + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); + } + + /** + * 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; + } + + /** + * 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; + } + + /** + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is 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 convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 + */ + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 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 + * + * _.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); + } + + /** + * 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)); + } + + /** + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. + * @example + * + * _.toSafeInteger(3.2); + * // => 3 + * + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 + */ + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); + } + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString(value) { + return value == null ? '' : baseToString(value); + } + + /*------------------------------------------------------------------------*/ + + /** + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). + * + * @static + * @memberOf _ + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } + */ + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + + /** + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + */ + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + + /** + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias extendWith + * @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`. + * @see _.assignWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignInWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + + /** + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **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`. + * @see _.assignInWith + * @example + * + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } + * + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + + /** + * Creates an array of values corresponding to `paths` of `object`. + * + * @static + * @memberOf _ + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] + */ + var at = flatRest(baseAt); + + /** + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. + * + * @static + * @memberOf _ + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); + } + + /** + * 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]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; + }); + + /** + * 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); + }); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' + */ + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' + * + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + + /** + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + */ + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + */ + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); + } + + /** + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). + */ + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); + } + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + */ + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + } + + /** + * Creates an array of function property names from own enumerable properties + * of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functionsIn + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functions(new Foo); + * // => ['a', 'b'] + */ + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + + /** + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions + * @example + * + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } + * + * Foo.prototype.c = _.constant('c'); + * + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * 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; + } + + /** + * Checks if `path` is a direct property of `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @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 = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b'); + * // => true + * + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); + * // => false + */ + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + + /** + * 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 hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + */ + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); + + /** + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } + * + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + */ + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); + + /** + * Invokes the method at `path` of `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + * @example + * + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] + */ + var invoke = baseRest(baseInvoke); + + /** + * 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); + } + + /** + * 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); + } + + /** + * 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 + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; + } + + /** + * Creates an object with the same keys as `object` and values 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 2.4.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 _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } + + /** + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + + /** + * 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); + }); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. + * + * **Note:** This method is considerably slower than `_.pick`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } + */ + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); + } + return result; + }); + + /** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + + /** + * 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 + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } + */ + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + + /** + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } + */ + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + + /** + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + + /** + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @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 assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } + */ + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); + } + + /** + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) + */ + var toPairs = createToPairs(keys); + + /** + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + */ + var toPairsIn = createToPairs(keysIn); + + /** + * 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 = getIteratee(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; + } + + /** + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + */ + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + + /** + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 + * + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 + */ + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + + /** + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @example + * + * var object = {}; + * + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } + */ + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + + /** + * Creates an array of the own enumerable string keyed property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable string keyed property + * values 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 values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Clamps `number` within the inclusive `lower` and `upper` bounds. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + * @example + * + * _.clamp(-10, -5, 5); + * // => -5 + * + * _.clamp(10, -5, 5); + * // => 5 + */ + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + + /** + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. + * + * @static + * @memberOf _ + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + * + * _.inRange(-3, -2, -6); + * // => true + */ + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + + /** + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. + * + * @static + * @memberOf _ + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; + } + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } + } + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); + + /** + * Converts the first character of `string` to upper case and the remaining + * to lower case. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('FRED'); + * // => 'Fred' + */ + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + + /** + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + + /** + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' + */ + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } + + /** + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Converts `string`, as space separated words, to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. + * @example + * + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' + * + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' + */ + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); + + /** + * Converts the first character of `string` to lower case. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.lowerFirst('Fred'); + * // => 'fred' + * + * _.lowerFirst('FRED'); + * // => 'fRED' + */ + var lowerFirst = createCaseFirst('toLowerCase'); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padEnd('abc', 6); + * // => 'abc ' + * + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padEnd('abc', 3); + * // => 'abc' + */ + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padStart('abc', 6); + * // => ' abc' + * + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padStart('abc', 3); + * // => 'abc' + */ + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; + } + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + + /** + * Replaces matches for `pattern` in `string` with `replacement`. + * + * **Note:** This method is based on + * [`String#replace`](https://mdn.io/String/replace). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. + * @example + * + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' + */ + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + + /** + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. + * @example + * + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] + */ + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + + /** + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); + + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. + * @example + * + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' + if (val === '') return true; + if (val === 'false') return false; + if (val === 'true') return true; + return val; + } + + if (DOCUMENT && typeof DOCUMENT.querySelector === 'function') { + var attrs = [['data-family-prefix', 'familyPrefix'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']]; + attrs.forEach(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + attr = _ref2[0], + key = _ref2[1]; + + var val = coerce(getAttrConfig(attr)); + + if (val !== undefined && val !== null) { + initial[key] = val; + } + }); + } + + var _default = { + familyPrefix: DEFAULT_FAMILY_PREFIX, + replacementClass: DEFAULT_REPLACEMENT_CLASS, + autoReplaceSvg: true, + autoAddCss: true, + autoA11y: true, + searchPseudoElements: false, + observeMutations: true, + mutateApproach: 'async', + keepOriginalSource: true, + measurePerformance: false, + showMissingIcons: true + }; + + var _config = _objectSpread({}, _default, initial); + + if (!_config.autoReplaceSvg) _config.observeMutations = false; + + var config = _objectSpread({}, _config); + + WINDOW.FontAwesomeConfig = config; + + var w = WINDOW || {}; + if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {}; + if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {}; + if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {}; + if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = []; + var namespace = w[NAMESPACE_IDENTIFIER]; + + var functions = []; + + var listener = function listener() { + DOCUMENT.removeEventListener('DOMContentLoaded', listener); + loaded = 1; + functions.map(function (fn) { + return fn(); + }); + }; + + var loaded = false; + + if (IS_DOM) { + loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState); + if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener); + } + + function domready (fn) { + if (!IS_DOM) return; + loaded ? setTimeout(fn, 0) : functions.push(fn); + } + + var PENDING = 'pending'; + var SETTLED = 'settled'; + var FULFILLED = 'fulfilled'; + var REJECTED = 'rejected'; + + var NOOP = function NOOP() {}; + + var isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function'; + var asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate; + var asyncQueue = []; + var asyncTimer; + + function asyncFlush() { + // run promise callbacks + for (var i = 0; i < asyncQueue.length; i++) { + asyncQueue[i][0](asyncQueue[i][1]); + } // reset async asyncQueue + + + asyncQueue = []; + asyncTimer = false; + } + + function asyncCall(callback, arg) { + asyncQueue.push([callback, arg]); + + if (!asyncTimer) { + asyncTimer = true; + asyncSetTimer(asyncFlush, 0); + } + } + + function invokeResolver(resolver, promise) { + function resolvePromise(value) { + resolve(promise, value); + } + + function rejectPromise(reason) { + reject(promise, reason); + } + + try { + resolver(resolvePromise, rejectPromise); + } catch (e) { + rejectPromise(e); + } + } + + function invokeCallback(subscriber) { + var owner = subscriber.owner; + var settled = owner._state; + var value = owner._data; + var callback = subscriber[settled]; + var promise = subscriber.then; + + if (typeof callback === 'function') { + settled = FULFILLED; + + try { + value = callback(value); + } catch (e) { + reject(promise, e); + } + } + + if (!handleThenable(promise, value)) { + if (settled === FULFILLED) { + resolve(promise, value); + } + + if (settled === REJECTED) { + reject(promise, value); + } + } + } + + function handleThenable(promise, value) { + var resolved; + + try { + if (promise === value) { + throw new TypeError('A promises callback cannot return that same promise.'); + } + + if (value && (typeof value === 'function' || _typeof(value) === 'object')) { + // then should be retrieved only once + var then = value.then; + + if (typeof then === 'function') { + then.call(value, function (val) { + if (!resolved) { + resolved = true; + + if (value === val) { + fulfill(promise, val); + } else { + resolve(promise, val); + } + } + }, function (reason) { + if (!resolved) { + resolved = true; + reject(promise, reason); + } + }); + return true; + } + } + } catch (e) { + if (!resolved) { + reject(promise, e); + } + + return true; + } + + return false; + } + + function resolve(promise, value) { + if (promise === value || !handleThenable(promise, value)) { + fulfill(promise, value); + } + } + + function fulfill(promise, value) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = value; + asyncCall(publishFulfillment, promise); + } + } + + function reject(promise, reason) { + if (promise._state === PENDING) { + promise._state = SETTLED; + promise._data = reason; + asyncCall(publishRejection, promise); + } + } + + function publish(promise) { + promise._then = promise._then.forEach(invokeCallback); + } + + function publishFulfillment(promise) { + promise._state = FULFILLED; + publish(promise); + } + + function publishRejection(promise) { + promise._state = REJECTED; + publish(promise); + + if (!promise._handled && isNode) { + global.process.emit('unhandledRejection', promise._data, promise); + } + } + + function notifyRejectionHandled(promise) { + global.process.emit('rejectionHandled', promise); + } + /** + * @class + */ + + + function P(resolver) { + if (typeof resolver !== 'function') { + throw new TypeError('Promise resolver ' + resolver + ' is not a function'); + } + + if (this instanceof P === false) { + throw new TypeError('Failed to construct \'Promise\': Please use the \'new\' operator, this object constructor cannot be called as a function.'); + } + + this._then = []; + invokeResolver(resolver, this); + } + + P.prototype = { + constructor: P, + _state: PENDING, + _then: null, + _data: undefined, + _handled: false, + then: function then(onFulfillment, onRejection) { + var subscriber = { + owner: this, + then: new this.constructor(NOOP), + fulfilled: onFulfillment, + rejected: onRejection + }; + + if ((onRejection || onFulfillment) && !this._handled) { + this._handled = true; + + if (this._state === REJECTED && isNode) { + asyncCall(notifyRejectionHandled, this); + } + } + + if (this._state === FULFILLED || this._state === REJECTED) { + // already resolved, call callback async + asyncCall(invokeCallback, subscriber); + } else { + // subscribe + this._then.push(subscriber); + } + + return subscriber.then; + }, + catch: function _catch(onRejection) { + return this.then(null, onRejection); + } + }; + + P.all = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.all().'); + } + + return new P(function (resolve, reject) { + var results = []; + var remaining = 0; + + function resolver(index) { + remaining++; + return function (value) { + results[index] = value; + + if (! --remaining) { + resolve(results); + } + }; + } + + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolver(i), reject); + } else { + results[i] = promise; + } + } + + if (!remaining) { + resolve(results); + } + }); + }; + + P.race = function (promises) { + if (!Array.isArray(promises)) { + throw new TypeError('You must pass an array to Promise.race().'); + } + + return new P(function (resolve, reject) { + for (var i = 0, promise; i < promises.length; i++) { + promise = promises[i]; + + if (promise && typeof promise.then === 'function') { + promise.then(resolve, reject); + } else { + resolve(promise); + } + } + }); + }; + + P.resolve = function (value) { + if (value && _typeof(value) === 'object' && value.constructor === P) { + return value; + } + + return new P(function (resolve) { + resolve(value); + }); + }; + + P.reject = function (reason) { + return new P(function (resolve, reject) { + reject(reason); + }); + }; + + var picked = typeof Promise === 'function' ? Promise : P; + + var d = UNITS_IN_GRID; + var meaninglessTransform = { + size: 16, + x: 0, + y: 0, + rotate: 0, + flipX: false, + flipY: false + }; + + function isReserved(name) { + return ~RESERVED_CLASSES.indexOf(name); + } + function insertCss(css) { + if (!css || !IS_DOM) { + return; + } + + var style = DOCUMENT.createElement('style'); + style.setAttribute('type', 'text/css'); + style.innerHTML = css; + var headChildren = DOCUMENT.head.childNodes; + var beforeChild = null; + + for (var i = headChildren.length - 1; i > -1; i--) { + var child = headChildren[i]; + var tagName = (child.tagName || '').toUpperCase(); + + if (['STYLE', 'LINK'].indexOf(tagName) > -1) { + beforeChild = child; + } + } + + DOCUMENT.head.insertBefore(style, beforeChild); + return css; + } + var idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + function nextUniqueId() { + var size = 12; + var id = ''; + + while (size-- > 0) { + id += idPool[Math.random() * 62 | 0]; + } + + return id; + } + function toArray(obj) { + var array = []; + + for (var i = (obj || []).length >>> 0; i--;) { + array[i] = obj[i]; + } + + return array; + } + function classArray(node) { + if (node.classList) { + return toArray(node.classList); + } else { + return (node.getAttribute('class') || '').split(' ').filter(function (i) { + return i; + }); + } + } + function getIconName(familyPrefix, cls) { + var parts = cls.split('-'); + var prefix = parts[0]; + var iconName = parts.slice(1).join('-'); + + if (prefix === familyPrefix && iconName !== '' && !isReserved(iconName)) { + return iconName; + } else { + return null; + } + } + function htmlEscape(str) { + return "".concat(str).replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(//g, '>'); + } + function joinAttributes(attributes) { + return Object.keys(attributes || {}).reduce(function (acc, attributeName) { + return acc + "".concat(attributeName, "=\"").concat(htmlEscape(attributes[attributeName]), "\" "); + }, '').trim(); + } + function joinStyles(styles) { + return Object.keys(styles || {}).reduce(function (acc, styleName) { + return acc + "".concat(styleName, ": ").concat(styles[styleName], ";"); + }, ''); + } + function transformIsMeaningful(transform) { + return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY; + } + function transformForSvg(_ref) { + var transform = _ref.transform, + containerWidth = _ref.containerWidth, + iconWidth = _ref.iconWidth; + var outer = { + transform: "translate(".concat(containerWidth / 2, " 256)") + }; + var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") "); + var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") "); + var innerRotate = "rotate(".concat(transform.rotate, " 0 0)"); + var inner = { + transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate) + }; + var path = { + transform: "translate(".concat(iconWidth / 2 * -1, " -256)") + }; + return { + outer: outer, + inner: inner, + path: path + }; + } + function transformForCss(_ref2) { + var transform = _ref2.transform, + _ref2$width = _ref2.width, + width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width, + _ref2$height = _ref2.height, + height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height, + _ref2$startCentered = _ref2.startCentered, + startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered; + var val = ''; + + if (startCentered && IS_IE) { + val += "translate(".concat(transform.x / d - width / 2, "em, ").concat(transform.y / d - height / 2, "em) "); + } else if (startCentered) { + val += "translate(calc(-50% + ".concat(transform.x / d, "em), calc(-50% + ").concat(transform.y / d, "em)) "); + } else { + val += "translate(".concat(transform.x / d, "em, ").concat(transform.y / d, "em) "); + } + + val += "scale(".concat(transform.size / d * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d * (transform.flipY ? -1 : 1), ") "); + val += "rotate(".concat(transform.rotate, "deg) "); + return val; + } + + var ALL_SPACE = { + x: 0, + y: 0, + width: '100%', + height: '100%' + }; + + function fillBlack(abstract) { + var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (abstract.attributes && (abstract.attributes.fill || force)) { + abstract.attributes.fill = 'black'; + } + + return abstract; + } + + function deGroup(abstract) { + if (abstract.tag === 'g') { + return abstract.children; + } else { + return [abstract]; + } + } + + function makeIconMasking (_ref) { + var children = _ref.children, + attributes = _ref.attributes, + main = _ref.main, + mask = _ref.mask, + explicitMaskId = _ref.maskId, + transform = _ref.transform; + var mainWidth = main.width, + mainPath = main.icon; + var maskWidth = mask.width, + maskPath = mask.icon; + var trans = transformForSvg({ + transform: transform, + containerWidth: maskWidth, + iconWidth: mainWidth + }); + var maskRect = { + tag: 'rect', + attributes: _objectSpread({}, ALL_SPACE, { + fill: 'white' + }) + }; + var maskInnerGroupChildrenMixin = mainPath.children ? { + children: mainPath.children.map(fillBlack) + } : {}; + var maskInnerGroup = { + tag: 'g', + attributes: _objectSpread({}, trans.inner), + children: [fillBlack(_objectSpread({ + tag: mainPath.tag, + attributes: _objectSpread({}, mainPath.attributes, trans.path) + }, maskInnerGroupChildrenMixin))] + }; + var maskOuterGroup = { + tag: 'g', + attributes: _objectSpread({}, trans.outer), + children: [maskInnerGroup] + }; + var maskId = "mask-".concat(explicitMaskId || nextUniqueId()); + var clipId = "clip-".concat(explicitMaskId || nextUniqueId()); + var maskTag = { + tag: 'mask', + attributes: _objectSpread({}, ALL_SPACE, { + id: maskId, + maskUnits: 'userSpaceOnUse', + maskContentUnits: 'userSpaceOnUse' + }), + children: [maskRect, maskOuterGroup] + }; + var defs = { + tag: 'defs', + children: [{ + tag: 'clipPath', + attributes: { + id: clipId + }, + children: deGroup(maskPath) + }, maskTag] + }; + children.push(defs, { + tag: 'rect', + attributes: _objectSpread({ + fill: 'currentColor', + 'clip-path': "url(#".concat(clipId, ")"), + mask: "url(#".concat(maskId, ")") + }, ALL_SPACE) + }); + return { + children: children, + attributes: attributes + }; + } + + function makeIconStandard (_ref) { + var children = _ref.children, + attributes = _ref.attributes, + main = _ref.main, + transform = _ref.transform, + styles = _ref.styles; + var styleString = joinStyles(styles); + + if (styleString.length > 0) { + attributes['style'] = styleString; + } + + if (transformIsMeaningful(transform)) { + var trans = transformForSvg({ + transform: transform, + containerWidth: main.width, + iconWidth: main.width + }); + children.push({ + tag: 'g', + attributes: _objectSpread({}, trans.outer), + children: [{ + tag: 'g', + attributes: _objectSpread({}, trans.inner), + children: [{ + tag: main.icon.tag, + children: main.icon.children, + attributes: _objectSpread({}, main.icon.attributes, trans.path) + }] + }] + }); + } else { + children.push(main.icon); + } + + return { + children: children, + attributes: attributes + }; + } + + function asIcon (_ref) { + var children = _ref.children, + main = _ref.main, + mask = _ref.mask, + attributes = _ref.attributes, + styles = _ref.styles, + transform = _ref.transform; + + if (transformIsMeaningful(transform) && main.found && !mask.found) { + var width = main.width, + height = main.height; + var offset = { + x: width / height / 2, + y: 0.5 + }; + attributes['style'] = joinStyles(_objectSpread({}, styles, { + 'transform-origin': "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em") + })); + } + + return [{ + tag: 'svg', + attributes: attributes, + children: children + }]; + } + + function asSymbol (_ref) { + var prefix = _ref.prefix, + iconName = _ref.iconName, + children = _ref.children, + attributes = _ref.attributes, + symbol = _ref.symbol; + var id = symbol === true ? "".concat(prefix, "-").concat(config.familyPrefix, "-").concat(iconName) : symbol; + return [{ + tag: 'svg', + attributes: { + style: 'display: none;' + }, + children: [{ + tag: 'symbol', + attributes: _objectSpread({}, attributes, { + id: id + }), + children: children + }] + }]; + } + + function makeInlineSvgAbstract(params) { + var _params$icons = params.icons, + main = _params$icons.main, + mask = _params$icons.mask, + prefix = params.prefix, + iconName = params.iconName, + transform = params.transform, + symbol = params.symbol, + title = params.title, + maskId = params.maskId, + titleId = params.titleId, + extra = params.extra, + _params$watchable = params.watchable, + watchable = _params$watchable === void 0 ? false : _params$watchable; + + var _ref = mask.found ? mask : main, + width = _ref.width, + height = _ref.height; + + var widthClass = "fa-w-".concat(Math.ceil(width / height * 16)); + var attrClass = [config.replacementClass, iconName ? "".concat(config.familyPrefix, "-").concat(iconName) : '', widthClass].filter(function (c) { + return extra.classes.indexOf(c) === -1; + }).concat(extra.classes).join(' '); + var content = { + children: [], + attributes: _objectSpread({}, extra.attributes, { + 'data-prefix': prefix, + 'data-icon': iconName, + 'class': attrClass, + 'role': extra.attributes.role || 'img', + 'xmlns': 'http://www.w3.org/2000/svg', + 'viewBox': "0 0 ".concat(width, " ").concat(height) + }) + }; + + if (watchable) { + content.attributes[DATA_FA_I2SVG] = ''; + } + + if (title) content.children.push({ + tag: 'title', + attributes: { + id: content.attributes['aria-labelledby'] || "title-".concat(titleId || nextUniqueId()) + }, + children: [title] + }); + + var args = _objectSpread({}, content, { + prefix: prefix, + iconName: iconName, + main: main, + mask: mask, + maskId: maskId, + transform: transform, + symbol: symbol, + styles: extra.styles + }); + + var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args), + children = _ref2.children, + attributes = _ref2.attributes; + + args.children = children; + args.attributes = attributes; + + if (symbol) { + return asSymbol(args); + } else { + return asIcon(args); + } + } + function makeLayersTextAbstract(params) { + var content = params.content, + width = params.width, + height = params.height, + transform = params.transform, + title = params.title, + extra = params.extra, + _params$watchable2 = params.watchable, + watchable = _params$watchable2 === void 0 ? false : _params$watchable2; + + var attributes = _objectSpread({}, extra.attributes, title ? { + 'title': title + } : {}, { + 'class': extra.classes.join(' ') + }); + + if (watchable) { + attributes[DATA_FA_I2SVG] = ''; + } + + var styles = _objectSpread({}, extra.styles); + + if (transformIsMeaningful(transform)) { + styles['transform'] = transformForCss({ + transform: transform, + startCentered: true, + width: width, + height: height + }); + styles['-webkit-transform'] = styles['transform']; + } + + var styleString = joinStyles(styles); + + if (styleString.length > 0) { + attributes['style'] = styleString; + } + + var val = []; + val.push({ + tag: 'span', + attributes: attributes, + children: [content] + }); + + if (title) { + val.push({ + tag: 'span', + attributes: { + class: 'sr-only' + }, + children: [title] + }); + } + + return val; + } + function makeLayersCounterAbstract(params) { + var content = params.content, + title = params.title, + extra = params.extra; + + var attributes = _objectSpread({}, extra.attributes, title ? { + 'title': title + } : {}, { + 'class': extra.classes.join(' ') + }); + + var styleString = joinStyles(extra.styles); + + if (styleString.length > 0) { + attributes['style'] = styleString; + } + + var val = []; + val.push({ + tag: 'span', + attributes: attributes, + children: [content] + }); + + if (title) { + val.push({ + tag: 'span', + attributes: { + class: 'sr-only' + }, + children: [title] + }); + } + + return val; + } + + var noop$1 = function noop() {}; + + var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : { + mark: noop$1, + measure: noop$1 + }; + var preamble = "FA \"5.13.0\""; + + var begin = function begin(name) { + p.mark("".concat(preamble, " ").concat(name, " begins")); + return function () { + return end(name); + }; + }; + + var end = function end(name) { + p.mark("".concat(preamble, " ").concat(name, " ends")); + p.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends")); + }; + + var perf = { + begin: begin, + end: end + }; + + /** + * Internal helper to bind a function known to have 4 arguments + * to a given context. + */ + + var bindInternal4 = function bindInternal4(func, thisContext) { + return function (a, b, c, d) { + return func.call(thisContext, a, b, c, d); + }; + }; + + /** + * # Reduce + * + * A fast object `.reduce()` implementation. + * + * @param {Object} subject The object to reduce over. + * @param {Function} fn The reducer function. + * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0]. + * @param {Object} thisContext The context for the reducer. + * @return {mixed} The final result. + */ + + + var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) { + var keys = Object.keys(subject), + length = keys.length, + iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn, + i, + key, + result; + + if (initialValue === undefined) { + i = 1; + result = subject[keys[0]]; + } else { + i = 0; + result = initialValue; + } + + for (; i < length; i++) { + key = keys[i]; + result = iterator(result, subject[key], key, subject); + } + + return result; + }; + + function toHex(unicode) { + var result = ''; + + for (var i = 0; i < unicode.length; i++) { + var hex = unicode.charCodeAt(i).toString(16); + result += ('000' + hex).slice(-4); + } + + return result; + } + + function defineIcons(prefix, icons) { + var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var _params$skipHooks = params.skipHooks, + skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks; + var normalized = Object.keys(icons).reduce(function (acc, iconName) { + var icon = icons[iconName]; + var expanded = !!icon.icon; + + if (expanded) { + acc[icon.iconName] = icon.icon; + } else { + acc[iconName] = icon; + } + + return acc; + }, {}); + + if (typeof namespace.hooks.addPack === 'function' && !skipHooks) { + namespace.hooks.addPack(prefix, normalized); + } else { + namespace.styles[prefix] = _objectSpread({}, namespace.styles[prefix] || {}, normalized); + } + /** + * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction + * of new styles we needed to differentiate between them. Prefix `fa` is now an alias + * for `fas` so we'll easy the upgrade process for our users by automatically defining + * this as well. + */ + + + if (prefix === 'fas') { + defineIcons('fa', icons); + } + } + + var styles = namespace.styles, + shims = namespace.shims; + var _byUnicode = {}; + var _byLigature = {}; + var _byOldName = {}; + var build = function build() { + var lookup = function lookup(reducer) { + return reduce(styles, function (o, style, prefix) { + o[prefix] = reduce(style, reducer, {}); + return o; + }, {}); + }; + + _byUnicode = lookup(function (acc, icon, iconName) { + if (icon[3]) { + acc[icon[3]] = iconName; + } + + return acc; + }); + _byLigature = lookup(function (acc, icon, iconName) { + var ligatures = icon[2]; + acc[iconName] = iconName; + ligatures.forEach(function (ligature) { + acc[ligature] = iconName; + }); + return acc; + }); + var hasRegular = 'far' in styles; + _byOldName = reduce(shims, function (acc, shim) { + var oldName = shim[0]; + var prefix = shim[1]; + var iconName = shim[2]; + + if (prefix === 'far' && !hasRegular) { + prefix = 'fas'; + } + + acc[oldName] = { + prefix: prefix, + iconName: iconName + }; + return acc; + }, {}); + }; + build(); + function byUnicode(prefix, unicode) { + return (_byUnicode[prefix] || {})[unicode]; + } + function byLigature(prefix, ligature) { + return (_byLigature[prefix] || {})[ligature]; + } + function byOldName(name) { + return _byOldName[name] || { + prefix: null, + iconName: null + }; + } + + var styles$1 = namespace.styles; + var emptyCanonicalIcon = function emptyCanonicalIcon() { + return { + prefix: null, + iconName: null, + rest: [] + }; + }; + function getCanonicalIcon(values) { + return values.reduce(function (acc, cls) { + var iconName = getIconName(config.familyPrefix, cls); + + if (styles$1[cls]) { + acc.prefix = cls; + } else if (config.autoFetchSvg && ['fas', 'far', 'fal', 'fad', 'fab', 'fa'].indexOf(cls) > -1) { + acc.prefix = cls; + } else if (iconName) { + var shim = acc.prefix === 'fa' ? byOldName(iconName) : {}; + acc.iconName = shim.iconName || iconName; + acc.prefix = shim.prefix || acc.prefix; + } else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) { + acc.rest.push(cls); + } + + return acc; + }, emptyCanonicalIcon()); + } + function iconFromMapping(mapping, prefix, iconName) { + if (mapping && mapping[prefix] && mapping[prefix][iconName]) { + return { + prefix: prefix, + iconName: iconName, + icon: mapping[prefix][iconName] + }; + } + } + + function toHtml(abstractNodes) { + var tag = abstractNodes.tag, + _abstractNodes$attrib = abstractNodes.attributes, + attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib, + _abstractNodes$childr = abstractNodes.children, + children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr; + + if (typeof abstractNodes === 'string') { + return htmlEscape(abstractNodes); + } else { + return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(''), ""); + } + } + + var noop$2 = function noop() {}; + + function isWatched(node) { + var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null; + return typeof i2svg === 'string'; + } + + function getMutator() { + if (config.autoReplaceSvg === true) { + return mutators.replace; + } + + var mutator = mutators[config.autoReplaceSvg]; + return mutator || mutators.replace; + } + + var mutators = { + replace: function replace(mutation) { + var node = mutation[0]; + var abstract = mutation[1]; + var newOuterHTML = abstract.map(function (a) { + return toHtml(a); + }).join('\n'); + + if (node.parentNode && node.outerHTML) { + node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? "") : ''); + } else if (node.parentNode) { + var newNode = document.createElement('span'); + node.parentNode.replaceChild(newNode, node); + newNode.outerHTML = newOuterHTML; + } + }, + nest: function nest(mutation) { + var node = mutation[0]; + var abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it. + // Short-circuit to the standard replacement + + if (~classArray(node).indexOf(config.replacementClass)) { + return mutators.replace(mutation); + } + + var forSvg = new RegExp("".concat(config.familyPrefix, "-.*")); + delete abstract[0].attributes.style; + delete abstract[0].attributes.id; + var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) { + if (cls === config.replacementClass || cls.match(forSvg)) { + acc.toSvg.push(cls); + } else { + acc.toNode.push(cls); + } + + return acc; + }, { + toNode: [], + toSvg: [] + }); + abstract[0].attributes.class = splitClasses.toSvg.join(' '); + var newInnerHTML = abstract.map(function (a) { + return toHtml(a); + }).join('\n'); + node.setAttribute('class', splitClasses.toNode.join(' ')); + node.setAttribute(DATA_FA_I2SVG, ''); + node.innerHTML = newInnerHTML; + } + }; + + function performOperationSync(op) { + op(); + } + + function perform(mutations, callback) { + var callbackFunction = typeof callback === 'function' ? callback : noop$2; + + if (mutations.length === 0) { + callbackFunction(); + } else { + var frame = performOperationSync; + + if (config.mutateApproach === MUTATION_APPROACH_ASYNC) { + frame = WINDOW.requestAnimationFrame || performOperationSync; + } + + frame(function () { + var mutator = getMutator(); + var mark = perf.begin('mutate'); + mutations.map(mutator); + mark(); + callbackFunction(); + }); + } + } + var disabled = false; + function disableObservation() { + disabled = true; + } + function enableObservation() { + disabled = false; + } + var mo = null; + function observe(options) { + if (!MUTATION_OBSERVER) { + return; + } + + if (!config.observeMutations) { + return; + } + + var treeCallback = options.treeCallback, + nodeCallback = options.nodeCallback, + pseudoElementsCallback = options.pseudoElementsCallback, + _options$observeMutat = options.observeMutationsRoot, + observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat; + mo = new MUTATION_OBSERVER(function (objects) { + if (disabled) return; + toArray(objects).forEach(function (mutationRecord) { + if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) { + if (config.searchPseudoElements) { + pseudoElementsCallback(mutationRecord.target); + } + + treeCallback(mutationRecord.target); + } + + if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) { + pseudoElementsCallback(mutationRecord.target.parentNode); + } + + if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) { + if (mutationRecord.attributeName === 'class') { + var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)), + prefix = _getCanonicalIcon.prefix, + iconName = _getCanonicalIcon.iconName; + + if (prefix) mutationRecord.target.setAttribute('data-prefix', prefix); + if (iconName) mutationRecord.target.setAttribute('data-icon', iconName); + } else { + nodeCallback(mutationRecord.target); + } + } + }); + }); + if (!IS_DOM) return; + mo.observe(observeMutationsRoot, { + childList: true, + attributes: true, + characterData: true, + subtree: true + }); + } + function disconnect() { + if (!mo) return; + mo.disconnect(); + } + + function styleParser (node) { + var style = node.getAttribute('style'); + var val = []; + + if (style) { + val = style.split(';').reduce(function (acc, style) { + var styles = style.split(':'); + var prop = styles[0]; + var value = styles.slice(1); + + if (prop && value.length > 0) { + acc[prop] = value.join(':').trim(); + } + + return acc; + }, {}); + } + + return val; + } + + function classParser (node) { + var existingPrefix = node.getAttribute('data-prefix'); + var existingIconName = node.getAttribute('data-icon'); + var innerText = node.innerText !== undefined ? node.innerText.trim() : ''; + var val = getCanonicalIcon(classArray(node)); + + if (existingPrefix && existingIconName) { + val.prefix = existingPrefix; + val.iconName = existingIconName; + } + + if (val.prefix && innerText.length > 1) { + val.iconName = byLigature(val.prefix, node.innerText); + } else if (val.prefix && innerText.length === 1) { + val.iconName = byUnicode(val.prefix, toHex(node.innerText)); + } + + return val; + } + + var parseTransformString = function parseTransformString(transformString) { + var transform = { + size: 16, + x: 0, + y: 0, + flipX: false, + flipY: false, + rotate: 0 + }; + + if (!transformString) { + return transform; + } else { + return transformString.toLowerCase().split(' ').reduce(function (acc, n) { + var parts = n.toLowerCase().split('-'); + var first = parts[0]; + var rest = parts.slice(1).join('-'); + + if (first && rest === 'h') { + acc.flipX = true; + return acc; + } + + if (first && rest === 'v') { + acc.flipY = true; + return acc; + } + + rest = parseFloat(rest); + + if (isNaN(rest)) { + return acc; + } + + switch (first) { + case 'grow': + acc.size = acc.size + rest; + break; + + case 'shrink': + acc.size = acc.size - rest; + break; + + case 'left': + acc.x = acc.x - rest; + break; + + case 'right': + acc.x = acc.x + rest; + break; + + case 'up': + acc.y = acc.y - rest; + break; + + case 'down': + acc.y = acc.y + rest; + break; + + case 'rotate': + acc.rotate = acc.rotate + rest; + break; + } + + return acc; + }, transform); + } + }; + function transformParser (node) { + return parseTransformString(node.getAttribute('data-fa-transform')); + } + + function symbolParser (node) { + var symbol = node.getAttribute('data-fa-symbol'); + return symbol === null ? false : symbol === '' ? true : symbol; + } + + function attributesParser (node) { + var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) { + if (acc.name !== 'class' && acc.name !== 'style') { + acc[attr.name] = attr.value; + } + + return acc; + }, {}); + var title = node.getAttribute('title'); + var titleId = node.getAttribute('data-fa-title-id'); + + if (config.autoA11y) { + if (title) { + extraAttributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId()); + } else { + extraAttributes['aria-hidden'] = 'true'; + extraAttributes['focusable'] = 'false'; + } + } + + return extraAttributes; + } + + function maskParser (node) { + var mask = node.getAttribute('data-fa-mask'); + + if (!mask) { + return emptyCanonicalIcon(); + } else { + return getCanonicalIcon(mask.split(' ').map(function (i) { + return i.trim(); + })); + } + } + + function blankMeta() { + return { + iconName: null, + title: null, + titleId: null, + prefix: null, + transform: meaninglessTransform, + symbol: false, + mask: null, + maskId: null, + extra: { + classes: [], + styles: {}, + attributes: {} + } + }; + } + function parseMeta(node) { + var _classParser = classParser(node), + iconName = _classParser.iconName, + prefix = _classParser.prefix, + extraClasses = _classParser.rest; + + var extraStyles = styleParser(node); + var transform = transformParser(node); + var symbol = symbolParser(node); + var extraAttributes = attributesParser(node); + var mask = maskParser(node); + return { + iconName: iconName, + title: node.getAttribute('title'), + titleId: node.getAttribute('data-fa-title-id'), + prefix: prefix, + transform: transform, + symbol: symbol, + mask: mask, + maskId: node.getAttribute('data-fa-mask-id'), + extra: { + classes: extraClasses, + styles: extraStyles, + attributes: extraAttributes + } + }; + } + + function MissingIcon(error) { + this.name = 'MissingIcon'; + this.message = error || 'Icon unavailable'; + this.stack = new Error().stack; + } + MissingIcon.prototype = Object.create(Error.prototype); + MissingIcon.prototype.constructor = MissingIcon; + + var FILL = { + fill: 'currentColor' + }; + var ANIMATION_BASE = { + attributeType: 'XML', + repeatCount: 'indefinite', + dur: '2s' + }; + var RING = { + tag: 'path', + attributes: _objectSpread({}, FILL, { + d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z' + }) + }; + + var OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, { + attributeName: 'opacity' + }); + + var DOT = { + tag: 'circle', + attributes: _objectSpread({}, FILL, { + cx: '256', + cy: '364', + r: '28' + }), + children: [{ + tag: 'animate', + attributes: _objectSpread({}, ANIMATION_BASE, { + attributeName: 'r', + values: '28;14;28;28;14;28;' + }) + }, { + tag: 'animate', + attributes: _objectSpread({}, OPACITY_ANIMATE, { + values: '1;0;1;1;0;1;' + }) + }] + }; + var QUESTION = { + tag: 'path', + attributes: _objectSpread({}, FILL, { + opacity: '1', + d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z' + }), + children: [{ + tag: 'animate', + attributes: _objectSpread({}, OPACITY_ANIMATE, { + values: '1;0;0;0;0;1;' + }) + }] + }; + var EXCLAMATION = { + tag: 'path', + attributes: _objectSpread({}, FILL, { + opacity: '0', + d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z' + }), + children: [{ + tag: 'animate', + attributes: _objectSpread({}, OPACITY_ANIMATE, { + values: '0;0;1;1;0;0;' + }) + }] + }; + var missing = { + tag: 'g', + children: [RING, DOT, QUESTION, EXCLAMATION] + }; + + var styles$2 = namespace.styles; + function asFoundIcon(icon) { + var width = icon[0]; + var height = icon[1]; + + var _icon$slice = icon.slice(4), + _icon$slice2 = _slicedToArray(_icon$slice, 1), + vectorData = _icon$slice2[0]; + + var element = null; + + if (Array.isArray(vectorData)) { + element = { + tag: 'g', + attributes: { + class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.GROUP) + }, + children: [{ + tag: 'path', + attributes: { + class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY), + fill: 'currentColor', + d: vectorData[0] + } + }, { + tag: 'path', + attributes: { + class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY), + fill: 'currentColor', + d: vectorData[1] + } + }] + }; + } else { + element = { + tag: 'path', + attributes: { + fill: 'currentColor', + d: vectorData + } + }; + } + + return { + found: true, + width: width, + height: height, + icon: element + }; + } + function findIcon(iconName, prefix) { + return new picked(function (resolve, reject) { + var val = { + found: false, + width: 512, + height: 512, + icon: missing + }; + + if (iconName && prefix && styles$2[prefix] && styles$2[prefix][iconName]) { + var icon = styles$2[prefix][iconName]; + return resolve(asFoundIcon(icon)); + } + + var headers = {}; + + if (_typeof(WINDOW.FontAwesomeKitConfig) === 'object' && typeof window.FontAwesomeKitConfig.token === 'string') { + headers['fa-kit-token'] = WINDOW.FontAwesomeKitConfig.token; + } + + if (iconName && prefix && !config.showMissingIcons) { + reject(new MissingIcon("Icon is missing for prefix ".concat(prefix, " with icon name ").concat(iconName))); + } else { + resolve(val); + } + }); + } + + var styles$3 = namespace.styles; + + function generateSvgReplacementMutation(node, nodeMeta) { + var iconName = nodeMeta.iconName, + title = nodeMeta.title, + titleId = nodeMeta.titleId, + prefix = nodeMeta.prefix, + transform = nodeMeta.transform, + symbol = nodeMeta.symbol, + mask = nodeMeta.mask, + maskId = nodeMeta.maskId, + extra = nodeMeta.extra; + return new picked(function (resolve, reject) { + picked.all([findIcon(iconName, prefix), findIcon(mask.iconName, mask.prefix)]).then(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + main = _ref2[0], + mask = _ref2[1]; + + resolve([node, makeInlineSvgAbstract({ + icons: { + main: main, + mask: mask + }, + prefix: prefix, + iconName: iconName, + transform: transform, + symbol: symbol, + mask: mask, + maskId: maskId, + title: title, + titleId: titleId, + extra: extra, + watchable: true + })]); + }); + }); + } + + function generateLayersText(node, nodeMeta) { + var title = nodeMeta.title, + transform = nodeMeta.transform, + extra = nodeMeta.extra; + var width = null; + var height = null; + + if (IS_IE) { + var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10); + var boundingClientRect = node.getBoundingClientRect(); + width = boundingClientRect.width / computedFontSize; + height = boundingClientRect.height / computedFontSize; + } + + if (config.autoA11y && !title) { + extra.attributes['aria-hidden'] = 'true'; + } + + return picked.resolve([node, makeLayersTextAbstract({ + content: node.innerHTML, + width: width, + height: height, + transform: transform, + title: title, + extra: extra, + watchable: true + })]); + } + + function generateMutation(node) { + var nodeMeta = parseMeta(node); + + if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) { + return generateLayersText(node, nodeMeta); + } else { + return generateSvgReplacementMutation(node, nodeMeta); + } + } + + function onTree(root) { + var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + if (!IS_DOM) return; + var htmlClassList = DOCUMENT.documentElement.classList; + + var hclAdd = function hclAdd(suffix) { + return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix)); + }; + + var hclRemove = function hclRemove(suffix) { + return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix)); + }; + + var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$3); + var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function (p) { + return ".".concat(p, ":not([").concat(DATA_FA_I2SVG, "])"); + })).join(', '); + + if (prefixesDomQuery.length === 0) { + return; + } + + var candidates = []; + + try { + candidates = toArray(root.querySelectorAll(prefixesDomQuery)); + } catch (e) {// noop + } + + if (candidates.length > 0) { + hclAdd('pending'); + hclRemove('complete'); + } else { + return; + } + + var mark = perf.begin('onTree'); + var mutations = candidates.reduce(function (acc, node) { + try { + var mutation = generateMutation(node); + + if (mutation) { + acc.push(mutation); + } + } catch (e) { + if (!PRODUCTION) { + if (e instanceof MissingIcon) { + console.error(e); + } + } + } + + return acc; + }, []); + return new picked(function (resolve, reject) { + picked.all(mutations).then(function (resolvedMutations) { + perform(resolvedMutations, function () { + hclAdd('active'); + hclAdd('complete'); + hclRemove('pending'); + if (typeof callback === 'function') callback(); + mark(); + resolve(); + }); + }).catch(function () { + mark(); + reject(); + }); + }); + } + function onNode(node) { + var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + generateMutation(node).then(function (mutation) { + if (mutation) { + perform([mutation], callback); + } + }); + } + + function replaceForPosition(node, position) { + var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-')); + return new picked(function (resolve, reject) { + if (node.getAttribute(pendingAttribute) !== null) { + // This node is already being processed + return resolve(); + } + + var children = toArray(node.children); + var alreadyProcessedPseudoElement = children.filter(function (c) { + return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position; + })[0]; + var styles = WINDOW.getComputedStyle(node, position); + var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN); + var fontWeight = styles.getPropertyValue('font-weight'); + var content = styles.getPropertyValue('content'); + + if (alreadyProcessedPseudoElement && !fontFamily) { + // If we've already processed it but the current computed style does not result in a font-family, + // that probably means that a class name that was previously present to make the icon has been + // removed. So we now should delete the icon. + node.removeChild(alreadyProcessedPseudoElement); + return resolve(); + } else if (fontFamily && content !== 'none' && content !== '') { + var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands'].indexOf(fontFamily[1]) ? STYLE_TO_PREFIX[fontFamily[1].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight]; + var hexValue = toHex(content.length === 3 ? content.substr(1, 1) : content); + var iconName = byUnicode(prefix, hexValue); + var iconIdentifier = iconName; // Only convert the pseudo element in this :before/:after position into an icon if we haven't + // already done so with the same prefix and iconName + + if (iconName && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) { + node.setAttribute(pendingAttribute, iconIdentifier); + + if (alreadyProcessedPseudoElement) { + // Delete the old one, since we're replacing it with a new one + node.removeChild(alreadyProcessedPseudoElement); + } + + var meta = blankMeta(); + var extra = meta.extra; + extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position; + findIcon(iconName, prefix).then(function (main) { + var abstract = makeInlineSvgAbstract(_objectSpread({}, meta, { + icons: { + main: main, + mask: emptyCanonicalIcon() + }, + prefix: prefix, + iconName: iconIdentifier, + extra: extra, + watchable: true + })); + var element = DOCUMENT.createElement('svg'); + + if (position === ':before') { + node.insertBefore(element, node.firstChild); + } else { + node.appendChild(element); + } + + element.outerHTML = abstract.map(function (a) { + return toHtml(a); + }).join('\n'); + node.removeAttribute(pendingAttribute); + resolve(); + }).catch(reject); + } else { + resolve(); + } + } else { + resolve(); + } + }); + } + + function replace(node) { + return picked.all([replaceForPosition(node, ':before'), replaceForPosition(node, ':after')]); + } + + function processable(node) { + return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg'); + } + + function searchPseudoElements (root) { + if (!IS_DOM) return; + return new picked(function (resolve, reject) { + var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace); + var end = perf.begin('searchPseudoElements'); + disableObservation(); + picked.all(operations).then(function () { + end(); + enableObservation(); + resolve(); + }).catch(function () { + end(); + enableObservation(); + reject(); + }); + }); + } + + var baseStyles = "svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse {\n color: #fff;\n}"; + + function css () { + var dfp = DEFAULT_FAMILY_PREFIX; + var drc = DEFAULT_REPLACEMENT_CLASS; + var fp = config.familyPrefix; + var rc = config.replacementClass; + var s = baseStyles; + + if (fp !== dfp || rc !== drc) { + var dPatt = new RegExp("\\.".concat(dfp, "\\-"), 'g'); + var customPropPatt = new RegExp("\\--".concat(dfp, "\\-"), 'g'); + var rPatt = new RegExp("\\.".concat(drc), 'g'); + s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc)); + } + + return s; + } + + var Library = + /*#__PURE__*/ + function () { + function Library() { + _classCallCheck(this, Library); + + this.definitions = {}; + } + + _createClass(Library, [{ + key: "add", + value: function add() { + var _this = this; + + for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) { + definitions[_key] = arguments[_key]; + } + + var additions = definitions.reduce(this._pullDefinitions, {}); + Object.keys(additions).forEach(function (key) { + _this.definitions[key] = _objectSpread({}, _this.definitions[key] || {}, additions[key]); + defineIcons(key, additions[key]); + build(); + }); + } + }, { + key: "reset", + value: function reset() { + this.definitions = {}; + } + }, { + key: "_pullDefinitions", + value: function _pullDefinitions(additions, definition) { + var normalized = definition.prefix && definition.iconName && definition.icon ? { + 0: definition + } : definition; + Object.keys(normalized).map(function (key) { + var _normalized$key = normalized[key], + prefix = _normalized$key.prefix, + iconName = _normalized$key.iconName, + icon = _normalized$key.icon; + if (!additions[prefix]) additions[prefix] = {}; + additions[prefix][iconName] = icon; + }); + return additions; + } + }]); + + return Library; + }(); + + function ensureCss() { + if (config.autoAddCss && !_cssInserted) { + insertCss(css()); + + _cssInserted = true; + } + } + + function apiObject(val, abstractCreator) { + Object.defineProperty(val, 'abstract', { + get: abstractCreator + }); + Object.defineProperty(val, 'html', { + get: function get() { + return val.abstract.map(function (a) { + return toHtml(a); + }); + } + }); + Object.defineProperty(val, 'node', { + get: function get() { + if (!IS_DOM) return; + var container = DOCUMENT.createElement('div'); + container.innerHTML = val.html; + return container.children; + } + }); + return val; + } + + function findIconDefinition(iconLookup) { + var _iconLookup$prefix = iconLookup.prefix, + prefix = _iconLookup$prefix === void 0 ? 'fa' : _iconLookup$prefix, + iconName = iconLookup.iconName; + if (!iconName) return; + return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName); + } + + function resolveIcons(next) { + return function (maybeIconDefinition) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {}); + var mask = params.mask; + + if (mask) { + mask = (mask || {}).icon ? mask : findIconDefinition(mask || {}); + } + + return next(iconDefinition, _objectSpread({}, params, { + mask: mask + })); + }; + } + + var library = new Library(); + var noAuto = function noAuto() { + config.autoReplaceSvg = false; + config.observeMutations = false; + disconnect(); + }; + var _cssInserted = false; + var dom = { + i2svg: function i2svg() { + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + if (IS_DOM) { + ensureCss(); + var _params$node = params.node, + node = _params$node === void 0 ? DOCUMENT : _params$node, + _params$callback = params.callback, + callback = _params$callback === void 0 ? function () {} : _params$callback; + + if (config.searchPseudoElements) { + searchPseudoElements(node); + } + + return onTree(node, callback); + } else { + return picked.reject('Operation requires a DOM of some kind.'); + } + }, + css: css, + insertCss: function insertCss$$1() { + if (!_cssInserted) { + insertCss(css()); + + _cssInserted = true; + } + }, + watch: function watch() { + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var autoReplaceSvgRoot = params.autoReplaceSvgRoot, + observeMutationsRoot = params.observeMutationsRoot; + + if (config.autoReplaceSvg === false) { + config.autoReplaceSvg = true; + } + + config.observeMutations = true; + domready(function () { + autoReplace({ + autoReplaceSvgRoot: autoReplaceSvgRoot + }); + observe({ + treeCallback: onTree, + nodeCallback: onNode, + pseudoElementsCallback: searchPseudoElements, + observeMutationsRoot: observeMutationsRoot + }); + }); + } + }; + var parse = { + transform: function transform(transformString) { + return parseTransformString(transformString); + } + }; + var icon = resolveIcons(function (iconDefinition) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _params$transform = params.transform, + transform = _params$transform === void 0 ? meaninglessTransform : _params$transform, + _params$symbol = params.symbol, + symbol = _params$symbol === void 0 ? false : _params$symbol, + _params$mask = params.mask, + mask = _params$mask === void 0 ? null : _params$mask, + _params$maskId = params.maskId, + maskId = _params$maskId === void 0 ? null : _params$maskId, + _params$title = params.title, + title = _params$title === void 0 ? null : _params$title, + _params$titleId = params.titleId, + titleId = _params$titleId === void 0 ? null : _params$titleId, + _params$classes = params.classes, + classes = _params$classes === void 0 ? [] : _params$classes, + _params$attributes = params.attributes, + attributes = _params$attributes === void 0 ? {} : _params$attributes, + _params$styles = params.styles, + styles = _params$styles === void 0 ? {} : _params$styles; + if (!iconDefinition) return; + var prefix = iconDefinition.prefix, + iconName = iconDefinition.iconName, + icon = iconDefinition.icon; + return apiObject(_objectSpread({ + type: 'icon' + }, iconDefinition), function () { + ensureCss(); + + if (config.autoA11y) { + if (title) { + attributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId()); + } else { + attributes['aria-hidden'] = 'true'; + attributes['focusable'] = 'false'; + } + } + + return makeInlineSvgAbstract({ + icons: { + main: asFoundIcon(icon), + mask: mask ? asFoundIcon(mask.icon) : { + found: false, + width: null, + height: null, + icon: {} + } + }, + prefix: prefix, + iconName: iconName, + transform: _objectSpread({}, meaninglessTransform, transform), + symbol: symbol, + title: title, + maskId: maskId, + titleId: titleId, + extra: { + attributes: attributes, + styles: styles, + classes: classes + } + }); + }); + }); + var text = function text(content) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _params$transform2 = params.transform, + transform = _params$transform2 === void 0 ? meaninglessTransform : _params$transform2, + _params$title2 = params.title, + title = _params$title2 === void 0 ? null : _params$title2, + _params$classes2 = params.classes, + classes = _params$classes2 === void 0 ? [] : _params$classes2, + _params$attributes2 = params.attributes, + attributes = _params$attributes2 === void 0 ? {} : _params$attributes2, + _params$styles2 = params.styles, + styles = _params$styles2 === void 0 ? {} : _params$styles2; + return apiObject({ + type: 'text', + content: content + }, function () { + ensureCss(); + return makeLayersTextAbstract({ + content: content, + transform: _objectSpread({}, meaninglessTransform, transform), + title: title, + extra: { + attributes: attributes, + styles: styles, + classes: ["".concat(config.familyPrefix, "-layers-text")].concat(_toConsumableArray(classes)) + } + }); + }); + }; + var counter = function counter(content) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _params$title3 = params.title, + title = _params$title3 === void 0 ? null : _params$title3, + _params$classes3 = params.classes, + classes = _params$classes3 === void 0 ? [] : _params$classes3, + _params$attributes3 = params.attributes, + attributes = _params$attributes3 === void 0 ? {} : _params$attributes3, + _params$styles3 = params.styles, + styles = _params$styles3 === void 0 ? {} : _params$styles3; + return apiObject({ + type: 'counter', + content: content + }, function () { + ensureCss(); + return makeLayersCounterAbstract({ + content: content.toString(), + title: title, + extra: { + attributes: attributes, + styles: styles, + classes: ["".concat(config.familyPrefix, "-layers-counter")].concat(_toConsumableArray(classes)) + } + }); + }); + }; + var layer = function layer(assembler) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _params$classes4 = params.classes, + classes = _params$classes4 === void 0 ? [] : _params$classes4; + return apiObject({ + type: 'layer' + }, function () { + ensureCss(); + var children = []; + assembler(function (args) { + Array.isArray(args) ? args.map(function (a) { + children = children.concat(a.abstract); + }) : children = children.concat(args.abstract); + }); + return [{ + tag: 'span', + attributes: { + class: ["".concat(config.familyPrefix, "-layers")].concat(_toConsumableArray(classes)).join(' ') + }, + children: children + }]; + }); + }; + var api = { + noAuto: noAuto, + config: config, + dom: dom, + library: library, + parse: parse, + findIconDefinition: findIconDefinition, + icon: icon, + text: text, + counter: counter, + layer: layer, + toHtml: toHtml + }; + + var autoReplace = function autoReplace() { + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var _params$autoReplaceSv = params.autoReplaceSvgRoot, + autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv; + if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({ + node: autoReplaceSvgRoot + }); + }; + + exports.icon = icon; + exports.noAuto = noAuto; + exports.config = config; + exports.toHtml = toHtml; + exports.layer = layer; + exports.text = text; + exports.counter = counter; + exports.library = library; + exports.dom = dom; + exports.parse = parse; + exports.findIconDefinition = findIconDefinition; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49), __webpack_require__(279).setImmediate)) + +/***/ }), +/* 352 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "DndContext", function() { return /* reexport */ DndContext["a" /* DndContext */]; }); +__webpack_require__.d(__webpack_exports__, "createDndContext", function() { return /* reexport */ DndContext["b" /* createDndContext */]; }); +__webpack_require__.d(__webpack_exports__, "DndProvider", function() { return /* reexport */ DndProvider["a" /* DndProvider */]; }); +__webpack_require__.d(__webpack_exports__, "DragPreviewImage", function() { return /* reexport */ DragPreviewImage; }); +__webpack_require__.d(__webpack_exports__, "useDrag", function() { return /* reexport */ useDrag; }); +__webpack_require__.d(__webpack_exports__, "useDrop", function() { return /* reexport */ useDrop; }); +__webpack_require__.d(__webpack_exports__, "useDragLayer", function() { return /* reexport */ useDragLayer; }); +__webpack_require__.d(__webpack_exports__, "DragSource", function() { return /* reexport */ DragSource; }); +__webpack_require__.d(__webpack_exports__, "DropTarget", function() { return /* reexport */ DropTarget; }); +__webpack_require__.d(__webpack_exports__, "DragLayer", function() { return /* reexport */ DragLayer; }); + +// EXTERNAL MODULE: ./node_modules/react-dnd/dist/esm/common/DndContext.js + 27 modules +var DndContext = __webpack_require__(143); + +// EXTERNAL MODULE: ./node_modules/react-dnd/dist/esm/common/DndProvider.js +var DndProvider = __webpack_require__(618); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(1); + +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/DragPreviewImage.js + +/* + * A utility for rendering a drag preview image + */ + +var DragPreviewImage = react["memo"](function (_ref) { + var connect = _ref.connect, + src = _ref.src; + + if (typeof Image !== 'undefined') { + var img = new Image(); + img.src = src; + + img.onload = function () { + return connect(img); + }; + } + + return null; +}); +DragPreviewImage.displayName = 'DragPreviewImage'; +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/index.js + + + +// EXTERNAL MODULE: ./node_modules/invariant/invariant.js +var invariant = __webpack_require__(7); +var invariant_default = /*#__PURE__*/__webpack_require__.n(invariant); + +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/internal/useIsomorphicLayoutEffect.js + // suppress the useLayoutEffect warning on server side. + +var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react["useLayoutEffect"] : react["useEffect"]; +// EXTERNAL MODULE: ./node_modules/shallowequal/index.js +var shallowequal = __webpack_require__(55); +var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); + +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/internal/useCollector.js +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + + +/** + * + * @param monitor The monitor to collect state from + * @param collect The collecting function + * @param onUpdate A method to invoke when updates occur + */ + +function useCollector(monitor, collect, onUpdate) { + var _useState = Object(react["useState"])(function () { + return collect(monitor); + }), + _useState2 = _slicedToArray(_useState, 2), + collected = _useState2[0], + setCollected = _useState2[1]; + + var updateCollected = Object(react["useCallback"])(function () { + var nextValue = collect(monitor); + + if (!shallowequal_default()(collected, nextValue)) { + setCollected(nextValue); + + if (onUpdate) { + onUpdate(); + } + } + }, [collected, monitor, onUpdate]); // update the collected properties after the first render + // and the components are attached to dnd-core + + useIsomorphicLayoutEffect(updateCollected, []); + return [collected, updateCollected]; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/internal/useMonitorOutput.js +function useMonitorOutput_slicedToArray(arr, i) { return useMonitorOutput_arrayWithHoles(arr) || useMonitorOutput_iterableToArrayLimit(arr, i) || useMonitorOutput_nonIterableRest(); } + +function useMonitorOutput_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function useMonitorOutput_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function useMonitorOutput_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + +function useMonitorOutput(monitor, collect, onCollect) { + var _useCollector = useCollector(monitor, collect, onCollect), + _useCollector2 = useMonitorOutput_slicedToArray(_useCollector, 2), + collected = _useCollector2[0], + updateCollected = _useCollector2[1]; + + useIsomorphicLayoutEffect(function subscribeToMonitorStateChange() { + var handlerId = monitor.getHandlerId(); + + if (handlerId == null) { + return undefined; + } + + return monitor.subscribeToStateChange(updateCollected, { + handlerIds: [handlerId] + }); + }, [monitor, updateCollected]); + return collected; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/registration.js +function registerTarget(type, target, manager) { + var registry = manager.getRegistry(); + var targetId = registry.addTarget(type, target); + return [targetId, function () { + return registry.removeTarget(targetId); + }]; +} +function registerSource(type, source, manager) { + var registry = manager.getRegistry(); + var sourceId = registry.addSource(type, source); + return [sourceId, function () { + return registry.removeSource(sourceId); + }]; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/internal/useDragDropManager.js + + + +/** + * A hook to retrieve the DragDropManager from Context + */ + +function useDragDropManager() { + var _useContext = Object(react["useContext"])(DndContext["a" /* DndContext */]), + dragDropManager = _useContext.dragDropManager; + + invariant_default()(dragDropManager != null, 'Expected drag drop context'); + return dragDropManager; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/DragSourceMonitorImpl.js +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; } + + +var isCallingCanDrag = false; +var isCallingIsDragging = false; +var DragSourceMonitorImpl_DragSourceMonitorImpl = +/*#__PURE__*/ +function () { + function DragSourceMonitorImpl(manager) { + _classCallCheck(this, DragSourceMonitorImpl); + + this.sourceId = null; + this.internalMonitor = manager.getMonitor(); + } + + _createClass(DragSourceMonitorImpl, [{ + key: "receiveHandlerId", + value: function receiveHandlerId(sourceId) { + this.sourceId = sourceId; + } + }, { + key: "getHandlerId", + value: function getHandlerId() { + return this.sourceId; + } + }, { + key: "canDrag", + value: function canDrag() { + invariant_default()(!isCallingCanDrag, 'You may not call monitor.canDrag() inside your canDrag() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor'); + + try { + isCallingCanDrag = true; + return this.internalMonitor.canDragSource(this.sourceId); + } finally { + isCallingCanDrag = false; + } + } + }, { + key: "isDragging", + value: function isDragging() { + if (!this.sourceId) { + return false; + } + + invariant_default()(!isCallingIsDragging, 'You may not call monitor.isDragging() inside your isDragging() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor'); + + try { + isCallingIsDragging = true; + return this.internalMonitor.isDraggingSource(this.sourceId); + } finally { + isCallingIsDragging = false; + } + } + }, { + key: "subscribeToStateChange", + value: function subscribeToStateChange(listener, options) { + return this.internalMonitor.subscribeToStateChange(listener, options); + } + }, { + key: "isDraggingSource", + value: function isDraggingSource(sourceId) { + return this.internalMonitor.isDraggingSource(sourceId); + } + }, { + key: "isOverTarget", + value: function isOverTarget(targetId, options) { + return this.internalMonitor.isOverTarget(targetId, options); + } + }, { + key: "getTargetIds", + value: function getTargetIds() { + return this.internalMonitor.getTargetIds(); + } + }, { + key: "isSourcePublic", + value: function isSourcePublic() { + return this.internalMonitor.isSourcePublic(); + } + }, { + key: "getSourceId", + value: function getSourceId() { + return this.internalMonitor.getSourceId(); + } + }, { + key: "subscribeToOffsetChange", + value: function subscribeToOffsetChange(listener) { + return this.internalMonitor.subscribeToOffsetChange(listener); + } + }, { + key: "canDragSource", + value: function canDragSource(sourceId) { + return this.internalMonitor.canDragSource(sourceId); + } + }, { + key: "canDropOnTarget", + value: function canDropOnTarget(targetId) { + return this.internalMonitor.canDropOnTarget(targetId); + } + }, { + key: "getItemType", + value: function getItemType() { + return this.internalMonitor.getItemType(); + } + }, { + key: "getItem", + value: function getItem() { + return this.internalMonitor.getItem(); + } + }, { + key: "getDropResult", + value: function getDropResult() { + return this.internalMonitor.getDropResult(); + } + }, { + key: "didDrop", + value: function didDrop() { + return this.internalMonitor.didDrop(); + } + }, { + key: "getInitialClientOffset", + value: function getInitialClientOffset() { + return this.internalMonitor.getInitialClientOffset(); + } + }, { + key: "getInitialSourceClientOffset", + value: function getInitialSourceClientOffset() { + return this.internalMonitor.getInitialSourceClientOffset(); + } + }, { + key: "getSourceClientOffset", + value: function getSourceClientOffset() { + return this.internalMonitor.getSourceClientOffset(); + } + }, { + key: "getClientOffset", + value: function getClientOffset() { + return this.internalMonitor.getClientOffset(); + } + }, { + key: "getDifferenceFromInitialOffset", + value: function getDifferenceFromInitialOffset() { + return this.internalMonitor.getDifferenceFromInitialOffset(); + } + }]); + + return DragSourceMonitorImpl; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/utils/cloneWithRef.js + + + +function setRef(ref, node) { + if (typeof ref === 'function') { + ref(node); + } else { + ref.current = node; + } +} + +function cloneWithRef(element, newRef) { + var previousRef = element.ref; + invariant_default()(typeof previousRef !== 'string', 'Cannot connect React DnD to an element with an existing string ref. ' + 'Please convert it to use a callback ref instead, or wrap it into a or
    . ' + 'Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute'); + + if (!previousRef) { + // When there is no ref on the element, use the new ref directly + return Object(react["cloneElement"])(element, { + ref: newRef + }); + } else { + return Object(react["cloneElement"])(element, { + ref: function ref(node) { + setRef(previousRef, node); + setRef(newRef, node); + } + }); + } +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/wrapConnectorHooks.js + + + +function throwIfCompositeComponentElement(element) { + // Custom components can no longer be wrapped directly in React DnD 2.0 + // so that we don't need to depend on findDOMNode() from react-dom. + if (typeof element.type === 'string') { + return; + } + + var displayName = element.type.displayName || element.type.name || 'the component'; + throw new Error('Only native element nodes can now be passed to React DnD connectors.' + "You can either wrap ".concat(displayName, " into a
    , or turn it into a ") + 'drag source or a drop target itself.'); +} + +function wrapHookToRecognizeElement(hook) { + return function () { + var elementOrNode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + // When passed a node, call the hook straight away. + if (!Object(react["isValidElement"])(elementOrNode)) { + var node = elementOrNode; + hook(node, options); // return the node so it can be chained (e.g. when within callback refs + //
    connectDragSource(connectDropTarget(node))}/> + + return node; + } // If passed a ReactElement, clone it and attach this function as a ref. + // This helps us achieve a neat API where user doesn't even know that refs + // are being used under the hood. + + + var element = elementOrNode; + throwIfCompositeComponentElement(element); // When no options are passed, use the hook directly + + var ref = options ? function (node) { + return hook(node, options); + } : hook; + return cloneWithRef(element, ref); + }; +} + +function wrapConnectorHooks(hooks) { + var wrappedHooks = {}; + Object.keys(hooks).forEach(function (key) { + var hook = hooks[key]; // ref objects should be passed straight through without wrapping + + if (key.endsWith('Ref')) { + wrappedHooks[key] = hooks[key]; + } else { + var wrappedHook = wrapHookToRecognizeElement(hook); + + wrappedHooks[key] = function () { + return wrappedHook; + }; + } + }); + return wrappedHooks; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/utils/isRef.js +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 isRef(obj) { + return (// eslint-disable-next-line no-prototype-builtins + obj !== null && _typeof(obj) === 'object' && obj.hasOwnProperty('current') + ); +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/SourceConnector.js +function SourceConnector_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function SourceConnector_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 SourceConnector_createClass(Constructor, protoProps, staticProps) { if (protoProps) SourceConnector_defineProperties(Constructor.prototype, protoProps); if (staticProps) SourceConnector_defineProperties(Constructor, staticProps); return Constructor; } + + + + +var SourceConnector_SourceConnector = +/*#__PURE__*/ +function () { + function SourceConnector(backend) { + var _this = this; + + SourceConnector_classCallCheck(this, SourceConnector); + + this.hooks = wrapConnectorHooks({ + dragSource: function dragSource(node, options) { + _this.clearDragSource(); + + _this.dragSourceOptions = options || null; + + if (isRef(node)) { + _this.dragSourceRef = node; + } else { + _this.dragSourceNode = node; + } + + _this.reconnectDragSource(); + }, + dragPreview: function dragPreview(node, options) { + _this.clearDragPreview(); + + _this.dragPreviewOptions = options || null; + + if (isRef(node)) { + _this.dragPreviewRef = node; + } else { + _this.dragPreviewNode = node; + } + + _this.reconnectDragPreview(); + } + }); + this.handlerId = null; // The drop target may either be attached via ref or connect function + + this.dragSourceRef = null; + this.dragSourceOptionsInternal = null; // The drag preview may either be attached via ref or connect function + + this.dragPreviewRef = null; + this.dragPreviewOptionsInternal = null; + this.lastConnectedHandlerId = null; + this.lastConnectedDragSource = null; + this.lastConnectedDragSourceOptions = null; + this.lastConnectedDragPreview = null; + this.lastConnectedDragPreviewOptions = null; + this.backend = backend; + } + + SourceConnector_createClass(SourceConnector, [{ + key: "receiveHandlerId", + value: function receiveHandlerId(newHandlerId) { + if (this.handlerId === newHandlerId) { + return; + } + + this.handlerId = newHandlerId; + this.reconnect(); + } + }, { + key: "reconnect", + value: function reconnect() { + this.reconnectDragSource(); + this.reconnectDragPreview(); + } + }, { + key: "reconnectDragSource", + value: function reconnectDragSource() { + var dragSource = this.dragSource; // if nothing has changed then don't resubscribe + + var didChange = this.didHandlerIdChange() || this.didConnectedDragSourceChange() || this.didDragSourceOptionsChange(); + + if (didChange) { + this.disconnectDragSource(); + } + + if (!this.handlerId) { + return; + } + + if (!dragSource) { + this.lastConnectedDragSource = dragSource; + return; + } + + if (didChange) { + this.lastConnectedHandlerId = this.handlerId; + this.lastConnectedDragSource = dragSource; + this.lastConnectedDragSourceOptions = this.dragSourceOptions; + this.dragSourceUnsubscribe = this.backend.connectDragSource(this.handlerId, dragSource, this.dragSourceOptions); + } + } + }, { + key: "reconnectDragPreview", + value: function reconnectDragPreview() { + var dragPreview = this.dragPreview; // if nothing has changed then don't resubscribe + + var didChange = this.didHandlerIdChange() || this.didConnectedDragPreviewChange() || this.didDragPreviewOptionsChange(); + + if (!this.handlerId) { + this.disconnectDragPreview(); + } else if (this.dragPreview && didChange) { + this.lastConnectedHandlerId = this.handlerId; + this.lastConnectedDragPreview = dragPreview; + this.lastConnectedDragPreviewOptions = this.dragPreviewOptions; + this.disconnectDragPreview(); + this.dragPreviewUnsubscribe = this.backend.connectDragPreview(this.handlerId, dragPreview, this.dragPreviewOptions); + } + } + }, { + key: "didHandlerIdChange", + value: function didHandlerIdChange() { + return this.lastConnectedHandlerId !== this.handlerId; + } + }, { + key: "didConnectedDragSourceChange", + value: function didConnectedDragSourceChange() { + return this.lastConnectedDragSource !== this.dragSource; + } + }, { + key: "didConnectedDragPreviewChange", + value: function didConnectedDragPreviewChange() { + return this.lastConnectedDragPreview !== this.dragPreview; + } + }, { + key: "didDragSourceOptionsChange", + value: function didDragSourceOptionsChange() { + return !shallowequal_default()(this.lastConnectedDragSourceOptions, this.dragSourceOptions); + } + }, { + key: "didDragPreviewOptionsChange", + value: function didDragPreviewOptionsChange() { + return !shallowequal_default()(this.lastConnectedDragPreviewOptions, this.dragPreviewOptions); + } + }, { + key: "disconnectDragSource", + value: function disconnectDragSource() { + if (this.dragSourceUnsubscribe) { + this.dragSourceUnsubscribe(); + this.dragSourceUnsubscribe = undefined; + } + } + }, { + key: "disconnectDragPreview", + value: function disconnectDragPreview() { + if (this.dragPreviewUnsubscribe) { + this.dragPreviewUnsubscribe(); + this.dragPreviewUnsubscribe = undefined; + this.dragPreviewNode = null; + this.dragPreviewRef = null; + } + } + }, { + key: "clearDragSource", + value: function clearDragSource() { + this.dragSourceNode = null; + this.dragSourceRef = null; + } + }, { + key: "clearDragPreview", + value: function clearDragPreview() { + this.dragPreviewNode = null; + this.dragPreviewRef = null; + } + }, { + key: "connectTarget", + get: function get() { + return this.dragSource; + } + }, { + key: "dragSourceOptions", + get: function get() { + return this.dragSourceOptionsInternal; + }, + set: function set(options) { + this.dragSourceOptionsInternal = options; + } + }, { + key: "dragPreviewOptions", + get: function get() { + return this.dragPreviewOptionsInternal; + }, + set: function set(options) { + this.dragPreviewOptionsInternal = options; + } + }, { + key: "dragSource", + get: function get() { + return this.dragSourceNode || this.dragSourceRef && this.dragSourceRef.current; + } + }, { + key: "dragPreview", + get: function get() { + return this.dragPreviewNode || this.dragPreviewRef && this.dragPreviewRef.current; + } + }]); + + return SourceConnector; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/internal/drag.js +function drag_slicedToArray(arr, i) { return drag_arrayWithHoles(arr) || drag_iterableToArrayLimit(arr, i) || drag_nonIterableRest(); } + +function drag_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function drag_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function drag_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function drag_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { drag_typeof = function _typeof(obj) { return typeof obj; }; } else { drag_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return drag_typeof(obj); } + + + + + + + + +function useDragSourceMonitor() { + var manager = useDragDropManager(); + var monitor = Object(react["useMemo"])(function () { + return new DragSourceMonitorImpl_DragSourceMonitorImpl(manager); + }, [manager]); + var connector = Object(react["useMemo"])(function () { + return new SourceConnector_SourceConnector(manager.getBackend()); + }, [manager]); + return [monitor, connector]; +} +function useDragHandler(spec, monitor, connector) { + var manager = useDragDropManager(); + var handler = Object(react["useMemo"])(function () { + return { + beginDrag: function beginDrag() { + var _spec$current = spec.current, + begin = _spec$current.begin, + item = _spec$current.item; + + if (begin) { + var beginResult = begin(monitor); + invariant_default()(beginResult == null || drag_typeof(beginResult) === 'object', 'dragSpec.begin() must either return an object, undefined, or null'); + return beginResult || item || {}; + } + + return item || {}; + }, + canDrag: function canDrag() { + if (typeof spec.current.canDrag === 'boolean') { + return spec.current.canDrag; + } else if (typeof spec.current.canDrag === 'function') { + return spec.current.canDrag(monitor); + } else { + return true; + } + }, + isDragging: function isDragging(globalMonitor, target) { + var isDragging = spec.current.isDragging; + return isDragging ? isDragging(monitor) : target === globalMonitor.getSourceId(); + }, + endDrag: function endDrag() { + var end = spec.current.end; + + if (end) { + end(monitor.getItem(), monitor); + } + + connector.reconnect(); + } + }; + }, []); + useIsomorphicLayoutEffect(function registerHandler() { + var _registerSource = registerSource(spec.current.item.type, handler, manager), + _registerSource2 = drag_slicedToArray(_registerSource, 2), + handlerId = _registerSource2[0], + unregister = _registerSource2[1]; + + monitor.receiveHandlerId(handlerId); + connector.receiveHandlerId(handlerId); + return unregister; + }, []); +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/useDrag.js +function useDrag_slicedToArray(arr, i) { return useDrag_arrayWithHoles(arr) || useDrag_iterableToArrayLimit(arr, i) || useDrag_nonIterableRest(); } + +function useDrag_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function useDrag_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function useDrag_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + + + + +/** + * useDragSource hook + * @param sourceSpec The drag source specification * + */ + +function useDrag(spec) { + var specRef = Object(react["useRef"])(spec); + specRef.current = spec; // TODO: wire options into createSourceConnector + + invariant_default()(spec.item != null, 'item must be defined'); + invariant_default()(spec.item.type != null, 'item type must be defined'); + + var _useDragSourceMonitor = useDragSourceMonitor(), + _useDragSourceMonitor2 = useDrag_slicedToArray(_useDragSourceMonitor, 2), + monitor = _useDragSourceMonitor2[0], + connector = _useDragSourceMonitor2[1]; + + useDragHandler(specRef, monitor, connector); + var result = useMonitorOutput(monitor, specRef.current.collect || function () { + return {}; + }, function () { + return connector.reconnect(); + }); + var connectDragSource = Object(react["useMemo"])(function () { + return connector.hooks.dragSource(); + }, [connector]); + var connectDragPreview = Object(react["useMemo"])(function () { + return connector.hooks.dragPreview(); + }, [connector]); + useIsomorphicLayoutEffect(function () { + connector.dragSourceOptions = specRef.current.options || null; + connector.reconnect(); + }, [connector]); + useIsomorphicLayoutEffect(function () { + connector.dragPreviewOptions = specRef.current.previewOptions || null; + connector.reconnect(); + }, [connector]); + return [result, connectDragSource, connectDragPreview]; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/TargetConnector.js +function TargetConnector_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function TargetConnector_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 TargetConnector_createClass(Constructor, protoProps, staticProps) { if (protoProps) TargetConnector_defineProperties(Constructor.prototype, protoProps); if (staticProps) TargetConnector_defineProperties(Constructor, staticProps); return Constructor; } + + + + +var TargetConnector_TargetConnector = +/*#__PURE__*/ +function () { + function TargetConnector(backend) { + var _this = this; + + TargetConnector_classCallCheck(this, TargetConnector); + + this.hooks = wrapConnectorHooks({ + dropTarget: function dropTarget(node, options) { + _this.clearDropTarget(); + + _this.dropTargetOptions = options; + + if (isRef(node)) { + _this.dropTargetRef = node; + } else { + _this.dropTargetNode = node; + } + + _this.reconnect(); + } + }); + this.handlerId = null; // The drop target may either be attached via ref or connect function + + this.dropTargetRef = null; + this.dropTargetOptionsInternal = null; + this.lastConnectedHandlerId = null; + this.lastConnectedDropTarget = null; + this.lastConnectedDropTargetOptions = null; + this.backend = backend; + } + + TargetConnector_createClass(TargetConnector, [{ + key: "reconnect", + value: function reconnect() { + // if nothing has changed then don't resubscribe + var didChange = this.didHandlerIdChange() || this.didDropTargetChange() || this.didOptionsChange(); + + if (didChange) { + this.disconnectDropTarget(); + } + + var dropTarget = this.dropTarget; + + if (!this.handlerId) { + return; + } + + if (!dropTarget) { + this.lastConnectedDropTarget = dropTarget; + return; + } + + if (didChange) { + this.lastConnectedHandlerId = this.handlerId; + this.lastConnectedDropTarget = dropTarget; + this.lastConnectedDropTargetOptions = this.dropTargetOptions; + this.unsubscribeDropTarget = this.backend.connectDropTarget(this.handlerId, dropTarget, this.dropTargetOptions); + } + } + }, { + key: "receiveHandlerId", + value: function receiveHandlerId(newHandlerId) { + if (newHandlerId === this.handlerId) { + return; + } + + this.handlerId = newHandlerId; + this.reconnect(); + } + }, { + key: "didHandlerIdChange", + value: function didHandlerIdChange() { + return this.lastConnectedHandlerId !== this.handlerId; + } + }, { + key: "didDropTargetChange", + value: function didDropTargetChange() { + return this.lastConnectedDropTarget !== this.dropTarget; + } + }, { + key: "didOptionsChange", + value: function didOptionsChange() { + return !shallowequal_default()(this.lastConnectedDropTargetOptions, this.dropTargetOptions); + } + }, { + key: "disconnectDropTarget", + value: function disconnectDropTarget() { + if (this.unsubscribeDropTarget) { + this.unsubscribeDropTarget(); + this.unsubscribeDropTarget = undefined; + } + } + }, { + key: "clearDropTarget", + value: function clearDropTarget() { + this.dropTargetRef = null; + this.dropTargetNode = null; + } + }, { + key: "connectTarget", + get: function get() { + return this.dropTarget; + } + }, { + key: "dropTargetOptions", + get: function get() { + return this.dropTargetOptionsInternal; + }, + set: function set(options) { + this.dropTargetOptionsInternal = options; + } + }, { + key: "dropTarget", + get: function get() { + return this.dropTargetNode || this.dropTargetRef && this.dropTargetRef.current; + } + }]); + + return TargetConnector; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/common/DropTargetMonitorImpl.js +function DropTargetMonitorImpl_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function DropTargetMonitorImpl_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 DropTargetMonitorImpl_createClass(Constructor, protoProps, staticProps) { if (protoProps) DropTargetMonitorImpl_defineProperties(Constructor.prototype, protoProps); if (staticProps) DropTargetMonitorImpl_defineProperties(Constructor, staticProps); return Constructor; } + + +var isCallingCanDrop = false; +var DropTargetMonitorImpl_DropTargetMonitorImpl = +/*#__PURE__*/ +function () { + function DropTargetMonitorImpl(manager) { + DropTargetMonitorImpl_classCallCheck(this, DropTargetMonitorImpl); + + this.targetId = null; + this.internalMonitor = manager.getMonitor(); + } + + DropTargetMonitorImpl_createClass(DropTargetMonitorImpl, [{ + key: "receiveHandlerId", + value: function receiveHandlerId(targetId) { + this.targetId = targetId; + } + }, { + key: "getHandlerId", + value: function getHandlerId() { + return this.targetId; + } + }, { + key: "subscribeToStateChange", + value: function subscribeToStateChange(listener, options) { + return this.internalMonitor.subscribeToStateChange(listener, options); + } + }, { + key: "canDrop", + value: function canDrop() { + // Cut out early if the target id has not been set. This should prevent errors + // where the user has an older version of dnd-core like in + // https://github.com/react-dnd/react-dnd/issues/1310 + if (!this.targetId) { + return false; + } + + invariant_default()(!isCallingCanDrop, 'You may not call monitor.canDrop() inside your canDrop() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor'); + + try { + isCallingCanDrop = true; + return this.internalMonitor.canDropOnTarget(this.targetId); + } finally { + isCallingCanDrop = false; + } + } + }, { + key: "isOver", + value: function isOver(options) { + if (!this.targetId) { + return false; + } + + return this.internalMonitor.isOverTarget(this.targetId, options); + } + }, { + key: "getItemType", + value: function getItemType() { + return this.internalMonitor.getItemType(); + } + }, { + key: "getItem", + value: function getItem() { + return this.internalMonitor.getItem(); + } + }, { + key: "getDropResult", + value: function getDropResult() { + return this.internalMonitor.getDropResult(); + } + }, { + key: "didDrop", + value: function didDrop() { + return this.internalMonitor.didDrop(); + } + }, { + key: "getInitialClientOffset", + value: function getInitialClientOffset() { + return this.internalMonitor.getInitialClientOffset(); + } + }, { + key: "getInitialSourceClientOffset", + value: function getInitialSourceClientOffset() { + return this.internalMonitor.getInitialSourceClientOffset(); + } + }, { + key: "getSourceClientOffset", + value: function getSourceClientOffset() { + return this.internalMonitor.getSourceClientOffset(); + } + }, { + key: "getClientOffset", + value: function getClientOffset() { + return this.internalMonitor.getClientOffset(); + } + }, { + key: "getDifferenceFromInitialOffset", + value: function getDifferenceFromInitialOffset() { + return this.internalMonitor.getDifferenceFromInitialOffset(); + } + }]); + + return DropTargetMonitorImpl; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/internal/drop.js +function drop_slicedToArray(arr, i) { return drop_arrayWithHoles(arr) || drop_iterableToArrayLimit(arr, i) || drop_nonIterableRest(); } + +function drop_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function drop_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function drop_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + + + + + +function useDropTargetMonitor() { + var manager = useDragDropManager(); + var monitor = Object(react["useMemo"])(function () { + return new DropTargetMonitorImpl_DropTargetMonitorImpl(manager); + }, [manager]); + var connector = Object(react["useMemo"])(function () { + return new TargetConnector_TargetConnector(manager.getBackend()); + }, [manager]); + return [monitor, connector]; +} +function useDropHandler(spec, monitor, connector) { + var manager = useDragDropManager(); + var handler = Object(react["useMemo"])(function () { + return { + canDrop: function canDrop() { + var canDrop = spec.current.canDrop; + return canDrop ? canDrop(monitor.getItem(), monitor) : true; + }, + hover: function hover() { + var hover = spec.current.hover; + + if (hover) { + hover(monitor.getItem(), monitor); + } + }, + drop: function drop() { + var drop = spec.current.drop; + + if (drop) { + return drop(monitor.getItem(), monitor); + } + } + }; + }, [monitor]); + useIsomorphicLayoutEffect(function registerHandler() { + var _registerTarget = registerTarget(spec.current.accept, handler, manager), + _registerTarget2 = drop_slicedToArray(_registerTarget, 2), + handlerId = _registerTarget2[0], + unregister = _registerTarget2[1]; + + monitor.receiveHandlerId(handlerId); + connector.receiveHandlerId(handlerId); + return unregister; + }, [monitor, connector]); +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/useDrop.js +function useDrop_slicedToArray(arr, i) { return useDrop_arrayWithHoles(arr) || useDrop_iterableToArrayLimit(arr, i) || useDrop_nonIterableRest(); } + +function useDrop_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function useDrop_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function useDrop_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + + + + +/** + * useDropTarget Hook + * @param spec The drop target specification + */ + +function useDrop(spec) { + var specRef = Object(react["useRef"])(spec); + specRef.current = spec; + invariant_default()(spec.accept != null, 'accept must be defined'); + + var _useDropTargetMonitor = useDropTargetMonitor(), + _useDropTargetMonitor2 = useDrop_slicedToArray(_useDropTargetMonitor, 2), + monitor = _useDropTargetMonitor2[0], + connector = _useDropTargetMonitor2[1]; + + useDropHandler(specRef, monitor, connector); + var result = useMonitorOutput(monitor, specRef.current.collect || function () { + return {}; + }, function () { + return connector.reconnect(); + }); + var connectDropTarget = Object(react["useMemo"])(function () { + return connector.hooks.dropTarget(); + }, [connector]); + useIsomorphicLayoutEffect(function () { + connector.dropTargetOptions = spec.options || null; + connector.reconnect(); + }, [spec.options]); + return [result, connectDropTarget]; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/useDragLayer.js +function useDragLayer_slicedToArray(arr, i) { return useDragLayer_arrayWithHoles(arr) || useDragLayer_iterableToArrayLimit(arr, i) || useDragLayer_nonIterableRest(); } + +function useDragLayer_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function useDragLayer_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function useDragLayer_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + + + + +/** + * useDragLayer Hook + * @param collector The property collector + */ + +function useDragLayer(collect) { + var dragDropManager = useDragDropManager(); + var monitor = dragDropManager.getMonitor(); + + var _useCollector = useCollector(monitor, collect), + _useCollector2 = useDragLayer_slicedToArray(_useCollector, 2), + collected = _useCollector2[0], + updateCollected = _useCollector2[1]; + + Object(react["useEffect"])(function () { + return monitor.subscribeToOffsetChange(updateCollected); + }); + Object(react["useEffect"])(function () { + return monitor.subscribeToStateChange(updateCollected); + }); + return collected; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/hooks/index.js + + + +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/utils/js_utils.js +function js_utils_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { js_utils_typeof = function _typeof(obj) { return typeof obj; }; } else { js_utils_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return js_utils_typeof(obj); } + +// cheap lodash replacements +function isFunction(input) { + return typeof input === 'function'; +} +function noop() {// noop +} + +function isObjectLike(input) { + return js_utils_typeof(input) === 'object' && input !== null; +} + +function isPlainObject(input) { + if (!isObjectLike(input)) { + return false; + } + + if (Object.getPrototypeOf(input) === null) { + return true; + } + + var proto = input; + + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(input) === proto; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/utils.js +function getDecoratedComponent(instanceRef) { + var currentRef = instanceRef.current; + + if (currentRef == null) { + return null; + } else if (currentRef.decoratedRef) { + // go through the private field in decorateHandler to avoid the invariant hit + return currentRef.decoratedRef.current; + } else { + return currentRef; + } +} +function isClassComponent(Component) { + return Component && Component.prototype && typeof Component.prototype.render === 'function'; +} +function isRefForwardingComponent(C) { + return C && C.$$typeof && C.$$typeof.toString() === 'Symbol(react.forward_ref)'; +} +function isRefable(C) { + return isClassComponent(C) || isRefForwardingComponent(C); +} +function checkDecoratorArguments(functionName, signature) { + if (false) { var arg, i; } +} +// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +var hoist_non_react_statics_cjs = __webpack_require__(70); +var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs); + +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/disposables.js +function disposables_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function disposables_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 disposables_createClass(Constructor, protoProps, staticProps) { if (protoProps) disposables_defineProperties(Constructor.prototype, protoProps); if (staticProps) disposables_defineProperties(Constructor, staticProps); return Constructor; } + + +/** + * Provides a set of static methods for creating Disposables. + * @param {Function} action Action to run during the first call to dispose. + * The action is guaranteed to be run at most once. + */ + +var disposables_Disposable = +/*#__PURE__*/ +function () { + function Disposable(action) { + disposables_classCallCheck(this, Disposable); + + this.isDisposed = false; + this.action = isFunction(action) ? action : noop; + } + /** + * Validates whether the given object is a disposable + * @param {Object} Object to test whether it has a dispose method + * @returns {Boolean} true if a disposable object, else false. + */ + + + disposables_createClass(Disposable, [{ + key: "dispose", + + /** Performs the task of cleaning up resources. */ + value: function dispose() { + if (!this.isDisposed) { + this.action(); + this.isDisposed = true; + } + } + }], [{ + key: "isDisposable", + value: function isDisposable(d) { + return d && isFunction(d.dispose); + } + }, { + key: "_fixup", + value: function _fixup(result) { + return Disposable.isDisposable(result) ? result : Disposable.empty; + } + /** + * Creates a disposable object that invokes the specified action when disposed. + * @param {Function} dispose Action to run during the first call to dispose. + * The action is guaranteed to be run at most once. + * @return {Disposable} The disposable object that runs the given action upon disposal. + */ + + }, { + key: "create", + value: function create(action) { + return new Disposable(action); + } + }]); + + return Disposable; +}(); +/** + * Gets the disposable that does nothing when disposed. + */ + +disposables_Disposable.empty = { + dispose: noop +}; +/** + * Represents a group of disposable resources that are disposed together. + * @constructor + */ + +var CompositeDisposable = +/*#__PURE__*/ +function () { + function CompositeDisposable() { + disposables_classCallCheck(this, CompositeDisposable); + + this.isDisposed = false; + + for (var _len = arguments.length, disposables = new Array(_len), _key = 0; _key < _len; _key++) { + disposables[_key] = arguments[_key]; + } + + this.disposables = disposables; + } + /** + * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. + * @param {Any} item Disposable to add. + */ + + + disposables_createClass(CompositeDisposable, [{ + key: "add", + value: function add(item) { + if (this.isDisposed) { + item.dispose(); + } else { + this.disposables.push(item); + } + } + /** + * Removes and disposes the first occurrence of a disposable from the CompositeDisposable. + * @param {Any} item Disposable to remove. + * @returns {Boolean} true if found; false otherwise. + */ + + }, { + key: "remove", + value: function remove(item) { + var shouldDispose = false; + + if (!this.isDisposed) { + var idx = this.disposables.indexOf(item); + + if (idx !== -1) { + shouldDispose = true; + this.disposables.splice(idx, 1); + item.dispose(); + } + } + + return shouldDispose; + } + /** + * Disposes all disposables in the group and removes them from the group but + * does not dispose the CompositeDisposable. + */ + + }, { + key: "clear", + value: function clear() { + if (!this.isDisposed) { + var len = this.disposables.length; + var currentDisposables = new Array(len); + + for (var i = 0; i < len; i++) { + currentDisposables[i] = this.disposables[i]; + } + + this.disposables = []; + + for (var _i = 0; _i < len; _i++) { + currentDisposables[_i].dispose(); + } + } + } + /** + * Disposes all disposables in the group and removes them from the group. + */ + + }, { + key: "dispose", + value: function dispose() { + if (!this.isDisposed) { + this.isDisposed = true; + var len = this.disposables.length; + var currentDisposables = new Array(len); + + for (var i = 0; i < len; i++) { + currentDisposables[i] = this.disposables[i]; + } + + this.disposables = []; + + for (var _i2 = 0; _i2 < len; _i2++) { + currentDisposables[_i2].dispose(); + } + } + } + }]); + + return CompositeDisposable; +}(); +/** + * Represents a disposable resource whose underlying disposable resource can + * be replaced by another disposable resource, causing automatic disposal of + * the previous underlying disposable resource. + */ + +var SerialDisposable = +/*#__PURE__*/ +function () { + function SerialDisposable() { + disposables_classCallCheck(this, SerialDisposable); + + this.isDisposed = false; + } + /** + * Gets the underlying disposable. + * @returns {Any} the underlying disposable. + */ + + + disposables_createClass(SerialDisposable, [{ + key: "getDisposable", + value: function getDisposable() { + return this.current; + } + }, { + key: "setDisposable", + value: function setDisposable(value) { + var shouldDispose = this.isDisposed; + + if (!shouldDispose) { + var old = this.current; + this.current = value; + + if (old) { + old.dispose(); + } + } + + if (shouldDispose && value) { + value.dispose(); + } + } + /** Performs the task of cleaning up resources. */ + + }, { + key: "dispose", + value: function dispose() { + if (!this.isDisposed) { + this.isDisposed = true; + var old = this.current; + this.current = undefined; + + if (old) { + old.dispose(); + } + } + } + }]); + + return SerialDisposable; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/decorateHandler.js +function decorateHandler_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { decorateHandler_typeof = function _typeof(obj) { return typeof obj; }; } else { decorateHandler_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return decorateHandler_typeof(obj); } + +function decorateHandler_slicedToArray(arr, i) { return decorateHandler_arrayWithHoles(arr) || decorateHandler_iterableToArrayLimit(arr, i) || decorateHandler_nonIterableRest(); } + +function decorateHandler_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function decorateHandler_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function decorateHandler_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function decorateHandler_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function decorateHandler_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 decorateHandler_createClass(Constructor, protoProps, staticProps) { if (protoProps) decorateHandler_defineProperties(Constructor.prototype, protoProps); if (staticProps) decorateHandler_defineProperties(Constructor, staticProps); return Constructor; } + +function _possibleConstructorReturn(self, call) { if (call && (decorateHandler_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +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 decorateHandler(_ref) { + var DecoratedComponent = _ref.DecoratedComponent, + createHandler = _ref.createHandler, + createMonitor = _ref.createMonitor, + createConnector = _ref.createConnector, + registerHandler = _ref.registerHandler, + containerDisplayName = _ref.containerDisplayName, + getType = _ref.getType, + collect = _ref.collect, + options = _ref.options; + var _options$arePropsEqua = options.arePropsEqual, + arePropsEqual = _options$arePropsEqua === void 0 ? shallowequal_default.a : _options$arePropsEqua; + var Decorated = DecoratedComponent; + var displayName = DecoratedComponent.displayName || DecoratedComponent.name || 'Component'; + + var DragDropContainer = + /*#__PURE__*/ + function (_React$Component) { + _inherits(DragDropContainer, _React$Component); + + function DragDropContainer(props) { + var _this; + + decorateHandler_classCallCheck(this, DragDropContainer); + + _this = _possibleConstructorReturn(this, _getPrototypeOf(DragDropContainer).call(this, props)); + _this.decoratedRef = react["createRef"](); + + _this.handleChange = function () { + var nextState = _this.getCurrentState(); + + if (!shallowequal_default()(nextState, _this.state)) { + _this.setState(nextState); + } + }; + + _this.disposable = new SerialDisposable(); + + _this.receiveProps(props); + + _this.dispose(); + + return _this; + } + + decorateHandler_createClass(DragDropContainer, [{ + key: "getHandlerId", + value: function getHandlerId() { + return this.handlerId; + } + }, { + key: "getDecoratedComponentInstance", + value: function getDecoratedComponentInstance() { + invariant_default()(this.decoratedRef.current, 'In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()'); + return this.decoratedRef.current; + } + }, { + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + return !arePropsEqual(nextProps, this.props) || !shallowequal_default()(nextState, this.state); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.disposable = new SerialDisposable(); + this.currentType = undefined; + this.receiveProps(this.props); + this.handleChange(); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (!arePropsEqual(this.props, prevProps)) { + this.receiveProps(this.props); + this.handleChange(); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.dispose(); + } + }, { + key: "receiveProps", + value: function receiveProps(props) { + if (!this.handler) { + return; + } + + this.handler.receiveProps(props); + this.receiveType(getType(props)); + } + }, { + key: "receiveType", + value: function receiveType(type) { + if (!this.handlerMonitor || !this.manager || !this.handlerConnector) { + return; + } + + if (type === this.currentType) { + return; + } + + this.currentType = type; + + var _registerHandler = registerHandler(type, this.handler, this.manager), + _registerHandler2 = decorateHandler_slicedToArray(_registerHandler, 2), + handlerId = _registerHandler2[0], + unregister = _registerHandler2[1]; + + this.handlerId = handlerId; + this.handlerMonitor.receiveHandlerId(handlerId); + this.handlerConnector.receiveHandlerId(handlerId); + var globalMonitor = this.manager.getMonitor(); + var unsubscribe = globalMonitor.subscribeToStateChange(this.handleChange, { + handlerIds: [handlerId] + }); + this.disposable.setDisposable(new CompositeDisposable(new disposables_Disposable(unsubscribe), new disposables_Disposable(unregister))); + } + }, { + key: "dispose", + value: function dispose() { + this.disposable.dispose(); + + if (this.handlerConnector) { + this.handlerConnector.receiveHandlerId(null); + } + } + }, { + key: "getCurrentState", + value: function getCurrentState() { + if (!this.handlerConnector) { + return {}; + } + + var nextState = collect(this.handlerConnector.hooks, this.handlerMonitor, this.props); + + if (false) {} + + return nextState; + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + return react["createElement"](DndContext["a" /* DndContext */].Consumer, null, function (_ref2) { + var dragDropManager = _ref2.dragDropManager; + + _this2.receiveDragDropManager(dragDropManager); + + if (typeof requestAnimationFrame !== 'undefined') { + requestAnimationFrame(function () { + return _this2.handlerConnector.reconnect(); + }); + } + + return react["createElement"](Decorated, Object.assign({}, _this2.props, _this2.getCurrentState(), { + // NOTE: if Decorated is a Function Component, decoratedRef will not be populated unless it's a refforwarding component. + ref: isRefable(Decorated) ? _this2.decoratedRef : null + })); + }); + } + }, { + key: "receiveDragDropManager", + value: function receiveDragDropManager(dragDropManager) { + if (this.manager !== undefined) { + return; + } + + invariant_default()(dragDropManager !== undefined, 'Could not find the drag and drop manager in the context of %s. ' + 'Make sure to render a DndProvider component in your top-level component. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context', displayName, displayName); + + if (dragDropManager === undefined) { + return; + } + + this.manager = dragDropManager; + this.handlerMonitor = createMonitor(dragDropManager); + this.handlerConnector = createConnector(dragDropManager.getBackend()); + this.handler = createHandler(this.handlerMonitor, this.decoratedRef); + } + }]); + + return DragDropContainer; + }(react["Component"]); + + DragDropContainer.DecoratedComponent = DecoratedComponent; + DragDropContainer.displayName = "".concat(containerDisplayName, "(").concat(displayName, ")"); + return hoist_non_react_statics_cjs_default()(DragDropContainer, DecoratedComponent); +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/utils/isValidType.js +function isValidType_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { isValidType_typeof = function _typeof(obj) { return typeof obj; }; } else { isValidType_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return isValidType_typeof(obj); } + +function isValidType(type, allowArray) { + return typeof type === 'string' || isValidType_typeof(type) === 'symbol' || !!allowArray && Array.isArray(type) && type.every(function (t) { + return isValidType(t, false); + }); +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/createSourceFactory.js +function createSourceFactory_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function createSourceFactory_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 createSourceFactory_createClass(Constructor, protoProps, staticProps) { if (protoProps) createSourceFactory_defineProperties(Constructor.prototype, protoProps); if (staticProps) createSourceFactory_defineProperties(Constructor, staticProps); return Constructor; } + + + + +var ALLOWED_SPEC_METHODS = ['canDrag', 'beginDrag', 'isDragging', 'endDrag']; +var REQUIRED_SPEC_METHODS = ['beginDrag']; + +var createSourceFactory_SourceImpl = +/*#__PURE__*/ +function () { + function SourceImpl(spec, monitor, ref) { + var _this = this; + + createSourceFactory_classCallCheck(this, SourceImpl); + + this.props = null; + + this.beginDrag = function () { + if (!_this.props) { + return; + } + + var item = _this.spec.beginDrag(_this.props, _this.monitor, _this.ref.current); + + if (false) {} + + return item; + }; + + this.spec = spec; + this.monitor = monitor; + this.ref = ref; + } + + createSourceFactory_createClass(SourceImpl, [{ + key: "receiveProps", + value: function receiveProps(props) { + this.props = props; + } + }, { + key: "canDrag", + value: function canDrag() { + if (!this.props) { + return false; + } + + if (!this.spec.canDrag) { + return true; + } + + return this.spec.canDrag(this.props, this.monitor); + } + }, { + key: "isDragging", + value: function isDragging(globalMonitor, sourceId) { + if (!this.props) { + return false; + } + + if (!this.spec.isDragging) { + return sourceId === globalMonitor.getSourceId(); + } + + return this.spec.isDragging(this.props, this.monitor); + } + }, { + key: "endDrag", + value: function endDrag() { + if (!this.props) { + return; + } + + if (!this.spec.endDrag) { + return; + } + + this.spec.endDrag(this.props, this.monitor, getDecoratedComponent(this.ref)); + } + }]); + + return SourceImpl; +}(); + +function createSourceFactory(spec) { + Object.keys(spec).forEach(function (key) { + invariant_default()(ALLOWED_SPEC_METHODS.indexOf(key) > -1, 'Expected the drag source specification to only have ' + 'some of the following keys: %s. ' + 'Instead received a specification with an unexpected "%s" key. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', ALLOWED_SPEC_METHODS.join(', '), key); + invariant_default()(typeof spec[key] === 'function', 'Expected %s in the drag source specification to be a function. ' + 'Instead received a specification with %s: %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', key, key, spec[key]); + }); + REQUIRED_SPEC_METHODS.forEach(function (key) { + invariant_default()(typeof spec[key] === 'function', 'Expected %s in the drag source specification to be a function. ' + 'Instead received a specification with %s: %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', key, key, spec[key]); + }); + return function createSource(monitor, ref) { + return new createSourceFactory_SourceImpl(spec, monitor, ref); + }; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/DragSource.js + + + + + + + + + +/** + * Decorates a component as a dragsource + * @param type The dragsource type + * @param spec The drag source specification + * @param collect The props collector function + * @param options DnD options + */ + +function DragSource(type, spec, collect) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + checkDecoratorArguments('DragSource', 'type, spec, collect[, options]', type, spec, collect, options); + var getType = type; + + if (typeof type !== 'function') { + invariant_default()(isValidType(type), 'Expected "type" provided as the first argument to DragSource to be ' + 'a string, or a function that returns a string given the current props. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', type); + + getType = function getType() { + return type; + }; + } + + invariant_default()(isPlainObject(spec), 'Expected "spec" provided as the second argument to DragSource to be ' + 'a plain object. Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', spec); + var createSource = createSourceFactory(spec); + invariant_default()(typeof collect === 'function', 'Expected "collect" provided as the third argument to DragSource to be ' + 'a function that returns a plain object of props to inject. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', collect); + invariant_default()(isPlainObject(options), 'Expected "options" provided as the fourth argument to DragSource to be ' + 'a plain object when specified. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source', collect); + return function decorateSource(DecoratedComponent) { + return decorateHandler({ + containerDisplayName: 'DragSource', + createHandler: createSource, + registerHandler: registerSource, + createConnector: function createConnector(backend) { + return new SourceConnector_SourceConnector(backend); + }, + createMonitor: function createMonitor(manager) { + return new DragSourceMonitorImpl_DragSourceMonitorImpl(manager); + }, + DecoratedComponent: DecoratedComponent, + getType: getType, + collect: collect, + options: options + }); + }; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/createTargetFactory.js +function createTargetFactory_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function createTargetFactory_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 createTargetFactory_createClass(Constructor, protoProps, staticProps) { if (protoProps) createTargetFactory_defineProperties(Constructor.prototype, protoProps); if (staticProps) createTargetFactory_defineProperties(Constructor, staticProps); return Constructor; } + + + + +var createTargetFactory_ALLOWED_SPEC_METHODS = ['canDrop', 'hover', 'drop']; + +var createTargetFactory_TargetImpl = +/*#__PURE__*/ +function () { + function TargetImpl(spec, monitor, ref) { + createTargetFactory_classCallCheck(this, TargetImpl); + + this.props = null; + this.spec = spec; + this.monitor = monitor; + this.ref = ref; + } + + createTargetFactory_createClass(TargetImpl, [{ + key: "receiveProps", + value: function receiveProps(props) { + this.props = props; + } + }, { + key: "receiveMonitor", + value: function receiveMonitor(monitor) { + this.monitor = monitor; + } + }, { + key: "canDrop", + value: function canDrop() { + if (!this.spec.canDrop) { + return true; + } + + return this.spec.canDrop(this.props, this.monitor); + } + }, { + key: "hover", + value: function hover() { + if (!this.spec.hover) { + return; + } + + this.spec.hover(this.props, this.monitor, getDecoratedComponent(this.ref)); + } + }, { + key: "drop", + value: function drop() { + if (!this.spec.drop) { + return undefined; + } + + var dropResult = this.spec.drop(this.props, this.monitor, this.ref.current); + + if (false) {} + + return dropResult; + } + }]); + + return TargetImpl; +}(); + +function createTargetFactory(spec) { + Object.keys(spec).forEach(function (key) { + invariant_default()(createTargetFactory_ALLOWED_SPEC_METHODS.indexOf(key) > -1, 'Expected the drop target specification to only have ' + 'some of the following keys: %s. ' + 'Instead received a specification with an unexpected "%s" key. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target', createTargetFactory_ALLOWED_SPEC_METHODS.join(', '), key); + invariant_default()(typeof spec[key] === 'function', 'Expected %s in the drop target specification to be a function. ' + 'Instead received a specification with %s: %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target', key, key, spec[key]); + }); + return function createTarget(monitor, ref) { + return new createTargetFactory_TargetImpl(spec, monitor, ref); + }; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/DropTarget.js + + + + + + + + + +function DropTarget(type, spec, collect) { + var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + checkDecoratorArguments('DropTarget', 'type, spec, collect[, options]', type, spec, collect, options); + var getType = type; + + if (typeof type !== 'function') { + invariant_default()(isValidType(type, true), 'Expected "type" provided as the first argument to DropTarget to be ' + 'a string, an array of strings, or a function that returns either given ' + 'the current props. Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target', type); + + getType = function getType() { + return type; + }; + } + + invariant_default()(isPlainObject(spec), 'Expected "spec" provided as the second argument to DropTarget to be ' + 'a plain object. Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target', spec); + var createTarget = createTargetFactory(spec); + invariant_default()(typeof collect === 'function', 'Expected "collect" provided as the third argument to DropTarget to be ' + 'a function that returns a plain object of props to inject. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target', collect); + invariant_default()(isPlainObject(options), 'Expected "options" provided as the fourth argument to DropTarget to be ' + 'a plain object when specified. ' + 'Instead, received %s. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target', collect); + return function decorateTarget(DecoratedComponent) { + return decorateHandler({ + containerDisplayName: 'DropTarget', + createHandler: createTarget, + registerHandler: registerTarget, + createMonitor: function createMonitor(manager) { + return new DropTargetMonitorImpl_DropTargetMonitorImpl(manager); + }, + createConnector: function createConnector(backend) { + return new TargetConnector_TargetConnector(backend); + }, + DecoratedComponent: DecoratedComponent, + getType: getType, + collect: collect, + options: options + }); + }; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/DragLayer.js +function DragLayer_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { DragLayer_typeof = function _typeof(obj) { return typeof obj; }; } else { DragLayer_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return DragLayer_typeof(obj); } + +function DragLayer_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function DragLayer_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 DragLayer_createClass(Constructor, protoProps, staticProps) { if (protoProps) DragLayer_defineProperties(Constructor.prototype, protoProps); if (staticProps) DragLayer_defineProperties(Constructor, staticProps); return Constructor; } + +function DragLayer_possibleConstructorReturn(self, call) { if (call && (DragLayer_typeof(call) === "object" || typeof call === "function")) { return call; } return DragLayer_assertThisInitialized(self); } + +function DragLayer_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function DragLayer_getPrototypeOf(o) { DragLayer_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return DragLayer_getPrototypeOf(o); } + +function DragLayer_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) DragLayer_setPrototypeOf(subClass, superClass); } + +function DragLayer_setPrototypeOf(o, p) { DragLayer_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return DragLayer_setPrototypeOf(o, p); } + + + + + + + + +function DragLayer(collect) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + checkDecoratorArguments('DragLayer', 'collect[, options]', collect, options); + invariant_default()(typeof collect === 'function', 'Expected "collect" provided as the first argument to DragLayer to be a function that collects props to inject into the component. ', 'Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer', collect); + invariant_default()(isPlainObject(options), 'Expected "options" provided as the second argument to DragLayer to be a plain object when specified. ' + 'Instead, received %s. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-layer', options); + return function decorateLayer(DecoratedComponent) { + var Decorated = DecoratedComponent; + var _options$arePropsEqua = options.arePropsEqual, + arePropsEqual = _options$arePropsEqua === void 0 ? shallowequal_default.a : _options$arePropsEqua; + var displayName = Decorated.displayName || Decorated.name || 'Component'; + + var DragLayerContainer = + /*#__PURE__*/ + function (_React$Component) { + DragLayer_inherits(DragLayerContainer, _React$Component); + + function DragLayerContainer() { + var _this; + + DragLayer_classCallCheck(this, DragLayerContainer); + + _this = DragLayer_possibleConstructorReturn(this, DragLayer_getPrototypeOf(DragLayerContainer).apply(this, arguments)); + _this.isCurrentlyMounted = false; + _this.ref = react["createRef"](); + + _this.handleChange = function () { + if (!_this.isCurrentlyMounted) { + return; + } + + var nextState = _this.getCurrentState(); + + if (!shallowequal_default()(nextState, _this.state)) { + _this.setState(nextState); + } + }; + + return _this; + } + + DragLayer_createClass(DragLayerContainer, [{ + key: "getDecoratedComponentInstance", + value: function getDecoratedComponentInstance() { + invariant_default()(this.ref.current, 'In order to access an instance of the decorated component, it must either be a class component or use React.forwardRef()'); + return this.ref.current; + } + }, { + key: "shouldComponentUpdate", + value: function shouldComponentUpdate(nextProps, nextState) { + return !arePropsEqual(nextProps, this.props) || !shallowequal_default()(nextState, this.state); + } + }, { + key: "componentDidMount", + value: function componentDidMount() { + this.isCurrentlyMounted = true; + this.handleChange(); + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + this.isCurrentlyMounted = false; + + if (this.unsubscribeFromOffsetChange) { + this.unsubscribeFromOffsetChange(); + this.unsubscribeFromOffsetChange = undefined; + } + + if (this.unsubscribeFromStateChange) { + this.unsubscribeFromStateChange(); + this.unsubscribeFromStateChange = undefined; + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + return react["createElement"](DndContext["a" /* DndContext */].Consumer, null, function (_ref) { + var dragDropManager = _ref.dragDropManager; + + if (dragDropManager === undefined) { + return null; + } + + _this2.receiveDragDropManager(dragDropManager); // Let componentDidMount fire to initialize the collected state + + + if (!_this2.isCurrentlyMounted) { + return null; + } + + return react["createElement"](Decorated, Object.assign({}, _this2.props, _this2.state, { + ref: isRefable(Decorated) ? _this2.ref : null + })); + }); + } + }, { + key: "receiveDragDropManager", + value: function receiveDragDropManager(dragDropManager) { + if (this.manager !== undefined) { + return; + } + + this.manager = dragDropManager; + invariant_default()(DragLayer_typeof(dragDropManager) === 'object', 'Could not find the drag and drop manager in the context of %s. ' + 'Make sure to render a DndProvider component in your top-level component. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/troubleshooting#could-not-find-the-drag-and-drop-manager-in-the-context', displayName, displayName); + var monitor = this.manager.getMonitor(); + this.unsubscribeFromOffsetChange = monitor.subscribeToOffsetChange(this.handleChange); + this.unsubscribeFromStateChange = monitor.subscribeToStateChange(this.handleChange); + } + }, { + key: "getCurrentState", + value: function getCurrentState() { + if (!this.manager) { + return {}; + } + + var monitor = this.manager.getMonitor(); + return collect(monitor, this.props); + } + }]); + + return DragLayerContainer; + }(react["Component"]); + + DragLayerContainer.displayName = "DragLayer(".concat(displayName, ")"); + DragLayerContainer.DecoratedComponent = DecoratedComponent; + return hoist_non_react_statics_cjs_default()(DragLayerContainer, DecoratedComponent); + }; +} +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/decorators/index.js + + + +// CONCATENATED MODULE: ./node_modules/react-dnd/dist/esm/index.js + + + + +/***/ }), +/* 353 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var makeSearch=function makeSearch(searchObj){var shouldContinue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(!shouldContinue){return'';}return Object.keys(searchObj).reduce(function(acc,current,index){if(searchObj[current]!==null){acc="".concat(acc).concat(index===0?'':'&').concat(current,"=").concat(searchObj[current]);}return acc;},'');};var _default=makeSearch;exports["default"]=_default; + +/***/ }), +/* 354 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.dispatch=void 0;__webpack_require__(657);__webpack_require__(831);__webpack_require__(834);__webpack_require__(836);__webpack_require__(838);__webpack_require__(846);__webpack_require__(854);var _react=_interopRequireDefault(__webpack_require__(1));var _reactDom=_interopRequireDefault(__webpack_require__(32));var _reactRedux=__webpack_require__(62);var _reactRouterDom=__webpack_require__(30);var _lodash=__webpack_require__(8);var _styles=__webpack_require__(21);var _actions=__webpack_require__(285);var _actions2=__webpack_require__(410);var _basename=_interopRequireDefault(__webpack_require__(412));var _injectReducer=_interopRequireDefault(__webpack_require__(217));var _injectSaga=_interopRequireDefault(__webpack_require__(293));var _App=_interopRequireDefault(__webpack_require__(1005));var _LanguageProvider=_interopRequireDefault(__webpack_require__(1516));var _configureStore=_interopRequireDefault(__webpack_require__(1517));var _config=__webpack_require__(221);var _i18n=__webpack_require__(327);var _history=_interopRequireDefault(__webpack_require__(1518));var _plugins=_interopRequireDefault(__webpack_require__(1519));// /** +// * +// * app.js +// * +// * Entry point of the application +// */ +/* eslint-disable */ // Third party css library needed +// Import root component +// Import Language provider +// Import i18n messages +// Create redux store with history +var initialState={};var store=(0,_configureStore["default"])(initialState,_history["default"]);var dispatch=store.dispatch;exports.dispatch=dispatch;var MOUNT_NODE=document.getElementById('app')||document.createElement('div');Object.keys(_plugins["default"]).forEach(function(current){var registerPlugin=function registerPlugin(plugin){return plugin;};var currentPluginFn=_plugins["default"][current];var plugin=currentPluginFn({registerPlugin:registerPlugin,settingsBaseURL:_config.SETTINGS_BASE_URL||'/settings'});var pluginTradsPrefixed=_i18n.languages.reduce(function(acc,lang){var currentLocale=plugin.trads[lang];if(currentLocale){var localeprefixedWithPluginId=Object.keys(currentLocale).reduce(function(acc2,current){acc2["".concat(plugin.id,".").concat(current)]=currentLocale[current];return acc2;},{});acc[lang]=localeprefixedWithPluginId;}return acc;},{});try{(0,_lodash.merge)(_i18n.translationMessages,pluginTradsPrefixed);dispatch((0,_actions.pluginLoaded)(plugin));}catch(err){console.log({err:err});}});// TODO +var remoteURL=function(){// Relative URL (ex: /dashboard) +if("/admin/"[0]==='/'){return(window.location.origin+"/admin/").replace(/\/$/,'');}return "/admin/".replace(/\/$/,'');}();var displayNotification=function displayNotification(message,status){dispatch((0,_actions2.showNotification)(message,status));};var lockApp=function lockApp(data){dispatch((0,_actions.freezeApp)(data));};var unlockApp=function unlockApp(){dispatch((0,_actions.unfreezeApp)());};window.strapi=Object.assign(window.strapi||{},{node:"host"||false,env:"production",remoteURL:remoteURL,backendURL: true?window.location.origin:undefined,notification:{success:function success(message){displayNotification(message,'success');},warning:function warning(message){displayNotification(message,'warning');},error:function error(message){displayNotification(message,'error');},info:function info(message){displayNotification(message,'info');}},refresh:function refresh(pluginId){return{translationMessages:function translationMessages(translationMessagesUpdated){render((0,_lodash.merge)({},_i18n.translationMessages,translationMessagesUpdated));},leftMenuSections:function leftMenuSections(leftMenuSectionsUpdated){store.dispatch((0,_actions.updatePlugin)(pluginId,'leftMenuSections',leftMenuSectionsUpdated));}};},router:_history["default"],languages:_i18n.languages,currentLanguage:window.localStorage.getItem('strapi-admin-language')||window.navigator.language||window.navigator.userLanguage||'en',lockApp:lockApp,unlockApp:unlockApp,injectReducer:_injectReducer["default"],injectSaga:_injectSaga["default"],store:store});var render=function render(messages){_reactDom["default"].render(/*#__PURE__*/_react["default"].createElement(_reactRedux.Provider,{store:store},/*#__PURE__*/_react["default"].createElement(_styles.Fonts,null),/*#__PURE__*/_react["default"].createElement(_LanguageProvider["default"],{messages:messages},/*#__PURE__*/_react["default"].createElement(_reactRouterDom.BrowserRouter,{basename:_basename["default"]},/*#__PURE__*/_react["default"].createElement(_App["default"],{store:store})))),MOUNT_NODE);};if(false){}if(true){// Chunked polyfill for browsers without Intl support +if(!window.Intl){new Promise(function(resolve){resolve(Promise.all(/* import() */[__webpack_require__.e(8), __webpack_require__.e(13)]).then(__webpack_require__.t.bind(null, 1894, 7)));}).then(function(){return Promise.all([__webpack_require__.e(/* import() */ 12).then(__webpack_require__.t.bind(null, 1895, 7)),__webpack_require__.e(/* import() */ 11).then(__webpack_require__.t.bind(null, 1896, 7))]);}).then(function(){return render(_i18n.translationMessages);})["catch"](function(err){throw err;});}else{render(_i18n.translationMessages);}}// @Pierre Burgy exporting dispatch for the notifications... +// TODO remove this for the new Cypress tests +if(window.Cypress){window.__store__=Object.assign(window.__store__||{},{store:store});} + +/***/ }), +/* 355 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(46) && !__webpack_require__(27)(function () { + return Object.defineProperty(__webpack_require__(252)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 356 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(26); +var core = __webpack_require__(42); +var LIBRARY = __webpack_require__(121); +var wksExt = __webpack_require__(253); +var defineProperty = __webpack_require__(47).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) }); +}; + + +/***/ }), +/* 357 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(74); +var toIObject = __webpack_require__(76); +var arrayIndexOf = __webpack_require__(203)(false); +var IE_PROTO = __webpack_require__(254)('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; +}; + + +/***/ }), +/* 358 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(47); +var anObject = __webpack_require__(28); +var getKeys = __webpack_require__(122); + +module.exports = __webpack_require__(46) ? 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; +}; + + +/***/ }), +/* 359 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = __webpack_require__(76); +var gOPN = __webpack_require__(125).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(); + } +}; + +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; + + +/***/ }), +/* 360 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 19.1.2.1 Object.assign(target, source, ...) +var DESCRIPTORS = __webpack_require__(46); +var getKeys = __webpack_require__(122); +var gOPS = __webpack_require__(204); +var pIE = __webpack_require__(174); +var toObject = __webpack_require__(58); +var IObject = __webpack_require__(173); +var $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(27)(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; + + +/***/ }), +/* 361 */ +/***/ (function(module, exports) { + +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y) { + // eslint-disable-next-line no-self-compare + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; + + +/***/ }), +/* 362 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var aFunction = __webpack_require__(86); +var isObject = __webpack_require__(29); +var invoke = __webpack_require__(363); +var arraySlice = [].slice; +var factories = {}; + +var construct = function (F, len, args) { + if (!(len in factories)) { + for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; + // eslint-disable-next-line no-new-func + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /* , ...args */) { + var fn = aFunction(this); + var partArgs = arraySlice.call(arguments, 1); + var bound = function (/* args... */) { + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if (isObject(fn.prototype)) bound.prototype = fn.prototype; + return bound; +}; + + +/***/ }), +/* 363 */ +/***/ (function(module, exports) { + +// 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); +}; + + +/***/ }), +/* 364 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseInt = __webpack_require__(26).parseInt; +var $trim = __webpack_require__(148).trim; +var ws = __webpack_require__(258); +var hex = /^[-+]?0[xX]/; + +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; + + +/***/ }), +/* 365 */ +/***/ (function(module, exports, __webpack_require__) { + +var $parseFloat = __webpack_require__(26).parseFloat; +var $trim = __webpack_require__(148).trim; + +module.exports = 1 / $parseFloat(__webpack_require__(258) + '-0') !== -Infinity ? function parseFloat(str) { + var string = $trim(String(str), 3); + var result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; + + +/***/ }), +/* 366 */ +/***/ (function(module, exports, __webpack_require__) { + +var cof = __webpack_require__(96); +module.exports = function (it, msg) { + if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); + return +it; +}; + + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +// 20.1.2.3 Number.isInteger(number) +var isObject = __webpack_require__(29); +var floor = Math.floor; +module.exports = function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), +/* 368 */ +/***/ (function(module, exports) { + +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x) { + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; + + +/***/ }), +/* 369 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var create = __webpack_require__(124); +var descriptor = __webpack_require__(119); +var setToStringTag = __webpack_require__(147); +var IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(75)(IteratorPrototype, __webpack_require__(36)('iterator'), function () { return this; }); + +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; + + +/***/ }), +/* 370 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(28); +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; + } +}; + + +/***/ }), +/* 371 */ +/***/ (function(module, exports, __webpack_require__) { + +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = __webpack_require__(751); + +module.exports = function (original, length) { + return new (speciesConstructor(original))(length); +}; + + +/***/ }), +/* 372 */ +/***/ (function(module, exports, __webpack_require__) { + +var aFunction = __webpack_require__(86); +var toObject = __webpack_require__(58); +var IObject = __webpack_require__(173); +var toLength = __webpack_require__(38); + +module.exports = function (that, callbackfn, aLen, memo, isRight) { + aFunction(callbackfn); + var O = toObject(that); + var self = IObject(O); + var length = toLength(O.length); + var index = isRight ? length - 1 : 0; + var i = isRight ? -1 : 1; + if (aLen < 2) for (;;) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (isRight ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;isRight ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; + + +/***/ }), +/* 373 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + +var toObject = __webpack_require__(58); +var toAbsoluteIndex = __webpack_require__(123); +var toLength = __webpack_require__(38); + +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = toLength(O.length); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), +/* 374 */ +/***/ (function(module, exports) { + +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; + + +/***/ }), +/* 375 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var regexpExec = __webpack_require__(273); +__webpack_require__(6)({ + target: 'RegExp', + proto: true, + forced: regexpExec !== /./.exec +}, { + exec: regexpExec +}); + + +/***/ }), +/* 376 */ +/***/ (function(module, exports, __webpack_require__) { + +// 21.2.5.3 get RegExp.prototype.flags() +if (__webpack_require__(46) && /./g.flags != 'g') __webpack_require__(47).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(207) +}); + + +/***/ }), +/* 377 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(121); +var global = __webpack_require__(26); +var ctx = __webpack_require__(85); +var classof = __webpack_require__(175); +var $export = __webpack_require__(6); +var isObject = __webpack_require__(29); +var aFunction = __webpack_require__(86); +var anInstance = __webpack_require__(151); +var forOf = __webpack_require__(210); +var speciesConstructor = __webpack_require__(176); +var task = __webpack_require__(275).set; +var microtask = __webpack_require__(771)(); +var newPromiseCapabilityModule = __webpack_require__(378); +var perform = __webpack_require__(772); +var userAgent = __webpack_require__(211); +var promiseResolve = __webpack_require__(379); +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__(36)('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__(152)($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); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(147)($Promise, PROMISE); +__webpack_require__(150)(PROMISE); +Wrapper = __webpack_require__(42)[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__(206)(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; + } +}); + + +/***/ }), +/* 378 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(86); + +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.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 379 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(28); +var isObject = __webpack_require__(29); +var newPromiseCapability = __webpack_require__(378); + +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; +}; + + +/***/ }), +/* 380 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var dP = __webpack_require__(47).f; +var create = __webpack_require__(124); +var redefineAll = __webpack_require__(152); +var ctx = __webpack_require__(85); +var anInstance = __webpack_require__(151); +var forOf = __webpack_require__(210); +var $iterDefine = __webpack_require__(264); +var step = __webpack_require__(374); +var setSpecies = __webpack_require__(150); +var DESCRIPTORS = __webpack_require__(46); +var fastKey = __webpack_require__(108).fastKey; +var validate = __webpack_require__(128); +var SIZE = DESCRIPTORS ? '_s' : 'size'; + +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; + } +}; + +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); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; + + +/***/ }), +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var redefineAll = __webpack_require__(152); +var getWeak = __webpack_require__(108).getWeak; +var anObject = __webpack_require__(28); +var isObject = __webpack_require__(29); +var anInstance = __webpack_require__(151); +var forOf = __webpack_require__(210); +var createArrayMethod = __webpack_require__(90); +var $has = __webpack_require__(74); +var validate = __webpack_require__(128); +var arrayFind = createArrayMethod(5); +var arrayFindIndex = createArrayMethod(6); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (that) { + return that._l || (that._l = new UncaughtFrozenStore()); +}; +var UncaughtFrozenStore = function () { + this.a = []; +}; +var findUncaughtFrozen = function (store, key) { + return arrayFind(store.a, function (it) { + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function (key) { + var index = arrayFindIndex(this.a, function (it) { + return it[0] === key; + }); + if (~index) this.a.splice(index, 1); + return !!~index; + } +}; + +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 = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function (key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key) { + if (!isObject(key)) return false; + var data = getWeak(key); + if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function (that, key, value) { + var data = getWeak(anObject(key), true); + if (data === true) uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; + + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://tc39.github.io/ecma262/#sec-toindex +var toInteger = __webpack_require__(87); +var toLength = __webpack_require__(38); +module.exports = function (it) { + if (it === undefined) return 0; + var number = toInteger(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length!'); + return length; +}; + + +/***/ }), +/* 383 */ +/***/ (function(module, exports, __webpack_require__) { + +// all object keys, includes non-enumerable and symbols +var gOPN = __webpack_require__(125); +var gOPS = __webpack_require__(204); +var anObject = __webpack_require__(28); +var Reflect = __webpack_require__(26).Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) { + var keys = gOPN.f(anObject(it)); + var getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; + + +/***/ }), +/* 384 */ +/***/ (function(module, exports, __webpack_require__) { + +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = __webpack_require__(38); +var repeat = __webpack_require__(260); +var defined = __webpack_require__(97); + +module.exports = function (that, maxLength, fillString, left) { + var S = String(defined(that)); + var stringLength = S.length; + var fillStr = fillString === undefined ? ' ' : String(fillString); + var intMaxLength = toLength(maxLength); + if (intMaxLength <= stringLength || fillStr == '') return S; + var fillLen = intMaxLength - stringLength; + var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; + + +/***/ }), +/* 385 */ +/***/ (function(module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(46); +var getKeys = __webpack_require__(122); +var toIObject = __webpack_require__(76); +var isEnum = __webpack_require__(174).f; +module.exports = function (isEntries) { + return function (it) { + var O = toIObject(it); + var keys = getKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || isEnum.call(O, key)) { + result.push(isEntries ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + + +/***/ }), +/* 386 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2014-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. + */ + +var runtime = (function (exports) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + exports.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + exports.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + exports.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + exports.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator, PromiseImpl) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return PromiseImpl.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return PromiseImpl.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. + result.value = unwrapped; + resolve(result); + }, function(error) { + // If a rejected Promise was yielded, throw the rejection back + // into the async generator function so it can be handled there. + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new PromiseImpl(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + exports.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { + if (PromiseImpl === void 0) PromiseImpl = Promise; + + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList), + PromiseImpl + ); + + return exports.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + // Note: ["return"] must be used for ES3 parsing compatibility. + if (delegate.iterator["return"]) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + exports.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; + + // Regardless of whether this script is executing as a CommonJS module + // or not, return the runtime object so that we can declare the variable + // regeneratorRuntime in the outer scope, which allows this module to be + // injected easily by `bin/regenerator --include-runtime script.js`. + return exports; + +}( + // If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + true ? module.exports : undefined +)); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + // This module should not be running in strict mode, so the above + // assignment should always work unless something is misconfigured. Just + // in case runtime.js accidentally runs in strict mode, we can escape + // strict mode using a global Function call. This could conceivably fail + // if a Content Security Policy forbids using Function, but in that case + // the proper solution is to fix the accidental strict mode problem. If + // you've misconfigured your bundler to force strict mode and applied a + // CSP to forbid Function, and you're not willing to fix either of those + // problems, please detail your unique predicament in a GitHub issue. + Function("r", "regeneratorRuntime = r")(runtime); +} + + +/***/ }), +/* 387 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = !__webpack_require__(100) && !__webpack_require__(154)(function () { + return Object.defineProperty(__webpack_require__(277)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 388 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function escape(url, needQuotes) { + if (typeof url !== 'string') { + return url; + } // If url is already wrapped in quotes, remove them + + + if (/^['"].*['"]$/.test(url)) { + url = url.slice(1, -1); + } // Should url be wrapped? + // See https://drafts.csswg.org/css-values-3/#urls + + + if (/["'() \t\n]/.test(url) || needQuotes) { + return '"' + url.replace(/"/g, '\\"').replace(/\n/g, '\\n') + '"'; + } + + return url; +}; + +/***/ }), +/* 389 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "c1868c9545d2de1cf8488f1dadd8c9d0.eot"; + +/***/ }), +/* 390 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "a06da7f0950f9dd366fc9db9d56d618a.woff2"; + +/***/ }), +/* 391 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "ec3cfddedb8bebd2d7a3fdf511f7c1cc.woff"; + +/***/ }), +/* 392 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "261d666b0147c6c5cda07265f98b8f8c.eot"; + +/***/ }), +/* 393 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "c20b5b7362d8d7bb7eddf94344ace33e.woff2"; + +/***/ }), +/* 394 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "f89ea91ecd1ca2db7e09baa2c4b156d1.woff"; + +/***/ }), +/* 395 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "a0369ea57eb6d3843d6474c035111f29.eot"; + +/***/ }), +/* 396 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "b15db15f746f29ffa02638cb455b8ec0.woff2"; + +/***/ }), +/* 397 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "bea989e82b07e9687c26fc58a4805021.woff"; + +/***/ }), +/* 398 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = void 0; + +var _batch = __webpack_require__(399); + +// encapsulates the subscription logic for connecting a component to the redux store, as +// well as nesting subscriptions of descendant components, so that we can ensure the +// ancestor components re-render before descendants +var CLEARED = null; +var nullListeners = { + notify: function notify() {} +}; + +function createListenerCollection() { + var batch = (0, _batch.getBatch)(); // the current/next pattern is copied from redux's createStore code. + // TODO: refactor+expose that code to be reusable here? + + var current = []; + var next = []; + return { + clear: function clear() { + next = CLEARED; + current = CLEARED; + }, + notify: function notify() { + var listeners = current = next; + batch(function () { + for (var i = 0; i < listeners.length; i++) { + listeners[i](); + } + }); + }, + get: function get() { + return next; + }, + subscribe: function subscribe(listener) { + var isSubscribed = true; + if (next === current) next = current.slice(); + next.push(listener); + return function unsubscribe() { + if (!isSubscribed || current === CLEARED) return; + isSubscribed = false; + if (next === current) next = current.slice(); + next.splice(next.indexOf(listener), 1); + }; + } + }; +} + +var Subscription = +/*#__PURE__*/ +function () { + function Subscription(store, parentSub) { + this.store = store; + this.parentSub = parentSub; + this.unsubscribe = null; + this.listeners = nullListeners; + this.handleChangeWrapper = this.handleChangeWrapper.bind(this); + } + + var _proto = Subscription.prototype; + + _proto.addNestedSub = function addNestedSub(listener) { + this.trySubscribe(); + return this.listeners.subscribe(listener); + }; + + _proto.notifyNestedSubs = function notifyNestedSubs() { + this.listeners.notify(); + }; + + _proto.handleChangeWrapper = function handleChangeWrapper() { + if (this.onStateChange) { + this.onStateChange(); + } + }; + + _proto.isSubscribed = function isSubscribed() { + return Boolean(this.unsubscribe); + }; + + _proto.trySubscribe = function trySubscribe() { + if (!this.unsubscribe) { + this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.handleChangeWrapper) : this.store.subscribe(this.handleChangeWrapper); + this.listeners = createListenerCollection(); + } + }; + + _proto.tryUnsubscribe = function tryUnsubscribe() { + if (this.unsubscribe) { + this.unsubscribe(); + this.unsubscribe = null; + this.listeners.clear(); + this.listeners = nullListeners; + } + }; + + return Subscription; +}(); + +exports["default"] = Subscription; + +/***/ }), +/* 399 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.getBatch = exports.setBatch = void 0; + +// Default to a dummy "batch" implementation that just runs the callback +function defaultNoopBatch(callback) { + callback(); +} + +var batch = defaultNoopBatch; // Allow injecting another batching function later + +var setBatch = function setBatch(newBatch) { + return batch = newBatch; +}; // Supply a getter just to skip dealing with ESM bindings + + +exports.setBatch = setBatch; + +var getBatch = function getBatch() { + return batch; +}; + +exports.getBatch = getBatch; + +/***/ }), +/* 400 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +exports.__esModule = true; +exports["default"] = connectAdvanced; + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(155)); + +var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(70)); + +var _invariant = _interopRequireDefault(__webpack_require__(7)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _reactIs = __webpack_require__(178); + +var _Subscription = _interopRequireDefault(__webpack_require__(398)); + +var _Context = __webpack_require__(281); + +// Define some constant arrays just to avoid re-creating these +var EMPTY_ARRAY = []; +var NO_SUBSCRIPTION_ARRAY = [null, null]; + +var stringifyComponent = function stringifyComponent(Comp) { + try { + return JSON.stringify(Comp); + } catch (err) { + return String(Comp); + } +}; + +function storeStateUpdatesReducer(state, action) { + var updateCount = state[1]; + return [action.payload, updateCount + 1]; +} + +var initStateUpdates = function initStateUpdates() { + return [null, 0]; +}; // React currently throws a warning when using useLayoutEffect on the server. +// To get around it, we can conditionally useEffect on the server (no-op) and +// useLayoutEffect in the browser. We need useLayoutEffect because we want +// `connect` to perform sync updates to a ref to save the latest props after +// a render is actually committed to the DOM. + + +var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? _react.useLayoutEffect : _react.useEffect; + +function connectAdvanced( +/* + selectorFactory is a func that is responsible for returning the selector function used to + compute new props from state, props, and dispatch. For example: + export default connectAdvanced((dispatch, options) => (state, props) => ({ + thing: state.things[props.thingId], + saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)), + }))(YourComponent) + Access to dispatch is provided to the factory so selectorFactories can bind actionCreators + outside of their selector as an optimization. Options passed to connectAdvanced are passed to + the selectorFactory, along with displayName and WrappedComponent, as the second argument. + Note that selectorFactory is responsible for all caching/memoization of inbound and outbound + props. Do not use connectAdvanced directly without memoizing results between calls to your + selector, otherwise the Connect component will re-render on every state or props change. +*/ +selectorFactory, // options object: +_ref) { + if (_ref === void 0) { + _ref = {}; + } + + var _ref2 = _ref, + _ref2$getDisplayName = _ref2.getDisplayName, + getDisplayName = _ref2$getDisplayName === void 0 ? function (name) { + return "ConnectAdvanced(" + name + ")"; + } : _ref2$getDisplayName, + _ref2$methodName = _ref2.methodName, + methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName, + _ref2$renderCountProp = _ref2.renderCountProp, + renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp, + _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges, + shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta, + _ref2$storeKey = _ref2.storeKey, + storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey, + _ref2$withRef = _ref2.withRef, + withRef = _ref2$withRef === void 0 ? false : _ref2$withRef, + _ref2$forwardRef = _ref2.forwardRef, + forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef, + _ref2$context = _ref2.context, + context = _ref2$context === void 0 ? _Context.ReactReduxContext : _ref2$context, + connectOptions = (0, _objectWithoutPropertiesLoose2["default"])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"]); + (0, _invariant["default"])(renderCountProp === undefined, "renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"); + (0, _invariant["default"])(!withRef, 'withRef is removed. To access the wrapped instance, use a ref on the connected component'); + var customStoreWarningMessage = 'To use a custom Redux store for specific components, create a custom React context with ' + "React.createContext(), and pass the context object to React Redux's Provider and specific components" + ' like: . ' + 'You may also pass a {context : MyContext} option to connect'; + (0, _invariant["default"])(storeKey === 'store', 'storeKey has been removed and does not do anything. ' + customStoreWarningMessage); + var Context = context; + return function wrapWithConnect(WrappedComponent) { + if (false) {} + + var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; + var displayName = getDisplayName(wrappedComponentName); + var selectorFactoryOptions = (0, _extends2["default"])({}, connectOptions, { + getDisplayName: getDisplayName, + methodName: methodName, + renderCountProp: renderCountProp, + shouldHandleStateChanges: shouldHandleStateChanges, + storeKey: storeKey, + displayName: displayName, + wrappedComponentName: wrappedComponentName, + WrappedComponent: WrappedComponent + }); + var pure = connectOptions.pure; + + function createChildSelector(store) { + return selectorFactory(store.dispatch, selectorFactoryOptions); + } // If we aren't running in "pure" mode, we don't want to memoize values. + // To avoid conditionally calling hooks, we fall back to a tiny wrapper + // that just executes the given callback immediately. + + + var usePureOnlyMemo = pure ? _react.useMemo : function (callback) { + return callback(); + }; + + function ConnectFunction(props) { + var _useMemo = (0, _react.useMemo)(function () { + // Distinguish between actual "data" props that were passed to the wrapper component, + // and values needed to control behavior (forwarded refs, alternate context instances). + // To maintain the wrapperProps object reference, memoize this destructuring. + var context = props.context, + forwardedRef = props.forwardedRef, + wrapperProps = (0, _objectWithoutPropertiesLoose2["default"])(props, ["context", "forwardedRef"]); + return [context, forwardedRef, wrapperProps]; + }, [props]), + propsContext = _useMemo[0], + forwardedRef = _useMemo[1], + wrapperProps = _useMemo[2]; + + var ContextToUse = (0, _react.useMemo)(function () { + // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. + // Memoize the check that determines which context instance we should use. + return propsContext && propsContext.Consumer && (0, _reactIs.isContextConsumer)(_react["default"].createElement(propsContext.Consumer, null)) ? propsContext : Context; + }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available + + var contextValue = (0, _react.useContext)(ContextToUse); // The store _must_ exist as either a prop or in context + + var didStoreComeFromProps = Boolean(props.store); + var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); + (0, _invariant["default"])(didStoreComeFromProps || didStoreComeFromContext, "Could not find \"store\" in the context of " + ("\"" + displayName + "\". Either wrap the root component in a , ") + "or pass a custom React context provider to and the corresponding " + ("React context consumer to " + displayName + " in connect options.")); + var store = props.store || contextValue.store; + var childPropsSelector = (0, _react.useMemo)(function () { + // The child props selector needs the store reference as an input. + // Re-create this selector whenever the store changes. + return createChildSelector(store); + }, [store]); + + var _useMemo2 = (0, _react.useMemo)(function () { + if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component + // connected to the store via props shouldn't use subscription from context, or vice versa. + + var subscription = new _Subscription["default"](store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in + // the middle of the notification loop, where `subscription` will then be null. This can + // probably be avoided if Subscription's listeners logic is changed to not call listeners + // that have been unsubscribed in the middle of the notification loop. + + var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); + return [subscription, notifyNestedSubs]; + }, [store, didStoreComeFromProps, contextValue]), + subscription = _useMemo2[0], + notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary, + // and memoize that value to avoid unnecessary context updates. + + + var overriddenContextValue = (0, _react.useMemo)(function () { + if (didStoreComeFromProps) { + // This component is directly subscribed to a store from props. + // We don't want descendants reading from this store - pass down whatever + // the existing context value is from the nearest connected ancestor. + return contextValue; + } // Otherwise, put this component's subscription instance into context, so that + // connected descendants won't update until after this component is done + + + return (0, _extends2["default"])({}, contextValue, { + subscription: subscription + }); + }, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update + // causes a change to the calculated child component props (or we caught an error in mapState) + + var _useReducer = (0, _react.useReducer)(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates), + _useReducer$ = _useReducer[0], + previousStateUpdateResult = _useReducer$[0], + forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards + + + if (previousStateUpdateResult && previousStateUpdateResult.error) { + throw previousStateUpdateResult.error; + } // Set up refs to coordinate values between the subscription effect and the render logic + + + var lastChildProps = (0, _react.useRef)(); + var lastWrapperProps = (0, _react.useRef)(wrapperProps); + var childPropsFromStoreUpdate = (0, _react.useRef)(); + var actualChildProps = usePureOnlyMemo(function () { + // Tricky logic here: + // - This render may have been triggered by a Redux store update that produced new child props + // - However, we may have gotten new wrapper props after that + // If we have new child props, and the same wrapper props, we know we should use the new child props as-is. + // But, if we have new wrapper props, those might change the child props, so we have to recalculate things. + // So, we'll use the child props from store update only if the wrapper props are the same as last time. + if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { + return childPropsFromStoreUpdate.current; + } // TODO We're reading the store directly in render() here. Bad idea? + // This will likely cause Bad Things (TM) to happen in Concurrent Mode. + // Note that we do this because on renders _not_ caused by store updates, we need the latest store state + // to determine what the child props should be. + + + return childPropsSelector(store.getState(), wrapperProps); + }, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns + // about useLayoutEffect in SSR, so we try to detect environment and fall back to + // just useEffect instead to avoid the warning, since neither will run anyway. + + useIsomorphicLayoutEffect(function () { + // We want to capture the wrapper props and child props we used for later comparisons + lastWrapperProps.current = wrapperProps; + lastChildProps.current = actualChildProps; // If the render was from a store update, clear out that reference and cascade the subscriber update + + if (childPropsFromStoreUpdate.current) { + childPropsFromStoreUpdate.current = null; + notifyNestedSubs(); + } + }); // Our re-subscribe logic only runs when the store/subscription setup changes + + useIsomorphicLayoutEffect(function () { + // If we're not subscribed to the store, nothing to do here + if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts + + var didUnsubscribe = false; + var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component + + var checkForUpdates = function checkForUpdates() { + if (didUnsubscribe) { + // Don't run stale listeners. + // Redux doesn't guarantee unsubscriptions happen until next dispatch. + return; + } + + var latestStoreState = store.getState(); + var newChildProps, error; + + try { + // Actually run the selector with the most recent store state and wrapper props + // to determine what the child props should be + newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); + } catch (e) { + error = e; + lastThrownError = e; + } + + if (!error) { + lastThrownError = null; + } // If the child props haven't changed, nothing to do here - cascade the subscription update + + + if (newChildProps === lastChildProps.current) { + notifyNestedSubs(); + } else { + // Save references to the new child props. Note that we track the "child props from store update" + // as a ref instead of a useState/useReducer because we need a way to determine if that value has + // been processed. If this went into useState/useReducer, we couldn't clear out the value without + // forcing another re-render, which we don't want. + lastChildProps.current = newChildProps; + childPropsFromStoreUpdate.current = newChildProps; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render + + forceComponentUpdateDispatch({ + type: 'STORE_UPDATED', + payload: { + latestStoreState: latestStoreState, + error: error + } + }); + } + }; // Actually subscribe to the nearest connected ancestor (or store) + + + subscription.onStateChange = checkForUpdates; + subscription.trySubscribe(); // Pull data from the store after first render in case the store has + // changed since we began. + + checkForUpdates(); + + var unsubscribeWrapper = function unsubscribeWrapper() { + didUnsubscribe = true; + subscription.tryUnsubscribe(); + + if (lastThrownError) { + // It's possible that we caught an error due to a bad mapState function, but the + // parent re-rendered without this component and we're about to unmount. + // This shouldn't happen as long as we do top-down subscriptions correctly, but + // if we ever do those wrong, this throw will surface the error in our tests. + // In that case, throw the error from here so it doesn't get lost. + throw lastThrownError; + } + }; + + return unsubscribeWrapper; + }, [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component. + // We memoize the elements for the rendered child component as an optimization. + + var renderedWrappedComponent = (0, _react.useMemo)(function () { + return _react["default"].createElement(WrappedComponent, (0, _extends2["default"])({}, actualChildProps, { + ref: forwardedRef + })); + }, [forwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering + // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. + + var renderedChild = (0, _react.useMemo)(function () { + if (shouldHandleStateChanges) { + // If this component is subscribed to store updates, we need to pass its own + // subscription instance down to our descendants. That means rendering the same + // Context instance, and putting a different value into the context. + return _react["default"].createElement(ContextToUse.Provider, { + value: overriddenContextValue + }, renderedWrappedComponent); + } + + return renderedWrappedComponent; + }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); + return renderedChild; + } // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed. + + + var Connect = pure ? _react["default"].memo(ConnectFunction) : ConnectFunction; + Connect.WrappedComponent = WrappedComponent; + Connect.displayName = displayName; + + if (forwardRef) { + var forwarded = _react["default"].forwardRef(function forwardConnectRef(props, ref) { + return _react["default"].createElement(Connect, (0, _extends2["default"])({}, props, { + forwardedRef: ref + })); + }); + + forwarded.displayName = displayName; + forwarded.WrappedComponent = WrappedComponent; + return (0, _hoistNonReactStatics["default"])(forwarded, WrappedComponent); + } + + return (0, _hoistNonReactStatics["default"])(Connect, WrappedComponent); + }; +} + +/***/ }), +/* 401 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +exports.__esModule = true; +exports.wrapMapToPropsConstant = wrapMapToPropsConstant; +exports.getDependsOnOwnProps = getDependsOnOwnProps; +exports.wrapMapToPropsFunc = wrapMapToPropsFunc; + +var _verifyPlainObject = _interopRequireDefault(__webpack_require__(402)); + +function wrapMapToPropsConstant(getConstant) { + return function initConstantSelector(dispatch, options) { + var constant = getConstant(dispatch, options); + + function constantSelector() { + return constant; + } + + constantSelector.dependsOnOwnProps = false; + return constantSelector; + }; +} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args +// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine +// whether mapToProps needs to be invoked when props have changed. +// +// A length of one signals that mapToProps does not depend on props from the parent component. +// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and +// therefore not reporting its length accurately.. + + +function getDependsOnOwnProps(mapToProps) { + return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; +} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, +// this function wraps mapToProps in a proxy function which does several things: +// +// * Detects whether the mapToProps function being called depends on props, which +// is used by selectorFactory to decide if it should reinvoke on props changes. +// +// * On first call, handles mapToProps if returns another function, and treats that +// new function as the true mapToProps for subsequent calls. +// +// * On first call, verifies the first result is a plain object, in order to warn +// the developer that their mapToProps function is not returning a valid result. +// + + +function wrapMapToPropsFunc(mapToProps, methodName) { + return function initProxySelector(dispatch, _ref) { + var displayName = _ref.displayName; + + var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { + return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch); + }; // allow detectFactoryAndVerify to get ownProps + + + proxy.dependsOnOwnProps = true; + + proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { + proxy.mapToProps = mapToProps; + proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); + var props = proxy(stateOrDispatch, ownProps); + + if (typeof props === 'function') { + proxy.mapToProps = props; + proxy.dependsOnOwnProps = getDependsOnOwnProps(props); + props = proxy(stateOrDispatch, ownProps); + } + + if (false) {} + return props; + }; + + return proxy; + }; +} + +/***/ }), +/* 402 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +exports.__esModule = true; +exports["default"] = verifyPlainObject; + +var _isPlainObject = _interopRequireDefault(__webpack_require__(868)); + +var _warning = _interopRequireDefault(__webpack_require__(403)); + +function verifyPlainObject(value, displayName, methodName) { + if (!(0, _isPlainObject["default"])(value)) { + (0, _warning["default"])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + "."); + } +} + +/***/ }), +/* 403 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports["default"] = warning; + +/** + * Prints a warning in the console if it exists. + * + * @param {String} message The warning message. + * @returns {void} + */ +function warning(message) { + /* eslint-disable no-console */ + if (typeof console !== 'undefined' && typeof console.error === 'function') { + console.error(message); + } + /* eslint-enable no-console */ + + + try { + // This error was thrown as a convenience so that if you enable + // "break on all exceptions" in your console, + // it would pause the execution at this line. + throw new Error(message); + /* eslint-disable no-empty */ + } catch (e) {} + /* eslint-enable no-empty */ + +} + +/***/ }), +/* 404 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function stylis_min (W) { + function M(d, c, e, h, a) { + for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) { + g = e.charCodeAt(l); + l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++); + + if (0 === b + n + v + m) { + if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) { + switch (g) { + case 32: + case 9: + case 59: + case 13: + case 10: + break; + + default: + f += e.charAt(l); + } + + g = 59; + } + + switch (g) { + case 123: + f = f.trim(); + q = f.charCodeAt(0); + k = 1; + + for (t = ++l; l < B;) { + switch (g = e.charCodeAt(l)) { + case 123: + k++; + break; + + case 125: + k--; + break; + + case 47: + switch (g = e.charCodeAt(l + 1)) { + case 42: + case 47: + a: { + for (u = l + 1; u < J; ++u) { + switch (e.charCodeAt(u)) { + case 47: + if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) { + l = u + 1; + break a; + } + + break; + + case 10: + if (47 === g) { + l = u + 1; + break a; + } + + } + } + + l = u; + } + + } + + break; + + case 91: + g++; + + case 40: + g++; + + case 34: + case 39: + for (; l++ < J && e.charCodeAt(l) !== g;) { + } + + } + + if (0 === k) break; + l++; + } + + k = e.substring(t, l); + 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0)); + + switch (q) { + case 64: + 0 < r && (f = f.replace(N, '')); + g = f.charCodeAt(1); + + switch (g) { + case 100: + case 109: + case 115: + case 45: + r = c; + break; + + default: + r = O; + } + + k = M(c, r, k, g, a + 1); + t = k.length; + 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = '')); + if (0 < t) switch (g) { + case 115: + f = f.replace(da, ea); + + case 100: + case 109: + case 45: + k = f + '{' + k + '}'; + break; + + case 107: + f = f.replace(fa, '$1 $2'); + k = f + '{' + k + '}'; + k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k; + break; + + default: + k = f + k, 112 === h && (k = (p += k, '')); + } else k = ''; + break; + + default: + k = M(c, X(c, f, I), k, h, a + 1); + } + + F += k; + k = I = r = u = q = 0; + f = ''; + g = e.charCodeAt(++l); + break; + + case 125: + case 59: + f = (0 < r ? f.replace(N, '') : f).trim(); + if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) { + case 0: + break; + + case 64: + if (105 === g || 99 === g) { + G += f + e.charAt(l); + break; + } + + default: + 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2))); + } + I = r = u = q = 0; + f = ''; + g = e.charCodeAt(++l); + } + } + + switch (g) { + case 13: + case 10: + 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00'); + 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h); + z = 1; + D++; + break; + + case 59: + case 125: + if (0 === b + n + v + m) { + z++; + break; + } + + default: + z++; + y = e.charAt(l); + + switch (g) { + case 9: + case 32: + if (0 === n + m + b) switch (x) { + case 44: + case 58: + case 9: + case 32: + y = ''; + break; + + default: + 32 !== g && (y = ' '); + } + break; + + case 0: + y = '\\0'; + break; + + case 12: + y = '\\f'; + break; + + case 11: + y = '\\v'; + break; + + case 38: + 0 === n + b + m && (r = I = 1, y = '\f' + y); + break; + + case 108: + if (0 === n + b + m + E && 0 < u) switch (l - u) { + case 2: + 112 === x && 58 === e.charCodeAt(l - 3) && (E = x); + + case 8: + 111 === K && (E = K); + } + break; + + case 58: + 0 === n + b + m && (u = l); + break; + + case 44: + 0 === b + v + n + m && (r = 1, y += '\r'); + break; + + case 34: + case 39: + 0 === b && (n = n === g ? 0 : 0 === n ? g : n); + break; + + case 91: + 0 === n + b + v && m++; + break; + + case 93: + 0 === n + b + v && m--; + break; + + case 41: + 0 === n + b + m && v--; + break; + + case 40: + if (0 === n + b + m) { + if (0 === q) switch (2 * x + 3 * K) { + case 533: + break; + + default: + q = 1; + } + v++; + } + + break; + + case 64: + 0 === b + v + n + m + u + k && (k = 1); + break; + + case 42: + case 47: + if (!(0 < n + m + v)) switch (b) { + case 0: + switch (2 * g + 3 * e.charCodeAt(l + 1)) { + case 235: + b = 47; + break; + + case 220: + t = l, b = 42; + } + + break; + + case 42: + 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0); + } + } + + 0 === b && (f += y); + } + + K = x; + x = g; + l++; + } + + t = p.length; + + if (0 < t) { + r = c; + if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F; + p = r.join(',') + '{' + p + '}'; + + if (0 !== w * E) { + 2 !== w || L(p, 2) || (E = 0); + + switch (E) { + case 111: + p = p.replace(ha, ':-moz-$1') + p; + break; + + case 112: + p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p; + } + + E = 0; + } + } + + return G + p + F; + } + + function X(d, c, e) { + var h = c.trim().split(ia); + c = h; + var a = h.length, + m = d.length; + + switch (m) { + case 0: + case 1: + var b = 0; + + for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) { + c[b] = Z(d, c[b], e).trim(); + } + + break; + + default: + var v = b = 0; + + for (c = []; b < a; ++b) { + for (var n = 0; n < m; ++n) { + c[v++] = Z(d[n] + ' ', h[b], e).trim(); + } + } + + } + + return c; + } + + function Z(d, c, e) { + var h = c.charCodeAt(0); + 33 > h && (h = (c = c.trim()).charCodeAt(0)); + + switch (h) { + case 38: + return c.replace(F, '$1' + d.trim()); + + case 58: + return d.trim() + c.replace(F, '$1' + d.trim()); + + default: + if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim()); + } + + return d + c; + } + + function P(d, c, e, h) { + var a = d + ';', + m = 2 * c + 3 * e + 4 * h; + + if (944 === m) { + d = a.indexOf(':', 9) + 1; + var b = a.substring(d, a.length - 1).trim(); + b = a.substring(0, d).trim() + b + ';'; + return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b; + } + + if (0 === w || 2 === w && !L(a, 1)) return a; + + switch (m) { + case 1015: + return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a; + + case 951: + return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a; + + case 963: + return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a; + + case 1009: + if (100 !== a.charCodeAt(4)) break; + + case 969: + case 942: + return '-webkit-' + a + a; + + case 978: + return '-webkit-' + a + '-moz-' + a + a; + + case 1019: + case 983: + return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a; + + case 883: + if (45 === a.charCodeAt(8)) return '-webkit-' + a + a; + if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a; + break; + + case 932: + if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) { + case 103: + return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a; + + case 115: + return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a; + + case 98: + return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a; + } + return '-webkit-' + a + '-ms-' + a + a; + + case 964: + return '-webkit-' + a + '-ms-flex-' + a + a; + + case 1023: + if (99 !== a.charCodeAt(8)) break; + b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify'); + return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a; + + case 1005: + return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a; + + case 1e3: + b = a.substring(13).trim(); + c = b.indexOf('-') + 1; + + switch (b.charCodeAt(0) + b.charCodeAt(c)) { + case 226: + b = a.replace(G, 'tb'); + break; + + case 232: + b = a.replace(G, 'tb-rl'); + break; + + case 220: + b = a.replace(G, 'lr'); + break; + + default: + return a; + } + + return '-webkit-' + a + '-ms-' + b + a; + + case 1017: + if (-1 === a.indexOf('sticky', 9)) break; + + case 975: + c = (a = d).length - 10; + b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim(); + + switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) { + case 203: + if (111 > b.charCodeAt(8)) break; + + case 115: + a = a.replace(b, '-webkit-' + b) + ';' + a; + break; + + case 207: + case 102: + a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a; + } + + return a + ';'; + + case 938: + if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) { + case 105: + return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a; + + case 115: + return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a; + + default: + return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a; + } + break; + + case 973: + case 989: + if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break; + + case 931: + case 953: + if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a; + break; + + case 962: + if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a; + } + + return a; + } + + function L(d, c) { + var e = d.indexOf(1 === c ? ':' : '{'), + h = d.substring(0, 3 !== c ? e : 10); + e = d.substring(e + 1, d.length - 1); + return R(2 !== c ? h : h.replace(na, '$1'), e, c); + } + + function ea(d, c) { + var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2)); + return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')'; + } + + function H(d, c, e, h, a, m, b, v, n, q) { + for (var g = 0, x = c, w; g < A; ++g) { + switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) { + case void 0: + case !1: + case !0: + case null: + break; + + default: + x = w; + } + } + + if (x !== c) return x; + } + + function T(d) { + switch (d) { + case void 0: + case null: + A = S.length = 0; + break; + + default: + if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) { + T(d[c]); + } else Y = !!d | 0; + } + + return T; + } + + function U(d) { + d = d.prefix; + void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0); + return U; + } + + function B(d, c) { + var e = d; + 33 > e.charCodeAt(0) && (e = e.trim()); + V = e; + e = [V]; + + if (0 < A) { + var h = H(-1, c, e, e, D, z, 0, 0, 0, 0); + void 0 !== h && 'string' === typeof h && (c = h); + } + + var a = M(O, e, c, 0, 0); + 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h)); + V = ''; + E = 0; + z = D = 1; + return a; + } + + var ca = /^\0+/g, + N = /[\0\r\f]/g, + aa = /: */g, + ka = /zoo|gra/, + ma = /([,: ])(transform)/g, + ia = /,\r+?/g, + F = /([\t\r\n ])*\f?&/g, + fa = /@(k\w+)\s*(\S*)\s*/, + Q = /::(place)/g, + ha = /:(read-only)/g, + G = /[svh]\w+-[tblr]{2}/, + da = /\(\s*(.*)\s*\)/g, + oa = /([\s\S]*?);/g, + ba = /-self|flex-/g, + na = /[^]*?(:[rp][el]a[\w-]+)[^]*/, + la = /stretch|:\s*\w+\-(?:conte|avail)/, + ja = /([^-])(image-set\()/, + z = 1, + D = 1, + E = 0, + w = 1, + O = [], + S = [], + A = 0, + R = null, + Y = 0, + V = ''; + B.use = T; + B.set = U; + void 0 !== W && U(W); + return B; +} + +exports.default = stylis_min; + + +/***/ }), +/* 405 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +var unitlessKeys = { + animationIterationCount: 1, + borderImageOutset: 1, + borderImageSlice: 1, + borderImageWidth: 1, + boxFlex: 1, + boxFlexGroup: 1, + boxOrdinalGroup: 1, + columnCount: 1, + columns: 1, + flex: 1, + flexGrow: 1, + flexPositive: 1, + flexShrink: 1, + flexNegative: 1, + flexOrder: 1, + gridRow: 1, + gridRowEnd: 1, + gridRowSpan: 1, + gridRowStart: 1, + gridColumn: 1, + gridColumnEnd: 1, + gridColumnSpan: 1, + gridColumnStart: 1, + msGridRow: 1, + msGridRowSpan: 1, + msGridColumn: 1, + msGridColumnSpan: 1, + fontWeight: 1, + lineHeight: 1, + opacity: 1, + order: 1, + orphans: 1, + tabSize: 1, + widows: 1, + zIndex: 1, + zoom: 1, + WebkitLineClamp: 1, + // SVG-related properties + fillOpacity: 1, + floodOpacity: 1, + stopOpacity: 1, + strokeDasharray: 1, + strokeDashoffset: 1, + strokeMiterlimit: 1, + strokeOpacity: 1, + strokeWidth: 1 +}; + +exports.default = unitlessKeys; + + +/***/ }), +/* 406 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function memoize(fn) { + var cache = {}; + return function (arg) { + if (cache[arg] === undefined) cache[arg] = fn(arg); + return cache[arg]; + }; +} + +exports.default = memoize; + + +/***/ }), +/* 407 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _styledComponents = _interopRequireDefault(__webpack_require__(4)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _colors = _interopRequireDefault(__webpack_require__(24)); + +var _sizes = _interopRequireDefault(__webpack_require__(43)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _templateObject() { + var data = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n color: ", ";\n position: absolute;\n left: 0;\n top: 0;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +var IconWrapper = _styledComponents["default"].span(_templateObject(), _sizes["default"].input.height, _sizes["default"].input.height, _colors["default"].greyIconColor, function (props) { + return props.background ? _colors["default"].greyIconBkgd : 'transparent'; +}); + +IconWrapper.defaultProps = { + background: true +}; +IconWrapper.propTypes = { + background: _propTypes["default"].bool +}; +var _default = IconWrapper; +exports["default"] = _default; + +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__.p + "587bfd5bca999b8d1213603050cb696e.svg"; + +/***/ }), +/* 409 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.GET_DATA_SUCCEEDED=exports.ENABLE_GLOBAL_OVERLAY_BLOCKER=exports.DISABLE_GLOBAL_OVERLAY_BLOCKER=exports.UPDATE_PLUGIN=exports.UNSET_HAS_USERS_PLUGIN=exports.UNFREEZE_APP=exports.PLUGIN_DELETED=exports.PLUGIN_LOADED=exports.LOAD_PLUGIN=exports.FREEZE_APP=void 0;/* + * + * App constants + * + */var FREEZE_APP='app/App/FREEZE_APP';exports.FREEZE_APP=FREEZE_APP;var LOAD_PLUGIN='app/App/LOAD_PLUGIN';exports.LOAD_PLUGIN=LOAD_PLUGIN;var PLUGIN_LOADED='app/App/PLUGIN_LOADED';exports.PLUGIN_LOADED=PLUGIN_LOADED;var PLUGIN_DELETED='app/App/PLUGIN_DELETED';exports.PLUGIN_DELETED=PLUGIN_DELETED;var UNFREEZE_APP='app/App/UNFREEZE_APP';exports.UNFREEZE_APP=UNFREEZE_APP;var UNSET_HAS_USERS_PLUGIN='app/App/UNSET_HAS_USERS_PLUGIN';exports.UNSET_HAS_USERS_PLUGIN=UNSET_HAS_USERS_PLUGIN;var UPDATE_PLUGIN='app/App/UPDATE_PLUGIN';exports.UPDATE_PLUGIN=UPDATE_PLUGIN;var DISABLE_GLOBAL_OVERLAY_BLOCKER='app/App/OverlayBlocker/DISABLE_GLOBAL_OVERLAY_BLOCKER';exports.DISABLE_GLOBAL_OVERLAY_BLOCKER=DISABLE_GLOBAL_OVERLAY_BLOCKER;var ENABLE_GLOBAL_OVERLAY_BLOCKER='app/App/OverlayBlocker/ENABLE_GLOBAL_OVERLAY_BLOCKER';exports.ENABLE_GLOBAL_OVERLAY_BLOCKER=ENABLE_GLOBAL_OVERLAY_BLOCKER;var GET_DATA_SUCCEEDED='app/App/OverlayBlocker/GET_DATA_SUCCEEDED';exports.GET_DATA_SUCCEEDED=GET_DATA_SUCCEEDED; + +/***/ }), +/* 410 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.showNotification=showNotification;exports.hideNotification=hideNotification;var _app=__webpack_require__(354);var _constants=__webpack_require__(411);/* + * + * NotificationProvider actions + * + */ /* eslint-disable import/no-cycle */var nextNotificationId=0;function showNotification(message,status){nextNotificationId++;// eslint-disable-line no-plusplus +// Start timeout to hide the notification +(function(id){setTimeout(function(){(0,_app.dispatch)(hideNotification(id));},2500);})(nextNotificationId);return{type:_constants.SHOW_NOTIFICATION,message:message,status:status,id:nextNotificationId};}function hideNotification(id){return{type:_constants.HIDE_NOTIFICATION,id:id};} + +/***/ }), +/* 411 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.HIDE_NOTIFICATION=exports.SHOW_NOTIFICATION=void 0;/* + * + * NotificationProvider constants + * + */var SHOW_NOTIFICATION='app/NotificationProvider/SHOW_NOTIFICATION';exports.SHOW_NOTIFICATION=SHOW_NOTIFICATION;var HIDE_NOTIFICATION='app/NotificationProvider/HIDE_NOTIFICATION';exports.HIDE_NOTIFICATION=HIDE_NOTIFICATION; + +/***/ }), +/* 412 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var basename="/admin/".replace(window.location.origin,'');var _default=basename;exports["default"]=_default; + +/***/ }), +/* 413 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseKeys = __webpack_require__(414), + getTag = __webpack_require__(156), + isArguments = __webpack_require__(287), + isArray = __webpack_require__(82), + isArrayLike = __webpack_require__(219), + isBuffer = __webpack_require__(220), + isPrototype = __webpack_require__(218), + isTypedArray = __webpack_require__(289); + +/** `Object#toString` result references. */ +var mapTag = '[object Map]', + setTag = '[object Set]'; + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** 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; +} + +module.exports = isEmpty; + + +/***/ }), +/* 414 */ +/***/ (function(module, exports, __webpack_require__) { + +var isPrototype = __webpack_require__(218), + nativeKeys = __webpack_require__(960); + +/** 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 `_.keys` 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 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); + } + } + return result; +} + +module.exports = baseKeys; + + +/***/ }), +/* 415 */ +/***/ (function(module, exports) { + +/** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ +function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; +} + +module.exports = overArg; + + +/***/ }), +/* 416 */ +/***/ (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__(49))) + +/***/ }), +/* 417 */ +/***/ (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; + +/** + * Converts `func` to its source code. + * + * @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) {} + } + return ''; +} + +module.exports = toSource; + + +/***/ }), +/* 418 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=createReducer;var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _reduxImmutable=__webpack_require__(974);var _reducer=_interopRequireDefault(__webpack_require__(979));var _reducer2=_interopRequireDefault(__webpack_require__(981));var _reducer3=_interopRequireDefault(__webpack_require__(1000));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false + */ +function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); +} + +module.exports = conformsTo; + + +/***/ }), +/* 425 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseTimes = __webpack_require__(1002), + isArguments = __webpack_require__(287), + isArray = __webpack_require__(82), + isBuffer = __webpack_require__(220), + isIndex = __webpack_require__(426), + isTypedArray = __webpack_require__(289); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * 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; + + 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); + } + } + return result; +} + +module.exports = arrayLikeKeys; + + +/***/ }), +/* 426 */ +/***/ (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 a valid array-like index. + * + * @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`. + */ +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 = isIndex; + + +/***/ }), +/* 427 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(428); + +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(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} + +module.exports = _unsupportedIterableToArray; + +/***/ }), +/* 428 */ +/***/ (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]; + } + + return arr2; +} + +module.exports = _arrayLikeToArray; + +/***/ }), +/* 429 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function bind(fn, thisArg) { + return function wrap() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + return fn.apply(thisArg, args); + }; +}; + + +/***/ }), +/* 430 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(68); + +function encode(val) { + return encodeURIComponent(val). + replace(/%40/gi, '@'). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @returns {string} The formatted url + */ +module.exports = function buildURL(url, params, paramsSerializer) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + + var serializedParams; + if (paramsSerializer) { + serializedParams = paramsSerializer(params); + } else if (utils.isURLSearchParams(params)) { + serializedParams = params.toString(); + } else { + var parts = []; + + utils.forEach(params, function serialize(val, key) { + if (val === null || typeof val === 'undefined') { + return; + } + + if (utils.isArray(val)) { + key = key + '[]'; + } else { + val = [val]; + } + + utils.forEach(val, function parseValue(v) { + if (utils.isDate(v)) { + v = v.toISOString(); + } else if (utils.isObject(v)) { + v = JSON.stringify(v); + } + parts.push(encode(key) + '=' + encode(v)); + }); + }); + + serializedParams = parts.join('&'); + } + + if (serializedParams) { + var hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +}; + + +/***/ }), +/* 431 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + + +/***/ }), +/* 432 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) { + +var utils = __webpack_require__(68); +var normalizeHeaderName = __webpack_require__(1031); + +var DEFAULT_CONTENT_TYPE = { + 'Content-Type': 'application/x-www-form-urlencoded' +}; + +function setContentTypeIfUnset(headers, value) { + if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { + headers['Content-Type'] = value; + } +} + +function getDefaultAdapter() { + var adapter; + if (typeof XMLHttpRequest !== 'undefined') { + // For browsers use XHR adapter + adapter = __webpack_require__(433); + } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { + // For node use HTTP adapter + adapter = __webpack_require__(433); + } + return adapter; +} + +var defaults = { + adapter: getDefaultAdapter(), + + transformRequest: [function transformRequest(data, headers) { + normalizeHeaderName(headers, 'Accept'); + normalizeHeaderName(headers, 'Content-Type'); + if (utils.isFormData(data) || + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); + return data.toString(); + } + if (utils.isObject(data)) { + setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); + return JSON.stringify(data); + } + return data; + }], + + transformResponse: [function transformResponse(data) { + /*eslint no-param-reassign:0*/ + if (typeof data === 'string') { + try { + data = JSON.parse(data); + } catch (e) { /* Ignore */ } + } + return data; + }], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + } +}; + +defaults.headers = { + common: { + 'Accept': 'application/json, text/plain, */*' + } +}; + +utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { + defaults.headers[method] = {}; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); +}); + +module.exports = defaults; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(215))) + +/***/ }), +/* 433 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(68); +var settle = __webpack_require__(1032); +var buildURL = __webpack_require__(430); +var buildFullPath = __webpack_require__(1034); +var parseHeaders = __webpack_require__(1037); +var isURLSameOrigin = __webpack_require__(1038); +var createError = __webpack_require__(434); + +module.exports = function xhrAdapter(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var requestData = config.data; + var requestHeaders = config.headers; + + if (utils.isFormData(requestData)) { + delete requestHeaders['Content-Type']; // Let the browser set it + } + + var request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + var username = config.auth.username || ''; + var password = config.auth.password || ''; + requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); + } + + var fullPath = buildFullPath(config.baseURL, config.url); + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + // Listen for ready state + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; + } + + // Prepare the response + var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; + var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + + settle(resolve, reject, response); + + // Clean up request + request = null; + }; + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(createError('Request aborted', config, 'ECONNABORTED', request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(createError('Network Error', config, null, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (utils.isStandardBrowserEnv()) { + var cookies = __webpack_require__(1039); + + // Add xsrf header + var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? + cookies.read(config.xsrfCookieName) : + undefined; + + if (xsrfValue) { + requestHeaders[config.xsrfHeaderName] = xsrfValue; + } + } + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders, function setRequestHeader(val, key) { + if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { + // Remove Content-Type if data is undefined + delete requestHeaders[key]; + } else { + // Otherwise add header to the request + request.setRequestHeader(key, val); + } + }); + } + + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (config.responseType) { + try { + request.responseType = config.responseType; + } catch (e) { + // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { + throw e; + } + } + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', config.onDownloadProgress); + } + + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', config.onUploadProgress); + } + + if (config.cancelToken) { + // Handle cancellation + config.cancelToken.promise.then(function onCanceled(cancel) { + if (!request) { + return; + } + + request.abort(); + reject(cancel); + // Clean up request + request = null; + }); + } + + if (requestData === undefined) { + requestData = null; + } + + // Send the request + request.send(requestData); + }); +}; + + +/***/ }), +/* 434 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var enhanceError = __webpack_require__(1033); + +/** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {Object} config The config. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * @returns {Error} The created error. + */ +module.exports = function createError(message, config, code, request, response) { + var error = new Error(message); + return enhanceError(error, config, code, request, response); +}; + + +/***/ }), +/* 435 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(68); + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * @returns {Object} New object resulting from merging config2 to config1 + */ +module.exports = function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + var config = {}; + + var valueFromConfig2Keys = ['url', 'method', 'params', 'data']; + var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy']; + var defaultToConfig2Keys = [ + 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer', + 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', + 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', + 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent', + 'httpsAgent', 'cancelToken', 'socketPath' + ]; + + utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { + if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } + }); + + utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) { + if (utils.isObject(config2[prop])) { + config[prop] = utils.deepMerge(config1[prop], config2[prop]); + } else if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } else if (utils.isObject(config1[prop])) { + config[prop] = utils.deepMerge(config1[prop]); + } else if (typeof config1[prop] !== 'undefined') { + config[prop] = config1[prop]; + } + }); + + utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { + if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } else if (typeof config1[prop] !== 'undefined') { + config[prop] = config1[prop]; + } + }); + + var axiosKeys = valueFromConfig2Keys + .concat(mergeDeepPropertiesKeys) + .concat(defaultToConfig2Keys); + + var otherKeys = Object + .keys(config2) + .filter(function filterAxiosKeys(key) { + return axiosKeys.indexOf(key) === -1; + }); + + utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) { + if (typeof config2[prop] !== 'undefined') { + config[prop] = config2[prop]; + } else if (typeof config1[prop] !== 'undefined') { + config[prop] = config1[prop]; + } + }); + + return config; +}; + + +/***/ }), +/* 436 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/** + * A `Cancel` is an object that is thrown when an operation is canceled. + * + * @class + * @param {string=} message The message. + */ +function Cancel(message) { + this.message = message; +} + +Cancel.prototype.toString = function toString() { + return 'Cancel' + (this.message ? ': ' + this.message : ''); +}; + +Cancel.prototype.__CANCEL__ = true; + +module.exports = Cancel; + + +/***/ }), +/* 437 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n right: 0;\n display: flex;\n z-index: 1050;\n"]);_templateObject=function _templateObject(){return data;};return data;}var NavTopRightWrapper=_styledComponents["default"].div(_templateObject());var _default=NavTopRightWrapper;exports["default"]=_default; + +/***/ }), +/* 438 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"collectionType\":{\"id\":\"app.components.LeftMenuLinkContainer.collectionTypes\",\"defaultMessage\":\"Collection Types\"},\"singleType\":{\"id\":\"app.components.LeftMenuLinkContainer.singleTypes\",\"defaultMessage\":\"Single Types\"},\"listPlugins\":{\"id\":\"app.components.LeftMenuLinkContainer.listPlugins\",\"defaultMessage\":\"Plugins\"},\"installNewPlugin\":{\"id\":\"app.components.LeftMenuLinkContainer.installNewPlugin\",\"defaultMessage\":\"Marketplace\"},\"configuration\":{\"id\":\"app.components.LeftMenuLinkContainer.configuration\",\"defaultMessage\":\"Configurations\"},\"plugins\":{\"id\":\"app.components.LeftMenuLinkContainer.plugins\",\"defaultMessage\":\"Plugins\"},\"general\":{\"id\":\"app.components.LeftMenuLinkContainer.general\",\"defaultMessage\":\"General\"},\"noPluginsInstalled\":{\"id\":\"app.components.LeftMenuLinkContainer.noPluginsInstalled\",\"defaultMessage\":\"No plugins installed yet\"},\"settings\":{\"id\":\"app.components.LeftMenuLinkContainer.settings\",\"defaultMessage\":\"Settings\"}}"); + +/***/ }), +/* 439 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _lodash=__webpack_require__(8);var _propTypes=_interopRequireDefault(__webpack_require__(2));var _LeftMenuLinkContent=_interopRequireDefault(__webpack_require__(1054));var _Plugin=_interopRequireDefault(__webpack_require__(1057));/** + * + * LeftMenuLink + * + */var LeftMenuLink=function LeftMenuLink(_ref){var destination=_ref.destination,iconName=_ref.iconName,label=_ref.label,location=_ref.location,source=_ref.source,suffixUrlToReplaceForLeftMenuHighlight=_ref.suffixUrlToReplaceForLeftMenuHighlight;var plugin=source!=='content-manager'&&source!==''?/*#__PURE__*/_react["default"].createElement(_Plugin["default"],null,/*#__PURE__*/_react["default"].createElement("span",null,(0,_lodash.upperFirst)(source.split('-').join(' ')))):'';return/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_LeftMenuLinkContent["default"],{destination:destination,iconName:iconName,label:label,location:location,source:source,suffixUrlToReplaceForLeftMenuHighlight:suffixUrlToReplaceForLeftMenuHighlight}),plugin);};LeftMenuLink.propTypes={destination:_propTypes["default"].string.isRequired,iconName:_propTypes["default"].string,label:_propTypes["default"].string.isRequired,location:_propTypes["default"].shape({pathname:_propTypes["default"].string}).isRequired,source:_propTypes["default"].string,suffixUrlToReplaceForLeftMenuHighlight:_propTypes["default"].string};LeftMenuLink.defaultProps={iconName:'circle',source:'',suffixUrlToReplaceForLeftMenuHighlight:''};var _default=LeftMenuLink;exports["default"]=_default; + +/***/ }), +/* 440 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = exports.getTimeObject = exports.getTimeString = void 0; + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _core = __webpack_require__(53); + +var _Wrapper = _interopRequireDefault(__webpack_require__(1374)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +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 UNITS = ['hour', 'minute', 'second']; + +var getTimeString = function getTimeString(time) { + if (!time) { + return ''; + } + + var currTime = time || (0, _moment["default"])(); + var timeObj = getTimeObject(currTime); + var timeString = Object.keys(timeObj).map(function (key) { + return timeObj[key] < 10 ? "0".concat(timeObj[key]) : timeObj[key]; + }).join(':'); + return timeString; +}; + +exports.getTimeString = getTimeString; + +var getTimeObject = function getTimeObject(time) { + var timeObj = {}; + UNITS.forEach(function (unit) { + timeObj[unit] = time.get(unit); + }); + return timeObj; +}; + +exports.getTimeObject = getTimeObject; + +function DateTime(_ref) { + var disabled = _ref.disabled, + name = _ref.name, + onChange = _ref.onChange, + value = _ref.value, + tabIndex = _ref.tabIndex, + step = _ref.step, + rest = _objectWithoutProperties(_ref, ["disabled", "name", "onChange", "value", "tabIndex", "step"]); + + var _useState = (0, _react.useState)(''), + _useState2 = _slicedToArray(_useState, 2), + timestamp = _useState2[0], + setTimestamp = _useState2[1]; + + var _useState3 = (0, _react.useState)(false), + _useState4 = _slicedToArray(_useState3, 2), + isInit = _useState4[0], + setIsInit = _useState4[1]; + + var setTime = function setTime(time) { + var _time$split = time.split(':'), + _time$split2 = _slicedToArray(_time$split, 3), + hour = _time$split2[0], + minute = _time$split2[1], + second = _time$split2[2]; + + var timeObj = { + hour: hour, + minute: minute, + second: second + }; + var currentDate = timestamp || (0, _moment["default"])(); + currentDate.set(timeObj); + setDate(currentDate); + }; + + var setDate = function setDate(date, time) { + var newDate = time || date; + date.set(getTimeObject(newDate)); + date.toISOString(); + date.format(); + setTimestamp(date); + onChange({ + target: { + name: name, + type: 'datetime', + value: date + } + }); + }; + + (0, _react.useEffect)(function () { + if (!!value && (0, _moment["default"])(value).isValid()) { + var newDate = value._isAMomentObject === true ? value : (0, _moment["default"])(value); + setDate(newDate); + } else { + setTimestamp(''); + } + + setIsInit(true); + }, [value]); + + if (!isInit) { + return null; + } + + return _react["default"].createElement(_Wrapper["default"], null, _react["default"].createElement(_core.DatePicker, _extends({}, rest, { + name: "datetime", + disabled: disabled, + onChange: function onChange(_ref2) { + var target = _ref2.target; + setDate(target.value, timestamp); + }, + tabIndex: tabIndex, + value: timestamp + })), _react["default"].createElement(_core.TimePicker, { + name: "time", + disabled: disabled, + onChange: function onChange(_ref3) { + var target = _ref3.target; + setTime(target.value); + }, + seconds: false, + tabIndex: tabIndex, + value: getTimeString(timestamp), + step: step + })); +} + +DateTime.defaultProps = { + autoFocus: false, + disabled: false, + id: null, + onChange: function onChange() {}, + placeholder: null, + tabIndex: '0', + value: null, + withDefaultValue: false, + step: 30 +}; +DateTime.propTypes = { + autoFocus: _propTypes["default"].bool, + disabled: _propTypes["default"].bool, + id: _propTypes["default"].string, + name: _propTypes["default"].string.isRequired, + onChange: _propTypes["default"].func, + placeholder: _propTypes["default"].string, + step: _propTypes["default"].number, + tabIndex: _propTypes["default"].string, + value: _propTypes["default"].oneOfType([_reactMomentProptypes["default"].momentObj, _propTypes["default"].string, _propTypes["default"].instanceOf(Date)]), + withDefaultValue: _propTypes["default"].bool +}; +var _default = DateTime; +exports["default"] = _default; + +/***/ }), +/* 441 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _styledComponents = _interopRequireDefault(__webpack_require__(4)); + +var _styles = __webpack_require__(21); + +var _Icon = _interopRequireDefault(__webpack_require__(101)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _templateObject() { + var data = _taggedTemplateLiteral(["\n margin-right: ", "px;\n font-size: 0.94em;\n"]); + + _templateObject = function _templateObject() { + return data; + }; + + return data; +} + +function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } + +var PrefixIcon = (0, _styledComponents["default"])(_Icon["default"])(_templateObject(), _styles.sizes.margin); +var _default = PrefixIcon; +exports["default"] = _default; + +/***/ }), +/* 442 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "far", function() { return _iconsCache; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faAddressBook", function() { return faAddressBook; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faAddressCard", function() { return faAddressCard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faAngry", function() { return faAngry; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faArrowAltCircleDown", function() { return faArrowAltCircleDown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faArrowAltCircleLeft", function() { return faArrowAltCircleLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faArrowAltCircleRight", function() { return faArrowAltCircleRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faArrowAltCircleUp", function() { return faArrowAltCircleUp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faBell", function() { return faBell; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faBellSlash", function() { return faBellSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faBookmark", function() { return faBookmark; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faBuilding", function() { return faBuilding; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCalendar", function() { return faCalendar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCalendarAlt", function() { return faCalendarAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCalendarCheck", function() { return faCalendarCheck; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCalendarMinus", function() { return faCalendarMinus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCalendarPlus", function() { return faCalendarPlus; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCalendarTimes", function() { return faCalendarTimes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCaretSquareDown", function() { return faCaretSquareDown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCaretSquareLeft", function() { return faCaretSquareLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCaretSquareRight", function() { return faCaretSquareRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCaretSquareUp", function() { return faCaretSquareUp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faChartBar", function() { return faChartBar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCheckCircle", function() { return faCheckCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCheckSquare", function() { return faCheckSquare; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCircle", function() { return faCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faClipboard", function() { return faClipboard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faClock", function() { return faClock; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faClone", function() { return faClone; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faClosedCaptioning", function() { return faClosedCaptioning; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faComment", function() { return faComment; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCommentAlt", function() { return faCommentAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCommentDots", function() { return faCommentDots; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faComments", function() { return faComments; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCompass", function() { return faCompass; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCopy", function() { return faCopy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCopyright", function() { return faCopyright; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faCreditCard", function() { return faCreditCard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faDizzy", function() { return faDizzy; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faDotCircle", function() { return faDotCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faEdit", function() { return faEdit; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faEnvelope", function() { return faEnvelope; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faEnvelopeOpen", function() { return faEnvelopeOpen; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faEye", function() { return faEye; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faEyeSlash", function() { return faEyeSlash; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFile", function() { return faFile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileAlt", function() { return faFileAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileArchive", function() { return faFileArchive; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileAudio", function() { return faFileAudio; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileCode", function() { return faFileCode; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileExcel", function() { return faFileExcel; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileImage", function() { return faFileImage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFilePdf", function() { return faFilePdf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFilePowerpoint", function() { return faFilePowerpoint; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileVideo", function() { return faFileVideo; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFileWord", function() { return faFileWord; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFlag", function() { return faFlag; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFlushed", function() { return faFlushed; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFolder", function() { return faFolder; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFolderOpen", function() { return faFolderOpen; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFontAwesomeLogoFull", function() { return faFontAwesomeLogoFull; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFrown", function() { return faFrown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFrownOpen", function() { return faFrownOpen; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faFutbol", function() { return faFutbol; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGem", function() { return faGem; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrimace", function() { return faGrimace; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrin", function() { return faGrin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinAlt", function() { return faGrinAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinBeam", function() { return faGrinBeam; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinBeamSweat", function() { return faGrinBeamSweat; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinHearts", function() { return faGrinHearts; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinSquint", function() { return faGrinSquint; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinSquintTears", function() { return faGrinSquintTears; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinStars", function() { return faGrinStars; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinTears", function() { return faGrinTears; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinTongue", function() { return faGrinTongue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinTongueSquint", function() { return faGrinTongueSquint; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinTongueWink", function() { return faGrinTongueWink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faGrinWink", function() { return faGrinWink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandLizard", function() { return faHandLizard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPaper", function() { return faHandPaper; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPeace", function() { return faHandPeace; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPointDown", function() { return faHandPointDown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPointLeft", function() { return faHandPointLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPointRight", function() { return faHandPointRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPointUp", function() { return faHandPointUp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandPointer", function() { return faHandPointer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandRock", function() { return faHandRock; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandScissors", function() { return faHandScissors; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandSpock", function() { return faHandSpock; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHandshake", function() { return faHandshake; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHdd", function() { return faHdd; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHeart", function() { return faHeart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHospital", function() { return faHospital; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faHourglass", function() { return faHourglass; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faIdBadge", function() { return faIdBadge; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faIdCard", function() { return faIdCard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faImage", function() { return faImage; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faImages", function() { return faImages; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faKeyboard", function() { return faKeyboard; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faKiss", function() { return faKiss; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faKissBeam", function() { return faKissBeam; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faKissWinkHeart", function() { return faKissWinkHeart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLaugh", function() { return faLaugh; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLaughBeam", function() { return faLaughBeam; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLaughSquint", function() { return faLaughSquint; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLaughWink", function() { return faLaughWink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLemon", function() { return faLemon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLifeRing", function() { return faLifeRing; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faLightbulb", function() { return faLightbulb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faListAlt", function() { return faListAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMap", function() { return faMap; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMeh", function() { return faMeh; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMehBlank", function() { return faMehBlank; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMehRollingEyes", function() { return faMehRollingEyes; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMinusSquare", function() { return faMinusSquare; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMoneyBillAlt", function() { return faMoneyBillAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faMoon", function() { return faMoon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faNewspaper", function() { return faNewspaper; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faObjectGroup", function() { return faObjectGroup; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faObjectUngroup", function() { return faObjectUngroup; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faPaperPlane", function() { return faPaperPlane; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faPauseCircle", function() { return faPauseCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faPlayCircle", function() { return faPlayCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faPlusSquare", function() { return faPlusSquare; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faQuestionCircle", function() { return faQuestionCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faRegistered", function() { return faRegistered; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSadCry", function() { return faSadCry; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSadTear", function() { return faSadTear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSave", function() { return faSave; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faShareSquare", function() { return faShareSquare; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSmile", function() { return faSmile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSmileBeam", function() { return faSmileBeam; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSmileWink", function() { return faSmileWink; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSnowflake", function() { return faSnowflake; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSquare", function() { return faSquare; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faStar", function() { return faStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faStarHalf", function() { return faStarHalf; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faStickyNote", function() { return faStickyNote; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faStopCircle", function() { return faStopCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSun", function() { return faSun; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faSurprise", function() { return faSurprise; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faThumbsDown", function() { return faThumbsDown; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faThumbsUp", function() { return faThumbsUp; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faTimesCircle", function() { return faTimesCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faTired", function() { return faTired; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faTrashAlt", function() { return faTrashAlt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faUser", function() { return faUser; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faUserCircle", function() { return faUserCircle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faWindowClose", function() { return faWindowClose; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faWindowMaximize", function() { return faWindowMaximize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faWindowMinimize", function() { return faWindowMinimize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "faWindowRestore", function() { return faWindowRestore; }); +var prefix = "far"; +var faAddressBook = { + prefix: 'far', + iconName: 'address-book', + icon: [448, 512, [], "f2b9", "M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-68 304H48V48h320v416zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2z"] +}; +var faAddressCard = { + prefix: 'far', + iconName: 'address-card', + icon: [576, 512, [], "f2bb", "M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H48V80h480v352zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2zM360 320h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8z"] +}; +var faAngry = { + prefix: 'far', + iconName: 'angry', + icon: [496, 512, [], "f556", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm0-144c-33.6 0-65.2 14.8-86.8 40.6-8.5 10.2-7.1 25.3 3.1 33.8s25.3 7.2 33.8-3c24.8-29.7 75-29.7 99.8 0 8.1 9.7 23.2 11.9 33.8 3 10.2-8.5 11.5-23.6 3.1-33.8-21.6-25.8-53.2-40.6-86.8-40.6zm-48-72c10.3 0 19.9-6.7 23-17.1 3.8-12.7-3.4-26.1-16.1-29.9l-80-24c-12.8-3.9-26.1 3.4-29.9 16.1-3.8 12.7 3.4 26.1 16.1 29.9l28.2 8.5c-3.1 4.9-5.3 10.4-5.3 16.6 0 17.7 14.3 32 32 32s32-14.4 32-32.1zm199-54.9c-3.8-12.7-17.1-19.9-29.9-16.1l-80 24c-12.7 3.8-19.9 17.2-16.1 29.9 3.1 10.4 12.7 17.1 23 17.1 0 17.7 14.3 32 32 32s32-14.3 32-32c0-6.2-2.2-11.7-5.3-16.6l28.2-8.5c12.7-3.7 19.9-17.1 16.1-29.8z"] +}; +var faArrowAltCircleDown = { + prefix: 'far', + iconName: 'arrow-alt-circle-down', + icon: [512, 512, [], "f358", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm-32-316v116h-67c-10.7 0-16 12.9-8.5 20.5l99 99c4.7 4.7 12.3 4.7 17 0l99-99c7.6-7.6 2.2-20.5-8.5-20.5h-67V140c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12z"] +}; +var faArrowAltCircleLeft = { + prefix: 'far', + iconName: 'arrow-alt-circle-left', + icon: [512, 512, [], "f359", "M8 256c0 137 111 248 248 248s248-111 248-248S393 8 256 8 8 119 8 256zm448 0c0 110.5-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56s200 89.5 200 200zm-72-20v40c0 6.6-5.4 12-12 12H256v67c0 10.7-12.9 16-20.5 8.5l-99-99c-4.7-4.7-4.7-12.3 0-17l99-99c7.6-7.6 20.5-2.2 20.5 8.5v67h116c6.6 0 12 5.4 12 12z"] +}; +var faArrowAltCircleRight = { + prefix: 'far', + iconName: 'arrow-alt-circle-right', + icon: [512, 512, [], "f35a", "M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm72 20v-40c0-6.6 5.4-12 12-12h116v-67c0-10.7 12.9-16 20.5-8.5l99 99c4.7 4.7 4.7 12.3 0 17l-99 99c-7.6 7.6-20.5 2.2-20.5-8.5v-67H140c-6.6 0-12-5.4-12-12z"] +}; +var faArrowAltCircleUp = { + prefix: 'far', + iconName: 'arrow-alt-circle-up', + icon: [512, 512, [], "f35b", "M256 504c137 0 248-111 248-248S393 8 256 8 8 119 8 256s111 248 248 248zm0-448c110.5 0 200 89.5 200 200s-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56zm20 328h-40c-6.6 0-12-5.4-12-12V256h-67c-10.7 0-16-12.9-8.5-20.5l99-99c4.7-4.7 12.3-4.7 17 0l99 99c7.6 7.6 2.2 20.5-8.5 20.5h-67v116c0 6.6-5.4 12-12 12z"] +}; +var faBell = { + prefix: 'far', + iconName: 'bell', + icon: [448, 512, [], "f0f3", "M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z"] +}; +var faBellSlash = { + prefix: 'far', + iconName: 'bell-slash', + icon: [640, 512, [], "f1f6", "M633.99 471.02L36 3.51C29.1-2.01 19.03-.9 13.51 6l-10 12.49C-2.02 25.39-.9 35.46 6 40.98l598 467.51c6.9 5.52 16.96 4.4 22.49-2.49l10-12.49c5.52-6.9 4.41-16.97-2.5-22.49zM163.53 368c16.71-22.03 34.48-55.8 41.4-110.58l-45.47-35.55c-3.27 90.73-36.47 120.68-54.84 140.42-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h279.66l-61.4-48H163.53zM320 96c61.86 0 112 50.14 112 112 0 .2-.06.38-.06.58.02 16.84 1.16 31.77 2.79 45.73l59.53 46.54c-8.31-22.13-14.34-51.49-14.34-92.85 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84c-26.02 5.41-49.45 16.94-69.13 32.72l38.17 29.84C275 103.18 296.65 96 320 96zm0 416c35.32 0 63.97-28.65 63.97-64H256.03c0 35.35 28.65 64 63.97 64z"] +}; +var faBookmark = { + prefix: 'far', + iconName: 'bookmark', + icon: [384, 512, [], "f02e", "M336 0H48C21.49 0 0 21.49 0 48v464l192-112 192 112V48c0-26.51-21.49-48-48-48zm0 428.43l-144-84-144 84V54a6 6 0 0 1 6-6h276c3.314 0 6 2.683 6 5.996V428.43z"] +}; +var faBuilding = { + prefix: 'far', + iconName: 'building', + icon: [448, 512, [], "f1ad", "M128 148v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12zm140 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-128 96h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm128 0h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-76 84v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm76 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm180 124v36H0v-36c0-6.6 5.4-12 12-12h19.5V24c0-13.3 10.7-24 24-24h337c13.3 0 24 10.7 24 24v440H436c6.6 0 12 5.4 12 12zM79.5 463H192v-67c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v67h112.5V49L80 48l-.5 415z"] +}; +var faCalendar = { + prefix: 'far', + iconName: 'calendar', + icon: [448, 512, [], "f133", "M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z"] +}; +var faCalendarAlt = { + prefix: 'far', + iconName: 'calendar-alt', + icon: [448, 512, [], "f073", "M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCalendarCheck = { + prefix: 'far', + iconName: 'calendar-check', + icon: [448, 512, [], "f274", "M400 64h-48V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H160V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V160h352v298a6 6 0 0 1-6 6zm-52.849-200.65L198.842 404.519c-4.705 4.667-12.303 4.637-16.971-.068l-75.091-75.699c-4.667-4.705-4.637-12.303.068-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l44.104 44.461 111.072-110.181c4.705-4.667 12.303-4.637 16.971.068l22.536 22.718c4.667 4.705 4.636 12.303-.069 16.97z"] +}; +var faCalendarMinus = { + prefix: 'far', + iconName: 'calendar-minus', + icon: [448, 512, [], "f272", "M124 328c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v24c0 6.6-5.4 12-12 12H124zm324-216v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCalendarPlus = { + prefix: 'far', + iconName: 'calendar-plus', + icon: [448, 512, [], "f271", "M336 292v24c0 6.6-5.4 12-12 12h-76v76c0 6.6-5.4 12-12 12h-24c-6.6 0-12-5.4-12-12v-76h-76c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h76v-76c0-6.6 5.4-12 12-12h24c6.6 0 12 5.4 12 12v76h76c6.6 0 12 5.4 12 12zm112-180v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCalendarTimes = { + prefix: 'far', + iconName: 'calendar-times', + icon: [448, 512, [], "f273", "M311.7 374.7l-17 17c-4.7 4.7-12.3 4.7-17 0L224 337.9l-53.7 53.7c-4.7 4.7-12.3 4.7-17 0l-17-17c-4.7-4.7-4.7-12.3 0-17l53.7-53.7-53.7-53.7c-4.7-4.7-4.7-12.3 0-17l17-17c4.7-4.7 12.3-4.7 17 0l53.7 53.7 53.7-53.7c4.7-4.7 12.3-4.7 17 0l17 17c4.7 4.7 4.7 12.3 0 17L257.9 304l53.7 53.7c4.8 4.7 4.8 12.3.1 17zM448 112v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCaretSquareDown = { + prefix: 'far', + iconName: 'caret-square-down', + icon: [448, 512, [], "f150", "M125.1 208h197.8c10.7 0 16.1 13 8.5 20.5l-98.9 98.3c-4.7 4.7-12.2 4.7-16.9 0l-98.9-98.3c-7.7-7.5-2.3-20.5 8.4-20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCaretSquareLeft = { + prefix: 'far', + iconName: 'caret-square-left', + icon: [448, 512, [], "f191", "M272 157.1v197.8c0 10.7-13 16.1-20.5 8.5l-98.3-98.9c-4.7-4.7-4.7-12.2 0-16.9l98.3-98.9c7.5-7.7 20.5-2.3 20.5 8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCaretSquareRight = { + prefix: 'far', + iconName: 'caret-square-right', + icon: [448, 512, [], "f152", "M176 354.9V157.1c0-10.7 13-16.1 20.5-8.5l98.3 98.9c4.7 4.7 4.7 12.2 0 16.9l-98.3 98.9c-7.5 7.7-20.5 2.3-20.5-8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faCaretSquareUp = { + prefix: 'far', + iconName: 'caret-square-up', + icon: [448, 512, [], "f151", "M322.9 304H125.1c-10.7 0-16.1-13-8.5-20.5l98.9-98.3c4.7-4.7 12.2-4.7 16.9 0l98.9 98.3c7.7 7.5 2.3 20.5-8.4 20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faChartBar = { + prefix: 'far', + iconName: 'chart-bar', + icon: [512, 512, [], "f080", "M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z"] +}; +var faCheckCircle = { + prefix: 'far', + iconName: 'check-circle', + icon: [512, 512, [], "f058", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"] +}; +var faCheckSquare = { + prefix: 'far', + iconName: 'check-square', + icon: [448, 512, [], "f14a", "M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 400H48V80h352v352zm-35.864-241.724L191.547 361.48c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z"] +}; +var faCircle = { + prefix: 'far', + iconName: 'circle', + icon: [512, 512, [], "f111", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"] +}; +var faClipboard = { + prefix: 'far', + iconName: 'clipboard', + icon: [384, 512, [], "f328", "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z"] +}; +var faClock = { + prefix: 'far', + iconName: 'clock', + icon: [512, 512, [], "f017", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"] +}; +var faClone = { + prefix: 'far', + iconName: 'clone', + icon: [512, 512, [], "f24d", "M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z"] +}; +var faClosedCaptioning = { + prefix: 'far', + iconName: 'closed-captioning', + icon: [512, 512, [], "f20a", "M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 336H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v276c0 3.3-2.7 6-6 6zm-211.1-85.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7zm190.4 0c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.9-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 220.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7z"] +}; +var faComment = { + prefix: 'far', + iconName: 'comment', + icon: [512, 512, [], "f075", "M256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z"] +}; +var faCommentAlt = { + prefix: 'far', + iconName: 'comment-alt', + icon: [512, 512, [], "f27a", "M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 7.1 5.8 12 12 12 2.4 0 4.9-.7 7.1-2.4L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm16 352c0 8.8-7.2 16-16 16H288l-12.8 9.6L208 428v-60H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h384c8.8 0 16 7.2 16 16v288z"] +}; +var faCommentDots = { + prefix: 'far', + iconName: 'comment-dots', + icon: [512, 512, [], "f4ad", "M144 208c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zM256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z"] +}; +var faComments = { + prefix: 'far', + iconName: 'comments', + icon: [576, 512, [], "f086", "M532 386.2c27.5-27.1 44-61.1 44-98.2 0-80-76.5-146.1-176.2-157.9C368.3 72.5 294.3 32 208 32 93.1 32 0 103.6 0 192c0 37 16.5 71 44 98.2-15.3 30.7-37.3 54.5-37.7 54.9-6.3 6.7-8.1 16.5-4.4 25 3.6 8.5 12 14 21.2 14 53.5 0 96.7-20.2 125.2-38.8 9.2 2.1 18.7 3.7 28.4 4.9C208.1 407.6 281.8 448 368 448c20.8 0 40.8-2.4 59.8-6.8C456.3 459.7 499.4 480 553 480c9.2 0 17.5-5.5 21.2-14 3.6-8.5 1.9-18.3-4.4-25-.4-.3-22.5-24.1-37.8-54.8zm-392.8-92.3L122.1 305c-14.1 9.1-28.5 16.3-43.1 21.4 2.7-4.7 5.4-9.7 8-14.8l15.5-31.1L77.7 256C64.2 242.6 48 220.7 48 192c0-60.7 73.3-112 160-112s160 51.3 160 112-73.3 112-160 112c-16.5 0-33-1.9-49-5.6l-19.8-4.5zM498.3 352l-24.7 24.4 15.5 31.1c2.6 5.1 5.3 10.1 8 14.8-14.6-5.1-29-12.3-43.1-21.4l-17.1-11.1-19.9 4.6c-16 3.7-32.5 5.6-49 5.6-54 0-102.2-20.1-131.3-49.7C338 339.5 416 272.9 416 192c0-3.4-.4-6.7-.7-10C479.7 196.5 528 238.8 528 288c0 28.7-16.2 50.6-29.7 64z"] +}; +var faCompass = { + prefix: 'far', + iconName: 'compass', + icon: [496, 512, [], "f14e", "M347.94 129.86L203.6 195.83a31.938 31.938 0 0 0-15.77 15.77l-65.97 144.34c-7.61 16.65 9.54 33.81 26.2 26.2l144.34-65.97a31.938 31.938 0 0 0 15.77-15.77l65.97-144.34c7.61-16.66-9.54-33.81-26.2-26.2zm-77.36 148.72c-12.47 12.47-32.69 12.47-45.16 0-12.47-12.47-12.47-32.69 0-45.16 12.47-12.47 32.69-12.47 45.16 0 12.47 12.47 12.47 32.69 0 45.16zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 448c-110.28 0-200-89.72-200-200S137.72 56 248 56s200 89.72 200 200-89.72 200-200 200z"] +}; +var faCopy = { + prefix: 'far', + iconName: 'copy', + icon: [448, 512, [], "f0c5", "M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"] +}; +var faCopyright = { + prefix: 'far', + iconName: 'copyright', + icon: [512, 512, [], "f1f9", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm107.351-101.064c-9.614 9.712-45.53 41.396-104.065 41.396-82.43 0-140.484-61.425-140.484-141.567 0-79.152 60.275-139.401 139.762-139.401 55.531 0 88.738 26.62 97.593 34.779a11.965 11.965 0 0 1 1.936 15.322l-18.155 28.113c-3.841 5.95-11.966 7.282-17.499 2.921-8.595-6.776-31.814-22.538-61.708-22.538-48.303 0-77.916 35.33-77.916 80.082 0 41.589 26.888 83.692 78.277 83.692 32.657 0 56.843-19.039 65.726-27.225 5.27-4.857 13.596-4.039 17.82 1.738l19.865 27.17a11.947 11.947 0 0 1-1.152 15.518z"] +}; +var faCreditCard = { + prefix: 'far', + iconName: 'credit-card', + icon: [576, 512, [], "f09d", "M527.9 32H48.1C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48.1 48h479.8c26.6 0 48.1-21.5 48.1-48V80c0-26.5-21.5-48-48.1-48zM54.1 80h467.8c3.3 0 6 2.7 6 6v42H48.1V86c0-3.3 2.7-6 6-6zm467.8 352H54.1c-3.3 0-6-2.7-6-6V256h479.8v170c0 3.3-2.7 6-6 6zM192 332v40c0 6.6-5.4 12-12 12h-72c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12zm192 0v40c0 6.6-5.4 12-12 12H236c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12z"] +}; +var faDizzy = { + prefix: 'far', + iconName: 'dizzy', + icon: [496, 512, [], "f567", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-33.8-217.9c7.8-7.8 7.8-20.5 0-28.3L196.3 192l17.9-17.9c7.8-7.8 7.8-20.5 0-28.3-7.8-7.8-20.5-7.8-28.3 0L168 163.7l-17.8-17.8c-7.8-7.8-20.5-7.8-28.3 0-7.8 7.8-7.8 20.5 0 28.3l17.9 17.9-17.9 17.9c-7.8 7.8-7.8 20.5 0 28.3 7.8 7.8 20.5 7.8 28.3 0l17.8-17.8 17.8 17.8c7.9 7.7 20.5 7.7 28.4-.2zm160-92.2c-7.8-7.8-20.5-7.8-28.3 0L328 163.7l-17.8-17.8c-7.8-7.8-20.5-7.8-28.3 0-7.8 7.8-7.8 20.5 0 28.3l17.9 17.9-17.9 17.9c-7.8 7.8-7.8 20.5 0 28.3 7.8 7.8 20.5 7.8 28.3 0l17.8-17.8 17.8 17.8c7.8 7.8 20.5 7.8 28.3 0 7.8-7.8 7.8-20.5 0-28.3l-17.8-18 17.9-17.9c7.7-7.8 7.7-20.4 0-28.2zM248 272c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64z"] +}; +var faDotCircle = { + prefix: 'far', + iconName: 'dot-circle', + icon: [512, 512, [], "f192", "M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z"] +}; +var faEdit = { + prefix: 'far', + iconName: 'edit', + icon: [576, 512, [], "f044", "M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z"] +}; +var faEnvelope = { + prefix: 'far', + iconName: 'envelope', + icon: [512, 512, [], "f0e0", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"] +}; +var faEnvelopeOpen = { + prefix: 'far', + iconName: 'envelope-open', + icon: [512, 512, [], "f2b6", "M494.586 164.516c-4.697-3.883-111.723-89.95-135.251-108.657C337.231 38.191 299.437 0 256 0c-43.205 0-80.636 37.717-103.335 55.859-24.463 19.45-131.07 105.195-135.15 108.549A48.004 48.004 0 0 0 0 201.485V464c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V201.509a48 48 0 0 0-17.414-36.993zM464 458a6 6 0 0 1-6 6H54a6 6 0 0 1-6-6V204.347c0-1.813.816-3.526 2.226-4.665 15.87-12.814 108.793-87.554 132.364-106.293C200.755 78.88 232.398 48 256 48c23.693 0 55.857 31.369 73.41 45.389 23.573 18.741 116.503 93.493 132.366 106.316a5.99 5.99 0 0 1 2.224 4.663V458zm-31.991-187.704c4.249 5.159 3.465 12.795-1.745 16.981-28.975 23.283-59.274 47.597-70.929 56.863C336.636 362.283 299.205 400 256 400c-43.452 0-81.287-38.237-103.335-55.86-11.279-8.967-41.744-33.413-70.927-56.865-5.21-4.187-5.993-11.822-1.745-16.981l15.258-18.528c4.178-5.073 11.657-5.843 16.779-1.726 28.618 23.001 58.566 47.035 70.56 56.571C200.143 320.631 232.307 352 256 352c23.602 0 55.246-30.88 73.41-45.389 11.994-9.535 41.944-33.57 70.563-56.568 5.122-4.116 12.601-3.346 16.778 1.727l15.258 18.526z"] +}; +var faEye = { + prefix: 'far', + iconName: 'eye', + icon: [576, 512, [], "f06e", "M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"] +}; +var faEyeSlash = { + prefix: 'far', + iconName: 'eye-slash', + icon: [640, 512, [], "f070", "M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z"] +}; +var faFile = { + prefix: 'far', + iconName: 'file', + icon: [384, 512, [], "f15b", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"] +}; +var faFileAlt = { + prefix: 'far', + iconName: 'file-alt', + icon: [384, 512, [], "f15c", "M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"] +}; +var faFileArchive = { + prefix: 'far', + iconName: 'file-archive', + icon: [384, 512, [], "f1c6", "M128.3 160v32h32v-32zm64-96h-32v32h32zm-64 32v32h32V96zm64 32h-32v32h32zm177.6-30.1L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h79.7v16h32V48H208v104c0 13.3 10.7 24 24 24h104zM194.2 265.7c-1.1-5.6-6-9.7-11.8-9.7h-22.1v-32h-32v32l-19.7 97.1C102 385.6 126.8 416 160 416c33.1 0 57.9-30.2 51.5-62.6zm-33.9 124.4c-17.9 0-32.4-12.1-32.4-27s14.5-27 32.4-27 32.4 12.1 32.4 27-14.5 27-32.4 27zm32-198.1h-32v32h32z"] +}; +var faFileAudio = { + prefix: 'far', + iconName: 'file-audio', + icon: [384, 512, [], "f1c7", "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm144-76.024c0 10.691-12.926 16.045-20.485 8.485L136 360.486h-28c-6.627 0-12-5.373-12-12v-56c0-6.627 5.373-12 12-12h28l35.515-36.947c7.56-7.56 20.485-2.206 20.485 8.485v135.952zm41.201-47.13c9.051-9.297 9.06-24.133.001-33.439-22.149-22.752 12.235-56.246 34.395-33.481 27.198 27.94 27.212 72.444.001 100.401-21.793 22.386-56.947-10.315-34.397-33.481z"] +}; +var faFileCode = { + prefix: 'far', + iconName: 'file-code', + icon: [384, 512, [], "f1c9", "M149.9 349.1l-.2-.2-32.8-28.9 32.8-28.9c3.6-3.2 4-8.8.8-12.4l-.2-.2-17.4-18.6c-3.4-3.6-9-3.7-12.4-.4l-57.7 54.1c-3.7 3.5-3.7 9.4 0 12.8l57.7 54.1c1.6 1.5 3.8 2.4 6 2.4 2.4 0 4.8-1 6.4-2.8l17.4-18.6c3.3-3.5 3.1-9.1-.4-12.4zm220-251.2L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h160v104c0 13.3 10.7 24 24 24h104zM209.6 214c-4.7-1.4-9.5 1.3-10.9 6L144 408.1c-1.4 4.7 1.3 9.6 6 10.9l24.4 7.1c4.7 1.4 9.6-1.4 10.9-6L240 231.9c1.4-4.7-1.3-9.6-6-10.9zm24.5 76.9l.2.2 32.8 28.9-32.8 28.9c-3.6 3.2-4 8.8-.8 12.4l.2.2 17.4 18.6c3.3 3.5 8.9 3.7 12.4.4l57.7-54.1c3.7-3.5 3.7-9.4 0-12.8l-57.7-54.1c-3.5-3.3-9.1-3.2-12.4.4l-17.4 18.6c-3.3 3.5-3.1 9.1.4 12.4z"] +}; +var faFileExcel = { + prefix: 'far', + iconName: 'file-excel', + icon: [384, 512, [], "f1c3", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm212-240h-28.8c-4.4 0-8.4 2.4-10.5 6.3-18 33.1-22.2 42.4-28.6 57.7-13.9-29.1-6.9-17.3-28.6-57.7-2.1-3.9-6.2-6.3-10.6-6.3H124c-9.3 0-15 10-10.4 18l46.3 78-46.3 78c-4.7 8 1.1 18 10.4 18h28.9c4.4 0 8.4-2.4 10.5-6.3 21.7-40 23-45 28.6-57.7 14.9 30.2 5.9 15.9 28.6 57.7 2.1 3.9 6.2 6.3 10.6 6.3H260c9.3 0 15-10 10.4-18L224 320c.7-1.1 30.3-50.5 46.3-78 4.7-8-1.1-18-10.3-18z"] +}; +var faFileImage = { + prefix: 'far', + iconName: 'file-image', + icon: [384, 512, [], "f1c5", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z"] +}; +var faFilePdf = { + prefix: 'far', + iconName: 'file-pdf', + icon: [384, 512, [], "f1c1", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"] +}; +var faFilePowerpoint = { + prefix: 'far', + iconName: 'file-powerpoint', + icon: [384, 512, [], "f1c4", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm72-60V236c0-6.6 5.4-12 12-12h69.2c36.7 0 62.8 27 62.8 66.3 0 74.3-68.7 66.5-95.5 66.5V404c0 6.6-5.4 12-12 12H132c-6.6 0-12-5.4-12-12zm48.5-87.4h23c7.9 0 13.9-2.4 18.1-7.2 8.5-9.8 8.4-28.5.1-37.8-4.1-4.6-9.9-7-17.4-7h-23.9v52z"] +}; +var faFileVideo = { + prefix: 'far', + iconName: 'file-video', + icon: [384, 512, [], "f1c8", "M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm228.687-211.303L224 305.374V268c0-11.046-8.954-20-20-20H100c-11.046 0-20 8.954-20 20v104c0 11.046 8.954 20 20 20h104c11.046 0 20-8.954 20-20v-37.374l52.687 52.674C286.704 397.318 304 390.28 304 375.986V264.011c0-14.311-17.309-21.319-27.313-11.314z"] +}; +var faFileWord = { + prefix: 'far', + iconName: 'file-word', + icon: [384, 512, [], "f1c2", "M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm220.1-208c-5.7 0-10.6 4-11.7 9.5-20.6 97.7-20.4 95.4-21 103.5-.2-1.2-.4-2.6-.7-4.3-.8-5.1.3.2-23.6-99.5-1.3-5.4-6.1-9.2-11.7-9.2h-13.3c-5.5 0-10.3 3.8-11.7 9.1-24.4 99-24 96.2-24.8 103.7-.1-1.1-.2-2.5-.5-4.2-.7-5.2-14.1-73.3-19.1-99-1.1-5.6-6-9.7-11.8-9.7h-16.8c-7.8 0-13.5 7.3-11.7 14.8 8 32.6 26.7 109.5 33.2 136 1.3 5.4 6.1 9.1 11.7 9.1h25.2c5.5 0 10.3-3.7 11.6-9.1l17.9-71.4c1.5-6.2 2.5-12 3-17.3l2.9 17.3c.1.4 12.6 50.5 17.9 71.4 1.3 5.3 6.1 9.1 11.6 9.1h24.7c5.5 0 10.3-3.7 11.6-9.1 20.8-81.9 30.2-119 34.5-136 1.9-7.6-3.8-14.9-11.6-14.9h-15.8z"] +}; +var faFlag = { + prefix: 'far', + iconName: 'flag', + icon: [512, 512, [], "f024", "M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z"] +}; +var faFlushed = { + prefix: 'far', + iconName: 'flushed', + icon: [496, 512, [], "f579", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm96-312c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80zm0 128c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm-112 24c0-44.2-35.8-80-80-80s-80 35.8-80 80 35.8 80 80 80 80-35.8 80-80zm-80 48c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm160 144H184c-13.2 0-24 10.8-24 24s10.8 24 24 24h128c13.2 0 24-10.8 24-24s-10.8-24-24-24z"] +}; +var faFolder = { + prefix: 'far', + iconName: 'folder', + icon: [512, 512, [], "f07b", "M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z"] +}; +var faFolderOpen = { + prefix: 'far', + iconName: 'folder-open', + icon: [576, 512, [], "f07c", "M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z"] +}; +var faFontAwesomeLogoFull = { + prefix: 'far', + iconName: 'font-awesome-logo-full', + icon: [3992, 512, ["Font Awesome"], "f4e6", "M454.6 0H57.4C25.9 0 0 25.9 0 57.4v397.3C0 486.1 25.9 512 57.4 512h397.3c31.4 0 57.4-25.9 57.4-57.4V57.4C512 25.9 486.1 0 454.6 0zm-58.9 324.9c0 4.8-4.1 6.9-8.9 8.9-19.2 8.1-39.7 15.7-61.5 15.7-40.5 0-68.7-44.8-163.2 2.5v51.8c0 30.3-45.7 30.2-45.7 0v-250c-9-7-15-17.9-15-30.3 0-21 17.1-38.2 38.2-38.2 21 0 38.2 17.1 38.2 38.2 0 12.2-5.8 23.2-14.9 30.2v21c37.1-12 65.5-34.4 146.1-3.4 26.6 11.4 68.7-15.7 76.5-15.7 5.5 0 10.3 4.1 10.3 8.9v160.4zm432.9-174.2h-137v70.1H825c39.8 0 40.4 62.2 0 62.2H691.6v105.6c0 45.5-70.7 46.4-70.7 0V128.3c0-22 18-39.8 39.8-39.8h167.8c39.6 0 40.5 62.2.1 62.2zm191.1 23.4c-169.3 0-169.1 252.4 0 252.4 169.9 0 169.9-252.4 0-252.4zm0 196.1c-81.6 0-82.1-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm372.4 53.4c-17.5 0-31.4-13.9-31.4-31.4v-117c0-62.4-72.6-52.5-99.1-16.4v133.4c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c43.3-51.6 162.4-60.4 162.4 39.3v141.5c.3 30.4-31.5 31.4-31.7 31.4zm179.7 2.9c-44.3 0-68.3-22.9-68.3-65.8V235.2H1488c-35.6 0-36.7-55.3 0-55.3h15.5v-37.3c0-41.3 63.8-42.1 63.8 0v37.5h24.9c35.4 0 35.7 55.3 0 55.3h-24.9v108.5c0 29.6 26.1 26.3 27.4 26.3 31.4 0 52.6 56.3-22.9 56.3zM1992 123c-19.5-50.2-95.5-50-114.5 0-107.3 275.7-99.5 252.7-99.5 262.8 0 42.8 58.3 51.2 72.1 14.4l13.5-35.9H2006l13 35.9c14.2 37.7 72.1 27.2 72.1-14.4 0-10.1 5.3 6.8-99.1-262.8zm-108.9 179.1l51.7-142.9 51.8 142.9h-103.5zm591.3-85.6l-53.7 176.3c-12.4 41.2-72 41-84 0l-42.3-135.9-42.3 135.9c-12.4 40.9-72 41.2-84.5 0l-54.2-176.3c-12.5-39.4 49.8-56.1 60.2-16.9L2213 342l45.3-139.5c10.9-32.7 59.6-34.7 71.2 0l45.3 139.5 39.3-142.4c10.3-38.3 72.6-23.8 60.3 16.9zm275.4 75.1c0-42.4-33.9-117.5-119.5-117.5-73.2 0-124.4 56.3-124.4 126 0 77.2 55.3 126.4 128.5 126.4 31.7 0 93-11.5 93-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-109 8.4-115.9-43.8h148.3c16.3 0 29.3-13.4 29.3-28.9zM2571 277.7c9.5-73.4 113.9-68.6 118.6 0H2571zm316.7 148.8c-31.4 0-81.6-10.5-96.6-31.9-12.4-17 2.5-39.8 21.8-39.8 16.3 0 36.8 22.9 77.7 22.9 27.4 0 40.4-11 40.4-25.8 0-39.8-142.9-7.4-142.9-102 0-40.4 35.3-75.7 98.6-75.7 31.4 0 74.1 9.9 87.6 29.4 10.8 14.8-1.4 36.2-20.9 36.2-15.1 0-26.7-17.3-66.2-17.3-22.9 0-37.8 10.5-37.8 23.8 0 35.9 142.4 6 142.4 103.1-.1 43.7-37.4 77.1-104.1 77.1zm266.8-252.4c-169.3 0-169.1 252.4 0 252.4 170.1 0 169.6-252.4 0-252.4zm0 196.1c-81.8 0-82-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm476.9 22V268.7c0-53.8-61.4-45.8-85.7-10.5v134c0 41.3-63.8 42.1-63.8 0V268.7c0-52.1-59.5-47.4-85.7-10.1v133.6c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c9.9-14.4 41.8-37.3 78.6-37.3 35.3 0 57.7 16.4 66.7 43.8 13.9-21.8 45.8-43.8 82.6-43.8 44.3 0 70.7 23.4 70.7 72.7v145.3c.5 17.3-13.5 31.4-31.9 31.4 3.5.1-31.3 1.1-31.3-31.3zM3992 291.6c0-42.4-32.4-117.5-117.9-117.5-73.2 0-127.5 56.3-127.5 126 0 77.2 58.3 126.4 131.6 126.4 31.7 0 91.5-11.5 91.5-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-110.5 8.4-117.5-43.8h149.8c16.3 0 29.1-13.4 29.3-28.9zm-180.5-13.9c9.7-74.4 115.9-68.3 120.1 0h-120.1z"] +}; +var faFrown = { + prefix: 'far', + iconName: 'frown', + icon: [496, 512, [], "f119", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.4 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c8.1 9.7 23.1 11.9 33.8 3.1 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z"] +}; +var faFrownOpen = { + prefix: 'far', + iconName: 'frown-open', + icon: [496, 512, [], "f57a", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-48-248c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32zm128-32c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 112c-35.6 0-88.8 21.3-95.8 61.2-2 11.8 9 21.5 20.5 18.1 31.2-9.6 59.4-15.3 75.3-15.3s44.1 5.7 75.3 15.3c11.4 3.5 22.5-6.3 20.5-18.1-7-39.9-60.2-61.2-95.8-61.2z"] +}; +var faFutbol = { + prefix: 'far', + iconName: 'futbol', + icon: [496, 512, [], "f1e3", "M483.8 179.4C449.8 74.6 352.6 8 248.1 8c-25.4 0-51.2 3.9-76.7 12.2C41.2 62.5-30.1 202.4 12.2 332.6 46.2 437.4 143.4 504 247.9 504c25.4 0 51.2-3.9 76.7-12.2 130.2-42.3 201.5-182.2 159.2-312.4zm-74.5 193.7l-52.2 6.4-43.7-60.9 24.4-75.2 71.1-22.1 38.9 36.4c-.2 30.7-7.4 61.1-21.7 89.2-4.7 9.3-10.7 17.8-16.8 26.2zm0-235.4l-10.4 53.1-70.7 22-64.2-46.5V92.5l47.4-26.2c39.2 13 73.4 38 97.9 71.4zM184.9 66.4L232 92.5v73.8l-64.2 46.5-70.6-22-10.1-52.5c24.3-33.4 57.9-58.6 97.8-71.9zM139 379.5L85.9 373c-14.4-20.1-37.3-59.6-37.8-115.3l39-36.4 71.1 22.2 24.3 74.3-43.5 61.7zm48.2 67l-22.4-48.1 43.6-61.7H287l44.3 61.7-22.4 48.1c-6.2 1.8-57.6 20.4-121.7 0z"] +}; +var faGem = { + prefix: 'far', + iconName: 'gem', + icon: [576, 512, [], "f3a5", "M464 0H112c-4 0-7.8 2-10 5.4L2 152.6c-2.9 4.4-2.6 10.2.7 14.2l276 340.8c4.8 5.9 13.8 5.9 18.6 0l276-340.8c3.3-4.1 3.6-9.8.7-14.2L474.1 5.4C471.8 2 468.1 0 464 0zm-19.3 48l63.3 96h-68.4l-51.7-96h56.8zm-202.1 0h90.7l51.7 96H191l51.6-96zm-111.3 0h56.8l-51.7 96H68l63.3-96zm-43 144h51.4L208 352 88.3 192zm102.9 0h193.6L288 435.3 191.2 192zM368 352l68.2-160h51.4L368 352z"] +}; +var faGrimace = { + prefix: 'far', + iconName: 'grimace', + icon: [496, 512, [], "f57f", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm16 16H152c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h192c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48zm-168 96h-24c-8.8 0-16-7.2-16-16v-8h40v24zm0-40h-40v-8c0-8.8 7.2-16 16-16h24v24zm64 40h-48v-24h48v24zm0-40h-48v-24h48v24zm64 40h-48v-24h48v24zm0-40h-48v-24h48v24zm56 24c0 8.8-7.2 16-16 16h-24v-24h40v8zm0-24h-40v-24h24c8.8 0 16 7.2 16 16v8z"] +}; +var faGrin = { + prefix: 'far', + iconName: 'grin', + icon: [496, 512, [], "f580", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.4-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z"] +}; +var faGrinAlt = { + prefix: 'far', + iconName: 'grin-alt', + icon: [496, 512, [], "f581", "M200.3 248c12.4-18.7 15.1-37.3 15.7-56-.5-18.7-3.3-37.3-15.7-56-8-12-25.1-11.4-32.7 0-12.4 18.7-15.1 37.3-15.7 56 .5 18.7 3.3 37.3 15.7 56 8.1 12 25.2 11.4 32.7 0zm128 0c12.4-18.7 15.1-37.3 15.7-56-.5-18.7-3.3-37.3-15.7-56-8-12-25.1-11.4-32.7 0-12.4 18.7-15.1 37.3-15.7 56 .5 18.7 3.3 37.3 15.7 56 8.1 12 25.2 11.4 32.7 0zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3z"] +}; +var faGrinBeam = { + prefix: 'far', + iconName: 'grin-beam', + icon: [496, 512, [], "f582", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-235.9-72.9c3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3zm160 0c3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3z"] +}; +var faGrinBeamSweat = { + prefix: 'far', + iconName: 'grin-beam-sweat', + icon: [496, 512, [], "f583", "M440 160c29.5 0 53.3-26.3 53.3-58.7 0-25-31.7-75.5-46.2-97.3-3.6-5.3-10.7-5.3-14.2 0-14.5 21.8-46.2 72.3-46.2 97.3 0 32.4 23.8 58.7 53.3 58.7zM248 400c51.9 0 115.3-32.9 123.3-80 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 8 47.1 71.4 80 123.3 80zm130.3-168.3c3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.6 6.2 4.6 9.3 3.7zm105.3-52.9c-24.6 15.7-46 12.9-46.4 12.9 6.9 20.2 10.8 41.8 10.8 64.3 0 110.3-89.7 200-200 200S48 366.3 48 256 137.7 56 248 56c39.8 0 76.8 11.8 108 31.9 1.7-9.5 6.3-24.1 17.2-45.7C336.4 20.6 293.7 8 248 8 111 8 0 119 0 256s111 248 248 248 248-111 248-248c0-27-4.4-52.9-12.4-77.2zM168 189.4c12.3 0 23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.8 19.2-21.6 31.5-21.6z"] +}; +var faGrinHearts = { + prefix: 'far', + iconName: 'grin-hearts', + icon: [496, 512, [], "f584", "M353.6 304.6c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-152.8-48.9c4.5 1.2 9.2-1.5 10.5-6l19.4-69.9c5.6-20.3-7.4-41.1-28.8-44.5-18.6-3-36.4 9.8-41.5 27.9l-2 7.1-7.1-1.9c-18.2-4.7-38.2 4.3-44.9 22-7.7 20.2 3.8 41.9 24.2 47.2l70.2 18.1zm188.8-65.3c-6.7-17.6-26.7-26.7-44.9-22l-7.1 1.9-2-7.1c-5-18.1-22.8-30.9-41.5-27.9-21.4 3.4-34.4 24.2-28.8 44.5l19.4 69.9c1.2 4.5 5.9 7.2 10.5 6l70.2-18.2c20.4-5.3 31.9-26.9 24.2-47.1zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200z"] +}; +var faGrinSquint = { + prefix: 'far', + iconName: 'grin-squint', + icon: [496, 512, [], "f585", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.4-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-234.7-40.8c3.6 4.2 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3s-2.2-8.1-5.8-10.3l-80-48c-5.1-3-11.4-1.9-15.3 2.5-3.8 4.5-3.8 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11.1.1 15.5zm242.9 2.5c5.4 3.2 11.7 1.7 15.3-2.5 3.8-4.5 3.8-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11-.1-15.5-3.8-4.4-10.2-5.4-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48z"] +}; +var faGrinSquintTears = { + prefix: 'far', + iconName: 'grin-squint-tears', + icon: [512, 512, [], "f586", "M117.1 384.1c-25.8 3.7-84 13.7-100.9 30.6-21.9 21.9-21.5 57.9.9 80.3s58.3 22.8 80.3.9C114.3 479 124.3 420.8 128 395c.8-6.4-4.6-11.8-10.9-10.9zm-41.2-41.7C40.3 268 53 176.1 114.6 114.6 152.4 76.8 202.6 56 256 56c36.2 0 70.8 9.8 101.2 27.7 3.8-20.3 8-36.1 12-48.3C333.8 17.2 294.9 8 256 8 192.5 8 129.1 32.2 80.6 80.6c-74.1 74.1-91.3 183.4-52 274 12.2-4.1 27.7-8.3 47.3-12.2zm352.3-187.6c45 76.6 34.9 176.9-30.8 242.6-37.8 37.8-88 58.6-141.4 58.6-30.5 0-59.8-7-86.4-19.8-3.9 19.5-8 35-12.2 47.2 31.4 13.6 65 20.6 98.7 20.6 63.5 0 126.9-24.2 175.4-72.6 78.1-78.1 93.1-195.4 45.2-288.6-12.3 4-28.2 8.1-48.5 12zm-33.3-26.9c25.8-3.7 84-13.7 100.9-30.6 21.9-21.9 21.5-57.9-.9-80.3s-58.3-22.8-80.3-.9C397.7 33 387.7 91.2 384 117c-.8 6.4 4.6 11.8 10.9 10.9zm-187 108.3c-3-3-7.2-4.2-11.4-3.2L106 255.7c-5.7 1.4-9.5 6.7-9.1 12.6.5 5.8 5.1 10.5 10.9 11l52.3 4.8 4.8 52.3c.5 5.8 5.2 10.4 11 10.9h.9c5.5 0 10.3-3.7 11.7-9.1l22.6-90.5c1-4.2-.2-8.5-3.2-11.5zm39.7-25.1l90.5-22.6c5.7-1.4 9.5-6.7 9.1-12.6-.5-5.8-5.1-10.5-10.9-11l-52.3-4.8-4.8-52.3c-.5-5.8-5.2-10.4-11-10.9-5.6-.1-11.2 3.4-12.6 9.1L233 196.5c-1 4.1.2 8.4 3.2 11.4 5 5 11.3 3.2 11.4 3.2zm52 88.5c-29.1 29.1-59.7 52.9-83.9 65.4-9.2 4.8-10 17.5-1.7 23.4 38.9 27.7 107 6.2 143.7-30.6S416 253 388.3 214.1c-5.8-8.2-18.5-7.6-23.4 1.7-12.3 24.2-36.2 54.7-65.3 83.8z"] +}; +var faGrinStars = { + prefix: 'far', + iconName: 'grin-stars', + icon: [496, 512, [], "f587", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-227.9-57.5c-1 6.2 5.4 11 11 7.9l31.3-16.3 31.3 16.3c5.6 3.1 12-1.7 11-7.9l-6-34.9 25.4-24.6c4.5-4.5 1.9-12.2-4.3-13.2l-34.9-5-15.5-31.6c-2.9-5.8-11-5.8-13.9 0l-15.5 31.6-34.9 5c-6.2.9-8.9 8.6-4.3 13.2l25.4 24.6-6.1 34.9zm259.7-72.7l-34.9-5-15.5-31.6c-2.9-5.8-11-5.8-13.9 0l-15.5 31.6-34.9 5c-6.2.9-8.9 8.6-4.3 13.2l25.4 24.6-6 34.9c-1 6.2 5.4 11 11 7.9l31.3-16.3 31.3 16.3c5.6 3.1 12-1.7 11-7.9l-6-34.9 25.4-24.6c4.5-4.6 1.8-12.2-4.4-13.2z"] +}; +var faGrinTears = { + prefix: 'far', + iconName: 'grin-tears', + icon: [640, 512, [], "f588", "M117.1 256.1c-25.8 3.7-84 13.7-100.9 30.6-21.9 21.9-21.5 57.9.9 80.3s58.3 22.8 80.3.9C114.3 351 124.3 292.8 128 267c.8-6.4-4.6-11.8-10.9-10.9zm506.7 30.6c-16.9-16.9-75.1-26.9-100.9-30.6-6.3-.9-11.7 4.5-10.8 10.8 3.7 25.8 13.7 84 30.6 100.9 21.9 21.9 57.9 21.5 80.3-.9 22.3-22.3 22.7-58.3.8-80.2zm-126.6 61.7C463.8 412.3 396.9 456 320 456c-76.9 0-143.8-43.7-177.2-107.6-12.5 37.4-25.2 43.9-28.3 46.5C159.1 460.7 234.5 504 320 504s160.9-43.3 205.5-109.1c-3.2-2.7-15.9-9.2-28.3-46.5zM122.7 224.5C137.9 129.2 220.5 56 320 56c99.5 0 182.1 73.2 197.3 168.5 2.1-.2 5.2-2.4 49.5 7C554.4 106 448.7 8 320 8S85.6 106 73.2 231.4c44.5-9.4 47.1-7.2 49.5-6.9zM320 400c51.9 0 115.3-32.9 123.3-80 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 8 47.1 71.4 80 123.3 80zm130.3-168.3c3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.6 6.2 4.6 9.3 3.7zM240 189.4c12.3 0 23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.8 19.2-21.6 31.5-21.6z"] +}; +var faGrinTongue = { + prefix: 'far', + iconName: 'grin-tongue', + icon: [496, 512, [], "f589", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3zM168 176c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z"] +}; +var faGrinTongueSquint = { + prefix: 'far', + iconName: 'grin-tongue-squint', + icon: [496, 512, [], "f58a", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3zm36.9-281.1c-3.8-4.4-10.3-5.5-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48c5.4 3.2 11.7 1.7 15.3-2.5 3.8-4.5 3.8-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11.1-.1-15.5zm-162.9 45.5l-80-48c-5-3-11.4-2-15.3 2.5-3.8 4.5-3.8 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11 .1 15.5 3.6 4.2 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3s-2.2-8.1-5.8-10.3z"] +}; +var faGrinTongueWink = { + prefix: 'far', + iconName: 'grin-tongue-wink', + icon: [496, 512, [], "f58b", "M152 180c-25.7 0-55.9 16.9-59.8 42.1-.8 5 1.7 10 6.1 12.4 4.4 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.2 8 4.7 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-3.9-25.2-34.1-42.1-59.8-42.1zm176-52c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80zm0 128c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3z"] +}; +var faGrinWink = { + prefix: 'far', + iconName: 'grin-wink', + icon: [496, 512, [], "f58c", "M328 180c-25.69 0-55.88 16.92-59.86 42.12-1.75 11.22 11.5 18.24 19.83 10.84l9.55-8.48c14.81-13.19 46.16-13.19 60.97 0l9.55 8.48c8.48 7.43 21.56.25 19.83-10.84C383.88 196.92 353.69 180 328 180zm-160 60c17.67 0 32-14.33 32-32s-14.33-32-32-32-32 14.33-32 32 14.33 32 32 32zm185.55 64.64c-25.93 8.3-64.4 13.06-105.55 13.06s-79.62-4.75-105.55-13.06c-9.94-3.13-19.4 5.37-17.71 15.34C132.67 367.13 196.06 400 248 400s115.33-32.87 123.26-80.02c1.68-9.89-7.67-18.48-17.71-15.34zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 448c-110.28 0-200-89.72-200-200S137.72 56 248 56s200 89.72 200 200-89.72 200-200 200z"] +}; +var faHandLizard = { + prefix: 'far', + iconName: 'hand-lizard', + icon: [576, 512, [], "f258", "M556.686 290.542L410.328 64.829C397.001 44.272 374.417 32 349.917 32H56C25.121 32 0 57.122 0 88v8c0 44.112 35.888 80 80 80h196.042l-18.333 48H144c-48.523 0-88 39.477-88 88 0 30.879 25.121 56 56 56h131.552c2.987 0 5.914.549 8.697 1.631L352 408.418V480h224V355.829c0-23.225-6.679-45.801-19.314-65.287zM528 432H400v-23.582c0-19.948-12.014-37.508-30.604-44.736l-99.751-38.788A71.733 71.733 0 0 0 243.552 320H112c-4.411 0-8-3.589-8-8 0-22.056 17.944-40 40-40h113.709c19.767 0 37.786-12.407 44.84-30.873l24.552-64.281c8.996-23.553-8.428-48.846-33.63-48.846H80c-17.645 0-32-14.355-32-32v-8c0-4.411 3.589-8 8-8h293.917c8.166 0 15.693 4.09 20.137 10.942l146.358 225.715A71.84 71.84 0 0 1 528 355.829V432z"] +}; +var faHandPaper = { + prefix: 'far', + iconName: 'hand-paper', + icon: [448, 512, [], "f256", "M372.57 112.641v-10.825c0-43.612-40.52-76.691-83.039-65.546-25.629-49.5-94.09-47.45-117.982.747C130.269 26.456 89.144 57.945 89.144 102v126.13c-19.953-7.427-43.308-5.068-62.083 8.871-29.355 21.796-35.794 63.333-14.55 93.153L132.48 498.569a32 32 0 0 0 26.062 13.432h222.897c14.904 0 27.835-10.289 31.182-24.813l30.184-130.958A203.637 203.637 0 0 0 448 310.564V179c0-40.62-35.523-71.992-75.43-66.359zm27.427 197.922c0 11.731-1.334 23.469-3.965 34.886L368.707 464h-201.92L51.591 302.303c-14.439-20.27 15.023-42.776 29.394-22.605l27.128 38.079c8.995 12.626 29.031 6.287 29.031-9.283V102c0-25.645 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V67c0-25.663 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V101.125c0-25.672 36.57-24.81 36.57.691V256c0 8.837 7.163 16 16 16h6.857c8.837 0 16-7.163 16-16v-76.309c0-26.242 36.57-25.64 36.57-.691v131.563z"] +}; +var faHandPeace = { + prefix: 'far', + iconName: 'hand-peace', + icon: [448, 512, [], "f25b", "M362.146 191.976c-13.71-21.649-38.761-34.016-65.006-30.341V74c0-40.804-32.811-74-73.141-74-40.33 0-73.14 33.196-73.14 74L160 168l-18.679-78.85C126.578 50.843 83.85 32.11 46.209 47.208 8.735 62.238-9.571 104.963 5.008 142.85l55.757 144.927c-30.557 24.956-43.994 57.809-24.733 92.218l54.853 97.999C102.625 498.97 124.73 512 148.575 512h205.702c30.744 0 57.558-21.44 64.555-51.797l27.427-118.999a67.801 67.801 0 0 0 1.729-15.203L448 256c0-44.956-43.263-77.343-85.854-64.024zM399.987 326c0 1.488-.169 2.977-.502 4.423l-27.427 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H148.575c-6.486 0-12.542-3.621-15.805-9.449l-54.854-98c-4.557-8.141-2.619-18.668 4.508-24.488l26.647-21.764a16 16 0 0 0 4.812-18.139l-64.09-166.549C37.226 92.956 84.37 74.837 96.51 106.389l59.784 155.357A16 16 0 0 0 171.227 272h11.632c8.837 0 16-7.163 16-16V74c0-34.375 50.281-34.43 50.281 0v182c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16v-28c0-25.122 36.567-25.159 36.567 0v28c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16 0-25.12 36.567-25.16 36.567 0v70z"] +}; +var faHandPointDown = { + prefix: 'far', + iconName: 'hand-point-down', + icon: [448, 512, [], "f0a7", "M188.8 512c45.616 0 83.2-37.765 83.2-83.2v-35.647a93.148 93.148 0 0 0 22.064-7.929c22.006 2.507 44.978-3.503 62.791-15.985C409.342 368.1 448 331.841 448 269.299V248c0-60.063-40-98.512-40-127.2v-2.679c4.952-5.747 8-13.536 8-22.12V32c0-17.673-12.894-32-28.8-32H156.8C140.894 0 128 14.327 128 32v64c0 8.584 3.048 16.373 8 22.12v2.679c0 6.964-6.193 14.862-23.668 30.183l-.148.129-.146.131c-9.937 8.856-20.841 18.116-33.253 25.851C48.537 195.798 0 207.486 0 252.8c0 56.928 35.286 92 83.2 92 8.026 0 15.489-.814 22.4-2.176V428.8c0 45.099 38.101 83.2 83.2 83.2zm0-48c-18.7 0-35.2-16.775-35.2-35.2V270.4c-17.325 0-35.2 26.4-70.4 26.4-26.4 0-35.2-20.625-35.2-44 0-8.794 32.712-20.445 56.1-34.926 14.575-9.074 27.225-19.524 39.875-30.799 18.374-16.109 36.633-33.836 39.596-59.075h176.752C364.087 170.79 400 202.509 400 248v21.299c0 40.524-22.197 57.124-61.325 50.601-8.001 14.612-33.979 24.151-53.625 12.925-18.225 19.365-46.381 17.787-61.05 4.95V428.8c0 18.975-16.225 35.2-35.2 35.2zM328 64c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24z"] +}; +var faHandPointLeft = { + prefix: 'far', + iconName: 'hand-point-left', + icon: [512, 512, [], "f0a5", "M0 220.8C0 266.416 37.765 304 83.2 304h35.647a93.148 93.148 0 0 0 7.929 22.064c-2.507 22.006 3.503 44.978 15.985 62.791C143.9 441.342 180.159 480 242.701 480H264c60.063 0 98.512-40 127.2-40h2.679c5.747 4.952 13.536 8 22.12 8h64c17.673 0 32-12.894 32-28.8V188.8c0-15.906-14.327-28.8-32-28.8h-64c-8.584 0-16.373 3.048-22.12 8H391.2c-6.964 0-14.862-6.193-30.183-23.668l-.129-.148-.131-.146c-8.856-9.937-18.116-20.841-25.851-33.253C316.202 80.537 304.514 32 259.2 32c-56.928 0-92 35.286-92 83.2 0 8.026.814 15.489 2.176 22.4H83.2C38.101 137.6 0 175.701 0 220.8zm48 0c0-18.7 16.775-35.2 35.2-35.2h158.4c0-17.325-26.4-35.2-26.4-70.4 0-26.4 20.625-35.2 44-35.2 8.794 0 20.445 32.712 34.926 56.1 9.074 14.575 19.524 27.225 30.799 39.875 16.109 18.374 33.836 36.633 59.075 39.596v176.752C341.21 396.087 309.491 432 264 432h-21.299c-40.524 0-57.124-22.197-50.601-61.325-14.612-8.001-24.151-33.979-12.925-53.625-19.365-18.225-17.787-46.381-4.95-61.05H83.2C64.225 256 48 239.775 48 220.8zM448 360c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z"] +}; +var faHandPointRight = { + prefix: 'far', + iconName: 'hand-point-right', + icon: [512, 512, [], "f0a4", "M428.8 137.6h-86.177a115.52 115.52 0 0 0 2.176-22.4c0-47.914-35.072-83.2-92-83.2-45.314 0-57.002 48.537-75.707 78.784-7.735 12.413-16.994 23.317-25.851 33.253l-.131.146-.129.148C135.662 161.807 127.764 168 120.8 168h-2.679c-5.747-4.952-13.536-8-22.12-8H32c-17.673 0-32 12.894-32 28.8v230.4C0 435.106 14.327 448 32 448h64c8.584 0 16.373-3.048 22.12-8h2.679c28.688 0 67.137 40 127.2 40h21.299c62.542 0 98.8-38.658 99.94-91.145 12.482-17.813 18.491-40.785 15.985-62.791A93.148 93.148 0 0 0 393.152 304H428.8c45.435 0 83.2-37.584 83.2-83.2 0-45.099-38.101-83.2-83.2-83.2zm0 118.4h-91.026c12.837 14.669 14.415 42.825-4.95 61.05 11.227 19.646 1.687 45.624-12.925 53.625 6.524 39.128-10.076 61.325-50.6 61.325H248c-45.491 0-77.21-35.913-120-39.676V215.571c25.239-2.964 42.966-21.222 59.075-39.596 11.275-12.65 21.725-25.3 30.799-39.875C232.355 112.712 244.006 80 252.8 80c23.375 0 44 8.8 44 35.2 0 35.2-26.4 53.075-26.4 70.4h158.4c18.425 0 35.2 16.5 35.2 35.2 0 18.975-16.225 35.2-35.2 35.2zM88 384c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"] +}; +var faHandPointUp = { + prefix: 'far', + iconName: 'hand-point-up', + icon: [448, 512, [], "f0a6", "M105.6 83.2v86.177a115.52 115.52 0 0 0-22.4-2.176c-47.914 0-83.2 35.072-83.2 92 0 45.314 48.537 57.002 78.784 75.707 12.413 7.735 23.317 16.994 33.253 25.851l.146.131.148.129C129.807 376.338 136 384.236 136 391.2v2.679c-4.952 5.747-8 13.536-8 22.12v64c0 17.673 12.894 32 28.8 32h230.4c15.906 0 28.8-14.327 28.8-32v-64c0-8.584-3.048-16.373-8-22.12V391.2c0-28.688 40-67.137 40-127.2v-21.299c0-62.542-38.658-98.8-91.145-99.94-17.813-12.482-40.785-18.491-62.791-15.985A93.148 93.148 0 0 0 272 118.847V83.2C272 37.765 234.416 0 188.8 0c-45.099 0-83.2 38.101-83.2 83.2zm118.4 0v91.026c14.669-12.837 42.825-14.415 61.05 4.95 19.646-11.227 45.624-1.687 53.625 12.925 39.128-6.524 61.325 10.076 61.325 50.6V264c0 45.491-35.913 77.21-39.676 120H183.571c-2.964-25.239-21.222-42.966-39.596-59.075-12.65-11.275-25.3-21.725-39.875-30.799C80.712 279.645 48 267.994 48 259.2c0-23.375 8.8-44 35.2-44 35.2 0 53.075 26.4 70.4 26.4V83.2c0-18.425 16.5-35.2 35.2-35.2 18.975 0 35.2 16.225 35.2 35.2zM352 424c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z"] +}; +var faHandPointer = { + prefix: 'far', + iconName: 'hand-pointer', + icon: [448, 512, [], "f25a", "M358.182 179.361c-19.493-24.768-52.679-31.945-79.872-19.098-15.127-15.687-36.182-22.487-56.595-19.629V67c0-36.944-29.736-67-66.286-67S89.143 30.056 89.143 67v161.129c-19.909-7.41-43.272-5.094-62.083 8.872-29.355 21.795-35.793 63.333-14.55 93.152l109.699 154.001C134.632 501.59 154.741 512 176 512h178.286c30.802 0 57.574-21.5 64.557-51.797l27.429-118.999A67.873 67.873 0 0 0 448 326v-84c0-46.844-46.625-79.273-89.818-62.639zM80.985 279.697l27.126 38.079c8.995 12.626 29.031 6.287 29.031-9.283V67c0-25.12 36.571-25.16 36.571 0v175c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16v-35c0-25.12 36.571-25.16 36.571 0v35c0 8.836 7.163 16 16 16H272c8.837 0 16-7.164 16-16v-21c0-25.12 36.571-25.16 36.571 0v21c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16 0-25.121 36.571-25.16 36.571 0v84c0 1.488-.169 2.977-.502 4.423l-27.43 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H176c-5.769 0-11.263-2.878-14.697-7.697l-109.712-154c-14.406-20.223 14.994-42.818 29.394-22.606zM176.143 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.733 0-14-7.163-14-16zm75.428 0v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16zM327 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16z"] +}; +var faHandRock = { + prefix: 'far', + iconName: 'hand-rock', + icon: [512, 512, [], "f255", "M408.864 79.052c-22.401-33.898-66.108-42.273-98.813-23.588-29.474-31.469-79.145-31.093-108.334-.022-47.16-27.02-108.71 5.055-110.671 60.806C44.846 105.407 0 140.001 0 187.429v56.953c0 32.741 14.28 63.954 39.18 85.634l97.71 85.081c4.252 3.702 3.11 5.573 3.11 32.903 0 17.673 14.327 32 32 32h252c17.673 0 32-14.327 32-32 0-23.513-1.015-30.745 3.982-42.37l42.835-99.656c6.094-14.177 9.183-29.172 9.183-44.568V146.963c0-52.839-54.314-88.662-103.136-67.911zM464 261.406a64.505 64.505 0 0 1-5.282 25.613l-42.835 99.655c-5.23 12.171-7.883 25.04-7.883 38.25V432H188v-10.286c0-16.37-7.14-31.977-19.59-42.817l-97.71-85.08C56.274 281.255 48 263.236 48 244.381v-56.953c0-33.208 52-33.537 52 .677v41.228a16 16 0 0 0 5.493 12.067l7 6.095A16 16 0 0 0 139 235.429V118.857c0-33.097 52-33.725 52 .677v26.751c0 8.836 7.164 16 16 16h7c8.836 0 16-7.164 16-16v-41.143c0-33.134 52-33.675 52 .677v40.466c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16v-27.429c0-33.03 52-33.78 52 .677v26.751c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16 0-33.146 52-33.613 52 .677v114.445z"] +}; +var faHandScissors = { + prefix: 'far', + iconName: 'hand-scissors', + icon: [512, 512, [], "f257", "M256 480l70-.013c5.114 0 10.231-.583 15.203-1.729l118.999-27.427C490.56 443.835 512 417.02 512 386.277V180.575c0-23.845-13.03-45.951-34.005-57.69l-97.999-54.853c-34.409-19.261-67.263-5.824-92.218 24.733L142.85 37.008c-37.887-14.579-80.612 3.727-95.642 41.201-15.098 37.642 3.635 80.37 41.942 95.112L168 192l-94-9.141c-40.804 0-74 32.811-74 73.14 0 40.33 33.196 73.141 74 73.141h87.635c-3.675 26.245 8.692 51.297 30.341 65.006C178.657 436.737 211.044 480 256 480zm0-48.013c-25.16 0-25.12-36.567 0-36.567 8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16h-28c-25.159 0-25.122-36.567 0-36.567h28c8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16H74c-34.43 0-34.375-50.281 0-50.281h182c8.837 0 16-7.163 16-16v-11.632a16 16 0 0 0-10.254-14.933L106.389 128.51c-31.552-12.14-13.432-59.283 19.222-46.717l166.549 64.091a16.001 16.001 0 0 0 18.139-4.812l21.764-26.647c5.82-7.127 16.348-9.064 24.488-4.508l98 54.854c5.828 3.263 9.449 9.318 9.449 15.805v205.701c0 8.491-5.994 15.804-14.576 17.782l-119.001 27.427a19.743 19.743 0 0 1-4.423.502h-70z"] +}; +var faHandSpock = { + prefix: 'far', + iconName: 'hand-spock', + icon: [512, 512, [], "f259", "M501.03053,116.17605c-19.39059-31.50779-51.24406-35.72849-66.31044-35.01756-14.11325-50.81051-62.0038-54.08-70.73816-54.08a74.03091,74.03091,0,0,0-72.23816,58.916l-4.64648,22.66014-13.68357-53.207c-9.09569-35.37107-46.412-64.05074-89.66-53.07223a73.89749,73.89749,0,0,0-55.121,78.94722,73.68273,73.68273,0,0,0-64.8495,94.42181l24.35933,82.19721c-38.24017-7.54492-62.79677,16.18358-68.11512,21.84764a73.6791,73.6791,0,0,0,3.19921,104.19329l91.36509,85.9765A154.164,154.164,0,0,0,220.62279,512h107.4549A127.30079,127.30079,0,0,0,452.3392,413.86139l57.623-241.96272A73.20274,73.20274,0,0,0,501.03053,116.17605Zm-37.7597,44.60544L405.64788,402.74812a79.46616,79.46616,0,0,1-77.57019,61.25972H220.62279a106.34052,106.34052,0,0,1-73.1366-28.998l-91.369-85.98041C31.34381,325.72669,66.61133,288.131,91.39644,311.5392l51.123,48.10739c5.42577,5.10937,13.48239.71679,13.48239-5.82617a246.79914,246.79914,0,0,0-10.17771-70.1523l-36.01362-121.539c-9.7324-32.88279,39.69916-47.27145,49.38664-14.625l31.3437,105.77923c5.59374,18.90428,33.78119,10.71288,28.9648-8.00781L177.06427,80.23662c-8.50389-33.1035,41.43157-45.64646,49.86515-12.83593l47.32609,184.035c4.42773,17.24218,29.16207,16.5039,32.71089-.80468l31.791-154.9706c6.81054-33.1074,57.51748-24.10741,50.11906,11.96288L360.32764,246.78924c-3.72265,18.10936,23.66793,24.63084,28.05659,6.21679L413.185,148.85962C421.1498,115.512,471.14,127.79713,463.27083,160.78149Z"] +}; +var faHandshake = { + prefix: 'far', + iconName: 'handshake', + icon: [640, 512, [], "f2b5", "M519.2 127.9l-47.6-47.6A56.252 56.252 0 0 0 432 64H205.2c-14.8 0-29.1 5.9-39.6 16.3L118 127.9H0v255.7h64c17.6 0 31.8-14.2 31.9-31.7h9.1l84.6 76.4c30.9 25.1 73.8 25.7 105.6 3.8 12.5 10.8 26 15.9 41.1 15.9 18.2 0 35.3-7.4 48.8-24 22.1 8.7 48.2 2.6 64-16.8l26.2-32.3c5.6-6.9 9.1-14.8 10.9-23h57.9c.1 17.5 14.4 31.7 31.9 31.7h64V127.9H519.2zM48 351.6c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16c0 8.9-7.2 16-16 16zm390-6.9l-26.1 32.2c-2.8 3.4-7.8 4-11.3 1.2l-23.9-19.4-30 36.5c-6 7.3-15 4.8-18 2.4l-36.8-31.5-15.6 19.2c-13.9 17.1-39.2 19.7-55.3 6.6l-97.3-88H96V175.8h41.9l61.7-61.6c2-.8 3.7-1.5 5.7-2.3H262l-38.7 35.5c-29.4 26.9-31.1 72.3-4.4 101.3 14.8 16.2 61.2 41.2 101.5 4.4l8.2-7.5 108.2 87.8c3.4 2.8 3.9 7.9 1.2 11.3zm106-40.8h-69.2c-2.3-2.8-4.9-5.4-7.7-7.7l-102.7-83.4 12.5-11.4c6.5-6 7-16.1 1-22.6L367 167.1c-6-6.5-16.1-6.9-22.6-1l-55.2 50.6c-9.5 8.7-25.7 9.4-34.6 0-9.3-9.9-8.5-25.1 1.2-33.9l65.6-60.1c7.4-6.8 17-10.5 27-10.5l83.7-.2c2.1 0 4.1.8 5.5 2.3l61.7 61.6H544v128zm48 47.7c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16c0 8.9-7.2 16-16 16z"] +}; +var faHdd = { + prefix: 'far', + iconName: 'hdd', + icon: [576, 512, [], "f0a0", "M567.403 235.642L462.323 84.589A48 48 0 0 0 422.919 64H153.081a48 48 0 0 0-39.404 20.589L8.597 235.642A48.001 48.001 0 0 0 0 263.054V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V263.054c0-9.801-3-19.366-8.597-27.412zM153.081 112h269.838l77.913 112H75.168l77.913-112zM528 400H48V272h480v128zm-32-64c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32zm-96 0c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32z"] +}; +var faHeart = { + prefix: 'far', + iconName: 'heart', + icon: [512, 512, [], "f004", "M458.4 64.3C400.6 15.7 311.3 23 256 79.3 200.7 23 111.4 15.6 53.6 64.3-21.6 127.6-10.6 230.8 43 285.5l175.4 178.7c10 10.2 23.4 15.9 37.6 15.9 14.3 0 27.6-5.6 37.6-15.8L469 285.6c53.5-54.7 64.7-157.9-10.6-221.3zm-23.6 187.5L259.4 430.5c-2.4 2.4-4.4 2.4-6.8 0L77.2 251.8c-36.5-37.2-43.9-107.6 7.3-150.7 38.9-32.7 98.9-27.8 136.5 10.5l35 35.7 35-35.7c37.8-38.5 97.8-43.2 136.5-10.6 51.1 43.1 43.5 113.9 7.3 150.8z"] +}; +var faHospital = { + prefix: 'far', + iconName: 'hospital', + icon: [448, 512, [], "f0f8", "M128 244v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12zm140 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm-76 84v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm76 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm180 124v36H0v-36c0-6.627 5.373-12 12-12h19.5V85.035C31.5 73.418 42.245 64 55.5 64H144V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v40h88.5c13.255 0 24 9.418 24 21.035V464H436c6.627 0 12 5.373 12 12zM79.5 463H192v-67c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v67h112.5V112H304v24c0 13.255-10.745 24-24 24H168c-13.255 0-24-10.745-24-24v-24H79.5v351zM266 64h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6z"] +}; +var faHourglass = { + prefix: 'far', + iconName: 'hourglass', + icon: [384, 512, [], "f254", "M368 48h4c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12H12C5.373 0 0 5.373 0 12v24c0 6.627 5.373 12 12 12h4c0 80.564 32.188 165.807 97.18 208C47.899 298.381 16 383.9 16 464h-4c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h360c6.627 0 12-5.373 12-12v-24c0-6.627-5.373-12-12-12h-4c0-80.564-32.188-165.807-97.18-208C336.102 213.619 368 128.1 368 48zM64 48h256c0 101.62-57.307 184-128 184S64 149.621 64 48zm256 416H64c0-101.62 57.308-184 128-184s128 82.38 128 184z"] +}; +var faIdBadge = { + prefix: 'far', + iconName: 'id-badge', + icon: [384, 512, [], "f2c1", "M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm0 464H48V48h288v416zM144 112h96c8.8 0 16-7.2 16-16s-7.2-16-16-16h-96c-8.8 0-16 7.2-16 16s7.2 16 16 16zm48 176c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2z"] +}; +var faIdCard = { + prefix: 'far', + iconName: 'id-card', + icon: [576, 512, [], "f2c2", "M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H303.2c.9-4.5.8 3.6.8-22.4 0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6 0 26-.2 17.9.8 22.4H48V144h480v288zm-168-80h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm-168 96c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64z"] +}; +var faImage = { + prefix: 'far', + iconName: 'image', + icon: [512, 512, [], "f03e", "M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"] +}; +var faImages = { + prefix: 'far', + iconName: 'images', + icon: [576, 512, [], "f302", "M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v48H54a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6v-10h48zm42-336H150a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6V86a6 6 0 0 0-6-6zm6-48c26.51 0 48 21.49 48 48v256c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h384zM264 144c0 22.091-17.909 40-40 40s-40-17.909-40-40 17.909-40 40-40 40 17.909 40 40zm-72 96l39.515-39.515c4.686-4.686 12.284-4.686 16.971 0L288 240l103.515-103.515c4.686-4.686 12.284-4.686 16.971 0L480 208v80H192v-48z"] +}; +var faKeyboard = { + prefix: 'far', + iconName: 'keyboard', + icon: [576, 512, [], "f11c", "M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm8 336c0 4.411-3.589 8-8 8H48c-4.411 0-8-3.589-8-8V112c0-4.411 3.589-8 8-8h480c4.411 0 8 3.589 8 8v288zM170 270v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-336 82v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm384 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zM122 188v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-98 158v-16c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v16c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z"] +}; +var faKiss = { + prefix: 'far', + iconName: 'kiss', + icon: [496, 512, [], "f596", "M168 176c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm136 132c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36C290.6 335.3 304 321 304 308zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm80-280c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z"] +}; +var faKissBeam = { + prefix: 'far', + iconName: 'kiss-beam', + icon: [496, 512, [], "f597", "M168 152c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2 7.2 5.6 8.3 3.5 1 7.5-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 5.9-4.5 5.6-8.3-3.1-42.1-32-71.4-55.8-71.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm56-148c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36C290.6 335.3 304 321 304 308zm24-156c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2 7.2 5.6 8.3 3.5 1 7.5-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 5.9-4.5 5.6-8.3-3.1-42.1-32-71.4-55.8-71.4z"] +}; +var faKissWinkHeart = { + prefix: 'far', + iconName: 'kiss-wink-heart', + icon: [504, 512, [], "f598", "M304 308.5c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36 21.7-9.1 35.1-23.4 35.1-36.4zm70.5-83.5l9.5 8.5c3.8 3.3 9.3 4 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-4-25.2-34.2-42.1-59.8-42.1s-55.9 16.9-59.8 42.1c-.8 5 1.7 10 6.1 12.4 5.8 3.1 11.2.7 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0zM136 208.5c0 17.7 14.3 32 32 32s32-14.3 32-32-14.3-32-32-32-32 14.3-32 32zm365.1 194c-8-20.8-31.5-31.5-53.1-25.9l-8.4 2.2-2.3-8.4c-5.9-21.4-27-36.5-49-33-25.2 4-40.6 28.6-34 52.6l22.9 82.6c1.5 5.3 7 8.5 12.4 7.1l83-21.5c24.1-6.3 37.7-31.8 28.5-55.7zM334 436.3c-26.1 12.5-55.2 19.7-86 19.7-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200c0 22.1-3.7 43.3-10.4 63.2 9 6.4 17 14.2 22.6 23.9 6.4.1 12.6 1.4 18.6 2.9 10.9-27.9 17.1-58.2 17.1-90C496 119 385 8 248 8S0 119 0 256s111 248 248 248c35.4 0 68.9-7.5 99.4-20.9-2.5-7.3 4.3 17.2-13.4-46.8z"] +}; +var faLaugh = { + prefix: 'far', + iconName: 'laugh', + icon: [496, 512, [], "f599", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM328 224c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm-160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm194.4 64H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z"] +}; +var faLaughBeam = { + prefix: 'far', + iconName: 'laugh-beam', + icon: [496, 512, [], "f59a", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM328 152c-23.8 0-52.7 29.3-56 71.4-.7 8.6 10.8 11.9 14.9 4.5l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c4.1 7.4 15.6 4 14.9-4.5-3.1-42.1-32-71.4-55.8-71.4zm-201 75.9l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c4.1 7.4 15.6 4 14.9-4.5-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.6 8.5 10.9 11.9 15.1 4.5zM362.4 288H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z"] +}; +var faLaughSquint = { + prefix: 'far', + iconName: 'laugh-squint', + icon: [496, 512, [], "f59b", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM343.6 196l33.6-40.3c8.6-10.3-3.8-24.8-15.4-18l-80 48c-7.8 4.7-7.8 15.9 0 20.6l80 48c11.5 6.8 24-7.6 15.4-18L343.6 196zm-209.4 58.3l80-48c7.8-4.7 7.8-15.9 0-20.6l-80-48c-11.6-6.9-24 7.7-15.4 18l33.6 40.3-33.6 40.3c-8.7 10.4 3.8 24.8 15.4 18zM362.4 288H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z"] +}; +var faLaughWink = { + prefix: 'far', + iconName: 'laugh-wink', + icon: [496, 512, [], "f59c", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6C68.8 359.6 48 309.4 48 256s20.8-103.6 58.6-141.4C144.4 76.8 194.6 56 248 56s103.6 20.8 141.4 58.6c37.8 37.8 58.6 88 58.6 141.4s-20.8 103.6-58.6 141.4zM328 164c-25.7 0-55.9 16.9-59.9 42.1-1.7 11.2 11.5 18.2 19.8 10.8l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c8.5 7.4 21.6.3 19.8-10.8-3.8-25.2-34-42.1-59.7-42.1zm-160 60c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm194.4 64H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z"] +}; +var faLemon = { + prefix: 'far', + iconName: 'lemon', + icon: [512, 512, [], "f094", "M484.112 27.889C455.989-.233 416.108-8.057 387.059 8.865 347.604 31.848 223.504-41.111 91.196 91.197-41.277 223.672 31.923 347.472 8.866 387.058c-16.922 29.051-9.1 68.932 19.022 97.054 28.135 28.135 68.011 35.938 97.057 19.021 39.423-22.97 163.557 49.969 295.858-82.329 132.474-132.477 59.273-256.277 82.331-295.861 16.922-29.05 9.1-68.931-19.022-97.054zm-22.405 72.894c-38.8 66.609 45.6 165.635-74.845 286.08-120.44 120.443-219.475 36.048-286.076 74.843-22.679 13.207-64.035-27.241-50.493-50.488 38.8-66.609-45.6-165.635 74.845-286.08C245.573 4.702 344.616 89.086 411.219 50.292c22.73-13.24 64.005 27.288 50.488 50.491zm-169.861 8.736c1.37 10.96-6.404 20.957-17.365 22.327-54.846 6.855-135.779 87.787-142.635 142.635-1.373 10.989-11.399 18.734-22.326 17.365-10.961-1.37-18.735-11.366-17.365-22.326 9.162-73.286 104.167-168.215 177.365-177.365 10.953-1.368 20.956 6.403 22.326 17.364z"] +}; +var faLifeRing = { + prefix: 'far', + iconName: 'life-ring', + icon: [512, 512, [], "f1cd", "M256 504c136.967 0 248-111.033 248-248S392.967 8 256 8 8 119.033 8 256s111.033 248 248 248zm-103.398-76.72l53.411-53.411c31.806 13.506 68.128 13.522 99.974 0l53.411 53.411c-63.217 38.319-143.579 38.319-206.796 0zM336 256c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zm91.28 103.398l-53.411-53.411c13.505-31.806 13.522-68.128 0-99.974l53.411-53.411c38.319 63.217 38.319 143.579 0 206.796zM359.397 84.72l-53.411 53.411c-31.806-13.505-68.128-13.522-99.973 0L152.602 84.72c63.217-38.319 143.579-38.319 206.795 0zM84.72 152.602l53.411 53.411c-13.506 31.806-13.522 68.128 0 99.974L84.72 359.398c-38.319-63.217-38.319-143.579 0-206.796z"] +}; +var faLightbulb = { + prefix: 'far', + iconName: 'lightbulb', + icon: [352, 512, [], "f0eb", "M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z"] +}; +var faListAlt = { + prefix: 'far', + iconName: 'list-alt', + icon: [512, 512, [], "f022", "M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zm-42-92v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm-252 12c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36z"] +}; +var faMap = { + prefix: 'far', + iconName: 'map', + icon: [576, 512, [], "f279", "M560.02 32c-1.96 0-3.98.37-5.96 1.16L384.01 96H384L212 35.28A64.252 64.252 0 0 0 191.76 32c-6.69 0-13.37 1.05-19.81 3.14L20.12 87.95A32.006 32.006 0 0 0 0 117.66v346.32C0 473.17 7.53 480 15.99 480c1.96 0 3.97-.37 5.96-1.16L192 416l172 60.71a63.98 63.98 0 0 0 40.05.15l151.83-52.81A31.996 31.996 0 0 0 576 394.34V48.02c0-9.19-7.53-16.02-15.98-16.02zM224 90.42l128 45.19v285.97l-128-45.19V90.42zM48 418.05V129.07l128-44.53v286.2l-.64.23L48 418.05zm480-35.13l-128 44.53V141.26l.64-.24L528 93.95v288.97z"] +}; +var faMeh = { + prefix: 'far', + iconName: 'meh', + icon: [496, 512, [], "f11a", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm8 144H160c-13.2 0-24 10.8-24 24s10.8 24 24 24h176c13.2 0 24-10.8 24-24s-10.8-24-24-24z"] +}; +var faMehBlank = { + prefix: 'far', + iconName: 'meh-blank', + icon: [496, 512, [], "f5a4", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-280c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z"] +}; +var faMehRollingEyes = { + prefix: 'far', + iconName: 'meh-rolling-eyes', + icon: [496, 512, [], "f5a5", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm88-304c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 112c-22.1 0-40-17.9-40-40 0-13.6 7.3-25.1 17.7-32.3-1 2.6-1.7 5.3-1.7 8.3 0 13.3 10.7 24 24 24s24-10.7 24-24c0-2.9-.7-5.7-1.7-8.3 10.4 7.2 17.7 18.7 17.7 32.3 0 22.1-17.9 40-40 40zm-104-40c0-39.8-32.2-72-72-72s-72 32.2-72 72 32.2 72 72 72 72-32.2 72-72zm-112 0c0-13.6 7.3-25.1 17.7-32.3-1 2.6-1.7 5.3-1.7 8.3 0 13.3 10.7 24 24 24s24-10.7 24-24c0-2.9-.7-5.7-1.7-8.3 10.4 7.2 17.7 18.7 17.7 32.3 0 22.1-17.9 40-40 40s-40-17.9-40-40zm192 128H184c-13.2 0-24 10.8-24 24s10.8 24 24 24h128c13.2 0 24-10.8 24-24s-10.8-24-24-24z"] +}; +var faMinusSquare = { + prefix: 'far', + iconName: 'minus-square', + icon: [448, 512, [], "f146", "M108 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4 12-12 12H108zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faMoneyBillAlt = { + prefix: 'far', + iconName: 'money-bill-alt', + icon: [640, 512, [], "f3d1", "M320 144c-53.02 0-96 50.14-96 112 0 61.85 42.98 112 96 112 53 0 96-50.13 96-112 0-61.86-42.98-112-96-112zm40 168c0 4.42-3.58 8-8 8h-64c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h16v-55.44l-.47.31a7.992 7.992 0 0 1-11.09-2.22l-8.88-13.31a7.992 7.992 0 0 1 2.22-11.09l15.33-10.22a23.99 23.99 0 0 1 13.31-4.03H328c4.42 0 8 3.58 8 8v88h16c4.42 0 8 3.58 8 8v16zM608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zm-16 272c-35.35 0-64 28.65-64 64H112c0-35.35-28.65-64-64-64V176c35.35 0 64-28.65 64-64h416c0 35.35 28.65 64 64 64v160z"] +}; +var faMoon = { + prefix: 'far', + iconName: 'moon', + icon: [512, 512, [], "f186", "M279.135 512c78.756 0 150.982-35.804 198.844-94.775 28.27-34.831-2.558-85.722-46.249-77.401-82.348 15.683-158.272-47.268-158.272-130.792 0-48.424 26.06-92.292 67.434-115.836 38.745-22.05 28.999-80.788-15.022-88.919A257.936 257.936 0 0 0 279.135 0c-141.36 0-256 114.575-256 256 0 141.36 114.576 256 256 256zm0-464c12.985 0 25.689 1.201 38.016 3.478-54.76 31.163-91.693 90.042-91.693 157.554 0 113.848 103.641 199.2 215.252 177.944C402.574 433.964 344.366 464 279.135 464c-114.875 0-208-93.125-208-208s93.125-208 208-208z"] +}; +var faNewspaper = { + prefix: 'far', + iconName: 'newspaper', + icon: [576, 512, [], "f1ea", "M552 64H112c-20.858 0-38.643 13.377-45.248 32H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h496c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24zM48 392V144h16v248c0 4.411-3.589 8-8 8s-8-3.589-8-8zm480 8H111.422c.374-2.614.578-5.283.578-8V112h416v288zM172 280h136c6.627 0 12-5.373 12-12v-96c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v96c0 6.627 5.373 12 12 12zm28-80h80v40h-80v-40zm-40 140v-24c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H172c-6.627 0-12-5.373-12-12zm192 0v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0-144v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0 72v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12z"] +}; +var faObjectGroup = { + prefix: 'far', + iconName: 'object-group', + icon: [512, 512, [], "f247", "M500 128c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v256H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V128h12zm-52-64h32v32h-32V64zM32 64h32v32H32V64zm32 384H32v-32h32v32zm416 0h-32v-32h32v32zm-40-64h-12c-6.627 0-12 5.373-12 12v12H96v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h12v256zm-36-192h-84v-52c0-6.628-5.373-12-12-12H108c-6.627 0-12 5.372-12 12v168c0 6.628 5.373 12 12 12h84v52c0 6.628 5.373 12 12 12h200c6.627 0 12-5.372 12-12V204c0-6.628-5.373-12-12-12zm-268-24h144v112H136V168zm240 176H232v-24h76c6.627 0 12-5.372 12-12v-76h56v112z"] +}; +var faObjectUngroup = { + prefix: 'far', + iconName: 'object-ungroup', + icon: [576, 512, [], "f248", "M564 224c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12h-88v-24h12c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v160H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h88v24h-12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V224h12zM352 64h32v32h-32V64zm0 256h32v32h-32v-32zM64 352H32v-32h32v32zm0-256H32V64h32v32zm32 216v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h12v160h-12c-6.627 0-12 5.373-12 12v12H96zm128 136h-32v-32h32v32zm280-64h-12c-6.627 0-12 5.373-12 12v12H256v-12c0-6.627-5.373-12-12-12h-12v-24h88v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12v-88h88v12c0 6.627 5.373 12 12 12h12v160zm40 64h-32v-32h32v32zm0-256h-32v-32h32v32z"] +}; +var faPaperPlane = { + prefix: 'far', + iconName: 'paper-plane', + icon: [512, 512, [], "f1d8", "M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z"] +}; +var faPauseCircle = { + prefix: 'far', + iconName: 'pause-circle', + icon: [512, 512, [], "f28b", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm96-280v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16zm-112 0v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16z"] +}; +var faPlayCircle = { + prefix: 'far', + iconName: 'play-circle', + icon: [512, 512, [], "f144", "M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8 0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256z"] +}; +var faPlusSquare = { + prefix: 'far', + iconName: 'plus-square', + icon: [448, 512, [], "f0fe", "M352 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"] +}; +var faQuestionCircle = { + prefix: 'far', + iconName: 'question-circle', + icon: [512, 512, [], "f059", "M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z"] +}; +var faRegistered = { + prefix: 'far', + iconName: 'registered', + icon: [512, 512, [], "f25d", "M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm110.442-81.791c-53.046-96.284-50.25-91.468-53.271-96.085 24.267-13.879 39.482-41.563 39.482-73.176 0-52.503-30.247-85.252-101.498-85.252h-78.667c-6.617 0-12 5.383-12 12V380c0 6.617 5.383 12 12 12h38.568c6.617 0 12-5.383 12-12v-83.663h31.958l47.515 89.303a11.98 11.98 0 0 0 10.593 6.36h42.81c9.14 0 14.914-9.799 10.51-17.791zM256.933 239.906h-33.875v-64.14h27.377c32.417 0 38.929 12.133 38.929 31.709-.001 20.913-11.518 32.431-32.431 32.431z"] +}; +var faSadCry = { + prefix: 'far', + iconName: 'sad-cry', + icon: [496, 512, [], "f5b3", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm144 386.4V280c0-13.2-10.8-24-24-24s-24 10.8-24 24v151.4C315.5 447 282.8 456 248 456s-67.5-9-96-24.6V280c0-13.2-10.8-24-24-24s-24 10.8-24 24v114.4c-34.6-36-56-84.7-56-138.4 0-110.3 89.7-200 200-200s200 89.7 200 200c0 53.7-21.4 102.5-56 138.4zM205.8 234.5c4.4-2.4 6.9-7.4 6.1-12.4-4-25.2-34.2-42.1-59.8-42.1s-55.9 16.9-59.8 42.1c-.8 5 1.7 10 6.1 12.4 4.4 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.3 7.9 4.8 13.7 1.6zM344 180c-25.7 0-55.9 16.9-59.8 42.1-.8 5 1.7 10 6.1 12.4 4.5 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.2 8 4.7 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-3.9-25.2-34.1-42.1-59.8-42.1zm-96 92c-30.9 0-56 28.7-56 64s25.1 64 56 64 56-28.7 56-64-25.1-64-56-64z"] +}; +var faSadTear = { + prefix: 'far', + iconName: 'sad-tear', + icon: [496, 512, [], "f5b4", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm8-152c-13.2 0-24 10.8-24 24s10.8 24 24 24c23.8 0 46.3 10.5 61.6 28.8 8.1 9.8 23.2 11.9 33.8 3.1 10.2-8.5 11.6-23.6 3.1-33.8C330 320.8 294.1 304 256 304zm-88-64c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-165.6 98.8C151 290.1 126 325.4 126 342.9c0 22.7 18.8 41.1 42 41.1s42-18.4 42-41.1c0-17.5-25-52.8-36.4-68.1-2.8-3.7-8.4-3.7-11.2 0z"] +}; +var faSave = { + prefix: 'far', + iconName: 'save', + icon: [448, 512, [], "f0c7", "M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z"] +}; +var faShareSquare = { + prefix: 'far', + iconName: 'share-square', + icon: [576, 512, [], "f14d", "M561.938 158.06L417.94 14.092C387.926-15.922 336 5.097 336 48.032v57.198c-42.45 1.88-84.03 6.55-120.76 17.99-35.17 10.95-63.07 27.58-82.91 49.42C108.22 199.2 96 232.6 96 271.94c0 61.697 33.178 112.455 84.87 144.76 37.546 23.508 85.248-12.651 71.02-55.74-15.515-47.119-17.156-70.923 84.11-78.76V336c0 42.993 51.968 63.913 81.94 33.94l143.998-144c18.75-18.74 18.75-49.14 0-67.88zM384 336V232.16C255.309 234.082 166.492 255.35 206.31 376 176.79 357.55 144 324.08 144 271.94c0-109.334 129.14-118.947 240-119.85V48l144 144-144 144zm24.74 84.493a82.658 82.658 0 0 0 20.974-9.303c7.976-4.952 18.286.826 18.286 10.214V464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h132c6.627 0 12 5.373 12 12v4.486c0 4.917-2.987 9.369-7.569 11.152-13.702 5.331-26.396 11.537-38.05 18.585a12.138 12.138 0 0 1-6.28 1.777H54a6 6 0 0 0-6 6v340a6 6 0 0 0 6 6h340a6 6 0 0 0 6-6v-25.966c0-5.37 3.579-10.059 8.74-11.541z"] +}; +var faSmile = { + prefix: 'far', + iconName: 'smile', + icon: [496, 512, [], "f118", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"] +}; +var faSmileBeam = { + prefix: 'far', + iconName: 'smile-beam', + icon: [496, 512, [], "f5b8", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm84-143.4c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.6-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.2-8.4-25.3-7.1-33.8 3.1zM136.5 211c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.4 1.1 7.4-.5 9.3-3.7l9.5-17zM328 152c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4z"] +}; +var faSmileWink = { + prefix: 'far', + iconName: 'smile-wink', + icon: [496, 512, [], "f4da", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm117.8-146.4c-10.2-8.5-25.3-7.1-33.8 3.1-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-60c-25.7 0-55.9 16.9-59.9 42.1-1.7 11.2 11.5 18.2 19.8 10.8l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c8.5 7.4 21.6.3 19.8-10.8-3.8-25.2-34-42.1-59.7-42.1z"] +}; +var faSnowflake = { + prefix: 'far', + iconName: 'snowflake', + icon: [448, 512, [], "f2dc", "M440.1 355.2l-39.2-23 34.1-9.3c8.4-2.3 13.4-11.1 11.1-19.6l-4.1-15.5c-2.2-8.5-10.9-13.6-19.3-11.3L343 298.2 271.2 256l71.9-42.2 79.7 21.7c8.4 2.3 17-2.8 19.3-11.3l4.1-15.5c2.2-8.5-2.7-17.3-11.1-19.6l-34.1-9.3 39.2-23c7.5-4.4 10.1-14.2 5.8-21.9l-7.9-13.9c-4.3-7.7-14-10.3-21.5-5.9l-39.2 23 9.1-34.7c2.2-8.5-2.7-17.3-11.1-19.6l-15.2-4.1c-8.4-2.3-17 2.8-19.3 11.3l-21.3 81-71.9 42.2v-84.5L306 70.4c6.1-6.2 6.1-16.4 0-22.6l-11.1-11.3c-6.1-6.2-16.1-6.2-22.2 0l-24.9 25.4V16c0-8.8-7-16-15.7-16h-15.7c-8.7 0-15.7 7.2-15.7 16v46.1l-24.9-25.4c-6.1-6.2-16.1-6.2-22.2 0L142.1 48c-6.1 6.2-6.1 16.4 0 22.6l58.3 59.3v84.5l-71.9-42.2-21.3-81c-2.2-8.5-10.9-13.6-19.3-11.3L72.7 84c-8.4 2.3-13.4 11.1-11.1 19.6l9.1 34.7-39.2-23c-7.5-4.4-17.1-1.8-21.5 5.9l-7.9 13.9c-4.3 7.7-1.8 17.4 5.8 21.9l39.2 23-34.1 9.1c-8.4 2.3-13.4 11.1-11.1 19.6L6 224.2c2.2 8.5 10.9 13.6 19.3 11.3l79.7-21.7 71.9 42.2-71.9 42.2-79.7-21.7c-8.4-2.3-17 2.8-19.3 11.3l-4.1 15.5c-2.2 8.5 2.7 17.3 11.1 19.6l34.1 9.3-39.2 23c-7.5 4.4-10.1 14.2-5.8 21.9L10 391c4.3 7.7 14 10.3 21.5 5.9l39.2-23-9.1 34.7c-2.2 8.5 2.7 17.3 11.1 19.6l15.2 4.1c8.4 2.3 17-2.8 19.3-11.3l21.3-81 71.9-42.2v84.5l-58.3 59.3c-6.1 6.2-6.1 16.4 0 22.6l11.1 11.3c6.1 6.2 16.1 6.2 22.2 0l24.9-25.4V496c0 8.8 7 16 15.7 16h15.7c8.7 0 15.7-7.2 15.7-16v-46.1l24.9 25.4c6.1 6.2 16.1 6.2 22.2 0l11.1-11.3c6.1-6.2 6.1-16.4 0-22.6l-58.3-59.3v-84.5l71.9 42.2 21.3 81c2.2 8.5 10.9 13.6 19.3 11.3L375 428c8.4-2.3 13.4-11.1 11.1-19.6l-9.1-34.7 39.2 23c7.5 4.4 17.1 1.8 21.5-5.9l7.9-13.9c4.6-7.5 2.1-17.3-5.5-21.7z"] +}; +var faSquare = { + prefix: 'far', + iconName: 'square', + icon: [448, 512, [], "f0c8", "M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z"] +}; +var faStar = { + prefix: 'far', + iconName: 'star', + icon: [576, 512, [], "f005", "M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"] +}; +var faStarHalf = { + prefix: 'far', + iconName: 'star-half', + icon: [576, 512, [], "f089", "M288 385.3l-124.3 65.4 23.7-138.4-100.6-98 139-20.2 62.2-126V0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6v-54.3z"] +}; +var faStickyNote = { + prefix: 'far', + iconName: 'sticky-note', + icon: [448, 512, [], "f249", "M448 348.106V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80v351.988c0 26.51 21.49 48 48 48h268.118a48 48 0 0 0 33.941-14.059l83.882-83.882A48 48 0 0 0 448 348.106zm-128 80v-76.118h76.118L320 428.106zM400 80v223.988H296c-13.255 0-24 10.745-24 24v104H48V80h352z"] +}; +var faStopCircle = { + prefix: 'far', + iconName: 'stop-circle', + icon: [512, 512, [], "f28d", "M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm296-80v160c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16z"] +}; +var faSun = { + prefix: 'far', + iconName: 'sun', + icon: [512, 512, [], "f185", "M494.2 221.9l-59.8-40.5 13.7-71c2.6-13.2-1.6-26.8-11.1-36.4-9.6-9.5-23.2-13.7-36.2-11.1l-70.9 13.7-40.4-59.9c-15.1-22.3-51.9-22.3-67 0l-40.4 59.9-70.8-13.7C98 60.4 84.5 64.5 75 74.1c-9.5 9.6-13.7 23.1-11.1 36.3l13.7 71-59.8 40.5C6.6 229.5 0 242 0 255.5s6.7 26 17.8 33.5l59.8 40.5-13.7 71c-2.6 13.2 1.6 26.8 11.1 36.3 9.5 9.5 22.9 13.7 36.3 11.1l70.8-13.7 40.4 59.9C230 505.3 242.6 512 256 512s26-6.7 33.5-17.8l40.4-59.9 70.9 13.7c13.4 2.7 26.8-1.6 36.3-11.1 9.5-9.5 13.6-23.1 11.1-36.3l-13.7-71 59.8-40.5c11.1-7.5 17.8-20.1 17.8-33.5-.1-13.6-6.7-26.1-17.9-33.7zm-112.9 85.6l17.6 91.2-91-17.6L256 458l-51.9-77-90.9 17.6 17.6-91.2-76.8-52 76.8-52-17.6-91.2 91 17.6L256 53l51.9 76.9 91-17.6-17.6 91.1 76.8 52-76.8 52.1zM256 152c-57.3 0-104 46.7-104 104s46.7 104 104 104 104-46.7 104-104-46.7-104-104-104zm0 160c-30.9 0-56-25.1-56-56s25.1-56 56-56 56 25.1 56 56-25.1 56-56 56z"] +}; +var faSurprise = { + prefix: 'far', + iconName: 'surprise', + icon: [496, 512, [], "f5c2", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm0-176c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64zm-48-72c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32zm128-32c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z"] +}; +var faThumbsDown = { + prefix: 'far', + iconName: 'thumbs-down', + icon: [512, 512, [], "f165", "M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z"] +}; +var faThumbsUp = { + prefix: 'far', + iconName: 'thumbs-up', + icon: [512, 512, [], "f164", "M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"] +}; +var faTimesCircle = { + prefix: 'far', + iconName: 'times-circle', + icon: [512, 512, [], "f057", "M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z"] +}; +var faTired = { + prefix: 'far', + iconName: 'tired', + icon: [496, 512, [], "f5c8", "M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm129.1-303.8c-3.8-4.4-10.3-5.4-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48c5.4 3.2 11.8 1.6 15.3-2.5 3.8-4.5 3.9-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11.1-.1-15.5zM220 208c0-4.2-2.2-8.1-5.8-10.3l-80-48c-5-3-11.5-1.9-15.3 2.5-3.8 4.5-3.9 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11 .1 15.5 3.5 4.1 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3zm28 64c-45.4 0-100.9 38.3-107.8 93.3-1.5 11.8 6.9 21.6 15.5 17.9C178.4 373.5 212 368 248 368s69.6 5.5 92.3 15.2c8.5 3.7 17-6 15.5-17.9-6.9-55-62.4-93.3-107.8-93.3z"] +}; +var faTrashAlt = { + prefix: 'far', + iconName: 'trash-alt', + icon: [448, 512, [], "f2ed", "M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"] +}; +var faUser = { + prefix: 'far', + iconName: 'user', + icon: [448, 512, [], "f007", "M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z"] +}; +var faUserCircle = { + prefix: 'far', + iconName: 'user-circle', + icon: [496, 512, [], "f2bd", "M248 104c-53 0-96 43-96 96s43 96 96 96 96-43 96-96-43-96-96-96zm0 144c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-240C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-49.7 0-95.1-18.3-130.1-48.4 14.9-23 40.4-38.6 69.6-39.5 20.8 6.4 40.6 9.6 60.5 9.6s39.7-3.1 60.5-9.6c29.2 1 54.7 16.5 69.6 39.5-35 30.1-80.4 48.4-130.1 48.4zm162.7-84.1c-24.4-31.4-62.1-51.9-105.1-51.9-10.2 0-26 9.6-57.6 9.6-31.5 0-47.4-9.6-57.6-9.6-42.9 0-80.6 20.5-105.1 51.9C61.9 339.2 48 299.2 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 43.2-13.9 83.2-37.3 115.9z"] +}; +var faWindowClose = { + prefix: 'far', + iconName: 'window-close', + icon: [512, 512, [], "f410", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v340zM356.5 194.6L295.1 256l61.4 61.4c4.6 4.6 4.6 12.1 0 16.8l-22.3 22.3c-4.6 4.6-12.1 4.6-16.8 0L256 295.1l-61.4 61.4c-4.6 4.6-12.1 4.6-16.8 0l-22.3-22.3c-4.6-4.6-4.6-12.1 0-16.8l61.4-61.4-61.4-61.4c-4.6-4.6-4.6-12.1 0-16.8l22.3-22.3c4.6-4.6 12.1-4.6 16.8 0l61.4 61.4 61.4-61.4c4.6-4.6 12.1-4.6 16.8 0l22.3 22.3c4.7 4.6 4.7 12.1 0 16.8z"] +}; +var faWindowMaximize = { + prefix: 'far', + iconName: 'window-maximize', + icon: [512, 512, [], "f2d0", "M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V192h416v234z"] +}; +var faWindowMinimize = { + prefix: 'far', + iconName: 'window-minimize', + icon: [512, 512, [], "f2d1", "M480 480H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h448c17.7 0 32 14.3 32 32s-14.3 32-32 32z"] +}; +var faWindowRestore = { + prefix: 'far', + iconName: 'window-restore', + icon: [512, 512, [], "f2d2", "M464 0H144c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v320c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-96 464H48V256h320v208zm96-96h-48V144c0-26.5-21.5-48-48-48H144V48h320v320z"] +}; +var _iconsCache = { + faAddressBook: faAddressBook, + faAddressCard: faAddressCard, + faAngry: faAngry, + faArrowAltCircleDown: faArrowAltCircleDown, + faArrowAltCircleLeft: faArrowAltCircleLeft, + faArrowAltCircleRight: faArrowAltCircleRight, + faArrowAltCircleUp: faArrowAltCircleUp, + faBell: faBell, + faBellSlash: faBellSlash, + faBookmark: faBookmark, + faBuilding: faBuilding, + faCalendar: faCalendar, + faCalendarAlt: faCalendarAlt, + faCalendarCheck: faCalendarCheck, + faCalendarMinus: faCalendarMinus, + faCalendarPlus: faCalendarPlus, + faCalendarTimes: faCalendarTimes, + faCaretSquareDown: faCaretSquareDown, + faCaretSquareLeft: faCaretSquareLeft, + faCaretSquareRight: faCaretSquareRight, + faCaretSquareUp: faCaretSquareUp, + faChartBar: faChartBar, + faCheckCircle: faCheckCircle, + faCheckSquare: faCheckSquare, + faCircle: faCircle, + faClipboard: faClipboard, + faClock: faClock, + faClone: faClone, + faClosedCaptioning: faClosedCaptioning, + faComment: faComment, + faCommentAlt: faCommentAlt, + faCommentDots: faCommentDots, + faComments: faComments, + faCompass: faCompass, + faCopy: faCopy, + faCopyright: faCopyright, + faCreditCard: faCreditCard, + faDizzy: faDizzy, + faDotCircle: faDotCircle, + faEdit: faEdit, + faEnvelope: faEnvelope, + faEnvelopeOpen: faEnvelopeOpen, + faEye: faEye, + faEyeSlash: faEyeSlash, + faFile: faFile, + faFileAlt: faFileAlt, + faFileArchive: faFileArchive, + faFileAudio: faFileAudio, + faFileCode: faFileCode, + faFileExcel: faFileExcel, + faFileImage: faFileImage, + faFilePdf: faFilePdf, + faFilePowerpoint: faFilePowerpoint, + faFileVideo: faFileVideo, + faFileWord: faFileWord, + faFlag: faFlag, + faFlushed: faFlushed, + faFolder: faFolder, + faFolderOpen: faFolderOpen, + faFontAwesomeLogoFull: faFontAwesomeLogoFull, + faFrown: faFrown, + faFrownOpen: faFrownOpen, + faFutbol: faFutbol, + faGem: faGem, + faGrimace: faGrimace, + faGrin: faGrin, + faGrinAlt: faGrinAlt, + faGrinBeam: faGrinBeam, + faGrinBeamSweat: faGrinBeamSweat, + faGrinHearts: faGrinHearts, + faGrinSquint: faGrinSquint, + faGrinSquintTears: faGrinSquintTears, + faGrinStars: faGrinStars, + faGrinTears: faGrinTears, + faGrinTongue: faGrinTongue, + faGrinTongueSquint: faGrinTongueSquint, + faGrinTongueWink: faGrinTongueWink, + faGrinWink: faGrinWink, + faHandLizard: faHandLizard, + faHandPaper: faHandPaper, + faHandPeace: faHandPeace, + faHandPointDown: faHandPointDown, + faHandPointLeft: faHandPointLeft, + faHandPointRight: faHandPointRight, + faHandPointUp: faHandPointUp, + faHandPointer: faHandPointer, + faHandRock: faHandRock, + faHandScissors: faHandScissors, + faHandSpock: faHandSpock, + faHandshake: faHandshake, + faHdd: faHdd, + faHeart: faHeart, + faHospital: faHospital, + faHourglass: faHourglass, + faIdBadge: faIdBadge, + faIdCard: faIdCard, + faImage: faImage, + faImages: faImages, + faKeyboard: faKeyboard, + faKiss: faKiss, + faKissBeam: faKissBeam, + faKissWinkHeart: faKissWinkHeart, + faLaugh: faLaugh, + faLaughBeam: faLaughBeam, + faLaughSquint: faLaughSquint, + faLaughWink: faLaughWink, + faLemon: faLemon, + faLifeRing: faLifeRing, + faLightbulb: faLightbulb, + faListAlt: faListAlt, + faMap: faMap, + faMeh: faMeh, + faMehBlank: faMehBlank, + faMehRollingEyes: faMehRollingEyes, + faMinusSquare: faMinusSquare, + faMoneyBillAlt: faMoneyBillAlt, + faMoon: faMoon, + faNewspaper: faNewspaper, + faObjectGroup: faObjectGroup, + faObjectUngroup: faObjectUngroup, + faPaperPlane: faPaperPlane, + faPauseCircle: faPauseCircle, + faPlayCircle: faPlayCircle, + faPlusSquare: faPlusSquare, + faQuestionCircle: faQuestionCircle, + faRegistered: faRegistered, + faSadCry: faSadCry, + faSadTear: faSadTear, + faSave: faSave, + faShareSquare: faShareSquare, + faSmile: faSmile, + faSmileBeam: faSmileBeam, + faSmileWink: faSmileWink, + faSnowflake: faSnowflake, + faSquare: faSquare, + faStar: faStar, + faStarHalf: faStarHalf, + faStickyNote: faStickyNote, + faStopCircle: faStopCircle, + faSun: faSun, + faSurprise: faSurprise, + faThumbsDown: faThumbsDown, + faThumbsUp: faThumbsUp, + faTimesCircle: faTimesCircle, + faTired: faTired, + faTrashAlt: faTrashAlt, + faUser: faUser, + faUserCircle: faUserCircle, + faWindowClose: faWindowClose, + faWindowMaximize: faWindowMaximize, + faWindowMinimize: faWindowMinimize, + faWindowRestore: faWindowRestore +}; + + + + +/***/ }), +/* 443 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + + +/***/ }), +/* 444 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +var origSymbol = global.Symbol; +var hasSymbolSham = __webpack_require__(1116); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), +/* 445 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var ArraySpeciesCreate = __webpack_require__(1117); +var FlattenIntoArray = __webpack_require__(1122); +var Get = __webpack_require__(298); +var ToInteger = __webpack_require__(454); +var ToLength = __webpack_require__(453); +var ToObject = __webpack_require__(1147); + +module.exports = function flat() { + var O = ToObject(this); + var sourceLen = ToLength(Get(O, 'length')); + + var depthNum = 1; + if (arguments.length > 0 && typeof arguments[0] !== 'undefined') { + depthNum = ToInteger(arguments[0]); + } + + var A = ArraySpeciesCreate(O, 0); + FlattenIntoArray(A, O, sourceLen, 0, depthNum); + return A; +}; + + +/***/ }), +/* 446 */ +/***/ (function(module, exports, __webpack_require__) { + +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var match = String.prototype.match; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; + +var inspectCustom = __webpack_require__(1118).custom; +var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + return String(obj); + } + if (typeof obj === 'bigint') { // eslint-disable-line valid-typeof + return String(obj) + 'n'; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return '[Object]'; + } + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from) { + if (from) { + seen = seen.slice(); + seen.push(from); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function') { + var name = nameOf(obj); + return '[Function' + (name ? ': ' + name : '') + ']'; + } + if (isSymbol(obj)) { + var symString = Symbol.prototype.toString.call(obj); + return typeof obj === 'object' ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + String(obj.nodeName).toLowerCase(); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + return '[ ' + arrObjKeys(obj, inspect).join(', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }'; + } + if (typeof obj === 'object') { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { + return obj[inspectSymbol](); + } else if (typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj) + ' => ' + inspect(value, obj)); + }); + return collectionOf('Map', mapSize.call(obj), mapParts); + } + if (isSet(obj)) { + var setParts = []; + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + return collectionOf('Set', setSize.call(obj), setParts); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + if (!isDate(obj) && !isRegExp(obj)) { + var xs = arrObjKeys(obj, inspect); + if (xs.length === 0) { return '{}'; } + return '{ ' + xs.join(', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return String(s).replace(/"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]'; } +function isDate(obj) { return toStr(obj) === '[object Date]'; } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]'; } +function isError(obj) { return toStr(obj) === '[object Error]'; } +function isSymbol(obj) { return toStr(obj) === '[object Symbol]'; } +function isString(obj) { return toStr(obj) === '[object String]'; } +function isNumber(obj) { return toStr(obj) === '[object Number]'; } +function isBigInt(obj) { return toStr(obj) === '[object BigInt]'; } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]'; } + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = match.call(f, /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + // eslint-disable-next-line no-control-regex + var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', 9: 't', 10: 'n', 12: 'f', 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries) { + return type + ' (' + size + ') {' + entries.join(', ') + '}'; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if ((/[^\w$]/).test(key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + return xs; +} + + +/***/ }), +/* 447 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var $isNaN = Number.isNaN || function (a) { return a !== a; }; + +module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; + + +/***/ }), +/* 448 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(33); + +var $Math = GetIntrinsic('%Math%'); +var $Number = GetIntrinsic('%Number%'); + +module.exports = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1; + + +/***/ }), +/* 449 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + +module.exports = function isCallable(value) { + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (typeof value === 'function' && !value.prototype) { return true; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + return strClass === fnClass || strClass === genClass; +}; + + +/***/ }), +/* 450 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(33); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $SyntaxError = GetIntrinsic('%SyntaxError%'); + +var has = __webpack_require__(133); + +var predicates = { + // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type + 'Property Descriptor': function isPropertyDescriptor(Type, Desc) { + if (Type(Desc) !== 'Object') { + return false; + } + var allowed = { + '[[Configurable]]': true, + '[[Enumerable]]': true, + '[[Get]]': true, + '[[Set]]': true, + '[[Value]]': true, + '[[Writable]]': true + }; + + for (var key in Desc) { // eslint-disable-line + if (has(Desc, key) && !allowed[key]) { + return false; + } + } + + var isData = has(Desc, '[[Value]]'); + var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); + if (isData && IsAccessor) { + throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); + } + return true; + } +}; + +module.exports = function assertRecord(Type, recordType, argumentName, value) { + var predicate = predicates[recordType]; + if (typeof predicate !== 'function') { + throw new $SyntaxError('unknown record type: ' + recordType); + } + if (!predicate(Type, value)) { + throw new $TypeError(argumentName + ' must be a ' + recordType); + } +}; + + +/***/ }), +/* 451 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// http://www.ecma-international.org/ecma-262/5.1/#sec-9.2 + +module.exports = function ToBoolean(value) { return !!value; }; + + +/***/ }), +/* 452 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function isPrimitive(value) { + return value === null || (typeof value !== 'function' && typeof value !== 'object'); +}; + + +/***/ }), +/* 453 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var MAX_SAFE_INTEGER = __webpack_require__(448); + +var ToInteger = __webpack_require__(454); + +module.exports = function ToLength(argument) { + var len = ToInteger(argument); + if (len <= 0) { return 0; } // includes converting -0 to +0 + if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } + return len; +}; + + +/***/ }), +/* 454 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var ES5ToInteger = __webpack_require__(1137); + +var ToNumber = __webpack_require__(1140); + +// https://www.ecma-international.org/ecma-262/6.0/#sec-tointeger + +module.exports = function ToInteger(value) { + var number = ToNumber(value); + return ES5ToInteger(number); +}; + + +/***/ }), +/* 455 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; +var hasSymbols = __webpack_require__(444)(); + +if (hasSymbols) { + var symToStr = Symbol.prototype.toString; + var symStringRegex = /^Symbol\(.*\)$/; + var isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== 'symbol') { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + + module.exports = function isSymbol(value) { + if (typeof value === 'symbol') { + return true; + } + if (toStr.call(value) !== '[object Symbol]') { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; +} else { + + module.exports = function isSymbol(value) { + // this environment does not support Symbols. + return false && false; + }; +} + + +/***/ }), +/* 456 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = __webpack_require__(1148); + + +/***/ }), +/* 457 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(445); + +module.exports = function getPolyfill() { + return Array.prototype.flat || implementation; +}; + + +/***/ }), +/* 458 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports._getInterface = _getInterface; +exports._getTheme = get; +exports["default"] = void 0; +var styleInterface; +var styleTheme; +var START_MARK = 'react-with-styles.resolve.start'; +var END_MARK = 'react-with-styles.resolve.end'; +var MEASURE_MARK = "\uD83D\uDC69\u200D\uD83C\uDFA8 [resolve]"; + +function registerTheme(theme) { + styleTheme = theme; +} + +function registerInterface(interfaceToRegister) { + styleInterface = interfaceToRegister; +} + +function create(makeFromTheme, createWithDirection) { + var styles = createWithDirection(makeFromTheme(styleTheme)); + return function () { + return styles; + }; +} + +function createLTR(makeFromTheme) { + return create(makeFromTheme, styleInterface.createLTR || styleInterface.create); +} + +function createRTL(makeFromTheme) { + return create(makeFromTheme, styleInterface.createRTL || styleInterface.create); +} + +function get() { + return styleTheme; +} + +function resolve() { + if (false) {} + + for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) { + styles[_key] = arguments[_key]; + } + + var result = styleInterface.resolve(styles); + + if (false) {} + + return result; +} + +function resolveLTR() { + for (var _len2 = arguments.length, styles = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + styles[_key2] = arguments[_key2]; + } + + if (styleInterface.resolveLTR) { + return styleInterface.resolveLTR(styles); + } + + return resolve(styles); +} + +function resolveRTL() { + for (var _len3 = arguments.length, styles = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + styles[_key3] = arguments[_key3]; + } + + if (styleInterface.resolveRTL) { + return styleInterface.resolveRTL(styles); + } + + return resolve(styles); +} + +function flush() { + if (styleInterface.flush) { + styleInterface.flush(); + } +} // Exported until we deprecate this API completely +// eslint-disable-next-line no-underscore-dangle + + +function _getInterface() { + return styleInterface; +} // Exported until we deprecate this API completely + + +var _default = { + registerTheme: registerTheme, + registerInterface: registerInterface, + create: createLTR, + createLTR: createLTR, + createRTL: createRTL, + get: get, + resolve: resolveLTR, + resolveLTR: resolveLTR, + resolveRTL: resolveRTL, + flush: flush +}; +exports["default"] = _default; + +/***/ }), +/* 459 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = exports.PureCalendarDay = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _reactWithStyles = __webpack_require__(78); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _raf = _interopRequireDefault(__webpack_require__(1171)); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _getCalendarDaySettings = _interopRequireDefault(__webpack_require__(1173)); + +var _ModifiersShape = _interopRequireDefault(__webpack_require__(225)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + day: (0, _moment["default"])(), + daySize: _constants.DAY_SIZE, + isOutsideDay: false, + modifiers: new Set(), + isFocused: false, + tabIndex: -1, + onDayClick: function onDayClick() {}, + onDayMouseEnter: function onDayMouseEnter() {}, + onDayMouseLeave: function onDayMouseLeave() {}, + renderDayContents: null, + ariaLabelFormat: 'dddd, LL', + // internationalization + phrases: _defaultPhrases.CalendarDayPhrases +}; + +var CalendarDay = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(CalendarDay, _ref); + var _proto = CalendarDay.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function CalendarDay() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _ref.call.apply(_ref, [this].concat(args)) || this; + _this.setButtonRef = _this.setButtonRef.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var _this2 = this; + + var _this$props = this.props, + isFocused = _this$props.isFocused, + tabIndex = _this$props.tabIndex; + + if (tabIndex === 0) { + if (isFocused || tabIndex !== prevProps.tabIndex) { + (0, _raf["default"])(function () { + if (_this2.buttonRef) { + _this2.buttonRef.focus(); + } + }); + } + } + }; + + _proto.onDayClick = function onDayClick(day, e) { + var onDayClick = this.props.onDayClick; + onDayClick(day, e); + }; + + _proto.onDayMouseEnter = function onDayMouseEnter(day, e) { + var onDayMouseEnter = this.props.onDayMouseEnter; + onDayMouseEnter(day, e); + }; + + _proto.onDayMouseLeave = function onDayMouseLeave(day, e) { + var onDayMouseLeave = this.props.onDayMouseLeave; + onDayMouseLeave(day, e); + }; + + _proto.onKeyDown = function onKeyDown(day, e) { + var onDayClick = this.props.onDayClick; + var key = e.key; + + if (key === 'Enter' || key === ' ') { + onDayClick(day, e); + } + }; + + _proto.setButtonRef = function setButtonRef(ref) { + this.buttonRef = ref; + }; + + _proto.render = function render() { + var _this3 = this; + + var _this$props2 = this.props, + day = _this$props2.day, + ariaLabelFormat = _this$props2.ariaLabelFormat, + daySize = _this$props2.daySize, + isOutsideDay = _this$props2.isOutsideDay, + modifiers = _this$props2.modifiers, + renderDayContents = _this$props2.renderDayContents, + tabIndex = _this$props2.tabIndex, + styles = _this$props2.styles, + phrases = _this$props2.phrases; + if (!day) return _react["default"].createElement("td", null); + + var _getCalendarDaySettin = (0, _getCalendarDaySettings["default"])(day, ariaLabelFormat, daySize, modifiers, phrases), + daySizeStyles = _getCalendarDaySettin.daySizeStyles, + useDefaultCursor = _getCalendarDaySettin.useDefaultCursor, + selected = _getCalendarDaySettin.selected, + hoveredSpan = _getCalendarDaySettin.hoveredSpan, + isOutsideRange = _getCalendarDaySettin.isOutsideRange, + ariaLabel = _getCalendarDaySettin.ariaLabel; + + return _react["default"].createElement("td", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.CalendarDay, useDefaultCursor && styles.CalendarDay__defaultCursor, styles.CalendarDay__default, isOutsideDay && styles.CalendarDay__outside, modifiers.has('today') && styles.CalendarDay__today, modifiers.has('first-day-of-week') && styles.CalendarDay__firstDayOfWeek, modifiers.has('last-day-of-week') && styles.CalendarDay__lastDayOfWeek, modifiers.has('hovered-offset') && styles.CalendarDay__hovered_offset, modifiers.has('hovered-start-first-possible-end') && styles.CalendarDay__hovered_start_first_possible_end, modifiers.has('hovered-start-blocked-minimum-nights') && styles.CalendarDay__hovered_start_blocked_min_nights, modifiers.has('highlighted-calendar') && styles.CalendarDay__highlighted_calendar, modifiers.has('blocked-minimum-nights') && styles.CalendarDay__blocked_minimum_nights, modifiers.has('blocked-calendar') && styles.CalendarDay__blocked_calendar, hoveredSpan && styles.CalendarDay__hovered_span, modifiers.has('after-hovered-start') && styles.CalendarDay__after_hovered_start, modifiers.has('selected-span') && styles.CalendarDay__selected_span, modifiers.has('selected-start') && styles.CalendarDay__selected_start, modifiers.has('selected-end') && styles.CalendarDay__selected_end, selected && !modifiers.has('selected-span') && styles.CalendarDay__selected, modifiers.has('before-hovered-end') && styles.CalendarDay__before_hovered_end, modifiers.has('no-selected-start-before-selected-end') && styles.CalendarDay__no_selected_start_before_selected_end, modifiers.has('selected-start-in-hovered-span') && styles.CalendarDay__selected_start_in_hovered_span, modifiers.has('selected-end-in-hovered-span') && styles.CalendarDay__selected_end_in_hovered_span, modifiers.has('selected-start-no-selected-end') && styles.CalendarDay__selected_start_no_selected_end, modifiers.has('selected-end-no-selected-start') && styles.CalendarDay__selected_end_no_selected_start, isOutsideRange && styles.CalendarDay__blocked_out_of_range, daySizeStyles), { + role: "button" // eslint-disable-line jsx-a11y/no-noninteractive-element-to-interactive-role + , + ref: this.setButtonRef, + "aria-disabled": modifiers.has('blocked'), + "aria-label": ariaLabel, + onMouseEnter: function onMouseEnter(e) { + _this3.onDayMouseEnter(day, e); + }, + onMouseLeave: function onMouseLeave(e) { + _this3.onDayMouseLeave(day, e); + }, + onMouseUp: function onMouseUp(e) { + e.currentTarget.blur(); + }, + onClick: function onClick(e) { + _this3.onDayClick(day, e); + }, + onKeyDown: function onKeyDown(e) { + _this3.onKeyDown(day, e); + }, + tabIndex: tabIndex + }), renderDayContents ? renderDayContents(day, modifiers) : day.format('D')); + }; + + return CalendarDay; +}(_react["default"].PureComponent || _react["default"].Component); + +exports.PureCalendarDay = CalendarDay; +CalendarDay.propTypes = false ? undefined : {}; +CalendarDay.defaultProps = defaultProps; + +var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { + var _ref2$reactDates = _ref2.reactDates, + color = _ref2$reactDates.color, + font = _ref2$reactDates.font; + return { + CalendarDay: { + boxSizing: 'border-box', + cursor: 'pointer', + fontSize: font.size, + textAlign: 'center', + ':active': { + outline: 0 + } + }, + CalendarDay__defaultCursor: { + cursor: 'default' + }, + CalendarDay__default: { + border: "1px solid ".concat(color.core.borderLight), + color: color.text, + background: color.background, + ':hover': { + background: color.core.borderLight, + border: "1px solid ".concat(color.core.borderLight), + color: 'inherit' + } + }, + CalendarDay__hovered_offset: { + background: color.core.borderBright, + border: "1px double ".concat(color.core.borderLight), + color: 'inherit' + }, + CalendarDay__outside: { + border: 0, + background: color.outside.backgroundColor, + color: color.outside.color, + ':hover': { + border: 0 + } + }, + CalendarDay__blocked_minimum_nights: { + background: color.minimumNights.backgroundColor, + border: "1px solid ".concat(color.minimumNights.borderColor), + color: color.minimumNights.color, + ':hover': { + background: color.minimumNights.backgroundColor_hover, + color: color.minimumNights.color_active + }, + ':active': { + background: color.minimumNights.backgroundColor_active, + color: color.minimumNights.color_active + } + }, + CalendarDay__highlighted_calendar: { + background: color.highlighted.backgroundColor, + color: color.highlighted.color, + ':hover': { + background: color.highlighted.backgroundColor_hover, + color: color.highlighted.color_active + }, + ':active': { + background: color.highlighted.backgroundColor_active, + color: color.highlighted.color_active + } + }, + CalendarDay__selected_span: { + background: color.selectedSpan.backgroundColor, + border: "1px double ".concat(color.selectedSpan.borderColor), + color: color.selectedSpan.color, + ':hover': { + background: color.selectedSpan.backgroundColor_hover, + border: "1px double ".concat(color.selectedSpan.borderColor), + color: color.selectedSpan.color_active + }, + ':active': { + background: color.selectedSpan.backgroundColor_active, + border: "1px double ".concat(color.selectedSpan.borderColor), + color: color.selectedSpan.color_active + } + }, + CalendarDay__selected: { + background: color.selected.backgroundColor, + border: "1px double ".concat(color.selected.borderColor), + color: color.selected.color, + ':hover': { + background: color.selected.backgroundColor_hover, + border: "1px double ".concat(color.selected.borderColor), + color: color.selected.color_active + }, + ':active': { + background: color.selected.backgroundColor_active, + border: "1px double ".concat(color.selected.borderColor), + color: color.selected.color_active + } + }, + CalendarDay__hovered_span: { + background: color.hoveredSpan.backgroundColor, + border: "1px double ".concat(color.hoveredSpan.borderColor), + color: color.hoveredSpan.color, + ':hover': { + background: color.hoveredSpan.backgroundColor_hover, + border: "1px double ".concat(color.hoveredSpan.borderColor), + color: color.hoveredSpan.color_active + }, + ':active': { + background: color.hoveredSpan.backgroundColor_active, + border: "1px double ".concat(color.hoveredSpan.borderColor), + color: color.hoveredSpan.color_active + } + }, + CalendarDay__blocked_calendar: { + background: color.blocked_calendar.backgroundColor, + border: "1px solid ".concat(color.blocked_calendar.borderColor), + color: color.blocked_calendar.color, + ':hover': { + background: color.blocked_calendar.backgroundColor_hover, + border: "1px solid ".concat(color.blocked_calendar.borderColor), + color: color.blocked_calendar.color_active + }, + ':active': { + background: color.blocked_calendar.backgroundColor_active, + border: "1px solid ".concat(color.blocked_calendar.borderColor), + color: color.blocked_calendar.color_active + } + }, + CalendarDay__blocked_out_of_range: { + background: color.blocked_out_of_range.backgroundColor, + border: "1px solid ".concat(color.blocked_out_of_range.borderColor), + color: color.blocked_out_of_range.color, + ':hover': { + background: color.blocked_out_of_range.backgroundColor_hover, + border: "1px solid ".concat(color.blocked_out_of_range.borderColor), + color: color.blocked_out_of_range.color_active + }, + ':active': { + background: color.blocked_out_of_range.backgroundColor_active, + border: "1px solid ".concat(color.blocked_out_of_range.borderColor), + color: color.blocked_out_of_range.color_active + } + }, + CalendarDay__hovered_start_first_possible_end: { + background: color.core.borderLighter, + border: "1px double ".concat(color.core.borderLighter) + }, + CalendarDay__hovered_start_blocked_min_nights: { + background: color.core.borderLighter, + border: "1px double ".concat(color.core.borderLight) + }, + CalendarDay__selected_start: {}, + CalendarDay__selected_end: {}, + CalendarDay__today: {}, + CalendarDay__firstDayOfWeek: {}, + CalendarDay__lastDayOfWeek: {}, + CalendarDay__after_hovered_start: {}, + CalendarDay__before_hovered_end: {}, + CalendarDay__no_selected_start_before_selected_end: {}, + CalendarDay__selected_start_in_hovered_span: {}, + CalendarDay__selected_end_in_hovered_span: {}, + CalendarDay__selected_start_no_selected_end: {}, + CalendarDay__selected_end_no_selected_start: {} + }; +}, { + pureComponent: typeof _react["default"].PureComponent !== 'undefined' +})(CalendarDay); + +exports["default"] = _default; + +/***/ }), +/* 460 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = getComponentName; + +var _functionPrototype = _interopRequireDefault(__webpack_require__(1160)); + +var _reactIs = __webpack_require__(178); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function getComponentName(Component) { + if (typeof Component === 'string') { + return Component; + } + + if (typeof Component === 'function') { + return Component.displayName || (0, _functionPrototype["default"])(Component); + } + + if ((0, _reactIs.isForwardRef)({ + type: Component, + $$typeof: _reactIs.Element + })) { + return Component.displayName; + } + + if ((0, _reactIs.isMemo)(Component)) { + return getComponentName(Component.type); + } + + return null; +} +//# sourceMappingURL=getComponentName.js.map + +/***/ }), +/* 461 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var IsCallable = __webpack_require__(301); +var functionsHaveNames = __webpack_require__(462)(); +var callBound = __webpack_require__(160); +var $functionToString = callBound('Function.prototype.toString'); +var $stringMatch = callBound('String.prototype.match'); + +var classRegex = /^class /; + +var isClass = function isClassConstructor(fn) { + if (IsCallable(fn)) { + return false; + } + if (typeof fn !== 'function') { + return false; + } + try { + var match = $stringMatch($functionToString(fn), classRegex); + return !!match; + } catch (e) {} + return false; +}; + +var regex = /\s*function\s+([^(\s]*)\s*/; + +var functionProto = Function.prototype; + +module.exports = function getName() { + if (!isClass(this) && !IsCallable(this)) { + throw new TypeError('Function.prototype.name sham getter called on non-function'); + } + if (functionsHaveNames) { + return this.name; + } + if (this === functionProto) { + return ''; + } + var str = $functionToString(this); + var match = $stringMatch(str, regex); + var name = match && match[1]; + return name; +}; + + +/***/ }), +/* 462 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var functionsHaveNames = function functionsHaveNames() { + return typeof function f() {}.name === 'string'; +}; + +var gOPD = Object.getOwnPropertyDescriptor; +if (gOPD) { + try { + gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + gOPD = null; + } +} + +functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + return functionsHaveNames() && gOPD && !!gOPD(function () {}, 'name').configurable; +}; + +var $bind = Function.prototype.bind; + +functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== ''; +}; + +module.exports = functionsHaveNames; + + +/***/ }), +/* 463 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(461); + +module.exports = function getPolyfill() { + return implementation; +}; + + +/***/ }), +/* 464 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +var CHANNEL = exports.CHANNEL = '__direction__'; + +var DIRECTIONS = exports.DIRECTIONS = { + LTR: 'ltr', + RTL: 'rtl' +}; + +/***/ }), +/* 465 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var has = __webpack_require__(133); +var RequireObjectCoercible = __webpack_require__(456); +var callBound = __webpack_require__(160); + +var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); + +module.exports = function values(O) { + var obj = RequireObjectCoercible(O); + var vals = []; + for (var key in obj) { + if (has(obj, key) && $isEnumerable(obj, key)) { + vals.push(obj[key]); + } + } + return vals; +}; + + +/***/ }), +/* 466 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(465); + +module.exports = function getPolyfill() { + return typeof Object.values === 'function' ? Object.values : implementation; +}; + + +/***/ }), +/* 467 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _reactWithStyles = __webpack_require__(78); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _CalendarWeek = _interopRequireDefault(__webpack_require__(1178)); + +var _CalendarDay = _interopRequireDefault(__webpack_require__(459)); + +var _calculateDimension = _interopRequireDefault(__webpack_require__(468)); + +var _getCalendarMonthWeeks = _interopRequireDefault(__webpack_require__(1179)); + +var _isSameDay = _interopRequireDefault(__webpack_require__(134)); + +var _toISODateString = _interopRequireDefault(__webpack_require__(182)); + +var _ModifiersShape = _interopRequireDefault(__webpack_require__(225)); + +var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(162)); + +var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + month: (0, _moment["default"])(), + horizontalMonthPadding: 13, + isVisible: true, + enableOutsideDays: false, + modifiers: {}, + orientation: _constants.HORIZONTAL_ORIENTATION, + daySize: _constants.DAY_SIZE, + onDayClick: function onDayClick() {}, + onDayMouseEnter: function onDayMouseEnter() {}, + onDayMouseLeave: function onDayMouseLeave() {}, + onMonthSelect: function onMonthSelect() {}, + onYearSelect: function onYearSelect() {}, + renderMonthText: null, + renderCalendarDay: function renderCalendarDay(props) { + return _react["default"].createElement(_CalendarDay["default"], props); + }, + renderDayContents: null, + renderMonthElement: null, + firstDayOfWeek: null, + setMonthTitleHeight: null, + focusedDate: null, + isFocused: false, + // i18n + monthFormat: 'MMMM YYYY', + // english locale + phrases: _defaultPhrases.CalendarDayPhrases, + dayAriaLabelFormat: undefined, + verticalBorderSpacing: undefined +}; + +var CalendarMonth = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(CalendarMonth, _ref); + var _proto = CalendarMonth.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function CalendarMonth(props) { + var _this; + + _this = _ref.call(this, props) || this; + _this.state = { + weeks: (0, _getCalendarMonthWeeks["default"])(props.month, props.enableOutsideDays, props.firstDayOfWeek == null ? _moment["default"].localeData().firstDayOfWeek() : props.firstDayOfWeek) + }; + _this.setCaptionRef = _this.setCaptionRef.bind((0, _assertThisInitialized2["default"])(_this)); + _this.setMonthTitleHeight = _this.setMonthTitleHeight.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + _proto.componentDidMount = function componentDidMount() { + this.setMonthTitleHeightTimeout = setTimeout(this.setMonthTitleHeight, 0); + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var month = nextProps.month, + enableOutsideDays = nextProps.enableOutsideDays, + firstDayOfWeek = nextProps.firstDayOfWeek; + var _this$props = this.props, + prevMonth = _this$props.month, + prevEnableOutsideDays = _this$props.enableOutsideDays, + prevFirstDayOfWeek = _this$props.firstDayOfWeek; + + if (!month.isSame(prevMonth) || enableOutsideDays !== prevEnableOutsideDays || firstDayOfWeek !== prevFirstDayOfWeek) { + this.setState({ + weeks: (0, _getCalendarMonthWeeks["default"])(month, enableOutsideDays, firstDayOfWeek == null ? _moment["default"].localeData().firstDayOfWeek() : firstDayOfWeek) + }); + } + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.setMonthTitleHeightTimeout) { + clearTimeout(this.setMonthTitleHeightTimeout); + } + }; + + _proto.setMonthTitleHeight = function setMonthTitleHeight() { + var setMonthTitleHeight = this.props.setMonthTitleHeight; + + if (setMonthTitleHeight) { + var captionHeight = (0, _calculateDimension["default"])(this.captionRef, 'height', true, true); + setMonthTitleHeight(captionHeight); + } + }; + + _proto.setCaptionRef = function setCaptionRef(ref) { + this.captionRef = ref; + }; + + _proto.render = function render() { + var _this$props2 = this.props, + dayAriaLabelFormat = _this$props2.dayAriaLabelFormat, + daySize = _this$props2.daySize, + focusedDate = _this$props2.focusedDate, + horizontalMonthPadding = _this$props2.horizontalMonthPadding, + isFocused = _this$props2.isFocused, + isVisible = _this$props2.isVisible, + modifiers = _this$props2.modifiers, + month = _this$props2.month, + monthFormat = _this$props2.monthFormat, + onDayClick = _this$props2.onDayClick, + onDayMouseEnter = _this$props2.onDayMouseEnter, + onDayMouseLeave = _this$props2.onDayMouseLeave, + onMonthSelect = _this$props2.onMonthSelect, + onYearSelect = _this$props2.onYearSelect, + orientation = _this$props2.orientation, + phrases = _this$props2.phrases, + renderCalendarDay = _this$props2.renderCalendarDay, + renderDayContents = _this$props2.renderDayContents, + renderMonthElement = _this$props2.renderMonthElement, + renderMonthText = _this$props2.renderMonthText, + styles = _this$props2.styles, + verticalBorderSpacing = _this$props2.verticalBorderSpacing; + var weeks = this.state.weeks; + var monthTitle = renderMonthText ? renderMonthText(month) : month.format(monthFormat); + var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; + return _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.CalendarMonth, { + padding: "0 ".concat(horizontalMonthPadding, "px") + }), { + "data-visible": isVisible + }), _react["default"].createElement("div", (0, _extends2["default"])({ + ref: this.setCaptionRef + }, (0, _reactWithStyles.css)(styles.CalendarMonth_caption, verticalScrollable && styles.CalendarMonth_caption__verticalScrollable)), renderMonthElement ? renderMonthElement({ + month: month, + onMonthSelect: onMonthSelect, + onYearSelect: onYearSelect, + isVisible: isVisible + }) : _react["default"].createElement("strong", null, monthTitle)), _react["default"].createElement("table", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(!verticalBorderSpacing && styles.CalendarMonth_table, verticalBorderSpacing && styles.CalendarMonth_verticalSpacing, verticalBorderSpacing && { + borderSpacing: "0px ".concat(verticalBorderSpacing, "px") + }), { + role: "presentation" + }), _react["default"].createElement("tbody", null, weeks.map(function (week, i) { + return _react["default"].createElement(_CalendarWeek["default"], { + key: i + }, week.map(function (day, dayOfWeek) { + return renderCalendarDay({ + key: dayOfWeek, + day: day, + daySize: daySize, + isOutsideDay: !day || day.month() !== month.month(), + tabIndex: isVisible && (0, _isSameDay["default"])(day, focusedDate) ? 0 : -1, + isFocused: isFocused, + onDayMouseEnter: onDayMouseEnter, + onDayMouseLeave: onDayMouseLeave, + onDayClick: onDayClick, + renderDayContents: renderDayContents, + phrases: phrases, + modifiers: modifiers[(0, _toISODateString["default"])(day)], + ariaLabelFormat: dayAriaLabelFormat + }); + })); + })))); + }; + + return CalendarMonth; +}(_react["default"].PureComponent || _react["default"].Component); + +CalendarMonth.propTypes = false ? undefined : {}; +CalendarMonth.defaultProps = defaultProps; + +var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { + var _ref2$reactDates = _ref2.reactDates, + color = _ref2$reactDates.color, + font = _ref2$reactDates.font, + spacing = _ref2$reactDates.spacing; + return { + CalendarMonth: { + background: color.background, + textAlign: 'center', + verticalAlign: 'top', + userSelect: 'none' + }, + CalendarMonth_table: { + borderCollapse: 'collapse', + borderSpacing: 0 + }, + CalendarMonth_verticalSpacing: { + borderCollapse: 'separate' + }, + CalendarMonth_caption: { + color: color.text, + fontSize: font.captionSize, + textAlign: 'center', + paddingTop: spacing.captionPaddingTop, + paddingBottom: spacing.captionPaddingBottom, + captionSide: 'initial' + }, + CalendarMonth_caption__verticalScrollable: { + paddingTop: 12, + paddingBottom: 7 + } + }; +}, { + pureComponent: typeof _react["default"].PureComponent !== 'undefined' +})(CalendarMonth); + +exports["default"] = _default; + +/***/ }), +/* 468 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = calculateDimension; + +function calculateDimension(el, axis) { + var borderBox = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var withMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + if (!el) { + return 0; + } + + var axisStart = axis === 'width' ? 'Left' : 'Top'; + var axisEnd = axis === 'width' ? 'Right' : 'Bottom'; // Only read styles if we need to + + var style = !borderBox || withMargin ? window.getComputedStyle(el) : null; // Offset includes border and padding + + var offsetWidth = el.offsetWidth, + offsetHeight = el.offsetHeight; + var size = axis === 'width' ? offsetWidth : offsetHeight; // Get the inner size + + if (!borderBox) { + size -= parseFloat(style["padding".concat(axisStart)]) + parseFloat(style["padding".concat(axisEnd)]) + parseFloat(style["border".concat(axisStart, "Width")]) + parseFloat(style["border".concat(axisEnd, "Width")]); + } // Apply margin + + + if (withMargin) { + size += parseFloat(style["margin".concat(axisStart)]) + parseFloat(style["margin".concat(axisEnd)]); + } + + return size; +} + +/***/ }), +/* 469 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _reactWithStyles = __webpack_require__(78); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _consolidatedEvents = __webpack_require__(226); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _noflip = _interopRequireDefault(__webpack_require__(111)); + +var _CalendarMonth = _interopRequireDefault(__webpack_require__(467)); + +var _isTransitionEndSupported = _interopRequireDefault(__webpack_require__(1180)); + +var _getTransformStyles = _interopRequireDefault(__webpack_require__(1181)); + +var _getCalendarMonthWidth = _interopRequireDefault(__webpack_require__(470)); + +var _toISOMonthString = _interopRequireDefault(__webpack_require__(227)); + +var _isPrevMonth = _interopRequireDefault(__webpack_require__(1182)); + +var _isNextMonth = _interopRequireDefault(__webpack_require__(1183)); + +var _ModifiersShape = _interopRequireDefault(__webpack_require__(225)); + +var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(162)); + +var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + enableOutsideDays: false, + firstVisibleMonthIndex: 0, + horizontalMonthPadding: 13, + initialMonth: (0, _moment["default"])(), + isAnimating: false, + numberOfMonths: 1, + modifiers: {}, + orientation: _constants.HORIZONTAL_ORIENTATION, + onDayClick: function onDayClick() {}, + onDayMouseEnter: function onDayMouseEnter() {}, + onDayMouseLeave: function onDayMouseLeave() {}, + onMonthChange: function onMonthChange() {}, + onYearChange: function onYearChange() {}, + onMonthTransitionEnd: function onMonthTransitionEnd() {}, + renderMonthText: null, + renderCalendarDay: undefined, + renderDayContents: null, + translationValue: null, + renderMonthElement: null, + daySize: _constants.DAY_SIZE, + focusedDate: null, + isFocused: false, + firstDayOfWeek: null, + setMonthTitleHeight: null, + isRTL: false, + transitionDuration: 200, + verticalBorderSpacing: undefined, + // i18n + monthFormat: 'MMMM YYYY', + // english locale + phrases: _defaultPhrases.CalendarDayPhrases, + dayAriaLabelFormat: undefined +}; + +function getMonths(initialMonth, numberOfMonths, withoutTransitionMonths) { + var month = initialMonth.clone(); + if (!withoutTransitionMonths) month = month.subtract(1, 'month'); + var months = []; + + for (var i = 0; i < (withoutTransitionMonths ? numberOfMonths : numberOfMonths + 2); i += 1) { + months.push(month); + month = month.clone().add(1, 'month'); + } + + return months; +} + +var CalendarMonthGrid = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(CalendarMonthGrid, _ref); + var _proto = CalendarMonthGrid.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function CalendarMonthGrid(props) { + var _this; + + _this = _ref.call(this, props) || this; + var withoutTransitionMonths = props.orientation === _constants.VERTICAL_SCROLLABLE; + _this.state = { + months: getMonths(props.initialMonth, props.numberOfMonths, withoutTransitionMonths) + }; + _this.isTransitionEndSupported = (0, _isTransitionEndSupported["default"])(); + _this.onTransitionEnd = _this.onTransitionEnd.bind((0, _assertThisInitialized2["default"])(_this)); + _this.setContainerRef = _this.setContainerRef.bind((0, _assertThisInitialized2["default"])(_this)); + _this.locale = _moment["default"].locale(); + _this.onMonthSelect = _this.onMonthSelect.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onYearSelect = _this.onYearSelect.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + _proto.componentDidMount = function componentDidMount() { + this.removeEventListener = (0, _consolidatedEvents.addEventListener)(this.container, 'transitionend', this.onTransitionEnd); + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var _this2 = this; + + var initialMonth = nextProps.initialMonth, + numberOfMonths = nextProps.numberOfMonths, + orientation = nextProps.orientation; + var months = this.state.months; + var _this$props = this.props, + prevInitialMonth = _this$props.initialMonth, + prevNumberOfMonths = _this$props.numberOfMonths; + var hasMonthChanged = !prevInitialMonth.isSame(initialMonth, 'month'); + var hasNumberOfMonthsChanged = prevNumberOfMonths !== numberOfMonths; + var newMonths = months; + + if (hasMonthChanged && !hasNumberOfMonthsChanged) { + if ((0, _isNextMonth["default"])(prevInitialMonth, initialMonth)) { + newMonths = months.slice(1); + newMonths.push(months[months.length - 1].clone().add(1, 'month')); + } else if ((0, _isPrevMonth["default"])(prevInitialMonth, initialMonth)) { + newMonths = months.slice(0, months.length - 1); + newMonths.unshift(months[0].clone().subtract(1, 'month')); + } else { + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + newMonths = getMonths(initialMonth, numberOfMonths, withoutTransitionMonths); + } + } + + if (hasNumberOfMonthsChanged) { + var _withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + + newMonths = getMonths(initialMonth, numberOfMonths, _withoutTransitionMonths); + } + + var momentLocale = _moment["default"].locale(); + + if (this.locale !== momentLocale) { + this.locale = momentLocale; + newMonths = newMonths.map(function (m) { + return m.locale(_this2.locale); + }); + } + + this.setState({ + months: newMonths + }); + }; + + _proto.componentDidUpdate = function componentDidUpdate() { + var _this$props2 = this.props, + isAnimating = _this$props2.isAnimating, + transitionDuration = _this$props2.transitionDuration, + onMonthTransitionEnd = _this$props2.onMonthTransitionEnd; // For IE9, immediately call onMonthTransitionEnd instead of + // waiting for the animation to complete. Similarly, if transitionDuration + // is set to 0, also immediately invoke the onMonthTransitionEnd callback + + if ((!this.isTransitionEndSupported || !transitionDuration) && isAnimating) { + onMonthTransitionEnd(); + } + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + if (this.removeEventListener) this.removeEventListener(); + }; + + _proto.onTransitionEnd = function onTransitionEnd() { + var onMonthTransitionEnd = this.props.onMonthTransitionEnd; + onMonthTransitionEnd(); + }; + + _proto.onMonthSelect = function onMonthSelect(currentMonth, newMonthVal) { + var newMonth = currentMonth.clone(); + var _this$props3 = this.props, + onMonthChange = _this$props3.onMonthChange, + orientation = _this$props3.orientation; + var months = this.state.months; + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var initialMonthSubtraction = months.indexOf(currentMonth); + + if (!withoutTransitionMonths) { + initialMonthSubtraction -= 1; + } + + newMonth.set('month', newMonthVal).subtract(initialMonthSubtraction, 'months'); + onMonthChange(newMonth); + }; + + _proto.onYearSelect = function onYearSelect(currentMonth, newYearVal) { + var newMonth = currentMonth.clone(); + var _this$props4 = this.props, + onYearChange = _this$props4.onYearChange, + orientation = _this$props4.orientation; + var months = this.state.months; + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var initialMonthSubtraction = months.indexOf(currentMonth); + + if (!withoutTransitionMonths) { + initialMonthSubtraction -= 1; + } + + newMonth.set('year', newYearVal).subtract(initialMonthSubtraction, 'months'); + onYearChange(newMonth); + }; + + _proto.setContainerRef = function setContainerRef(ref) { + this.container = ref; + }; + + _proto.render = function render() { + var _this3 = this; + + var _this$props5 = this.props, + enableOutsideDays = _this$props5.enableOutsideDays, + firstVisibleMonthIndex = _this$props5.firstVisibleMonthIndex, + horizontalMonthPadding = _this$props5.horizontalMonthPadding, + isAnimating = _this$props5.isAnimating, + modifiers = _this$props5.modifiers, + numberOfMonths = _this$props5.numberOfMonths, + monthFormat = _this$props5.monthFormat, + orientation = _this$props5.orientation, + translationValue = _this$props5.translationValue, + daySize = _this$props5.daySize, + onDayMouseEnter = _this$props5.onDayMouseEnter, + onDayMouseLeave = _this$props5.onDayMouseLeave, + onDayClick = _this$props5.onDayClick, + renderMonthText = _this$props5.renderMonthText, + renderCalendarDay = _this$props5.renderCalendarDay, + renderDayContents = _this$props5.renderDayContents, + renderMonthElement = _this$props5.renderMonthElement, + onMonthTransitionEnd = _this$props5.onMonthTransitionEnd, + firstDayOfWeek = _this$props5.firstDayOfWeek, + focusedDate = _this$props5.focusedDate, + isFocused = _this$props5.isFocused, + isRTL = _this$props5.isRTL, + styles = _this$props5.styles, + phrases = _this$props5.phrases, + dayAriaLabelFormat = _this$props5.dayAriaLabelFormat, + transitionDuration = _this$props5.transitionDuration, + verticalBorderSpacing = _this$props5.verticalBorderSpacing, + setMonthTitleHeight = _this$props5.setMonthTitleHeight; + var months = this.state.months; + var isVertical = orientation === _constants.VERTICAL_ORIENTATION; + var isVerticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; + var isHorizontal = orientation === _constants.HORIZONTAL_ORIENTATION; + var calendarMonthWidth = (0, _getCalendarMonthWidth["default"])(daySize, horizontalMonthPadding); + var width = isVertical || isVerticalScrollable ? calendarMonthWidth : (numberOfMonths + 2) * calendarMonthWidth; + var transformType = isVertical || isVerticalScrollable ? 'translateY' : 'translateX'; + var transformValue = "".concat(transformType, "(").concat(translationValue, "px)"); + return _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.CalendarMonthGrid, isHorizontal && styles.CalendarMonthGrid__horizontal, isVertical && styles.CalendarMonthGrid__vertical, isVerticalScrollable && styles.CalendarMonthGrid__vertical_scrollable, isAnimating && styles.CalendarMonthGrid__animating, isAnimating && transitionDuration && { + transition: "transform ".concat(transitionDuration, "ms ease-in-out") + }, _objectSpread({}, (0, _getTransformStyles["default"])(transformValue), { + width: width + })), { + ref: this.setContainerRef, + onTransitionEnd: onMonthTransitionEnd + }), months.map(function (month, i) { + var isVisible = i >= firstVisibleMonthIndex && i < firstVisibleMonthIndex + numberOfMonths; + var hideForAnimation = i === 0 && !isVisible; + var showForAnimation = i === 0 && isAnimating && isVisible; + var monthString = (0, _toISOMonthString["default"])(month); + return _react["default"].createElement("div", (0, _extends2["default"])({ + key: monthString + }, (0, _reactWithStyles.css)(isHorizontal && styles.CalendarMonthGrid_month__horizontal, hideForAnimation && styles.CalendarMonthGrid_month__hideForAnimation, showForAnimation && !isVertical && !isRTL && { + position: 'absolute', + left: -calendarMonthWidth + }, showForAnimation && !isVertical && isRTL && { + position: 'absolute', + right: 0 + }, showForAnimation && isVertical && { + position: 'absolute', + top: -translationValue + }, !isVisible && !isAnimating && styles.CalendarMonthGrid_month__hidden)), _react["default"].createElement(_CalendarMonth["default"], { + month: month, + isVisible: isVisible, + enableOutsideDays: enableOutsideDays, + modifiers: modifiers[monthString], + monthFormat: monthFormat, + orientation: orientation, + onDayMouseEnter: onDayMouseEnter, + onDayMouseLeave: onDayMouseLeave, + onDayClick: onDayClick, + onMonthSelect: _this3.onMonthSelect, + onYearSelect: _this3.onYearSelect, + renderMonthText: renderMonthText, + renderCalendarDay: renderCalendarDay, + renderDayContents: renderDayContents, + renderMonthElement: renderMonthElement, + firstDayOfWeek: firstDayOfWeek, + daySize: daySize, + focusedDate: isVisible ? focusedDate : null, + isFocused: isFocused, + phrases: phrases, + setMonthTitleHeight: setMonthTitleHeight, + dayAriaLabelFormat: dayAriaLabelFormat, + verticalBorderSpacing: verticalBorderSpacing, + horizontalMonthPadding: horizontalMonthPadding + })); + })); + }; + + return CalendarMonthGrid; +}(_react["default"].PureComponent || _react["default"].Component); + +CalendarMonthGrid.propTypes = false ? undefined : {}; +CalendarMonthGrid.defaultProps = defaultProps; + +var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { + var _ref2$reactDates = _ref2.reactDates, + color = _ref2$reactDates.color, + spacing = _ref2$reactDates.spacing, + zIndex = _ref2$reactDates.zIndex; + return { + CalendarMonthGrid: { + background: color.background, + textAlign: (0, _noflip["default"])('left'), + zIndex: zIndex + }, + CalendarMonthGrid__animating: { + zIndex: zIndex + 1 + }, + CalendarMonthGrid__horizontal: { + position: 'absolute', + left: (0, _noflip["default"])(spacing.dayPickerHorizontalPadding) + }, + CalendarMonthGrid__vertical: { + margin: '0 auto' + }, + CalendarMonthGrid__vertical_scrollable: { + margin: '0 auto' + }, + CalendarMonthGrid_month__horizontal: { + display: 'inline-block', + verticalAlign: 'top', + minHeight: '100%' + }, + CalendarMonthGrid_month__hideForAnimation: { + position: 'absolute', + zIndex: zIndex - 1, + opacity: 0, + pointerEvents: 'none' + }, + CalendarMonthGrid_month__hidden: { + visibility: 'hidden' + } + }; +}, { + pureComponent: typeof _react["default"].PureComponent !== 'undefined' +})(CalendarMonthGrid); + +exports["default"] = _default; + +/***/ }), +/* 470 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = getCalendarMonthWidth; + +function getCalendarMonthWidth(daySize) { + var calendarMonthPadding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + return 7 * daySize + 2 * calendarMonthPadding + 1; +} + +/***/ }), +/* 471 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function contains(other) { + if (arguments.length < 1) { + throw new TypeError('1 argument is required'); + } + if (typeof other !== 'object') { + throw new TypeError('Argument 1 (”other“) to Node.contains must be an instance of Node'); + } + + var node = other; + do { + if (this === node) { + return true; + } + if (node) { + node = node.parentNode; + } + } while (node); + + return false; +}; + + +/***/ }), +/* 472 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(471); + +module.exports = function getPolyfill() { + if (typeof document !== 'undefined') { + if (document.contains) { + return document.contains; + } + if (document.body && document.body.contains) { + return document.body.contains; + } + } + return implementation; +}; + + +/***/ }), +/* 473 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _FocusedInputShape = _interopRequireDefault(__webpack_require__(474)); + +var _IconPositionShape = _interopRequireDefault(__webpack_require__(164)); + +var _OrientationShape = _interopRequireDefault(__webpack_require__(475)); + +var _DisabledShape = _interopRequireDefault(__webpack_require__(183)); + +var _AnchorDirectionShape = _interopRequireDefault(__webpack_require__(476)); + +var _OpenDirectionShape = _interopRequireDefault(__webpack_require__(136)); + +var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); + +var _CalendarInfoPositionShape = _interopRequireDefault(__webpack_require__(184)); + +var _NavPositionShape = _interopRequireDefault(__webpack_require__(165)); + +var _default = { + // required props for a functional interactive DateRangePicker + startDate: _reactMomentProptypes["default"].momentObj, + endDate: _reactMomentProptypes["default"].momentObj, + onDatesChange: _propTypes["default"].func.isRequired, + focusedInput: _FocusedInputShape["default"], + onFocusChange: _propTypes["default"].func.isRequired, + onClose: _propTypes["default"].func, + // input related props + startDateId: _propTypes["default"].string.isRequired, + startDatePlaceholderText: _propTypes["default"].string, + startDateOffset: _propTypes["default"].func, + endDateOffset: _propTypes["default"].func, + endDateId: _propTypes["default"].string.isRequired, + endDatePlaceholderText: _propTypes["default"].string, + startDateAriaLabel: _propTypes["default"].string, + endDateAriaLabel: _propTypes["default"].string, + disabled: _DisabledShape["default"], + required: _propTypes["default"].bool, + readOnly: _propTypes["default"].bool, + screenReaderInputMessage: _propTypes["default"].string, + showClearDates: _propTypes["default"].bool, + showDefaultInputIcon: _propTypes["default"].bool, + inputIconPosition: _IconPositionShape["default"], + customInputIcon: _propTypes["default"].node, + customArrowIcon: _propTypes["default"].node, + customCloseIcon: _propTypes["default"].node, + noBorder: _propTypes["default"].bool, + block: _propTypes["default"].bool, + small: _propTypes["default"].bool, + regular: _propTypes["default"].bool, + keepFocusOnInput: _propTypes["default"].bool, + // calendar presentation and interaction related props + renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes["default"].func, 'renderMonthText', 'renderMonthElement'), + renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes["default"].func, 'renderMonthText', 'renderMonthElement'), + renderWeekHeaderElement: _propTypes["default"].func, + orientation: _OrientationShape["default"], + anchorDirection: _AnchorDirectionShape["default"], + openDirection: _OpenDirectionShape["default"], + horizontalMargin: _propTypes["default"].number, + withPortal: _propTypes["default"].bool, + withFullScreenPortal: _propTypes["default"].bool, + appendToBody: _propTypes["default"].bool, + disableScroll: _propTypes["default"].bool, + daySize: _airbnbPropTypes.nonNegativeInteger, + isRTL: _propTypes["default"].bool, + firstDayOfWeek: _DayOfWeekShape["default"], + initialVisibleMonth: _propTypes["default"].func, + numberOfMonths: _propTypes["default"].number, + keepOpenOnDateSelect: _propTypes["default"].bool, + reopenPickerOnClearDates: _propTypes["default"].bool, + renderCalendarInfo: _propTypes["default"].func, + calendarInfoPosition: _CalendarInfoPositionShape["default"], + hideKeyboardShortcutsPanel: _propTypes["default"].bool, + verticalHeight: _airbnbPropTypes.nonNegativeInteger, + transitionDuration: _airbnbPropTypes.nonNegativeInteger, + verticalSpacing: _airbnbPropTypes.nonNegativeInteger, + horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger, + // navigation related props + dayPickerNavigationInlineStyles: _propTypes["default"].object, + navPosition: _NavPositionShape["default"], + navPrev: _propTypes["default"].node, + navNext: _propTypes["default"].node, + renderNavPrevButton: _propTypes["default"].func, + renderNavNextButton: _propTypes["default"].func, + onPrevMonthClick: _propTypes["default"].func, + onNextMonthClick: _propTypes["default"].func, + // day presentation and interaction related props + renderCalendarDay: _propTypes["default"].func, + renderDayContents: _propTypes["default"].func, + minimumNights: _propTypes["default"].number, + minDate: _reactMomentProptypes["default"].momentObj, + maxDate: _reactMomentProptypes["default"].momentObj, + enableOutsideDays: _propTypes["default"].bool, + isDayBlocked: _propTypes["default"].func, + isOutsideRange: _propTypes["default"].func, + isDayHighlighted: _propTypes["default"].func, + // internationalization props + displayFormat: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].func]), + monthFormat: _propTypes["default"].string, + weekDayFormat: _propTypes["default"].string, + phrases: _propTypes["default"].shape((0, _getPhrasePropTypes["default"])(_defaultPhrases.DateRangePickerPhrases)), + dayAriaLabelFormat: _propTypes["default"].string +}; +exports["default"] = _default; + +/***/ }), +/* 474 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _constants = __webpack_require__(25); + +var _default = _propTypes["default"].oneOf([_constants.START_DATE, _constants.END_DATE]); + +exports["default"] = _default; + +/***/ }), +/* 475 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _constants = __webpack_require__(25); + +var _default = _propTypes["default"].oneOf([_constants.HORIZONTAL_ORIENTATION, _constants.VERTICAL_ORIENTATION]); + +exports["default"] = _default; + +/***/ }), +/* 476 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _constants = __webpack_require__(25); + +var _default = _propTypes["default"].oneOf([_constants.ANCHOR_LEFT, _constants.ANCHOR_RIGHT]); + +exports["default"] = _default; + +/***/ }), +/* 477 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = getResponsiveContainerStyles; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _constants = __webpack_require__(25); + +function getResponsiveContainerStyles(anchorDirection, currentOffset, containerEdge, margin) { + var windowWidth = typeof window !== 'undefined' ? window.innerWidth : 0; + var calculatedOffset = anchorDirection === _constants.ANCHOR_LEFT ? windowWidth - containerEdge : containerEdge; + var calculatedMargin = margin || 0; + return (0, _defineProperty2["default"])({}, anchorDirection, Math.min(currentOffset + calculatedOffset - calculatedMargin, 0)); +} + +/***/ }), +/* 478 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = getDetachedContainerStyles; + +var _constants = __webpack_require__(25); + +/** + * Calculate and return a CSS transform style to position a detached element + * next to a reference element. The open and anchor direction indicate wether + * it should be positioned above/below and/or to the left/right of the + * reference element. + * + * Assuming r(0,0), r(1,1), d(0,0), d(1,1) for the bottom-left and top-right + * corners of the reference and detached elements, respectively: + * - openDirection = DOWN, anchorDirection = LEFT => d(0,1) == r(0,1) + * - openDirection = UP, anchorDirection = LEFT => d(0,0) == r(0,0) + * - openDirection = DOWN, anchorDirection = RIGHT => d(1,1) == r(1,1) + * - openDirection = UP, anchorDirection = RIGHT => d(1,0) == r(1,0) + * + * By using a CSS transform, we allow to further position it using + * top/bottom CSS properties for the anchor gutter. + * + * @param {string} openDirection The vertical positioning of the popup + * @param {string} anchorDirection The horizontal position of the popup + * @param {HTMLElement} referenceEl The reference element + */ +function getDetachedContainerStyles(openDirection, anchorDirection, referenceEl) { + var referenceRect = referenceEl.getBoundingClientRect(); + var offsetX = referenceRect.left; + var offsetY = referenceRect.top; + + if (openDirection === _constants.OPEN_UP) { + offsetY = -(window.innerHeight - referenceRect.bottom); + } + + if (anchorDirection === _constants.ANCHOR_RIGHT) { + offsetX = -(window.innerWidth - referenceRect.right); + } + + return { + transform: "translate3d(".concat(Math.round(offsetX), "px, ").concat(Math.round(offsetY), "px, 0)") + }; +} + +/***/ }), +/* 479 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getScrollParent = getScrollParent; +exports.getScrollAncestorsOverflowY = getScrollAncestorsOverflowY; +exports["default"] = disableScroll; + +var getScrollingRoot = function getScrollingRoot() { + return document.scrollingElement || document.documentElement; +}; +/** + * Recursively finds the scroll parent of a node. The scroll parrent of a node + * is the closest node that is scrollable. A node is scrollable if: + * - it is allowed to scroll via CSS ('overflow-y' not visible or hidden); + * - and its children/content are "bigger" than the node's box height. + * + * The root of the document always scrolls by default. + * + * @param {HTMLElement} node Any DOM element. + * @return {HTMLElement} The scroll parent element. + */ + + +function getScrollParent(node) { + var parent = node.parentElement; + if (parent == null) return getScrollingRoot(); + + var _window$getComputedSt = window.getComputedStyle(parent), + overflowY = _window$getComputedSt.overflowY; + + var canScroll = overflowY !== 'visible' && overflowY !== 'hidden'; + + if (canScroll && parent.scrollHeight > parent.clientHeight) { + return parent; + } + + return getScrollParent(parent); +} +/** + * Recursively traverses the tree upwards from the given node, capturing all + * ancestor nodes that scroll along with their current 'overflow-y' CSS + * property. + * + * @param {HTMLElement} node Any DOM element. + * @param {Map} [acc] Accumulator map. + * @return {Map} Map of ancestors with their 'overflow-y' value. + */ + + +function getScrollAncestorsOverflowY(node) { + var acc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Map(); + var scrollingRoot = getScrollingRoot(); + var scrollParent = getScrollParent(node); + acc.set(scrollParent, scrollParent.style.overflowY); + if (scrollParent === scrollingRoot) return acc; + return getScrollAncestorsOverflowY(scrollParent, acc); +} +/** + * Disabling the scroll on a node involves finding all the scrollable ancestors + * and set their 'overflow-y' CSS property to 'hidden'. When all ancestors have + * 'overflow-y: hidden' (up to the document element) there is no scroll + * container, thus all the scroll outside of the node is disabled. In order to + * enable scroll again, we store the previous value of the 'overflow-y' for + * every ancestor in a closure and reset it back. + * + * @param {HTMLElement} node Any DOM element. + */ + + +function disableScroll(node) { + var scrollAncestorsOverflowY = getScrollAncestorsOverflowY(node); + + var toggle = function toggle(on) { + return scrollAncestorsOverflowY.forEach(function (overflowY, ancestor) { + ancestor.style.setProperty('overflow-y', on ? 'hidden' : overflowY); + }); + }; + + toggle(true); + return function () { + return toggle(false); + }; +} + +/***/ }), +/* 480 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _OpenDirectionShape = _interopRequireDefault(__webpack_require__(136)); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _DateRangePickerInput = _interopRequireDefault(__webpack_require__(481)); + +var _IconPositionShape = _interopRequireDefault(__webpack_require__(164)); + +var _DisabledShape = _interopRequireDefault(__webpack_require__(183)); + +var _toMomentObject = _interopRequireDefault(__webpack_require__(161)); + +var _toLocalizedDateString = _interopRequireDefault(__webpack_require__(305)); + +var _isInclusivelyAfterDay = _interopRequireDefault(__webpack_require__(166)); + +var _isBeforeDay = _interopRequireDefault(__webpack_require__(185)); + +var _constants = __webpack_require__(25); + +var propTypes = false ? undefined : {}; +var defaultProps = { + children: null, + startDate: null, + startDateId: _constants.START_DATE, + startDatePlaceholderText: 'Start Date', + isStartDateFocused: false, + startDateAriaLabel: undefined, + endDate: null, + endDateId: _constants.END_DATE, + endDatePlaceholderText: 'End Date', + isEndDateFocused: false, + endDateAriaLabel: undefined, + screenReaderMessage: '', + showClearDates: false, + showCaret: false, + showDefaultInputIcon: false, + inputIconPosition: _constants.ICON_BEFORE_POSITION, + disabled: false, + required: false, + readOnly: false, + openDirection: _constants.OPEN_DOWN, + noBorder: false, + block: false, + small: false, + regular: false, + verticalSpacing: undefined, + keepOpenOnDateSelect: false, + reopenPickerOnClearDates: false, + withFullScreenPortal: false, + minimumNights: 1, + isOutsideRange: function isOutsideRange(day) { + return !(0, _isInclusivelyAfterDay["default"])(day, (0, _moment["default"])()); + }, + displayFormat: function displayFormat() { + return _moment["default"].localeData().longDateFormat('L'); + }, + onFocusChange: function onFocusChange() {}, + onClose: function onClose() {}, + onDatesChange: function onDatesChange() {}, + onKeyDownArrowDown: function onKeyDownArrowDown() {}, + onKeyDownQuestionMark: function onKeyDownQuestionMark() {}, + customInputIcon: null, + customArrowIcon: null, + customCloseIcon: null, + // accessibility + isFocused: false, + // i18n + phrases: _defaultPhrases.DateRangePickerInputPhrases, + isRTL: false +}; + +var DateRangePickerInputController = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(DateRangePickerInputController, _ref); + var _proto = DateRangePickerInputController.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function DateRangePickerInputController(props) { + var _this; + + _this = _ref.call(this, props) || this; + _this.onClearFocus = _this.onClearFocus.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onStartDateChange = _this.onStartDateChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onStartDateFocus = _this.onStartDateFocus.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onEndDateChange = _this.onEndDateChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onEndDateFocus = _this.onEndDateFocus.bind((0, _assertThisInitialized2["default"])(_this)); + _this.clearDates = _this.clearDates.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + _proto.onClearFocus = function onClearFocus() { + var _this$props = this.props, + onFocusChange = _this$props.onFocusChange, + onClose = _this$props.onClose, + startDate = _this$props.startDate, + endDate = _this$props.endDate; + onFocusChange(null); + onClose({ + startDate: startDate, + endDate: endDate + }); + }; + + _proto.onEndDateChange = function onEndDateChange(endDateString) { + var _this$props2 = this.props, + startDate = _this$props2.startDate, + isOutsideRange = _this$props2.isOutsideRange, + minimumNights = _this$props2.minimumNights, + keepOpenOnDateSelect = _this$props2.keepOpenOnDateSelect, + onDatesChange = _this$props2.onDatesChange; + var endDate = (0, _toMomentObject["default"])(endDateString, this.getDisplayFormat()); + var isEndDateValid = endDate && !isOutsideRange(endDate) && !(startDate && (0, _isBeforeDay["default"])(endDate, startDate.clone().add(minimumNights, 'days'))); + + if (isEndDateValid) { + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + if (!keepOpenOnDateSelect) this.onClearFocus(); + } else { + onDatesChange({ + startDate: startDate, + endDate: null + }); + } + }; + + _proto.onEndDateFocus = function onEndDateFocus() { + var _this$props3 = this.props, + startDate = _this$props3.startDate, + onFocusChange = _this$props3.onFocusChange, + withFullScreenPortal = _this$props3.withFullScreenPortal, + disabled = _this$props3.disabled; + + if (!startDate && withFullScreenPortal && (!disabled || disabled === _constants.END_DATE)) { + // When the datepicker is full screen, we never want to focus the end date first + // because there's no indication that that is the case once the datepicker is open and it + // might confuse the user + onFocusChange(_constants.START_DATE); + } else if (!disabled || disabled === _constants.START_DATE) { + onFocusChange(_constants.END_DATE); + } + }; + + _proto.onStartDateChange = function onStartDateChange(startDateString) { + var endDate = this.props.endDate; + var _this$props4 = this.props, + isOutsideRange = _this$props4.isOutsideRange, + minimumNights = _this$props4.minimumNights, + onDatesChange = _this$props4.onDatesChange, + onFocusChange = _this$props4.onFocusChange, + disabled = _this$props4.disabled; + var startDate = (0, _toMomentObject["default"])(startDateString, this.getDisplayFormat()); + var isEndDateBeforeStartDate = startDate && (0, _isBeforeDay["default"])(endDate, startDate.clone().add(minimumNights, 'days')); + var isStartDateValid = startDate && !isOutsideRange(startDate) && !(disabled === _constants.END_DATE && isEndDateBeforeStartDate); + + if (isStartDateValid) { + if (isEndDateBeforeStartDate) { + endDate = null; + } + + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + onFocusChange(_constants.END_DATE); + } else { + onDatesChange({ + startDate: null, + endDate: endDate + }); + } + }; + + _proto.onStartDateFocus = function onStartDateFocus() { + var _this$props5 = this.props, + disabled = _this$props5.disabled, + onFocusChange = _this$props5.onFocusChange; + + if (!disabled || disabled === _constants.END_DATE) { + onFocusChange(_constants.START_DATE); + } + }; + + _proto.getDisplayFormat = function getDisplayFormat() { + var displayFormat = this.props.displayFormat; + return typeof displayFormat === 'string' ? displayFormat : displayFormat(); + }; + + _proto.getDateString = function getDateString(date) { + var displayFormat = this.getDisplayFormat(); + + if (date && displayFormat) { + return date && date.format(displayFormat); + } + + return (0, _toLocalizedDateString["default"])(date); + }; + + _proto.clearDates = function clearDates() { + var _this$props6 = this.props, + onDatesChange = _this$props6.onDatesChange, + reopenPickerOnClearDates = _this$props6.reopenPickerOnClearDates, + onFocusChange = _this$props6.onFocusChange; + onDatesChange({ + startDate: null, + endDate: null + }); + + if (reopenPickerOnClearDates) { + onFocusChange(_constants.START_DATE); + } + }; + + _proto.render = function render() { + var _this$props7 = this.props, + children = _this$props7.children, + startDate = _this$props7.startDate, + startDateId = _this$props7.startDateId, + startDatePlaceholderText = _this$props7.startDatePlaceholderText, + isStartDateFocused = _this$props7.isStartDateFocused, + startDateAriaLabel = _this$props7.startDateAriaLabel, + endDate = _this$props7.endDate, + endDateId = _this$props7.endDateId, + endDatePlaceholderText = _this$props7.endDatePlaceholderText, + endDateAriaLabel = _this$props7.endDateAriaLabel, + isEndDateFocused = _this$props7.isEndDateFocused, + screenReaderMessage = _this$props7.screenReaderMessage, + showClearDates = _this$props7.showClearDates, + showCaret = _this$props7.showCaret, + showDefaultInputIcon = _this$props7.showDefaultInputIcon, + inputIconPosition = _this$props7.inputIconPosition, + customInputIcon = _this$props7.customInputIcon, + customArrowIcon = _this$props7.customArrowIcon, + customCloseIcon = _this$props7.customCloseIcon, + disabled = _this$props7.disabled, + required = _this$props7.required, + readOnly = _this$props7.readOnly, + openDirection = _this$props7.openDirection, + isFocused = _this$props7.isFocused, + phrases = _this$props7.phrases, + onKeyDownArrowDown = _this$props7.onKeyDownArrowDown, + onKeyDownQuestionMark = _this$props7.onKeyDownQuestionMark, + isRTL = _this$props7.isRTL, + noBorder = _this$props7.noBorder, + block = _this$props7.block, + small = _this$props7.small, + regular = _this$props7.regular, + verticalSpacing = _this$props7.verticalSpacing; + var startDateString = this.getDateString(startDate); + var endDateString = this.getDateString(endDate); + return _react["default"].createElement(_DateRangePickerInput["default"], { + startDate: startDateString, + startDateId: startDateId, + startDatePlaceholderText: startDatePlaceholderText, + isStartDateFocused: isStartDateFocused, + startDateAriaLabel: startDateAriaLabel, + endDate: endDateString, + endDateId: endDateId, + endDatePlaceholderText: endDatePlaceholderText, + isEndDateFocused: isEndDateFocused, + endDateAriaLabel: endDateAriaLabel, + isFocused: isFocused, + disabled: disabled, + required: required, + readOnly: readOnly, + openDirection: openDirection, + showCaret: showCaret, + showDefaultInputIcon: showDefaultInputIcon, + inputIconPosition: inputIconPosition, + customInputIcon: customInputIcon, + customArrowIcon: customArrowIcon, + customCloseIcon: customCloseIcon, + phrases: phrases, + onStartDateChange: this.onStartDateChange, + onStartDateFocus: this.onStartDateFocus, + onStartDateShiftTab: this.onClearFocus, + onEndDateChange: this.onEndDateChange, + onEndDateFocus: this.onEndDateFocus, + showClearDates: showClearDates, + onClearDates: this.clearDates, + screenReaderMessage: screenReaderMessage, + onKeyDownArrowDown: onKeyDownArrowDown, + onKeyDownQuestionMark: onKeyDownQuestionMark, + isRTL: isRTL, + noBorder: noBorder, + block: block, + small: small, + regular: regular, + verticalSpacing: verticalSpacing + }, children); + }; + + return DateRangePickerInputController; +}(_react["default"].PureComponent || _react["default"].Component); + +exports["default"] = DateRangePickerInputController; +DateRangePickerInputController.propTypes = false ? undefined : {}; +DateRangePickerInputController.defaultProps = defaultProps; + +/***/ }), +/* 481 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _reactWithStyles = __webpack_require__(78); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _noflip = _interopRequireDefault(__webpack_require__(111)); + +var _OpenDirectionShape = _interopRequireDefault(__webpack_require__(136)); + +var _DateInput = _interopRequireDefault(__webpack_require__(482)); + +var _IconPositionShape = _interopRequireDefault(__webpack_require__(164)); + +var _DisabledShape = _interopRequireDefault(__webpack_require__(183)); + +var _RightArrow = _interopRequireDefault(__webpack_require__(484)); + +var _LeftArrow = _interopRequireDefault(__webpack_require__(485)); + +var _CloseButton = _interopRequireDefault(__webpack_require__(186)); + +var _CalendarIcon = _interopRequireDefault(__webpack_require__(486)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + children: null, + startDateId: _constants.START_DATE, + endDateId: _constants.END_DATE, + startDatePlaceholderText: 'Start Date', + endDatePlaceholderText: 'End Date', + startDateAriaLabel: undefined, + endDateAriaLabel: undefined, + screenReaderMessage: '', + onStartDateFocus: function onStartDateFocus() {}, + onEndDateFocus: function onEndDateFocus() {}, + onStartDateChange: function onStartDateChange() {}, + onEndDateChange: function onEndDateChange() {}, + onStartDateShiftTab: function onStartDateShiftTab() {}, + onEndDateTab: function onEndDateTab() {}, + onClearDates: function onClearDates() {}, + onKeyDownArrowDown: function onKeyDownArrowDown() {}, + onKeyDownQuestionMark: function onKeyDownQuestionMark() {}, + startDate: '', + endDate: '', + isStartDateFocused: false, + isEndDateFocused: false, + showClearDates: false, + disabled: false, + required: false, + readOnly: false, + openDirection: _constants.OPEN_DOWN, + showCaret: false, + showDefaultInputIcon: false, + inputIconPosition: _constants.ICON_BEFORE_POSITION, + customInputIcon: null, + customArrowIcon: null, + customCloseIcon: null, + noBorder: false, + block: false, + small: false, + regular: false, + verticalSpacing: undefined, + // accessibility + isFocused: false, + // i18n + phrases: _defaultPhrases.DateRangePickerInputPhrases, + isRTL: false +}; + +function DateRangePickerInput(_ref) { + var children = _ref.children, + startDate = _ref.startDate, + startDateId = _ref.startDateId, + startDatePlaceholderText = _ref.startDatePlaceholderText, + screenReaderMessage = _ref.screenReaderMessage, + isStartDateFocused = _ref.isStartDateFocused, + onStartDateChange = _ref.onStartDateChange, + onStartDateFocus = _ref.onStartDateFocus, + onStartDateShiftTab = _ref.onStartDateShiftTab, + startDateAriaLabel = _ref.startDateAriaLabel, + endDate = _ref.endDate, + endDateId = _ref.endDateId, + endDatePlaceholderText = _ref.endDatePlaceholderText, + isEndDateFocused = _ref.isEndDateFocused, + onEndDateChange = _ref.onEndDateChange, + onEndDateFocus = _ref.onEndDateFocus, + onEndDateTab = _ref.onEndDateTab, + endDateAriaLabel = _ref.endDateAriaLabel, + onKeyDownArrowDown = _ref.onKeyDownArrowDown, + onKeyDownQuestionMark = _ref.onKeyDownQuestionMark, + onClearDates = _ref.onClearDates, + showClearDates = _ref.showClearDates, + disabled = _ref.disabled, + required = _ref.required, + readOnly = _ref.readOnly, + showCaret = _ref.showCaret, + openDirection = _ref.openDirection, + showDefaultInputIcon = _ref.showDefaultInputIcon, + inputIconPosition = _ref.inputIconPosition, + customInputIcon = _ref.customInputIcon, + customArrowIcon = _ref.customArrowIcon, + customCloseIcon = _ref.customCloseIcon, + isFocused = _ref.isFocused, + phrases = _ref.phrases, + isRTL = _ref.isRTL, + noBorder = _ref.noBorder, + block = _ref.block, + verticalSpacing = _ref.verticalSpacing, + small = _ref.small, + regular = _ref.regular, + styles = _ref.styles; + + var calendarIcon = customInputIcon || _react["default"].createElement(_CalendarIcon["default"], (0, _reactWithStyles.css)(styles.DateRangePickerInput_calendarIcon_svg)); + + var arrowIcon = customArrowIcon || _react["default"].createElement(_RightArrow["default"], (0, _reactWithStyles.css)(styles.DateRangePickerInput_arrow_svg)); + + if (isRTL) arrowIcon = _react["default"].createElement(_LeftArrow["default"], (0, _reactWithStyles.css)(styles.DateRangePickerInput_arrow_svg)); + if (small) arrowIcon = '-'; + + var closeIcon = customCloseIcon || _react["default"].createElement(_CloseButton["default"], (0, _reactWithStyles.css)(styles.DateRangePickerInput_clearDates_svg, small && styles.DateRangePickerInput_clearDates_svg__small)); + + var screenReaderStartDateText = screenReaderMessage || phrases.keyboardForwardNavigationInstructions; + var screenReaderEndDateText = screenReaderMessage || phrases.keyboardBackwardNavigationInstructions; + + var inputIcon = (showDefaultInputIcon || customInputIcon !== null) && _react["default"].createElement("button", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DateRangePickerInput_calendarIcon), { + type: "button", + disabled: disabled, + "aria-label": phrases.focusStartDate, + onClick: onKeyDownArrowDown + }), calendarIcon); + + var startDateDisabled = disabled === _constants.START_DATE || disabled === true; + var endDateDisabled = disabled === _constants.END_DATE || disabled === true; + return _react["default"].createElement("div", (0, _reactWithStyles.css)(styles.DateRangePickerInput, disabled && styles.DateRangePickerInput__disabled, isRTL && styles.DateRangePickerInput__rtl, !noBorder && styles.DateRangePickerInput__withBorder, block && styles.DateRangePickerInput__block, showClearDates && styles.DateRangePickerInput__showClearDates), inputIconPosition === _constants.ICON_BEFORE_POSITION && inputIcon, _react["default"].createElement(_DateInput["default"], { + id: startDateId, + placeholder: startDatePlaceholderText, + ariaLabel: startDateAriaLabel, + displayValue: startDate, + screenReaderMessage: screenReaderStartDateText, + focused: isStartDateFocused, + isFocused: isFocused, + disabled: startDateDisabled, + required: required, + readOnly: readOnly, + showCaret: showCaret, + openDirection: openDirection, + onChange: onStartDateChange, + onFocus: onStartDateFocus, + onKeyDownShiftTab: onStartDateShiftTab, + onKeyDownArrowDown: onKeyDownArrowDown, + onKeyDownQuestionMark: onKeyDownQuestionMark, + verticalSpacing: verticalSpacing, + small: small, + regular: regular + }), children, _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DateRangePickerInput_arrow), { + "aria-hidden": "true", + role: "presentation" + }), arrowIcon), _react["default"].createElement(_DateInput["default"], { + id: endDateId, + placeholder: endDatePlaceholderText, + ariaLabel: endDateAriaLabel, + displayValue: endDate, + screenReaderMessage: screenReaderEndDateText, + focused: isEndDateFocused, + isFocused: isFocused, + disabled: endDateDisabled, + required: required, + readOnly: readOnly, + showCaret: showCaret, + openDirection: openDirection, + onChange: onEndDateChange, + onFocus: onEndDateFocus, + onKeyDownArrowDown: onKeyDownArrowDown, + onKeyDownQuestionMark: onKeyDownQuestionMark, + onKeyDownTab: onEndDateTab, + verticalSpacing: verticalSpacing, + small: small, + regular: regular + }), showClearDates && _react["default"].createElement("button", (0, _extends2["default"])({ + type: "button", + "aria-label": phrases.clearDates + }, (0, _reactWithStyles.css)(styles.DateRangePickerInput_clearDates, small && styles.DateRangePickerInput_clearDates__small, !customCloseIcon && styles.DateRangePickerInput_clearDates_default, !(startDate || endDate) && styles.DateRangePickerInput_clearDates__hide), { + onClick: onClearDates, + disabled: disabled + }), closeIcon), inputIconPosition === _constants.ICON_AFTER_POSITION && inputIcon); +} + +DateRangePickerInput.propTypes = false ? undefined : {}; +DateRangePickerInput.defaultProps = defaultProps; + +var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { + var _ref2$reactDates = _ref2.reactDates, + border = _ref2$reactDates.border, + color = _ref2$reactDates.color, + sizing = _ref2$reactDates.sizing; + return { + DateRangePickerInput: { + backgroundColor: color.background, + display: 'inline-block' + }, + DateRangePickerInput__disabled: { + background: color.disabled + }, + DateRangePickerInput__withBorder: { + borderColor: color.border, + borderWidth: border.pickerInput.borderWidth, + borderStyle: border.pickerInput.borderStyle, + borderRadius: border.pickerInput.borderRadius + }, + DateRangePickerInput__rtl: { + direction: (0, _noflip["default"])('rtl') + }, + DateRangePickerInput__block: { + display: 'block' + }, + DateRangePickerInput__showClearDates: { + paddingRight: 30 // TODO: should be noflip wrapped and handled by an isRTL prop + + }, + DateRangePickerInput_arrow: { + display: 'inline-block', + verticalAlign: 'middle', + color: color.text + }, + DateRangePickerInput_arrow_svg: { + verticalAlign: 'middle', + fill: color.text, + height: sizing.arrowWidth, + width: sizing.arrowWidth + }, + DateRangePickerInput_clearDates: { + background: 'none', + border: 0, + color: 'inherit', + font: 'inherit', + lineHeight: 'normal', + overflow: 'visible', + cursor: 'pointer', + padding: 10, + margin: '0 10px 0 5px', + // TODO: should be noflip wrapped and handled by an isRTL prop + position: 'absolute', + right: 0, + // TODO: should be noflip wrapped and handled by an isRTL prop + top: '50%', + transform: 'translateY(-50%)' + }, + DateRangePickerInput_clearDates__small: { + padding: 6 + }, + DateRangePickerInput_clearDates_default: { + ':focus': { + background: color.core.border, + borderRadius: '50%' + }, + ':hover': { + background: color.core.border, + borderRadius: '50%' + } + }, + DateRangePickerInput_clearDates__hide: { + visibility: 'hidden' + }, + DateRangePickerInput_clearDates_svg: { + fill: color.core.grayLight, + height: 12, + width: 15, + verticalAlign: 'middle' + }, + DateRangePickerInput_clearDates_svg__small: { + height: 9 + }, + DateRangePickerInput_calendarIcon: { + background: 'none', + border: 0, + color: 'inherit', + font: 'inherit', + lineHeight: 'normal', + overflow: 'visible', + cursor: 'pointer', + display: 'inline-block', + verticalAlign: 'middle', + padding: 10, + margin: '0 5px 0 10px' // TODO: should be noflip wrapped and handled by an isRTL prop + + }, + DateRangePickerInput_calendarIcon_svg: { + fill: color.core.grayLight, + height: 15, + width: 14, + verticalAlign: 'middle' + } + }; +}, { + pureComponent: typeof _react["default"].PureComponent !== 'undefined' +})(DateRangePickerInput); + +exports["default"] = _default; + +/***/ }), +/* 482 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _reactWithStyles = __webpack_require__(78); + +var _throttle = _interopRequireDefault(__webpack_require__(483)); + +var _isTouchDevice = _interopRequireDefault(__webpack_require__(163)); + +var _noflip = _interopRequireDefault(__webpack_require__(111)); + +var _getInputHeight = _interopRequireDefault(__webpack_require__(304)); + +var _OpenDirectionShape = _interopRequireDefault(__webpack_require__(136)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var FANG_PATH_TOP = "M0,".concat(_constants.FANG_HEIGHT_PX, " ").concat(_constants.FANG_WIDTH_PX, ",").concat(_constants.FANG_HEIGHT_PX, " ").concat(_constants.FANG_WIDTH_PX / 2, ",0z"); +var FANG_STROKE_TOP = "M0,".concat(_constants.FANG_HEIGHT_PX, " ").concat(_constants.FANG_WIDTH_PX / 2, ",0 ").concat(_constants.FANG_WIDTH_PX, ",").concat(_constants.FANG_HEIGHT_PX); +var FANG_PATH_BOTTOM = "M0,0 ".concat(_constants.FANG_WIDTH_PX, ",0 ").concat(_constants.FANG_WIDTH_PX / 2, ",").concat(_constants.FANG_HEIGHT_PX, "z"); +var FANG_STROKE_BOTTOM = "M0,0 ".concat(_constants.FANG_WIDTH_PX / 2, ",").concat(_constants.FANG_HEIGHT_PX, " ").concat(_constants.FANG_WIDTH_PX, ",0"); +var propTypes = false ? undefined : {}; +var defaultProps = { + placeholder: 'Select Date', + displayValue: '', + ariaLabel: undefined, + screenReaderMessage: '', + focused: false, + disabled: false, + required: false, + readOnly: null, + openDirection: _constants.OPEN_DOWN, + showCaret: false, + verticalSpacing: _constants.DEFAULT_VERTICAL_SPACING, + small: false, + block: false, + regular: false, + onChange: function onChange() {}, + onFocus: function onFocus() {}, + onKeyDownShiftTab: function onKeyDownShiftTab() {}, + onKeyDownTab: function onKeyDownTab() {}, + onKeyDownArrowDown: function onKeyDownArrowDown() {}, + onKeyDownQuestionMark: function onKeyDownQuestionMark() {}, + // accessibility + isFocused: false +}; + +var DateInput = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(DateInput, _ref); + var _proto = DateInput.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function DateInput(props) { + var _this; + + _this = _ref.call(this, props) || this; + _this.state = { + dateString: '', + isTouchDevice: false + }; + _this.onChange = _this.onChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onKeyDown = _this.onKeyDown.bind((0, _assertThisInitialized2["default"])(_this)); + _this.setInputRef = _this.setInputRef.bind((0, _assertThisInitialized2["default"])(_this)); + _this.throttledKeyDown = (0, _throttle["default"])(_this.onFinalKeyDown, 300, { + trailing: false + }); + return _this; + } + + _proto.componentDidMount = function componentDidMount() { + this.setState({ + isTouchDevice: (0, _isTouchDevice["default"])() + }); + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var dateString = this.state.dateString; + + if (dateString && nextProps.displayValue) { + this.setState({ + dateString: '' + }); + } + }; + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var _this$props = this.props, + focused = _this$props.focused, + isFocused = _this$props.isFocused; + if (prevProps.focused === focused && prevProps.isFocused === isFocused) return; + + if (focused && isFocused) { + this.inputRef.focus(); + } + }; + + _proto.onChange = function onChange(e) { + var _this$props2 = this.props, + onChange = _this$props2.onChange, + onKeyDownQuestionMark = _this$props2.onKeyDownQuestionMark; + var dateString = e.target.value; // In Safari, onKeyDown does not consistently fire ahead of onChange. As a result, we need to + // special case the `?` key so that it always triggers the appropriate callback, instead of + // modifying the input value + + if (dateString[dateString.length - 1] === '?') { + onKeyDownQuestionMark(e); + } else { + this.setState({ + dateString: dateString + }, function () { + return onChange(dateString); + }); + } + }; + + _proto.onKeyDown = function onKeyDown(e) { + e.stopPropagation(); + + if (!_constants.MODIFIER_KEY_NAMES.has(e.key)) { + this.throttledKeyDown(e); + } + }; + + _proto.onFinalKeyDown = function onFinalKeyDown(e) { + var _this$props3 = this.props, + onKeyDownShiftTab = _this$props3.onKeyDownShiftTab, + onKeyDownTab = _this$props3.onKeyDownTab, + onKeyDownArrowDown = _this$props3.onKeyDownArrowDown, + onKeyDownQuestionMark = _this$props3.onKeyDownQuestionMark; + var key = e.key; + + if (key === 'Tab') { + if (e.shiftKey) { + onKeyDownShiftTab(e); + } else { + onKeyDownTab(e); + } + } else if (key === 'ArrowDown') { + onKeyDownArrowDown(e); + } else if (key === '?') { + e.preventDefault(); + onKeyDownQuestionMark(e); + } + }; + + _proto.setInputRef = function setInputRef(ref) { + this.inputRef = ref; + }; + + _proto.render = function render() { + var _this$state = this.state, + dateString = _this$state.dateString, + isTouch = _this$state.isTouchDevice; + var _this$props4 = this.props, + id = _this$props4.id, + placeholder = _this$props4.placeholder, + ariaLabel = _this$props4.ariaLabel, + displayValue = _this$props4.displayValue, + screenReaderMessage = _this$props4.screenReaderMessage, + focused = _this$props4.focused, + showCaret = _this$props4.showCaret, + onFocus = _this$props4.onFocus, + disabled = _this$props4.disabled, + required = _this$props4.required, + readOnly = _this$props4.readOnly, + openDirection = _this$props4.openDirection, + verticalSpacing = _this$props4.verticalSpacing, + small = _this$props4.small, + regular = _this$props4.regular, + block = _this$props4.block, + styles = _this$props4.styles, + reactDates = _this$props4.theme.reactDates; + var value = dateString || displayValue || ''; + var screenReaderMessageId = "DateInput__screen-reader-message-".concat(id); + var withFang = showCaret && focused; + var inputHeight = (0, _getInputHeight["default"])(reactDates, small); + return _react["default"].createElement("div", (0, _reactWithStyles.css)(styles.DateInput, small && styles.DateInput__small, block && styles.DateInput__block, withFang && styles.DateInput__withFang, disabled && styles.DateInput__disabled, withFang && openDirection === _constants.OPEN_DOWN && styles.DateInput__openDown, withFang && openDirection === _constants.OPEN_UP && styles.DateInput__openUp), _react["default"].createElement("input", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DateInput_input, small && styles.DateInput_input__small, regular && styles.DateInput_input__regular, readOnly && styles.DateInput_input__readOnly, focused && styles.DateInput_input__focused, disabled && styles.DateInput_input__disabled), { + "aria-label": ariaLabel === undefined ? placeholder : ariaLabel, + type: "text", + id: id, + name: id, + ref: this.setInputRef, + value: value, + onChange: this.onChange, + onKeyDown: this.onKeyDown, + onFocus: onFocus, + placeholder: placeholder, + autoComplete: "off", + disabled: disabled, + readOnly: typeof readOnly === 'boolean' ? readOnly : isTouch, + required: required, + "aria-describedby": screenReaderMessage && screenReaderMessageId + })), withFang && _react["default"].createElement("svg", (0, _extends2["default"])({ + role: "presentation", + focusable: "false" + }, (0, _reactWithStyles.css)(styles.DateInput_fang, openDirection === _constants.OPEN_DOWN && { + top: inputHeight + verticalSpacing - _constants.FANG_HEIGHT_PX - 1 + }, openDirection === _constants.OPEN_UP && { + bottom: inputHeight + verticalSpacing - _constants.FANG_HEIGHT_PX - 1 + })), _react["default"].createElement("path", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DateInput_fangShape), { + d: openDirection === _constants.OPEN_DOWN ? FANG_PATH_TOP : FANG_PATH_BOTTOM + })), _react["default"].createElement("path", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DateInput_fangStroke), { + d: openDirection === _constants.OPEN_DOWN ? FANG_STROKE_TOP : FANG_STROKE_BOTTOM + }))), screenReaderMessage && _react["default"].createElement("p", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DateInput_screenReaderMessage), { + id: screenReaderMessageId + }), screenReaderMessage)); + }; + + return DateInput; +}(_react["default"].PureComponent || _react["default"].Component); + +DateInput.propTypes = false ? undefined : {}; +DateInput.defaultProps = defaultProps; + +var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { + var _ref2$reactDates = _ref2.reactDates, + border = _ref2$reactDates.border, + color = _ref2$reactDates.color, + sizing = _ref2$reactDates.sizing, + spacing = _ref2$reactDates.spacing, + font = _ref2$reactDates.font, + zIndex = _ref2$reactDates.zIndex; + return { + DateInput: { + margin: 0, + padding: spacing.inputPadding, + background: color.background, + position: 'relative', + display: 'inline-block', + width: sizing.inputWidth, + verticalAlign: 'middle' + }, + DateInput__small: { + width: sizing.inputWidth_small + }, + DateInput__block: { + width: '100%' + }, + DateInput__disabled: { + background: color.disabled, + color: color.textDisabled + }, + DateInput_input: { + fontWeight: font.input.weight, + fontSize: font.input.size, + lineHeight: font.input.lineHeight, + color: color.text, + backgroundColor: color.background, + width: '100%', + padding: "".concat(spacing.displayTextPaddingVertical, "px ").concat(spacing.displayTextPaddingHorizontal, "px"), + paddingTop: spacing.displayTextPaddingTop, + paddingBottom: spacing.displayTextPaddingBottom, + paddingLeft: (0, _noflip["default"])(spacing.displayTextPaddingLeft), + paddingRight: (0, _noflip["default"])(spacing.displayTextPaddingRight), + border: border.input.border, + borderTop: border.input.borderTop, + borderRight: (0, _noflip["default"])(border.input.borderRight), + borderBottom: border.input.borderBottom, + borderLeft: (0, _noflip["default"])(border.input.borderLeft), + borderRadius: border.input.borderRadius + }, + DateInput_input__small: { + fontSize: font.input.size_small, + lineHeight: font.input.lineHeight_small, + letterSpacing: font.input.letterSpacing_small, + padding: "".concat(spacing.displayTextPaddingVertical_small, "px ").concat(spacing.displayTextPaddingHorizontal_small, "px"), + paddingTop: spacing.displayTextPaddingTop_small, + paddingBottom: spacing.displayTextPaddingBottom_small, + paddingLeft: (0, _noflip["default"])(spacing.displayTextPaddingLeft_small), + paddingRight: (0, _noflip["default"])(spacing.displayTextPaddingRight_small) + }, + DateInput_input__regular: { + fontWeight: 'auto' + }, + DateInput_input__readOnly: { + userSelect: 'none' + }, + DateInput_input__focused: { + outline: border.input.outlineFocused, + background: color.backgroundFocused, + border: border.input.borderFocused, + borderTop: border.input.borderTopFocused, + borderRight: (0, _noflip["default"])(border.input.borderRightFocused), + borderBottom: border.input.borderBottomFocused, + borderLeft: (0, _noflip["default"])(border.input.borderLeftFocused) + }, + DateInput_input__disabled: { + background: color.disabled, + fontStyle: font.input.styleDisabled + }, + DateInput_screenReaderMessage: { + border: 0, + clip: 'rect(0, 0, 0, 0)', + height: 1, + margin: -1, + overflow: 'hidden', + padding: 0, + position: 'absolute', + width: 1 + }, + DateInput_fang: { + position: 'absolute', + width: _constants.FANG_WIDTH_PX, + height: _constants.FANG_HEIGHT_PX, + left: 22, + // TODO: should be noflip wrapped and handled by an isRTL prop + zIndex: zIndex + 2 + }, + DateInput_fangShape: { + fill: color.background + }, + DateInput_fangStroke: { + stroke: color.core.border, + fill: 'transparent' + } + }; +}, { + pureComponent: typeof _react["default"].PureComponent !== 'undefined' +})(DateInput); + +exports["default"] = _default; + +/***/ }), +/* 483 */ +/***/ (function(module, exports, __webpack_require__) { + +var debounce = __webpack_require__(1188), + isObject = __webpack_require__(92); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing + }); +} + +module.exports = throttle; + + +/***/ }), +/* 484 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var RightArrow = function RightArrow(props) { + return _react["default"].createElement("svg", props, _react["default"].createElement("path", { + d: "M694 242l249 250c12 11 12 21 1 32L694 773c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210-210H68c-13 0-23-10-23-23s10-23 23-23h806L662 275c-21-22 11-54 32-33z" + })); +}; + +RightArrow.defaultProps = { + focusable: "false", + viewBox: "0 0 1000 1000" +}; +var _default = RightArrow; +exports["default"] = _default; + +/***/ }), +/* 485 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var LeftArrow = function LeftArrow(props) { + return _react["default"].createElement("svg", props, _react["default"].createElement("path", { + d: "M336 275L126 485h806c13 0 23 10 23 23s-10 23-23 23H126l210 210c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7L55 524c-11-11-11-21 0-32l249-249c21-22 53 10 32 32z" + })); +}; + +LeftArrow.defaultProps = { + focusable: "false", + viewBox: "0 0 1000 1000" +}; +var _default = LeftArrow; +exports["default"] = _default; + +/***/ }), +/* 486 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var CalendarIcon = function CalendarIcon(props) { + return _react["default"].createElement("svg", props, _react["default"].createElement("path", { + d: "m107 1393h241v-241h-241zm295 0h268v-241h-268zm-295-295h241v-268h-241zm295 0h268v-268h-268zm-295-321h241v-241h-241zm616 616h268v-241h-268zm-321-616h268v-241h-268zm643 616h241v-241h-241zm-322-295h268v-268h-268zm-294-723v-241c0-7-3-14-8-19-6-5-12-8-19-8h-54c-7 0-13 3-19 8-5 5-8 12-8 19v241c0 7 3 14 8 19 6 5 12 8 19 8h54c7 0 13-3 19-8 5-5 8-12 8-19zm616 723h241v-268h-241zm-322-321h268v-241h-268zm322 0h241v-241h-241zm27-402v-241c0-7-3-14-8-19-6-5-12-8-19-8h-54c-7 0-13 3-19 8-5 5-8 12-8 19v241c0 7 3 14 8 19 6 5 12 8 19 8h54c7 0 13-3 19-8 5-5 8-12 8-19zm321-54v1072c0 29-11 54-32 75s-46 32-75 32h-1179c-29 0-54-11-75-32s-32-46-32-75v-1072c0-29 11-54 32-75s46-32 75-32h107v-80c0-37 13-68 40-95s57-39 94-39h54c37 0 68 13 95 39 26 26 39 58 39 95v80h321v-80c0-37 13-69 40-95 26-26 57-39 94-39h54c37 0 68 13 94 39s40 58 40 95v80h107c29 0 54 11 75 32s32 46 32 75z" + })); +}; + +CalendarIcon.defaultProps = { + focusable: "false", + viewBox: "0 0 1393.1 1500" +}; +var _default = CalendarIcon; +exports["default"] = _default; + +/***/ }), +/* 487 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(31)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _object = _interopRequireDefault(__webpack_require__(224)); + +var _isTouchDevice = _interopRequireDefault(__webpack_require__(163)); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _isInclusivelyAfterDay = _interopRequireDefault(__webpack_require__(166)); + +var _isNextDay = _interopRequireDefault(__webpack_require__(488)); + +var _isSameDay = _interopRequireDefault(__webpack_require__(134)); + +var _isAfterDay = _interopRequireDefault(__webpack_require__(229)); + +var _isBeforeDay = _interopRequireDefault(__webpack_require__(185)); + +var _isPreviousDay = _interopRequireDefault(__webpack_require__(1191)); + +var _getVisibleDays = _interopRequireDefault(__webpack_require__(489)); + +var _isDayVisible = _interopRequireDefault(__webpack_require__(306)); + +var _getSelectedDateOffset = _interopRequireDefault(__webpack_require__(1192)); + +var _toISODateString = _interopRequireDefault(__webpack_require__(182)); + +var _modifiers = __webpack_require__(490); + +var _DisabledShape = _interopRequireDefault(__webpack_require__(183)); + +var _FocusedInputShape = _interopRequireDefault(__webpack_require__(474)); + +var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(162)); + +var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); + +var _CalendarInfoPositionShape = _interopRequireDefault(__webpack_require__(184)); + +var _NavPositionShape = _interopRequireDefault(__webpack_require__(165)); + +var _constants = __webpack_require__(25); + +var _DayPicker = _interopRequireDefault(__webpack_require__(307)); + +var _getPooledMoment = _interopRequireDefault(__webpack_require__(491)); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + startDate: undefined, + // TODO: use null + endDate: undefined, + // TODO: use null + minDate: null, + maxDate: null, + onDatesChange: function onDatesChange() {}, + startDateOffset: undefined, + endDateOffset: undefined, + focusedInput: null, + onFocusChange: function onFocusChange() {}, + onClose: function onClose() {}, + keepOpenOnDateSelect: false, + minimumNights: 1, + disabled: false, + isOutsideRange: function isOutsideRange() {}, + isDayBlocked: function isDayBlocked() {}, + isDayHighlighted: function isDayHighlighted() {}, + getMinNightsForHoverDate: function getMinNightsForHoverDate() {}, + daysViolatingMinNightsCanBeClicked: false, + // DayPicker props + renderMonthText: null, + renderWeekHeaderElement: null, + enableOutsideDays: false, + numberOfMonths: 1, + orientation: _constants.HORIZONTAL_ORIENTATION, + withPortal: false, + hideKeyboardShortcutsPanel: false, + initialVisibleMonth: null, + daySize: _constants.DAY_SIZE, + dayPickerNavigationInlineStyles: null, + navPosition: _constants.NAV_POSITION_TOP, + navPrev: null, + navNext: null, + renderNavPrevButton: null, + renderNavNextButton: null, + noNavButtons: false, + noNavNextButton: false, + noNavPrevButton: false, + onPrevMonthClick: function onPrevMonthClick() {}, + onNextMonthClick: function onNextMonthClick() {}, + onOutsideClick: function onOutsideClick() {}, + renderCalendarDay: undefined, + renderDayContents: null, + renderCalendarInfo: null, + renderMonthElement: null, + renderKeyboardShortcutsButton: undefined, + renderKeyboardShortcutsPanel: undefined, + calendarInfoPosition: _constants.INFO_POSITION_BOTTOM, + firstDayOfWeek: null, + verticalHeight: null, + noBorder: false, + transitionDuration: undefined, + verticalBorderSpacing: undefined, + horizontalMonthPadding: 13, + // accessibility + onBlur: function onBlur() {}, + isFocused: false, + showKeyboardShortcuts: false, + onTab: function onTab() {}, + onShiftTab: function onShiftTab() {}, + // i18n + monthFormat: 'MMMM YYYY', + weekDayFormat: 'dd', + phrases: _defaultPhrases.DayPickerPhrases, + dayAriaLabelFormat: undefined, + isRTL: false +}; + +var getChooseAvailableDatePhrase = function getChooseAvailableDatePhrase(phrases, focusedInput) { + if (focusedInput === _constants.START_DATE) { + return phrases.chooseAvailableStartDate; + } + + if (focusedInput === _constants.END_DATE) { + return phrases.chooseAvailableEndDate; + } + + return phrases.chooseAvailableDate; +}; + +var DayPickerRangeController = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(DayPickerRangeController, _ref); + var _proto = DayPickerRangeController.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function DayPickerRangeController(props) { + var _this; + + _this = _ref.call(this, props) || this; + _this.isTouchDevice = (0, _isTouchDevice["default"])(); + _this.today = (0, _moment["default"])(); + _this.modifiers = { + today: function today(day) { + return _this.isToday(day); + }, + blocked: function blocked(day) { + return _this.isBlocked(day); + }, + 'blocked-calendar': function blockedCalendar(day) { + return props.isDayBlocked(day); + }, + 'blocked-out-of-range': function blockedOutOfRange(day) { + return props.isOutsideRange(day); + }, + 'highlighted-calendar': function highlightedCalendar(day) { + return props.isDayHighlighted(day); + }, + valid: function valid(day) { + return !_this.isBlocked(day); + }, + 'selected-start': function selectedStart(day) { + return _this.isStartDate(day); + }, + 'selected-end': function selectedEnd(day) { + return _this.isEndDate(day); + }, + 'blocked-minimum-nights': function blockedMinimumNights(day) { + return _this.doesNotMeetMinimumNights(day); + }, + 'selected-span': function selectedSpan(day) { + return _this.isInSelectedSpan(day); + }, + 'last-in-range': function lastInRange(day) { + return _this.isLastInRange(day); + }, + hovered: function hovered(day) { + return _this.isHovered(day); + }, + 'hovered-span': function hoveredSpan(day) { + return _this.isInHoveredSpan(day); + }, + 'hovered-offset': function hoveredOffset(day) { + return _this.isInHoveredSpan(day); + }, + 'after-hovered-start': function afterHoveredStart(day) { + return _this.isDayAfterHoveredStartDate(day); + }, + 'first-day-of-week': function firstDayOfWeek(day) { + return _this.isFirstDayOfWeek(day); + }, + 'last-day-of-week': function lastDayOfWeek(day) { + return _this.isLastDayOfWeek(day); + }, + 'hovered-start-first-possible-end': function hoveredStartFirstPossibleEnd(day, hoverDate) { + return _this.isFirstPossibleEndDateForHoveredStartDate(day, hoverDate); + }, + 'hovered-start-blocked-minimum-nights': function hoveredStartBlockedMinimumNights(day, hoverDate) { + return _this.doesNotMeetMinNightsForHoveredStartDate(day, hoverDate); + }, + 'before-hovered-end': function beforeHoveredEnd(day) { + return _this.isDayBeforeHoveredEndDate(day); + }, + 'no-selected-start-before-selected-end': function noSelectedStartBeforeSelectedEnd(day) { + return _this.beforeSelectedEnd(day) && !props.startDate; + }, + 'selected-start-in-hovered-span': function selectedStartInHoveredSpan(day, hoverDate) { + return _this.isStartDate(day) && (0, _isAfterDay["default"])(hoverDate, day); + }, + 'selected-start-no-selected-end': function selectedStartNoSelectedEnd(day) { + return _this.isStartDate(day) && !props.endDate; + }, + 'selected-end-no-selected-start': function selectedEndNoSelectedStart(day) { + return _this.isEndDate(day) && !props.startDate; + } + }; + + var _this$getStateForNewM = _this.getStateForNewMonth(props), + currentMonth = _this$getStateForNewM.currentMonth, + visibleDays = _this$getStateForNewM.visibleDays; // initialize phrases + // set the appropriate CalendarDay phrase based on focusedInput + + + var chooseAvailableDate = getChooseAvailableDatePhrase(props.phrases, props.focusedInput); + _this.state = { + hoverDate: null, + currentMonth: currentMonth, + phrases: _objectSpread({}, props.phrases, { + chooseAvailableDate: chooseAvailableDate + }), + visibleDays: visibleDays, + disablePrev: _this.shouldDisableMonthNavigation(props.minDate, currentMonth), + disableNext: _this.shouldDisableMonthNavigation(props.maxDate, currentMonth) + }; + _this.onDayClick = _this.onDayClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onDayMouseEnter = _this.onDayMouseEnter.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onDayMouseLeave = _this.onDayMouseLeave.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onPrevMonthClick = _this.onPrevMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onNextMonthClick = _this.onNextMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onMonthChange = _this.onMonthChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onYearChange = _this.onYearChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onGetNextScrollableMonths = _this.onGetNextScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onGetPrevScrollableMonths = _this.onGetPrevScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); + _this.getFirstFocusableDay = _this.getFirstFocusableDay.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var _this2 = this; + + var startDate = nextProps.startDate, + endDate = nextProps.endDate, + focusedInput = nextProps.focusedInput, + getMinNightsForHoverDate = nextProps.getMinNightsForHoverDate, + minimumNights = nextProps.minimumNights, + isOutsideRange = nextProps.isOutsideRange, + isDayBlocked = nextProps.isDayBlocked, + isDayHighlighted = nextProps.isDayHighlighted, + phrases = nextProps.phrases, + initialVisibleMonth = nextProps.initialVisibleMonth, + numberOfMonths = nextProps.numberOfMonths, + enableOutsideDays = nextProps.enableOutsideDays; + var _this$props = this.props, + prevStartDate = _this$props.startDate, + prevEndDate = _this$props.endDate, + prevFocusedInput = _this$props.focusedInput, + prevMinimumNights = _this$props.minimumNights, + prevIsOutsideRange = _this$props.isOutsideRange, + prevIsDayBlocked = _this$props.isDayBlocked, + prevIsDayHighlighted = _this$props.isDayHighlighted, + prevPhrases = _this$props.phrases, + prevInitialVisibleMonth = _this$props.initialVisibleMonth, + prevNumberOfMonths = _this$props.numberOfMonths, + prevEnableOutsideDays = _this$props.enableOutsideDays; + var hoverDate = this.state.hoverDate; + var visibleDays = this.state.visibleDays; + var recomputeOutsideRange = false; + var recomputeDayBlocked = false; + var recomputeDayHighlighted = false; + + if (isOutsideRange !== prevIsOutsideRange) { + this.modifiers['blocked-out-of-range'] = function (day) { + return isOutsideRange(day); + }; + + recomputeOutsideRange = true; + } + + if (isDayBlocked !== prevIsDayBlocked) { + this.modifiers['blocked-calendar'] = function (day) { + return isDayBlocked(day); + }; + + recomputeDayBlocked = true; + } + + if (isDayHighlighted !== prevIsDayHighlighted) { + this.modifiers['highlighted-calendar'] = function (day) { + return isDayHighlighted(day); + }; + + recomputeDayHighlighted = true; + } + + var recomputePropModifiers = recomputeOutsideRange || recomputeDayBlocked || recomputeDayHighlighted; + var didStartDateChange = startDate !== prevStartDate; + var didEndDateChange = endDate !== prevEndDate; + var didFocusChange = focusedInput !== prevFocusedInput; + + if (numberOfMonths !== prevNumberOfMonths || enableOutsideDays !== prevEnableOutsideDays || initialVisibleMonth !== prevInitialVisibleMonth && !prevFocusedInput && didFocusChange) { + var newMonthState = this.getStateForNewMonth(nextProps); + var currentMonth = newMonthState.currentMonth; + visibleDays = newMonthState.visibleDays; + this.setState({ + currentMonth: currentMonth, + visibleDays: visibleDays + }); + } + + var modifiers = {}; + + if (didStartDateChange) { + modifiers = this.deleteModifier(modifiers, prevStartDate, 'selected-start'); + modifiers = this.addModifier(modifiers, startDate, 'selected-start'); + + if (prevStartDate) { + var startSpan = prevStartDate.clone().add(1, 'day'); + var endSpan = prevStartDate.clone().add(prevMinimumNights + 1, 'days'); + modifiers = this.deleteModifierFromRange(modifiers, startSpan, endSpan, 'after-hovered-start'); + + if (!endDate || !prevEndDate) { + modifiers = this.deleteModifier(modifiers, prevStartDate, 'selected-start-no-selected-end'); + } + } + + if (!prevStartDate && endDate && startDate) { + modifiers = this.deleteModifier(modifiers, endDate, 'selected-end-no-selected-start'); + modifiers = this.deleteModifier(modifiers, endDate, 'selected-end-in-hovered-span'); + (0, _object["default"])(visibleDays).forEach(function (days) { + Object.keys(days).forEach(function (day) { + var momentObj = (0, _moment["default"])(day); + modifiers = _this2.deleteModifier(modifiers, momentObj, 'no-selected-start-before-selected-end'); + }); + }); + } + } + + if (didEndDateChange) { + modifiers = this.deleteModifier(modifiers, prevEndDate, 'selected-end'); + modifiers = this.addModifier(modifiers, endDate, 'selected-end'); + + if (prevEndDate && (!startDate || !prevStartDate)) { + modifiers = this.deleteModifier(modifiers, prevEndDate, 'selected-end-no-selected-start'); + } + } + + if (didStartDateChange || didEndDateChange) { + if (prevStartDate && prevEndDate) { + modifiers = this.deleteModifierFromRange(modifiers, prevStartDate, prevEndDate.clone().add(1, 'day'), 'selected-span'); + } + + if (startDate && endDate) { + modifiers = this.deleteModifierFromRange(modifiers, startDate, endDate.clone().add(1, 'day'), 'hovered-span'); + modifiers = this.addModifierToRange(modifiers, startDate.clone().add(1, 'day'), endDate, 'selected-span'); + } + + if (startDate && !endDate) { + modifiers = this.addModifier(modifiers, startDate, 'selected-start-no-selected-end'); + } + + if (endDate && !startDate) { + modifiers = this.addModifier(modifiers, endDate, 'selected-end-no-selected-start'); + } + + if (!startDate && endDate) { + (0, _object["default"])(visibleDays).forEach(function (days) { + Object.keys(days).forEach(function (day) { + var momentObj = (0, _moment["default"])(day); + + if ((0, _isBeforeDay["default"])(momentObj, endDate)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'no-selected-start-before-selected-end'); + } + }); + }); + } + } + + if (!this.isTouchDevice && didStartDateChange && startDate && !endDate) { + var _startSpan = startDate.clone().add(1, 'day'); + + var _endSpan = startDate.clone().add(minimumNights + 1, 'days'); + + modifiers = this.addModifierToRange(modifiers, _startSpan, _endSpan, 'after-hovered-start'); + } + + if (!this.isTouchDevice && didEndDateChange && !startDate && endDate) { + var _startSpan2 = endDate.clone().subtract(minimumNights, 'days'); + + var _endSpan2 = endDate.clone(); + + modifiers = this.addModifierToRange(modifiers, _startSpan2, _endSpan2, 'before-hovered-end'); + } + + if (prevMinimumNights > 0) { + if (didFocusChange || didStartDateChange || minimumNights !== prevMinimumNights) { + var _startSpan3 = prevStartDate || this.today; + + modifiers = this.deleteModifierFromRange(modifiers, _startSpan3, _startSpan3.clone().add(prevMinimumNights, 'days'), 'blocked-minimum-nights'); + modifiers = this.deleteModifierFromRange(modifiers, _startSpan3, _startSpan3.clone().add(prevMinimumNights, 'days'), 'blocked'); + } + } + + if (didFocusChange || recomputePropModifiers) { + (0, _object["default"])(visibleDays).forEach(function (days) { + Object.keys(days).forEach(function (day) { + var momentObj = (0, _getPooledMoment["default"])(day); + var isBlocked = false; + + if (didFocusChange || recomputeOutsideRange) { + if (isOutsideRange(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-out-of-range'); + isBlocked = true; + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-out-of-range'); + } + } + + if (didFocusChange || recomputeDayBlocked) { + if (isDayBlocked(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-calendar'); + isBlocked = true; + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-calendar'); + } + } + + if (isBlocked) { + modifiers = _this2.addModifier(modifiers, momentObj, 'blocked'); + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked'); + } + + if (didFocusChange || recomputeDayHighlighted) { + if (isDayHighlighted(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'highlighted-calendar'); + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'highlighted-calendar'); + } + } + }); + }); + } + + if (!this.isTouchDevice && didFocusChange && hoverDate && !this.isBlocked(hoverDate)) { + var minNightsForHoverDate = getMinNightsForHoverDate(hoverDate); + + if (minNightsForHoverDate > 0 && focusedInput === _constants.END_DATE) { + modifiers = this.deleteModifierFromRange(modifiers, hoverDate.clone().add(1, 'days'), hoverDate.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-blocked-minimum-nights'); + modifiers = this.deleteModifier(modifiers, hoverDate.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-first-possible-end'); + } + + if (minNightsForHoverDate > 0 && focusedInput === _constants.START_DATE) { + modifiers = this.addModifierToRange(modifiers, hoverDate.clone().add(1, 'days'), hoverDate.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-blocked-minimum-nights'); + modifiers = this.addModifier(modifiers, hoverDate.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-first-possible-end'); + } + } + + if (minimumNights > 0 && startDate && focusedInput === _constants.END_DATE) { + modifiers = this.addModifierToRange(modifiers, startDate, startDate.clone().add(minimumNights, 'days'), 'blocked-minimum-nights'); + modifiers = this.addModifierToRange(modifiers, startDate, startDate.clone().add(minimumNights, 'days'), 'blocked'); + } + + var today = (0, _moment["default"])(); + + if (!(0, _isSameDay["default"])(this.today, today)) { + modifiers = this.deleteModifier(modifiers, this.today, 'today'); + modifiers = this.addModifier(modifiers, today, 'today'); + this.today = today; + } + + if (Object.keys(modifiers).length > 0) { + this.setState({ + visibleDays: _objectSpread({}, visibleDays, {}, modifiers) + }); + } + + if (didFocusChange || phrases !== prevPhrases) { + // set the appropriate CalendarDay phrase based on focusedInput + var chooseAvailableDate = getChooseAvailableDatePhrase(phrases, focusedInput); + this.setState({ + phrases: _objectSpread({}, phrases, { + chooseAvailableDate: chooseAvailableDate + }) + }); + } + }; + + _proto.onDayClick = function onDayClick(day, e) { + var _this$props2 = this.props, + keepOpenOnDateSelect = _this$props2.keepOpenOnDateSelect, + minimumNights = _this$props2.minimumNights, + onBlur = _this$props2.onBlur, + focusedInput = _this$props2.focusedInput, + onFocusChange = _this$props2.onFocusChange, + onClose = _this$props2.onClose, + onDatesChange = _this$props2.onDatesChange, + startDateOffset = _this$props2.startDateOffset, + endDateOffset = _this$props2.endDateOffset, + disabled = _this$props2.disabled, + daysViolatingMinNightsCanBeClicked = _this$props2.daysViolatingMinNightsCanBeClicked; + if (e) e.preventDefault(); + if (this.isBlocked(day, !daysViolatingMinNightsCanBeClicked)) return; + var _this$props3 = this.props, + startDate = _this$props3.startDate, + endDate = _this$props3.endDate; + + if (startDateOffset || endDateOffset) { + startDate = (0, _getSelectedDateOffset["default"])(startDateOffset, day); + endDate = (0, _getSelectedDateOffset["default"])(endDateOffset, day); + + if (this.isBlocked(startDate) || this.isBlocked(endDate)) { + return; + } + + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + + if (!keepOpenOnDateSelect) { + onFocusChange(null); + onClose({ + startDate: startDate, + endDate: endDate + }); + } + } else if (focusedInput === _constants.START_DATE) { + var lastAllowedStartDate = endDate && endDate.clone().subtract(minimumNights, 'days'); + var isStartDateAfterEndDate = (0, _isBeforeDay["default"])(lastAllowedStartDate, day) || (0, _isAfterDay["default"])(startDate, endDate); + var isEndDateDisabled = disabled === _constants.END_DATE; + + if (!isEndDateDisabled || !isStartDateAfterEndDate) { + startDate = day; + + if (isStartDateAfterEndDate) { + endDate = null; + } + } + + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + + if (isEndDateDisabled && !isStartDateAfterEndDate) { + onFocusChange(null); + onClose({ + startDate: startDate, + endDate: endDate + }); + } else if (!isEndDateDisabled) { + onFocusChange(_constants.END_DATE); + } + } else if (focusedInput === _constants.END_DATE) { + var firstAllowedEndDate = startDate && startDate.clone().add(minimumNights, 'days'); + + if (!startDate) { + endDate = day; + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + onFocusChange(_constants.START_DATE); + } else if ((0, _isInclusivelyAfterDay["default"])(day, firstAllowedEndDate)) { + endDate = day; + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + + if (!keepOpenOnDateSelect) { + onFocusChange(null); + onClose({ + startDate: startDate, + endDate: endDate + }); + } + } else if (daysViolatingMinNightsCanBeClicked && this.doesNotMeetMinimumNights(day)) { + endDate = day; + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + } else if (disabled !== _constants.START_DATE) { + startDate = day; + endDate = null; + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + } else { + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + } + } else { + onDatesChange({ + startDate: startDate, + endDate: endDate + }); + } + + onBlur(); + }; + + _proto.onDayMouseEnter = function onDayMouseEnter(day) { + /* eslint react/destructuring-assignment: 1 */ + if (this.isTouchDevice) return; + var _this$props4 = this.props, + startDate = _this$props4.startDate, + endDate = _this$props4.endDate, + focusedInput = _this$props4.focusedInput, + getMinNightsForHoverDate = _this$props4.getMinNightsForHoverDate, + minimumNights = _this$props4.minimumNights, + startDateOffset = _this$props4.startDateOffset, + endDateOffset = _this$props4.endDateOffset; + var _this$state = this.state, + hoverDate = _this$state.hoverDate, + visibleDays = _this$state.visibleDays, + dateOffset = _this$state.dateOffset; + var nextDateOffset = null; + + if (focusedInput) { + var hasOffset = startDateOffset || endDateOffset; + var modifiers = {}; + + if (hasOffset) { + var start = (0, _getSelectedDateOffset["default"])(startDateOffset, day); + var end = (0, _getSelectedDateOffset["default"])(endDateOffset, day, function (rangeDay) { + return rangeDay.add(1, 'day'); + }); + nextDateOffset = { + start: start, + end: end + }; // eslint-disable-next-line react/destructuring-assignment + + if (dateOffset && dateOffset.start && dateOffset.end) { + modifiers = this.deleteModifierFromRange(modifiers, dateOffset.start, dateOffset.end, 'hovered-offset'); + } + + modifiers = this.addModifierToRange(modifiers, start, end, 'hovered-offset'); + } + + if (!hasOffset) { + modifiers = this.deleteModifier(modifiers, hoverDate, 'hovered'); + modifiers = this.addModifier(modifiers, day, 'hovered'); + + if (startDate && !endDate && focusedInput === _constants.END_DATE) { + if ((0, _isAfterDay["default"])(hoverDate, startDate)) { + var endSpan = hoverDate.clone().add(1, 'day'); + modifiers = this.deleteModifierFromRange(modifiers, startDate, endSpan, 'hovered-span'); + } + + if ((0, _isBeforeDay["default"])(day, startDate) || (0, _isSameDay["default"])(day, startDate)) { + modifiers = this.deleteModifier(modifiers, startDate, 'selected-start-in-hovered-span'); + } + + if (!this.isBlocked(day) && (0, _isAfterDay["default"])(day, startDate)) { + var _endSpan3 = day.clone().add(1, 'day'); + + modifiers = this.addModifierToRange(modifiers, startDate, _endSpan3, 'hovered-span'); + modifiers = this.addModifier(modifiers, startDate, 'selected-start-in-hovered-span'); + } + } + + if (!startDate && endDate && focusedInput === _constants.START_DATE) { + if ((0, _isBeforeDay["default"])(hoverDate, endDate)) { + modifiers = this.deleteModifierFromRange(modifiers, hoverDate, endDate, 'hovered-span'); + } + + if ((0, _isAfterDay["default"])(day, endDate) || (0, _isSameDay["default"])(day, endDate)) { + modifiers = this.deleteModifier(modifiers, endDate, 'selected-end-in-hovered-span'); + } + + if (!this.isBlocked(day) && (0, _isBeforeDay["default"])(day, endDate)) { + modifiers = this.addModifierToRange(modifiers, day, endDate, 'hovered-span'); + modifiers = this.addModifier(modifiers, endDate, 'selected-end-in-hovered-span'); + } + } + + if (startDate) { + var startSpan = startDate.clone().add(1, 'day'); + + var _endSpan4 = startDate.clone().add(minimumNights + 1, 'days'); + + modifiers = this.deleteModifierFromRange(modifiers, startSpan, _endSpan4, 'after-hovered-start'); + + if ((0, _isSameDay["default"])(day, startDate)) { + var newStartSpan = startDate.clone().add(1, 'day'); + var newEndSpan = startDate.clone().add(minimumNights + 1, 'days'); + modifiers = this.addModifierToRange(modifiers, newStartSpan, newEndSpan, 'after-hovered-start'); + } + } + + if (endDate) { + var _startSpan4 = endDate.clone().subtract(minimumNights, 'days'); + + modifiers = this.deleteModifierFromRange(modifiers, _startSpan4, endDate, 'before-hovered-end'); + + if ((0, _isSameDay["default"])(day, endDate)) { + var _newStartSpan = endDate.clone().subtract(minimumNights, 'days'); + + modifiers = this.addModifierToRange(modifiers, _newStartSpan, endDate, 'before-hovered-end'); + } + } + + if (hoverDate && !this.isBlocked(hoverDate)) { + var minNightsForPrevHoverDate = getMinNightsForHoverDate(hoverDate); + + if (minNightsForPrevHoverDate > 0 && focusedInput === _constants.START_DATE) { + modifiers = this.deleteModifierFromRange(modifiers, hoverDate.clone().add(1, 'days'), hoverDate.clone().add(minNightsForPrevHoverDate, 'days'), 'hovered-start-blocked-minimum-nights'); + modifiers = this.deleteModifier(modifiers, hoverDate.clone().add(minNightsForPrevHoverDate, 'days'), 'hovered-start-first-possible-end'); + } + } + + if (!this.isBlocked(day)) { + var minNightsForHoverDate = getMinNightsForHoverDate(day); + + if (minNightsForHoverDate > 0 && focusedInput === _constants.START_DATE) { + modifiers = this.addModifierToRange(modifiers, day.clone().add(1, 'days'), day.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-blocked-minimum-nights'); + modifiers = this.addModifier(modifiers, day.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-first-possible-end'); + } + } + } + + this.setState({ + hoverDate: day, + dateOffset: nextDateOffset, + visibleDays: _objectSpread({}, visibleDays, {}, modifiers) + }); + } + }; + + _proto.onDayMouseLeave = function onDayMouseLeave(day) { + var _this$props5 = this.props, + startDate = _this$props5.startDate, + endDate = _this$props5.endDate, + focusedInput = _this$props5.focusedInput, + getMinNightsForHoverDate = _this$props5.getMinNightsForHoverDate, + minimumNights = _this$props5.minimumNights; + var _this$state2 = this.state, + hoverDate = _this$state2.hoverDate, + visibleDays = _this$state2.visibleDays, + dateOffset = _this$state2.dateOffset; + if (this.isTouchDevice || !hoverDate) return; + var modifiers = {}; + modifiers = this.deleteModifier(modifiers, hoverDate, 'hovered'); + + if (dateOffset) { + modifiers = this.deleteModifierFromRange(modifiers, dateOffset.start, dateOffset.end, 'hovered-offset'); + } + + if (startDate && !endDate) { + if ((0, _isAfterDay["default"])(hoverDate, startDate)) { + var endSpan = hoverDate.clone().add(1, 'day'); + modifiers = this.deleteModifierFromRange(modifiers, startDate, endSpan, 'hovered-span'); + } + + if ((0, _isAfterDay["default"])(day, startDate)) { + modifiers = this.deleteModifier(modifiers, startDate, 'selected-start-in-hovered-span'); + } + } + + if (!startDate && endDate) { + if ((0, _isAfterDay["default"])(endDate, hoverDate)) { + modifiers = this.deleteModifierFromRange(modifiers, hoverDate, endDate, 'hovered-span'); + } + + if ((0, _isBeforeDay["default"])(day, endDate)) { + modifiers = this.deleteModifier(modifiers, endDate, 'selected-end-in-hovered-span'); + } + } + + if (startDate && (0, _isSameDay["default"])(day, startDate)) { + var startSpan = startDate.clone().add(1, 'day'); + + var _endSpan5 = startDate.clone().add(minimumNights + 1, 'days'); + + modifiers = this.deleteModifierFromRange(modifiers, startSpan, _endSpan5, 'after-hovered-start'); + } + + if (endDate && (0, _isSameDay["default"])(day, endDate)) { + var _startSpan5 = endDate.clone().subtract(minimumNights, 'days'); + + modifiers = this.deleteModifierFromRange(modifiers, _startSpan5, endDate, 'before-hovered-end'); + } + + if (!this.isBlocked(hoverDate)) { + var minNightsForHoverDate = getMinNightsForHoverDate(hoverDate); + + if (minNightsForHoverDate > 0 && focusedInput === _constants.START_DATE) { + modifiers = this.deleteModifierFromRange(modifiers, hoverDate.clone().add(1, 'days'), hoverDate.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-blocked-minimum-nights'); + modifiers = this.deleteModifier(modifiers, hoverDate.clone().add(minNightsForHoverDate, 'days'), 'hovered-start-first-possible-end'); + } + } + + this.setState({ + hoverDate: null, + visibleDays: _objectSpread({}, visibleDays, {}, modifiers) + }); + }; + + _proto.onPrevMonthClick = function onPrevMonthClick() { + var _this$props6 = this.props, + enableOutsideDays = _this$props6.enableOutsideDays, + maxDate = _this$props6.maxDate, + minDate = _this$props6.minDate, + numberOfMonths = _this$props6.numberOfMonths, + onPrevMonthClick = _this$props6.onPrevMonthClick; + var _this$state3 = this.state, + currentMonth = _this$state3.currentMonth, + visibleDays = _this$state3.visibleDays; + var newVisibleDays = {}; + Object.keys(visibleDays).sort().slice(0, numberOfMonths + 1).forEach(function (month) { + newVisibleDays[month] = visibleDays[month]; + }); + var prevMonth = currentMonth.clone().subtract(2, 'months'); + var prevMonthVisibleDays = (0, _getVisibleDays["default"])(prevMonth, 1, enableOutsideDays, true); + var newCurrentMonth = currentMonth.clone().subtract(1, 'month'); + this.setState({ + currentMonth: newCurrentMonth, + disablePrev: this.shouldDisableMonthNavigation(minDate, newCurrentMonth), + disableNext: this.shouldDisableMonthNavigation(maxDate, newCurrentMonth), + visibleDays: _objectSpread({}, newVisibleDays, {}, this.getModifiers(prevMonthVisibleDays)) + }, function () { + onPrevMonthClick(newCurrentMonth.clone()); + }); + }; + + _proto.onNextMonthClick = function onNextMonthClick() { + var _this$props7 = this.props, + enableOutsideDays = _this$props7.enableOutsideDays, + maxDate = _this$props7.maxDate, + minDate = _this$props7.minDate, + numberOfMonths = _this$props7.numberOfMonths, + onNextMonthClick = _this$props7.onNextMonthClick; + var _this$state4 = this.state, + currentMonth = _this$state4.currentMonth, + visibleDays = _this$state4.visibleDays; + var newVisibleDays = {}; + Object.keys(visibleDays).sort().slice(1).forEach(function (month) { + newVisibleDays[month] = visibleDays[month]; + }); + var nextMonth = currentMonth.clone().add(numberOfMonths + 1, 'month'); + var nextMonthVisibleDays = (0, _getVisibleDays["default"])(nextMonth, 1, enableOutsideDays, true); + var newCurrentMonth = currentMonth.clone().add(1, 'month'); + this.setState({ + currentMonth: newCurrentMonth, + disablePrev: this.shouldDisableMonthNavigation(minDate, newCurrentMonth), + disableNext: this.shouldDisableMonthNavigation(maxDate, newCurrentMonth), + visibleDays: _objectSpread({}, newVisibleDays, {}, this.getModifiers(nextMonthVisibleDays)) + }, function () { + onNextMonthClick(newCurrentMonth.clone()); + }); + }; + + _proto.onMonthChange = function onMonthChange(newMonth) { + var _this$props8 = this.props, + numberOfMonths = _this$props8.numberOfMonths, + enableOutsideDays = _this$props8.enableOutsideDays, + orientation = _this$props8.orientation; + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var newVisibleDays = (0, _getVisibleDays["default"])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); + this.setState({ + currentMonth: newMonth.clone(), + visibleDays: this.getModifiers(newVisibleDays) + }); + }; + + _proto.onYearChange = function onYearChange(newMonth) { + var _this$props9 = this.props, + numberOfMonths = _this$props9.numberOfMonths, + enableOutsideDays = _this$props9.enableOutsideDays, + orientation = _this$props9.orientation; + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var newVisibleDays = (0, _getVisibleDays["default"])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); + this.setState({ + currentMonth: newMonth.clone(), + visibleDays: this.getModifiers(newVisibleDays) + }); + }; + + _proto.onGetNextScrollableMonths = function onGetNextScrollableMonths() { + var _this$props10 = this.props, + numberOfMonths = _this$props10.numberOfMonths, + enableOutsideDays = _this$props10.enableOutsideDays; + var _this$state5 = this.state, + currentMonth = _this$state5.currentMonth, + visibleDays = _this$state5.visibleDays; + var numberOfVisibleMonths = Object.keys(visibleDays).length; + var nextMonth = currentMonth.clone().add(numberOfVisibleMonths, 'month'); + var newVisibleDays = (0, _getVisibleDays["default"])(nextMonth, numberOfMonths, enableOutsideDays, true); + this.setState({ + visibleDays: _objectSpread({}, visibleDays, {}, this.getModifiers(newVisibleDays)) + }); + }; + + _proto.onGetPrevScrollableMonths = function onGetPrevScrollableMonths() { + var _this$props11 = this.props, + numberOfMonths = _this$props11.numberOfMonths, + enableOutsideDays = _this$props11.enableOutsideDays; + var _this$state6 = this.state, + currentMonth = _this$state6.currentMonth, + visibleDays = _this$state6.visibleDays; + var firstPreviousMonth = currentMonth.clone().subtract(numberOfMonths, 'month'); + var newVisibleDays = (0, _getVisibleDays["default"])(firstPreviousMonth, numberOfMonths, enableOutsideDays, true); + this.setState({ + currentMonth: firstPreviousMonth.clone(), + visibleDays: _objectSpread({}, visibleDays, {}, this.getModifiers(newVisibleDays)) + }); + }; + + _proto.getFirstFocusableDay = function getFirstFocusableDay(newMonth) { + var _this3 = this; + + var _this$props12 = this.props, + startDate = _this$props12.startDate, + endDate = _this$props12.endDate, + focusedInput = _this$props12.focusedInput, + minimumNights = _this$props12.minimumNights, + numberOfMonths = _this$props12.numberOfMonths; + var focusedDate = newMonth.clone().startOf('month'); + + if (focusedInput === _constants.START_DATE && startDate) { + focusedDate = startDate.clone(); + } else if (focusedInput === _constants.END_DATE && !endDate && startDate) { + focusedDate = startDate.clone().add(minimumNights, 'days'); + } else if (focusedInput === _constants.END_DATE && endDate) { + focusedDate = endDate.clone(); + } + + if (this.isBlocked(focusedDate)) { + var days = []; + var lastVisibleDay = newMonth.clone().add(numberOfMonths - 1, 'months').endOf('month'); + var currentDay = focusedDate.clone(); + + while (!(0, _isAfterDay["default"])(currentDay, lastVisibleDay)) { + currentDay = currentDay.clone().add(1, 'day'); + days.push(currentDay); + } + + var viableDays = days.filter(function (day) { + return !_this3.isBlocked(day); + }); + + if (viableDays.length > 0) { + var _viableDays = (0, _slicedToArray2["default"])(viableDays, 1); + + focusedDate = _viableDays[0]; + } + } + + return focusedDate; + }; + + _proto.getModifiers = function getModifiers(visibleDays) { + var _this4 = this; + + var modifiers = {}; + Object.keys(visibleDays).forEach(function (month) { + modifiers[month] = {}; + visibleDays[month].forEach(function (day) { + modifiers[month][(0, _toISODateString["default"])(day)] = _this4.getModifiersForDay(day); + }); + }); + return modifiers; + }; + + _proto.getModifiersForDay = function getModifiersForDay(day) { + var _this5 = this; + + return new Set(Object.keys(this.modifiers).filter(function (modifier) { + return _this5.modifiers[modifier](day); + })); + }; + + _proto.getStateForNewMonth = function getStateForNewMonth(nextProps) { + var _this6 = this; + + var initialVisibleMonth = nextProps.initialVisibleMonth, + numberOfMonths = nextProps.numberOfMonths, + enableOutsideDays = nextProps.enableOutsideDays, + orientation = nextProps.orientation, + startDate = nextProps.startDate; + var initialVisibleMonthThunk = initialVisibleMonth || (startDate ? function () { + return startDate; + } : function () { + return _this6.today; + }); + var currentMonth = initialVisibleMonthThunk(); + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var visibleDays = this.getModifiers((0, _getVisibleDays["default"])(currentMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths)); + return { + currentMonth: currentMonth, + visibleDays: visibleDays + }; + }; + + _proto.shouldDisableMonthNavigation = function shouldDisableMonthNavigation(date, visibleMonth) { + if (!date) return false; + var _this$props13 = this.props, + numberOfMonths = _this$props13.numberOfMonths, + enableOutsideDays = _this$props13.enableOutsideDays; + return (0, _isDayVisible["default"])(date, visibleMonth, numberOfMonths, enableOutsideDays); + }; + + _proto.addModifier = function addModifier(updatedDays, day, modifier) { + return (0, _modifiers.addModifier)(updatedDays, day, modifier, this.props, this.state); + }; + + _proto.addModifierToRange = function addModifierToRange(updatedDays, start, end, modifier) { + var days = updatedDays; + var spanStart = start.clone(); + + while ((0, _isBeforeDay["default"])(spanStart, end)) { + days = this.addModifier(days, spanStart, modifier); + spanStart = spanStart.clone().add(1, 'day'); + } + + return days; + }; + + _proto.deleteModifier = function deleteModifier(updatedDays, day, modifier) { + return (0, _modifiers.deleteModifier)(updatedDays, day, modifier, this.props, this.state); + }; + + _proto.deleteModifierFromRange = function deleteModifierFromRange(updatedDays, start, end, modifier) { + var days = updatedDays; + var spanStart = start.clone(); + + while ((0, _isBeforeDay["default"])(spanStart, end)) { + days = this.deleteModifier(days, spanStart, modifier); + spanStart = spanStart.clone().add(1, 'day'); + } + + return days; + }; + + _proto.doesNotMeetMinimumNights = function doesNotMeetMinimumNights(day) { + var _this$props14 = this.props, + startDate = _this$props14.startDate, + isOutsideRange = _this$props14.isOutsideRange, + focusedInput = _this$props14.focusedInput, + minimumNights = _this$props14.minimumNights; + if (focusedInput !== _constants.END_DATE) return false; + + if (startDate) { + var dayDiff = day.diff(startDate.clone().startOf('day').hour(12), 'days'); + return dayDiff < minimumNights && dayDiff >= 0; + } + + return isOutsideRange((0, _moment["default"])(day).subtract(minimumNights, 'days')); + }; + + _proto.doesNotMeetMinNightsForHoveredStartDate = function doesNotMeetMinNightsForHoveredStartDate(day, hoverDate) { + var _this$props15 = this.props, + focusedInput = _this$props15.focusedInput, + getMinNightsForHoverDate = _this$props15.getMinNightsForHoverDate; + if (focusedInput !== _constants.END_DATE) return false; + + if (hoverDate && !this.isBlocked(hoverDate)) { + var minNights = getMinNightsForHoverDate(hoverDate); + var dayDiff = day.diff(hoverDate.clone().startOf('day').hour(12), 'days'); + return dayDiff < minNights && dayDiff >= 0; + } + + return false; + }; + + _proto.isDayAfterHoveredStartDate = function isDayAfterHoveredStartDate(day) { + var _this$props16 = this.props, + startDate = _this$props16.startDate, + endDate = _this$props16.endDate, + minimumNights = _this$props16.minimumNights; + + var _ref2 = this.state || {}, + hoverDate = _ref2.hoverDate; + + return !!startDate && !endDate && !this.isBlocked(day) && (0, _isNextDay["default"])(hoverDate, day) && minimumNights > 0 && (0, _isSameDay["default"])(hoverDate, startDate); + }; + + _proto.isEndDate = function isEndDate(day) { + var endDate = this.props.endDate; + return (0, _isSameDay["default"])(day, endDate); + }; + + _proto.isHovered = function isHovered(day) { + var _ref3 = this.state || {}, + hoverDate = _ref3.hoverDate; + + var focusedInput = this.props.focusedInput; + return !!focusedInput && (0, _isSameDay["default"])(day, hoverDate); + }; + + _proto.isInHoveredSpan = function isInHoveredSpan(day) { + var _this$props17 = this.props, + startDate = _this$props17.startDate, + endDate = _this$props17.endDate; + + var _ref4 = this.state || {}, + hoverDate = _ref4.hoverDate; + + var isForwardRange = !!startDate && !endDate && (day.isBetween(startDate, hoverDate) || (0, _isSameDay["default"])(hoverDate, day)); + var isBackwardRange = !!endDate && !startDate && (day.isBetween(hoverDate, endDate) || (0, _isSameDay["default"])(hoverDate, day)); + var isValidDayHovered = hoverDate && !this.isBlocked(hoverDate); + return (isForwardRange || isBackwardRange) && isValidDayHovered; + }; + + _proto.isInSelectedSpan = function isInSelectedSpan(day) { + var _this$props18 = this.props, + startDate = _this$props18.startDate, + endDate = _this$props18.endDate; + return day.isBetween(startDate, endDate, 'days'); + }; + + _proto.isLastInRange = function isLastInRange(day) { + var endDate = this.props.endDate; + return this.isInSelectedSpan(day) && (0, _isNextDay["default"])(day, endDate); + }; + + _proto.isStartDate = function isStartDate(day) { + var startDate = this.props.startDate; + return (0, _isSameDay["default"])(day, startDate); + }; + + _proto.isBlocked = function isBlocked(day) { + var blockDaysViolatingMinNights = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var _this$props19 = this.props, + isDayBlocked = _this$props19.isDayBlocked, + isOutsideRange = _this$props19.isOutsideRange; + return isDayBlocked(day) || isOutsideRange(day) || blockDaysViolatingMinNights && this.doesNotMeetMinimumNights(day); + }; + + _proto.isToday = function isToday(day) { + return (0, _isSameDay["default"])(day, this.today); + }; + + _proto.isFirstDayOfWeek = function isFirstDayOfWeek(day) { + var firstDayOfWeek = this.props.firstDayOfWeek; + return day.day() === (firstDayOfWeek || _moment["default"].localeData().firstDayOfWeek()); + }; + + _proto.isLastDayOfWeek = function isLastDayOfWeek(day) { + var firstDayOfWeek = this.props.firstDayOfWeek; + return day.day() === ((firstDayOfWeek || _moment["default"].localeData().firstDayOfWeek()) + 6) % 7; + }; + + _proto.isFirstPossibleEndDateForHoveredStartDate = function isFirstPossibleEndDateForHoveredStartDate(day, hoverDate) { + var _this$props20 = this.props, + focusedInput = _this$props20.focusedInput, + getMinNightsForHoverDate = _this$props20.getMinNightsForHoverDate; + if (focusedInput !== _constants.END_DATE || !hoverDate || this.isBlocked(hoverDate)) return false; + var minNights = getMinNightsForHoverDate(hoverDate); + var firstAvailableEndDate = hoverDate.clone().add(minNights, 'days'); + return (0, _isSameDay["default"])(day, firstAvailableEndDate); + }; + + _proto.beforeSelectedEnd = function beforeSelectedEnd(day) { + var endDate = this.props.endDate; + return (0, _isBeforeDay["default"])(day, endDate); + }; + + _proto.isDayBeforeHoveredEndDate = function isDayBeforeHoveredEndDate(day) { + var _this$props21 = this.props, + startDate = _this$props21.startDate, + endDate = _this$props21.endDate, + minimumNights = _this$props21.minimumNights; + + var _ref5 = this.state || {}, + hoverDate = _ref5.hoverDate; + + return !!endDate && !startDate && !this.isBlocked(day) && (0, _isPreviousDay["default"])(hoverDate, day) && minimumNights > 0 && (0, _isSameDay["default"])(hoverDate, endDate); + }; + + _proto.render = function render() { + var _this$props22 = this.props, + numberOfMonths = _this$props22.numberOfMonths, + orientation = _this$props22.orientation, + monthFormat = _this$props22.monthFormat, + renderMonthText = _this$props22.renderMonthText, + renderWeekHeaderElement = _this$props22.renderWeekHeaderElement, + dayPickerNavigationInlineStyles = _this$props22.dayPickerNavigationInlineStyles, + navPosition = _this$props22.navPosition, + navPrev = _this$props22.navPrev, + navNext = _this$props22.navNext, + renderNavPrevButton = _this$props22.renderNavPrevButton, + renderNavNextButton = _this$props22.renderNavNextButton, + noNavButtons = _this$props22.noNavButtons, + noNavNextButton = _this$props22.noNavNextButton, + noNavPrevButton = _this$props22.noNavPrevButton, + onOutsideClick = _this$props22.onOutsideClick, + withPortal = _this$props22.withPortal, + enableOutsideDays = _this$props22.enableOutsideDays, + firstDayOfWeek = _this$props22.firstDayOfWeek, + renderKeyboardShortcutsButton = _this$props22.renderKeyboardShortcutsButton, + renderKeyboardShortcutsPanel = _this$props22.renderKeyboardShortcutsPanel, + hideKeyboardShortcutsPanel = _this$props22.hideKeyboardShortcutsPanel, + daySize = _this$props22.daySize, + focusedInput = _this$props22.focusedInput, + renderCalendarDay = _this$props22.renderCalendarDay, + renderDayContents = _this$props22.renderDayContents, + renderCalendarInfo = _this$props22.renderCalendarInfo, + renderMonthElement = _this$props22.renderMonthElement, + calendarInfoPosition = _this$props22.calendarInfoPosition, + onBlur = _this$props22.onBlur, + onShiftTab = _this$props22.onShiftTab, + onTab = _this$props22.onTab, + isFocused = _this$props22.isFocused, + showKeyboardShortcuts = _this$props22.showKeyboardShortcuts, + isRTL = _this$props22.isRTL, + weekDayFormat = _this$props22.weekDayFormat, + dayAriaLabelFormat = _this$props22.dayAriaLabelFormat, + verticalHeight = _this$props22.verticalHeight, + noBorder = _this$props22.noBorder, + transitionDuration = _this$props22.transitionDuration, + verticalBorderSpacing = _this$props22.verticalBorderSpacing, + horizontalMonthPadding = _this$props22.horizontalMonthPadding; + var _this$state7 = this.state, + currentMonth = _this$state7.currentMonth, + phrases = _this$state7.phrases, + visibleDays = _this$state7.visibleDays, + disablePrev = _this$state7.disablePrev, + disableNext = _this$state7.disableNext; + return _react["default"].createElement(_DayPicker["default"], { + orientation: orientation, + enableOutsideDays: enableOutsideDays, + modifiers: visibleDays, + numberOfMonths: numberOfMonths, + onDayClick: this.onDayClick, + onDayMouseEnter: this.onDayMouseEnter, + onDayMouseLeave: this.onDayMouseLeave, + onPrevMonthClick: this.onPrevMonthClick, + onNextMonthClick: this.onNextMonthClick, + onMonthChange: this.onMonthChange, + onTab: onTab, + onShiftTab: onShiftTab, + onYearChange: this.onYearChange, + onGetNextScrollableMonths: this.onGetNextScrollableMonths, + onGetPrevScrollableMonths: this.onGetPrevScrollableMonths, + monthFormat: monthFormat, + renderMonthText: renderMonthText, + renderWeekHeaderElement: renderWeekHeaderElement, + withPortal: withPortal, + hidden: !focusedInput, + initialVisibleMonth: function initialVisibleMonth() { + return currentMonth; + }, + daySize: daySize, + onOutsideClick: onOutsideClick, + disablePrev: disablePrev, + disableNext: disableNext, + dayPickerNavigationInlineStyles: dayPickerNavigationInlineStyles, + navPosition: navPosition, + navPrev: navPrev, + navNext: navNext, + renderNavPrevButton: renderNavPrevButton, + renderNavNextButton: renderNavNextButton, + noNavButtons: noNavButtons, + noNavPrevButton: noNavPrevButton, + noNavNextButton: noNavNextButton, + renderCalendarDay: renderCalendarDay, + renderDayContents: renderDayContents, + renderCalendarInfo: renderCalendarInfo, + renderMonthElement: renderMonthElement, + renderKeyboardShortcutsButton: renderKeyboardShortcutsButton, + renderKeyboardShortcutsPanel: renderKeyboardShortcutsPanel, + calendarInfoPosition: calendarInfoPosition, + firstDayOfWeek: firstDayOfWeek, + hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, + isFocused: isFocused, + getFirstFocusableDay: this.getFirstFocusableDay, + onBlur: onBlur, + showKeyboardShortcuts: showKeyboardShortcuts, + phrases: phrases, + isRTL: isRTL, + weekDayFormat: weekDayFormat, + dayAriaLabelFormat: dayAriaLabelFormat, + verticalHeight: verticalHeight, + verticalBorderSpacing: verticalBorderSpacing, + noBorder: noBorder, + transitionDuration: transitionDuration, + horizontalMonthPadding: horizontalMonthPadding + }); + }; + + return DayPickerRangeController; +}(_react["default"].PureComponent || _react["default"].Component); + +exports["default"] = DayPickerRangeController; +DayPickerRangeController.propTypes = false ? undefined : {}; +DayPickerRangeController.defaultProps = defaultProps; + +/***/ }), +/* 488 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = isNextDay; + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _isSameDay = _interopRequireDefault(__webpack_require__(134)); + +function isNextDay(a, b) { + if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; + var nextDay = (0, _moment["default"])(a).add(1, 'day'); + return (0, _isSameDay["default"])(nextDay, b); +} + +/***/ }), +/* 489 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = getVisibleDays; + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _toISOMonthString = _interopRequireDefault(__webpack_require__(227)); + +function getVisibleDays(month, numberOfMonths, enableOutsideDays, withoutTransitionMonths) { + if (!_moment["default"].isMoment(month)) return {}; + var visibleDaysByMonth = {}; + var currentMonth = withoutTransitionMonths ? month.clone() : month.clone().subtract(1, 'month'); + + for (var i = 0; i < (withoutTransitionMonths ? numberOfMonths : numberOfMonths + 2); i += 1) { + var visibleDays = []; // set utc offset to get correct dates in future (when timezone changes) + + var baseDate = currentMonth.clone(); + var firstOfMonth = baseDate.clone().startOf('month').hour(12); + var lastOfMonth = baseDate.clone().endOf('month').hour(12); + var currentDay = firstOfMonth.clone(); // days belonging to the previous month + + if (enableOutsideDays) { + for (var j = 0; j < currentDay.weekday(); j += 1) { + var prevDay = currentDay.clone().subtract(j + 1, 'day'); + visibleDays.unshift(prevDay); + } + } + + while (currentDay < lastOfMonth) { + visibleDays.push(currentDay.clone()); + currentDay.add(1, 'day'); + } + + if (enableOutsideDays) { + // weekday() returns the index of the day of the week according to the locale + // this means if the week starts on Monday, weekday() will return 0 for a Monday date, not 1 + if (currentDay.weekday() !== 0) { + // days belonging to the next month + for (var k = currentDay.weekday(), count = 0; k < 7; k += 1, count += 1) { + var nextDay = currentDay.clone().add(count, 'day'); + visibleDays.push(nextDay); + } + } + } + + visibleDaysByMonth[(0, _toISOMonthString["default"])(currentMonth)] = visibleDays; + currentMonth = currentMonth.clone().add(1, 'month'); + } + + return visibleDaysByMonth; +} + +/***/ }), +/* 490 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.addModifier = addModifier; +exports.deleteModifier = deleteModifier; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _isDayVisible = _interopRequireDefault(__webpack_require__(306)); + +var _toISODateString = _interopRequireDefault(__webpack_require__(182)); + +var _toISOMonthString = _interopRequireDefault(__webpack_require__(227)); + +var _getPreviousMonthMemoLast = _interopRequireDefault(__webpack_require__(1193)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function addModifier(updatedDays, day, modifier, props, state) { + var numberOfVisibleMonths = props.numberOfMonths, + enableOutsideDays = props.enableOutsideDays, + orientation = props.orientation; + var firstVisibleMonth = state.currentMonth, + visibleDays = state.visibleDays; + var currentMonth = firstVisibleMonth; + var numberOfMonths = numberOfVisibleMonths; + + if (orientation === _constants.VERTICAL_SCROLLABLE) { + numberOfMonths = Object.keys(visibleDays).length; + } else { + currentMonth = (0, _getPreviousMonthMemoLast["default"])(currentMonth); + numberOfMonths += 2; + } + + if (!day || !(0, _isDayVisible["default"])(day, currentMonth, numberOfMonths, enableOutsideDays)) { + return updatedDays; + } + + var iso = (0, _toISODateString["default"])(day); + + var updatedDaysAfterAddition = _objectSpread({}, updatedDays); + + if (enableOutsideDays) { + var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) { + return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1; + }); + updatedDaysAfterAddition = monthsToUpdate.reduce(function (acc, monthIso) { + var month = updatedDays[monthIso] || visibleDays[monthIso]; + + if (!month[iso] || !month[iso].has(modifier)) { + var modifiers = new Set(month[iso]); + modifiers.add(modifier); + acc[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); + } + + return acc; + }, updatedDaysAfterAddition); + } else { + var monthIso = (0, _toISOMonthString["default"])(day); + var month = updatedDays[monthIso] || visibleDays[monthIso] || {}; + + if (!month[iso] || !month[iso].has(modifier)) { + var modifiers = new Set(month[iso]); + modifiers.add(modifier); + updatedDaysAfterAddition[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); + } + } + + return updatedDaysAfterAddition; +} + +function deleteModifier(updatedDays, day, modifier, props, state) { + var numberOfVisibleMonths = props.numberOfMonths, + enableOutsideDays = props.enableOutsideDays, + orientation = props.orientation; + var firstVisibleMonth = state.currentMonth, + visibleDays = state.visibleDays; + var currentMonth = firstVisibleMonth; + var numberOfMonths = numberOfVisibleMonths; + + if (orientation === _constants.VERTICAL_SCROLLABLE) { + numberOfMonths = Object.keys(visibleDays).length; + } else { + currentMonth = (0, _getPreviousMonthMemoLast["default"])(currentMonth); + numberOfMonths += 2; + } + + if (!day || !(0, _isDayVisible["default"])(day, currentMonth, numberOfMonths, enableOutsideDays)) { + return updatedDays; + } + + var iso = (0, _toISODateString["default"])(day); + + var updatedDaysAfterDeletion = _objectSpread({}, updatedDays); + + if (enableOutsideDays) { + var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) { + return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1; + }); + updatedDaysAfterDeletion = monthsToUpdate.reduce(function (acc, monthIso) { + var month = updatedDays[monthIso] || visibleDays[monthIso]; + + if (month[iso] && month[iso].has(modifier)) { + var modifiers = new Set(month[iso]); + modifiers["delete"](modifier); + acc[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); + } + + return acc; + }, updatedDaysAfterDeletion); + } else { + var monthIso = (0, _toISOMonthString["default"])(day); + var month = updatedDays[monthIso] || visibleDays[monthIso] || {}; + + if (month[iso] && month[iso].has(modifier)) { + var modifiers = new Set(month[iso]); + modifiers["delete"](modifier); + updatedDaysAfterDeletion[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); + } + } + + return updatedDaysAfterDeletion; +} + +/***/ }), +/* 491 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = getPooledMoment; + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var momentPool = new Map(); + +function getPooledMoment(dayString) { + if (!momentPool.has(dayString)) { + momentPool.set(dayString, (0, _moment["default"])(dayString)); + } + + return momentPool.get(dayString); +} + +/***/ }), +/* 492 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(69)); + +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(31)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(54)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _moment = _interopRequireDefault(__webpack_require__(22)); + +var _object = _interopRequireDefault(__webpack_require__(224)); + +var _isTouchDevice = _interopRequireDefault(__webpack_require__(163)); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _isSameDay = _interopRequireDefault(__webpack_require__(134)); + +var _isAfterDay = _interopRequireDefault(__webpack_require__(229)); + +var _getVisibleDays = _interopRequireDefault(__webpack_require__(489)); + +var _toISODateString = _interopRequireDefault(__webpack_require__(182)); + +var _modifiers = __webpack_require__(490); + +var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(162)); + +var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); + +var _CalendarInfoPositionShape = _interopRequireDefault(__webpack_require__(184)); + +var _NavPositionShape = _interopRequireDefault(__webpack_require__(165)); + +var _constants = __webpack_require__(25); + +var _DayPicker = _interopRequireDefault(__webpack_require__(307)); + +var _getPooledMoment = _interopRequireDefault(__webpack_require__(491)); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + date: undefined, + // TODO: use null + onDateChange: function onDateChange() {}, + focused: false, + onFocusChange: function onFocusChange() {}, + onClose: function onClose() {}, + keepOpenOnDateSelect: false, + isOutsideRange: function isOutsideRange() {}, + isDayBlocked: function isDayBlocked() {}, + isDayHighlighted: function isDayHighlighted() {}, + // DayPicker props + renderMonthText: null, + renderWeekHeaderElement: null, + enableOutsideDays: false, + numberOfMonths: 1, + orientation: _constants.HORIZONTAL_ORIENTATION, + withPortal: false, + hideKeyboardShortcutsPanel: false, + initialVisibleMonth: null, + firstDayOfWeek: null, + daySize: _constants.DAY_SIZE, + verticalHeight: null, + noBorder: false, + verticalBorderSpacing: undefined, + transitionDuration: undefined, + horizontalMonthPadding: 13, + dayPickerNavigationInlineStyles: null, + navPosition: _constants.NAV_POSITION_TOP, + navPrev: null, + navNext: null, + renderNavPrevButton: null, + renderNavNextButton: null, + noNavButtons: false, + noNavNextButton: false, + noNavPrevButton: false, + onPrevMonthClick: function onPrevMonthClick() {}, + onNextMonthClick: function onNextMonthClick() {}, + onOutsideClick: function onOutsideClick() {}, + renderCalendarDay: undefined, + renderDayContents: null, + renderCalendarInfo: null, + renderMonthElement: null, + calendarInfoPosition: _constants.INFO_POSITION_BOTTOM, + // accessibility + onBlur: function onBlur() {}, + isFocused: false, + showKeyboardShortcuts: false, + onTab: function onTab() {}, + onShiftTab: function onShiftTab() {}, + // i18n + monthFormat: 'MMMM YYYY', + weekDayFormat: 'dd', + phrases: _defaultPhrases.DayPickerPhrases, + dayAriaLabelFormat: undefined, + isRTL: false +}; + +var DayPickerSingleDateController = +/*#__PURE__*/ +function (_ref) { + (0, _inheritsLoose2["default"])(DayPickerSingleDateController, _ref); + var _proto = DayPickerSingleDateController.prototype; + + _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { + return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); + }; + + function DayPickerSingleDateController(props) { + var _this; + + _this = _ref.call(this, props) || this; + _this.isTouchDevice = false; + _this.today = (0, _moment["default"])(); + _this.modifiers = { + today: function today(day) { + return _this.isToday(day); + }, + blocked: function blocked(day) { + return _this.isBlocked(day); + }, + 'blocked-calendar': function blockedCalendar(day) { + return props.isDayBlocked(day); + }, + 'blocked-out-of-range': function blockedOutOfRange(day) { + return props.isOutsideRange(day); + }, + 'highlighted-calendar': function highlightedCalendar(day) { + return props.isDayHighlighted(day); + }, + valid: function valid(day) { + return !_this.isBlocked(day); + }, + hovered: function hovered(day) { + return _this.isHovered(day); + }, + selected: function selected(day) { + return _this.isSelected(day); + }, + 'first-day-of-week': function firstDayOfWeek(day) { + return _this.isFirstDayOfWeek(day); + }, + 'last-day-of-week': function lastDayOfWeek(day) { + return _this.isLastDayOfWeek(day); + } + }; + + var _this$getStateForNewM = _this.getStateForNewMonth(props), + currentMonth = _this$getStateForNewM.currentMonth, + visibleDays = _this$getStateForNewM.visibleDays; + + _this.state = { + hoverDate: null, + currentMonth: currentMonth, + visibleDays: visibleDays + }; + _this.onDayMouseEnter = _this.onDayMouseEnter.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onDayMouseLeave = _this.onDayMouseLeave.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onDayClick = _this.onDayClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onPrevMonthClick = _this.onPrevMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onNextMonthClick = _this.onNextMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onMonthChange = _this.onMonthChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onYearChange = _this.onYearChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onGetNextScrollableMonths = _this.onGetNextScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); + _this.onGetPrevScrollableMonths = _this.onGetPrevScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); + _this.getFirstFocusableDay = _this.getFirstFocusableDay.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + _proto.componentDidMount = function componentDidMount() { + this.isTouchDevice = (0, _isTouchDevice["default"])(); + }; + + _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { + var _this2 = this; + + var date = nextProps.date, + focused = nextProps.focused, + isOutsideRange = nextProps.isOutsideRange, + isDayBlocked = nextProps.isDayBlocked, + isDayHighlighted = nextProps.isDayHighlighted, + initialVisibleMonth = nextProps.initialVisibleMonth, + numberOfMonths = nextProps.numberOfMonths, + enableOutsideDays = nextProps.enableOutsideDays; + var _this$props = this.props, + prevIsOutsideRange = _this$props.isOutsideRange, + prevIsDayBlocked = _this$props.isDayBlocked, + prevIsDayHighlighted = _this$props.isDayHighlighted, + prevNumberOfMonths = _this$props.numberOfMonths, + prevEnableOutsideDays = _this$props.enableOutsideDays, + prevInitialVisibleMonth = _this$props.initialVisibleMonth, + prevFocused = _this$props.focused, + prevDate = _this$props.date; + var visibleDays = this.state.visibleDays; + var recomputeOutsideRange = false; + var recomputeDayBlocked = false; + var recomputeDayHighlighted = false; + + if (isOutsideRange !== prevIsOutsideRange) { + this.modifiers['blocked-out-of-range'] = function (day) { + return isOutsideRange(day); + }; + + recomputeOutsideRange = true; + } + + if (isDayBlocked !== prevIsDayBlocked) { + this.modifiers['blocked-calendar'] = function (day) { + return isDayBlocked(day); + }; + + recomputeDayBlocked = true; + } + + if (isDayHighlighted !== prevIsDayHighlighted) { + this.modifiers['highlighted-calendar'] = function (day) { + return isDayHighlighted(day); + }; + + recomputeDayHighlighted = true; + } + + var recomputePropModifiers = recomputeOutsideRange || recomputeDayBlocked || recomputeDayHighlighted; + + if (numberOfMonths !== prevNumberOfMonths || enableOutsideDays !== prevEnableOutsideDays || initialVisibleMonth !== prevInitialVisibleMonth && !prevFocused && focused) { + var newMonthState = this.getStateForNewMonth(nextProps); + var currentMonth = newMonthState.currentMonth; + visibleDays = newMonthState.visibleDays; + this.setState({ + currentMonth: currentMonth, + visibleDays: visibleDays + }); + } + + var didDateChange = date !== prevDate; + var didFocusChange = focused !== prevFocused; + var modifiers = {}; + + if (didDateChange) { + modifiers = this.deleteModifier(modifiers, prevDate, 'selected'); + modifiers = this.addModifier(modifiers, date, 'selected'); + } + + if (didFocusChange || recomputePropModifiers) { + (0, _object["default"])(visibleDays).forEach(function (days) { + Object.keys(days).forEach(function (day) { + var momentObj = (0, _getPooledMoment["default"])(day); + + if (_this2.isBlocked(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'blocked'); + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked'); + } + + if (didFocusChange || recomputeOutsideRange) { + if (isOutsideRange(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-out-of-range'); + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-out-of-range'); + } + } + + if (didFocusChange || recomputeDayBlocked) { + if (isDayBlocked(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-calendar'); + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-calendar'); + } + } + + if (didFocusChange || recomputeDayHighlighted) { + if (isDayHighlighted(momentObj)) { + modifiers = _this2.addModifier(modifiers, momentObj, 'highlighted-calendar'); + } else { + modifiers = _this2.deleteModifier(modifiers, momentObj, 'highlighted-calendar'); + } + } + }); + }); + } + + var today = (0, _moment["default"])(); + + if (!(0, _isSameDay["default"])(this.today, today)) { + modifiers = this.deleteModifier(modifiers, this.today, 'today'); + modifiers = this.addModifier(modifiers, today, 'today'); + this.today = today; + } + + if (Object.keys(modifiers).length > 0) { + this.setState({ + visibleDays: _objectSpread({}, visibleDays, {}, modifiers) + }); + } + }; + + _proto.componentWillUpdate = function componentWillUpdate() { + this.today = (0, _moment["default"])(); + }; + + _proto.onDayClick = function onDayClick(day, e) { + if (e) e.preventDefault(); + if (this.isBlocked(day)) return; + var _this$props2 = this.props, + onDateChange = _this$props2.onDateChange, + keepOpenOnDateSelect = _this$props2.keepOpenOnDateSelect, + onFocusChange = _this$props2.onFocusChange, + onClose = _this$props2.onClose; + onDateChange(day); + + if (!keepOpenOnDateSelect) { + onFocusChange({ + focused: false + }); + onClose({ + date: day + }); + } + }; + + _proto.onDayMouseEnter = function onDayMouseEnter(day) { + if (this.isTouchDevice) return; + var _this$state = this.state, + hoverDate = _this$state.hoverDate, + visibleDays = _this$state.visibleDays; + var modifiers = this.deleteModifier({}, hoverDate, 'hovered'); + modifiers = this.addModifier(modifiers, day, 'hovered'); + this.setState({ + hoverDate: day, + visibleDays: _objectSpread({}, visibleDays, {}, modifiers) + }); + }; + + _proto.onDayMouseLeave = function onDayMouseLeave() { + var _this$state2 = this.state, + hoverDate = _this$state2.hoverDate, + visibleDays = _this$state2.visibleDays; + if (this.isTouchDevice || !hoverDate) return; + var modifiers = this.deleteModifier({}, hoverDate, 'hovered'); + this.setState({ + hoverDate: null, + visibleDays: _objectSpread({}, visibleDays, {}, modifiers) + }); + }; + + _proto.onPrevMonthClick = function onPrevMonthClick() { + var _this$props3 = this.props, + onPrevMonthClick = _this$props3.onPrevMonthClick, + numberOfMonths = _this$props3.numberOfMonths, + enableOutsideDays = _this$props3.enableOutsideDays; + var _this$state3 = this.state, + currentMonth = _this$state3.currentMonth, + visibleDays = _this$state3.visibleDays; + var newVisibleDays = {}; + Object.keys(visibleDays).sort().slice(0, numberOfMonths + 1).forEach(function (month) { + newVisibleDays[month] = visibleDays[month]; + }); + var prevMonth = currentMonth.clone().subtract(1, 'month'); + var prevMonthVisibleDays = (0, _getVisibleDays["default"])(prevMonth, 1, enableOutsideDays); + this.setState({ + currentMonth: prevMonth, + visibleDays: _objectSpread({}, newVisibleDays, {}, this.getModifiers(prevMonthVisibleDays)) + }, function () { + onPrevMonthClick(prevMonth.clone()); + }); + }; + + _proto.onNextMonthClick = function onNextMonthClick() { + var _this$props4 = this.props, + onNextMonthClick = _this$props4.onNextMonthClick, + numberOfMonths = _this$props4.numberOfMonths, + enableOutsideDays = _this$props4.enableOutsideDays; + var _this$state4 = this.state, + currentMonth = _this$state4.currentMonth, + visibleDays = _this$state4.visibleDays; + var newVisibleDays = {}; + Object.keys(visibleDays).sort().slice(1).forEach(function (month) { + newVisibleDays[month] = visibleDays[month]; + }); + var nextMonth = currentMonth.clone().add(numberOfMonths, 'month'); + var nextMonthVisibleDays = (0, _getVisibleDays["default"])(nextMonth, 1, enableOutsideDays); + var newCurrentMonth = currentMonth.clone().add(1, 'month'); + this.setState({ + currentMonth: newCurrentMonth, + visibleDays: _objectSpread({}, newVisibleDays, {}, this.getModifiers(nextMonthVisibleDays)) + }, function () { + onNextMonthClick(newCurrentMonth.clone()); + }); + }; + + _proto.onMonthChange = function onMonthChange(newMonth) { + var _this$props5 = this.props, + numberOfMonths = _this$props5.numberOfMonths, + enableOutsideDays = _this$props5.enableOutsideDays, + orientation = _this$props5.orientation; + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var newVisibleDays = (0, _getVisibleDays["default"])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); + this.setState({ + currentMonth: newMonth.clone(), + visibleDays: this.getModifiers(newVisibleDays) + }); + }; + + _proto.onYearChange = function onYearChange(newMonth) { + var _this$props6 = this.props, + numberOfMonths = _this$props6.numberOfMonths, + enableOutsideDays = _this$props6.enableOutsideDays, + orientation = _this$props6.orientation; + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var newVisibleDays = (0, _getVisibleDays["default"])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); + this.setState({ + currentMonth: newMonth.clone(), + visibleDays: this.getModifiers(newVisibleDays) + }); + }; + + _proto.onGetNextScrollableMonths = function onGetNextScrollableMonths() { + var _this$props7 = this.props, + numberOfMonths = _this$props7.numberOfMonths, + enableOutsideDays = _this$props7.enableOutsideDays; + var _this$state5 = this.state, + currentMonth = _this$state5.currentMonth, + visibleDays = _this$state5.visibleDays; + var numberOfVisibleMonths = Object.keys(visibleDays).length; + var nextMonth = currentMonth.clone().add(numberOfVisibleMonths, 'month'); + var newVisibleDays = (0, _getVisibleDays["default"])(nextMonth, numberOfMonths, enableOutsideDays, true); + this.setState({ + visibleDays: _objectSpread({}, visibleDays, {}, this.getModifiers(newVisibleDays)) + }); + }; + + _proto.onGetPrevScrollableMonths = function onGetPrevScrollableMonths() { + var _this$props8 = this.props, + numberOfMonths = _this$props8.numberOfMonths, + enableOutsideDays = _this$props8.enableOutsideDays; + var _this$state6 = this.state, + currentMonth = _this$state6.currentMonth, + visibleDays = _this$state6.visibleDays; + var firstPreviousMonth = currentMonth.clone().subtract(numberOfMonths, 'month'); + var newVisibleDays = (0, _getVisibleDays["default"])(firstPreviousMonth, numberOfMonths, enableOutsideDays, true); + this.setState({ + currentMonth: firstPreviousMonth.clone(), + visibleDays: _objectSpread({}, visibleDays, {}, this.getModifiers(newVisibleDays)) + }); + }; + + _proto.getFirstFocusableDay = function getFirstFocusableDay(newMonth) { + var _this3 = this; + + var _this$props9 = this.props, + date = _this$props9.date, + numberOfMonths = _this$props9.numberOfMonths; + var focusedDate = newMonth.clone().startOf('month'); + + if (date) { + focusedDate = date.clone(); + } + + if (this.isBlocked(focusedDate)) { + var days = []; + var lastVisibleDay = newMonth.clone().add(numberOfMonths - 1, 'months').endOf('month'); + var currentDay = focusedDate.clone(); + + while (!(0, _isAfterDay["default"])(currentDay, lastVisibleDay)) { + currentDay = currentDay.clone().add(1, 'day'); + days.push(currentDay); + } + + var viableDays = days.filter(function (day) { + return !_this3.isBlocked(day) && (0, _isAfterDay["default"])(day, focusedDate); + }); + + if (viableDays.length > 0) { + var _viableDays = (0, _slicedToArray2["default"])(viableDays, 1); + + focusedDate = _viableDays[0]; + } + } + + return focusedDate; + }; + + _proto.getModifiers = function getModifiers(visibleDays) { + var _this4 = this; + + var modifiers = {}; + Object.keys(visibleDays).forEach(function (month) { + modifiers[month] = {}; + visibleDays[month].forEach(function (day) { + modifiers[month][(0, _toISODateString["default"])(day)] = _this4.getModifiersForDay(day); + }); + }); + return modifiers; + }; + + _proto.getModifiersForDay = function getModifiersForDay(day) { + var _this5 = this; + + return new Set(Object.keys(this.modifiers).filter(function (modifier) { + return _this5.modifiers[modifier](day); + })); + }; + + _proto.getStateForNewMonth = function getStateForNewMonth(nextProps) { + var _this6 = this; + + var initialVisibleMonth = nextProps.initialVisibleMonth, + date = nextProps.date, + numberOfMonths = nextProps.numberOfMonths, + orientation = nextProps.orientation, + enableOutsideDays = nextProps.enableOutsideDays; + var initialVisibleMonthThunk = initialVisibleMonth || (date ? function () { + return date; + } : function () { + return _this6.today; + }); + var currentMonth = initialVisibleMonthThunk(); + var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; + var visibleDays = this.getModifiers((0, _getVisibleDays["default"])(currentMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths)); + return { + currentMonth: currentMonth, + visibleDays: visibleDays + }; + }; + + _proto.addModifier = function addModifier(updatedDays, day, modifier) { + return (0, _modifiers.addModifier)(updatedDays, day, modifier, this.props, this.state); + }; + + _proto.deleteModifier = function deleteModifier(updatedDays, day, modifier) { + return (0, _modifiers.deleteModifier)(updatedDays, day, modifier, this.props, this.state); + }; + + _proto.isBlocked = function isBlocked(day) { + var _this$props10 = this.props, + isDayBlocked = _this$props10.isDayBlocked, + isOutsideRange = _this$props10.isOutsideRange; + return isDayBlocked(day) || isOutsideRange(day); + }; + + _proto.isHovered = function isHovered(day) { + var _ref2 = this.state || {}, + hoverDate = _ref2.hoverDate; + + return (0, _isSameDay["default"])(day, hoverDate); + }; + + _proto.isSelected = function isSelected(day) { + var date = this.props.date; + return (0, _isSameDay["default"])(day, date); + }; + + _proto.isToday = function isToday(day) { + return (0, _isSameDay["default"])(day, this.today); + }; + + _proto.isFirstDayOfWeek = function isFirstDayOfWeek(day) { + var firstDayOfWeek = this.props.firstDayOfWeek; + return day.day() === (firstDayOfWeek || _moment["default"].localeData().firstDayOfWeek()); + }; + + _proto.isLastDayOfWeek = function isLastDayOfWeek(day) { + var firstDayOfWeek = this.props.firstDayOfWeek; + return day.day() === ((firstDayOfWeek || _moment["default"].localeData().firstDayOfWeek()) + 6) % 7; + }; + + _proto.render = function render() { + var _this$props11 = this.props, + numberOfMonths = _this$props11.numberOfMonths, + orientation = _this$props11.orientation, + monthFormat = _this$props11.monthFormat, + renderMonthText = _this$props11.renderMonthText, + renderWeekHeaderElement = _this$props11.renderWeekHeaderElement, + dayPickerNavigationInlineStyles = _this$props11.dayPickerNavigationInlineStyles, + navPosition = _this$props11.navPosition, + navPrev = _this$props11.navPrev, + navNext = _this$props11.navNext, + renderNavPrevButton = _this$props11.renderNavPrevButton, + renderNavNextButton = _this$props11.renderNavNextButton, + noNavButtons = _this$props11.noNavButtons, + noNavPrevButton = _this$props11.noNavPrevButton, + noNavNextButton = _this$props11.noNavNextButton, + onOutsideClick = _this$props11.onOutsideClick, + onShiftTab = _this$props11.onShiftTab, + onTab = _this$props11.onTab, + withPortal = _this$props11.withPortal, + focused = _this$props11.focused, + enableOutsideDays = _this$props11.enableOutsideDays, + hideKeyboardShortcutsPanel = _this$props11.hideKeyboardShortcutsPanel, + daySize = _this$props11.daySize, + firstDayOfWeek = _this$props11.firstDayOfWeek, + renderCalendarDay = _this$props11.renderCalendarDay, + renderDayContents = _this$props11.renderDayContents, + renderCalendarInfo = _this$props11.renderCalendarInfo, + renderMonthElement = _this$props11.renderMonthElement, + calendarInfoPosition = _this$props11.calendarInfoPosition, + isFocused = _this$props11.isFocused, + isRTL = _this$props11.isRTL, + phrases = _this$props11.phrases, + dayAriaLabelFormat = _this$props11.dayAriaLabelFormat, + onBlur = _this$props11.onBlur, + showKeyboardShortcuts = _this$props11.showKeyboardShortcuts, + weekDayFormat = _this$props11.weekDayFormat, + verticalHeight = _this$props11.verticalHeight, + noBorder = _this$props11.noBorder, + transitionDuration = _this$props11.transitionDuration, + verticalBorderSpacing = _this$props11.verticalBorderSpacing, + horizontalMonthPadding = _this$props11.horizontalMonthPadding; + var _this$state7 = this.state, + currentMonth = _this$state7.currentMonth, + visibleDays = _this$state7.visibleDays; + return _react["default"].createElement(_DayPicker["default"], { + orientation: orientation, + enableOutsideDays: enableOutsideDays, + modifiers: visibleDays, + numberOfMonths: numberOfMonths, + onDayClick: this.onDayClick, + onDayMouseEnter: this.onDayMouseEnter, + onDayMouseLeave: this.onDayMouseLeave, + onPrevMonthClick: this.onPrevMonthClick, + onNextMonthClick: this.onNextMonthClick, + onMonthChange: this.onMonthChange, + onYearChange: this.onYearChange, + onGetNextScrollableMonths: this.onGetNextScrollableMonths, + onGetPrevScrollableMonths: this.onGetPrevScrollableMonths, + monthFormat: monthFormat, + withPortal: withPortal, + hidden: !focused, + hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, + initialVisibleMonth: function initialVisibleMonth() { + return currentMonth; + }, + firstDayOfWeek: firstDayOfWeek, + onOutsideClick: onOutsideClick, + dayPickerNavigationInlineStyles: dayPickerNavigationInlineStyles, + navPosition: navPosition, + navPrev: navPrev, + navNext: navNext, + renderNavPrevButton: renderNavPrevButton, + renderNavNextButton: renderNavNextButton, + noNavButtons: noNavButtons, + noNavNextButton: noNavNextButton, + noNavPrevButton: noNavPrevButton, + renderMonthText: renderMonthText, + renderWeekHeaderElement: renderWeekHeaderElement, + renderCalendarDay: renderCalendarDay, + renderDayContents: renderDayContents, + renderCalendarInfo: renderCalendarInfo, + renderMonthElement: renderMonthElement, + calendarInfoPosition: calendarInfoPosition, + isFocused: isFocused, + getFirstFocusableDay: this.getFirstFocusableDay, + onBlur: onBlur, + onTab: onTab, + onShiftTab: onShiftTab, + phrases: phrases, + daySize: daySize, + isRTL: isRTL, + showKeyboardShortcuts: showKeyboardShortcuts, + weekDayFormat: weekDayFormat, + dayAriaLabelFormat: dayAriaLabelFormat, + verticalHeight: verticalHeight, + noBorder: noBorder, + transitionDuration: transitionDuration, + verticalBorderSpacing: verticalBorderSpacing, + horizontalMonthPadding: horizontalMonthPadding + }); + }; + + return DayPickerSingleDateController; +}(_react["default"].PureComponent || _react["default"].Component); + +exports["default"] = DayPickerSingleDateController; +DayPickerSingleDateController.propTypes = false ? undefined : {}; +DayPickerSingleDateController.defaultProps = defaultProps; + +/***/ }), +/* 493 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(83)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _IconPositionShape = _interopRequireDefault(__webpack_require__(164)); + +var _OrientationShape = _interopRequireDefault(__webpack_require__(475)); + +var _AnchorDirectionShape = _interopRequireDefault(__webpack_require__(476)); + +var _OpenDirectionShape = _interopRequireDefault(__webpack_require__(136)); + +var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); + +var _CalendarInfoPositionShape = _interopRequireDefault(__webpack_require__(184)); + +var _NavPositionShape = _interopRequireDefault(__webpack_require__(165)); + +var _default = { + // required props for a functional interactive SingleDatePicker + date: _reactMomentProptypes["default"].momentObj, + onDateChange: _propTypes["default"].func.isRequired, + focused: _propTypes["default"].bool, + onFocusChange: _propTypes["default"].func.isRequired, + // input related props + id: _propTypes["default"].string.isRequired, + placeholder: _propTypes["default"].string, + ariaLabel: _propTypes["default"].string, + disabled: _propTypes["default"].bool, + required: _propTypes["default"].bool, + readOnly: _propTypes["default"].bool, + screenReaderInputMessage: _propTypes["default"].string, + showClearDate: _propTypes["default"].bool, + customCloseIcon: _propTypes["default"].node, + showDefaultInputIcon: _propTypes["default"].bool, + inputIconPosition: _IconPositionShape["default"], + customInputIcon: _propTypes["default"].node, + noBorder: _propTypes["default"].bool, + block: _propTypes["default"].bool, + small: _propTypes["default"].bool, + regular: _propTypes["default"].bool, + verticalSpacing: _airbnbPropTypes.nonNegativeInteger, + keepFocusOnInput: _propTypes["default"].bool, + // calendar presentation and interaction related props + renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes["default"].func, 'renderMonthText', 'renderMonthElement'), + renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes["default"].func, 'renderMonthText', 'renderMonthElement'), + renderWeekHeaderElement: _propTypes["default"].func, + orientation: _OrientationShape["default"], + anchorDirection: _AnchorDirectionShape["default"], + openDirection: _OpenDirectionShape["default"], + horizontalMargin: _propTypes["default"].number, + withPortal: _propTypes["default"].bool, + withFullScreenPortal: _propTypes["default"].bool, + appendToBody: _propTypes["default"].bool, + disableScroll: _propTypes["default"].bool, + initialVisibleMonth: _propTypes["default"].func, + firstDayOfWeek: _DayOfWeekShape["default"], + numberOfMonths: _propTypes["default"].number, + keepOpenOnDateSelect: _propTypes["default"].bool, + reopenPickerOnClearDate: _propTypes["default"].bool, + renderCalendarInfo: _propTypes["default"].func, + calendarInfoPosition: _CalendarInfoPositionShape["default"], + hideKeyboardShortcutsPanel: _propTypes["default"].bool, + daySize: _airbnbPropTypes.nonNegativeInteger, + isRTL: _propTypes["default"].bool, + verticalHeight: _airbnbPropTypes.nonNegativeInteger, + transitionDuration: _airbnbPropTypes.nonNegativeInteger, + horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger, + // navigation related props + dayPickerNavigationInlineStyles: _propTypes["default"].object, + navPosition: _NavPositionShape["default"], + navPrev: _propTypes["default"].node, + navNext: _propTypes["default"].node, + renderNavPrevButton: _propTypes["default"].func, + renderNavNextButton: _propTypes["default"].func, + onPrevMonthClick: _propTypes["default"].func, + onNextMonthClick: _propTypes["default"].func, + onClose: _propTypes["default"].func, + // day presentation and interaction related props + renderCalendarDay: _propTypes["default"].func, + renderDayContents: _propTypes["default"].func, + enableOutsideDays: _propTypes["default"].bool, + isDayBlocked: _propTypes["default"].func, + isOutsideRange: _propTypes["default"].func, + isDayHighlighted: _propTypes["default"].func, + // internationalization props + displayFormat: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].func]), + monthFormat: _propTypes["default"].string, + weekDayFormat: _propTypes["default"].string, + phrases: _propTypes["default"].shape((0, _getPhrasePropTypes["default"])(_defaultPhrases.SingleDatePickerPhrases)), + dayAriaLabelFormat: _propTypes["default"].string +}; +exports["default"] = _default; + +/***/ }), +/* 494 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _airbnbPropTypes = __webpack_require__(41); + +var _reactWithStyles = __webpack_require__(78); + +var _defaultPhrases = __webpack_require__(56); + +var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(64)); + +var _noflip = _interopRequireDefault(__webpack_require__(111)); + +var _DateInput = _interopRequireDefault(__webpack_require__(482)); + +var _IconPositionShape = _interopRequireDefault(__webpack_require__(164)); + +var _CloseButton = _interopRequireDefault(__webpack_require__(186)); + +var _CalendarIcon = _interopRequireDefault(__webpack_require__(486)); + +var _OpenDirectionShape = _interopRequireDefault(__webpack_require__(136)); + +var _constants = __webpack_require__(25); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var propTypes = false ? undefined : {}; +var defaultProps = { + children: null, + placeholder: 'Select Date', + ariaLabel: undefined, + displayValue: '', + screenReaderMessage: '', + focused: false, + isFocused: false, + disabled: false, + required: false, + readOnly: false, + openDirection: _constants.OPEN_DOWN, + showCaret: false, + showClearDate: false, + showDefaultInputIcon: false, + inputIconPosition: _constants.ICON_BEFORE_POSITION, + customCloseIcon: null, + customInputIcon: null, + isRTL: false, + noBorder: false, + block: false, + small: false, + regular: false, + verticalSpacing: undefined, + onChange: function onChange() {}, + onClearDate: function onClearDate() {}, + onFocus: function onFocus() {}, + onKeyDownShiftTab: function onKeyDownShiftTab() {}, + onKeyDownTab: function onKeyDownTab() {}, + onKeyDownArrowDown: function onKeyDownArrowDown() {}, + onKeyDownQuestionMark: function onKeyDownQuestionMark() {}, + // i18n + phrases: _defaultPhrases.SingleDatePickerInputPhrases +}; + +function SingleDatePickerInput(_ref) { + var id = _ref.id, + children = _ref.children, + placeholder = _ref.placeholder, + ariaLabel = _ref.ariaLabel, + displayValue = _ref.displayValue, + focused = _ref.focused, + isFocused = _ref.isFocused, + disabled = _ref.disabled, + required = _ref.required, + readOnly = _ref.readOnly, + showCaret = _ref.showCaret, + showClearDate = _ref.showClearDate, + showDefaultInputIcon = _ref.showDefaultInputIcon, + inputIconPosition = _ref.inputIconPosition, + phrases = _ref.phrases, + onClearDate = _ref.onClearDate, + onChange = _ref.onChange, + onFocus = _ref.onFocus, + onKeyDownShiftTab = _ref.onKeyDownShiftTab, + onKeyDownTab = _ref.onKeyDownTab, + onKeyDownArrowDown = _ref.onKeyDownArrowDown, + onKeyDownQuestionMark = _ref.onKeyDownQuestionMark, + screenReaderMessage = _ref.screenReaderMessage, + customCloseIcon = _ref.customCloseIcon, + customInputIcon = _ref.customInputIcon, + openDirection = _ref.openDirection, + isRTL = _ref.isRTL, + noBorder = _ref.noBorder, + block = _ref.block, + small = _ref.small, + regular = _ref.regular, + verticalSpacing = _ref.verticalSpacing, + styles = _ref.styles; + + var calendarIcon = customInputIcon || _react["default"].createElement(_CalendarIcon["default"], (0, _reactWithStyles.css)(styles.SingleDatePickerInput_calendarIcon_svg)); + + var closeIcon = customCloseIcon || _react["default"].createElement(_CloseButton["default"], (0, _reactWithStyles.css)(styles.SingleDatePickerInput_clearDate_svg, small && styles.SingleDatePickerInput_clearDate_svg__small)); + + var screenReaderText = screenReaderMessage || phrases.keyboardForwardNavigationInstructions; + + var inputIcon = (showDefaultInputIcon || customInputIcon !== null) && _react["default"].createElement("button", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.SingleDatePickerInput_calendarIcon), { + type: "button", + disabled: disabled, + "aria-label": phrases.focusStartDate, + onClick: onFocus + }), calendarIcon); + + return _react["default"].createElement("div", (0, _reactWithStyles.css)(styles.SingleDatePickerInput, disabled && styles.SingleDatePickerInput__disabled, isRTL && styles.SingleDatePickerInput__rtl, !noBorder && styles.SingleDatePickerInput__withBorder, block && styles.SingleDatePickerInput__block, showClearDate && styles.SingleDatePickerInput__showClearDate), inputIconPosition === _constants.ICON_BEFORE_POSITION && inputIcon, _react["default"].createElement(_DateInput["default"], { + id: id, + placeholder: placeholder, + ariaLabel: ariaLabel, + displayValue: displayValue, + screenReaderMessage: screenReaderText, + focused: focused, + isFocused: isFocused, + disabled: disabled, + required: required, + readOnly: readOnly, + showCaret: showCaret, + onChange: onChange, + onFocus: onFocus, + onKeyDownShiftTab: onKeyDownShiftTab, + onKeyDownTab: onKeyDownTab, + onKeyDownArrowDown: onKeyDownArrowDown, + onKeyDownQuestionMark: onKeyDownQuestionMark, + openDirection: openDirection, + verticalSpacing: verticalSpacing, + small: small, + regular: regular, + block: block + }), children, showClearDate && _react["default"].createElement("button", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.SingleDatePickerInput_clearDate, small && styles.SingleDatePickerInput_clearDate__small, !customCloseIcon && styles.SingleDatePickerInput_clearDate__default, !displayValue && styles.SingleDatePickerInput_clearDate__hide), { + type: "button", + "aria-label": phrases.clearDate, + disabled: disabled, + onClick: onClearDate + }), closeIcon), inputIconPosition === _constants.ICON_AFTER_POSITION && inputIcon); +} + +SingleDatePickerInput.propTypes = false ? undefined : {}; +SingleDatePickerInput.defaultProps = defaultProps; + +var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { + var _ref2$reactDates = _ref2.reactDates, + border = _ref2$reactDates.border, + color = _ref2$reactDates.color; + return { + SingleDatePickerInput: { + display: 'inline-block', + backgroundColor: color.background + }, + SingleDatePickerInput__withBorder: { + borderColor: color.border, + borderWidth: border.pickerInput.borderWidth, + borderStyle: border.pickerInput.borderStyle, + borderRadius: border.pickerInput.borderRadius + }, + SingleDatePickerInput__rtl: { + direction: (0, _noflip["default"])('rtl') + }, + SingleDatePickerInput__disabled: { + backgroundColor: color.disabled + }, + SingleDatePickerInput__block: { + display: 'block' + }, + SingleDatePickerInput__showClearDate: { + paddingRight: 30 // TODO: should be noflip wrapped and handled by an isRTL prop + + }, + SingleDatePickerInput_clearDate: { + background: 'none', + border: 0, + color: 'inherit', + font: 'inherit', + lineHeight: 'normal', + overflow: 'visible', + cursor: 'pointer', + padding: 10, + margin: '0 10px 0 5px', + // TODO: should be noflip wrapped and handled by an isRTL prop + position: 'absolute', + right: 0, + // TODO: should be noflip wrapped and handled by an isRTL prop + top: '50%', + transform: 'translateY(-50%)' + }, + SingleDatePickerInput_clearDate__default: { + ':focus': { + background: color.core.border, + borderRadius: '50%' + }, + ':hover': { + background: color.core.border, + borderRadius: '50%' + } + }, + SingleDatePickerInput_clearDate__small: { + padding: 6 + }, + SingleDatePickerInput_clearDate__hide: { + visibility: 'hidden' + }, + SingleDatePickerInput_clearDate_svg: { + fill: color.core.grayLight, + height: 12, + width: 15, + verticalAlign: 'middle' + }, + SingleDatePickerInput_clearDate_svg__small: { + height: 9 + }, + SingleDatePickerInput_calendarIcon: { + background: 'none', + border: 0, + color: 'inherit', + font: 'inherit', + lineHeight: 'normal', + overflow: 'visible', + cursor: 'pointer', + display: 'inline-block', + verticalAlign: 'middle', + padding: 10, + margin: '0 5px 0 10px' // TODO: should be noflip wrapped and handled by an isRTL prop + + }, + SingleDatePickerInput_calendarIcon_svg: { + fill: color.core.grayLight, + height: 15, + width: 14, + verticalAlign: 'middle' + } + }; +}, { + pureComponent: typeof _react["default"].PureComponent !== 'undefined' +})(SingleDatePickerInput); + +exports["default"] = _default; + +/***/ }), +/* 495 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _styles = __webpack_require__(21); + +var _Icon = _interopRequireDefault(__webpack_require__(101)); + +var _PrefixIcon = _interopRequireDefault(__webpack_require__(1204)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + +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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +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 InputText(_ref) { + var autoFocus = _ref.autoFocus, + className = _ref.className, + icon = _ref.icon, + id = _ref.id, + name = _ref.name, + onChange = _ref.onChange, + tabIndex = _ref.tabIndex, + type = _ref.type, + value = _ref.value, + rest = _objectWithoutProperties(_ref, ["autoFocus", "className", "icon", "id", "name", "onChange", "tabIndex", "type", "value"]); + + var _useState = (0, _react.useState)(false), + _useState2 = _slicedToArray(_useState, 2), + showPassword = _useState2[0], + togglePassword = _useState2[1]; + + return _react["default"].createElement(_styles.InputWrapper, { + className: className + }, _react["default"].createElement(_PrefixIcon["default"], { + icon: icon, + type: type + }), type === 'password' && _react["default"].createElement("button", { + type: "button", + onClick: function onClick() { + return togglePassword(!showPassword); + }, + className: showPassword ? 'shown' : '', + tabIndex: "-1" + }, _react["default"].createElement(_styles.IconWrapper, { + background: false + }, _react["default"].createElement(_Icon["default"], { + icon: type + }))), _react["default"].createElement(_styles.InputText, _extends({ + autoFocus: autoFocus, + id: id || name, + name: name, + onChange: onChange, + tabIndex: tabIndex, + type: showPassword ? 'text' : type, + value: value, + icon: icon + }, rest))); +} + +InputText.defaultProps = { + autoComplete: 'off', + autoFocus: false, + className: null, + icon: null, + id: null, + onChange: function onChange() {}, + placeholder: null, + tabIndex: '0', + type: 'text', + value: '' +}; +InputText.propTypes = { + autoComplete: _propTypes["default"].string, + autoFocus: _propTypes["default"].bool, + className: _propTypes["default"].string, + icon: _propTypes["default"].node, + id: _propTypes["default"].string, + name: _propTypes["default"].string.isRequired, + onChange: _propTypes["default"].func, + placeholder: _propTypes["default"].string, + tabIndex: _propTypes["default"].string, + type: _propTypes["default"].string, + value: _propTypes["default"].string +}; +var _default = InputText; +exports["default"] = _default; + +/***/ }), +/* 496 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "createYupSchema", { + enumerable: true, + get: function get() { + return _createYupSchema["default"]; + } +}); +Object.defineProperty(exports, "gradient", { + enumerable: true, + get: function get() { + return _gradient["default"]; + } +}); + +var _createYupSchema = _interopRequireDefault(__webpack_require__(1207)); + +var _gradient = _interopRequireDefault(__webpack_require__(1318)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +/***/ }), +/* 497 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(498), + isArguments = __webpack_require__(287), + isArray = __webpack_require__(82), + isIndex = __webpack_require__(426), + isLength = __webpack_require__(288), + toKey = __webpack_require__(234); + +/** + * 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; + } + 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; + + +/***/ }), +/* 498 */ +/***/ (function(module, exports, __webpack_require__) { + +var isArray = __webpack_require__(82), + isKey = __webpack_require__(308), + stringToPath = __webpack_require__(1209), + toString = __webpack_require__(187); + +/** + * 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)); +} + +module.exports = castPath; + + +/***/ }), +/* 499 */ +/***/ (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; +} + +module.exports = arrayMap; + + +/***/ }), +/* 500 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__(235), + eq = __webpack_require__(310); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * 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); + } +} + +module.exports = assignValue; + + +/***/ }), +/* 501 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(425), + baseKeysIn = __webpack_require__(1241), + isArrayLike = __webpack_require__(219); + +/** + * 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); +} + +module.exports = keysIn; + + +/***/ }), +/* 502 */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = copyArray; + + +/***/ }), +/* 503 */ +/***/ (function(module, exports) { + +/** + * 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); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false + */ +function stubArray() { + return []; +} + +module.exports = stubArray; + + +/***/ }), +/* 504 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__(505), + getPrototype = __webpack_require__(506), + getSymbols = __webpack_require__(312), + stubArray = __webpack_require__(503); + +/* 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; +}; + +module.exports = getSymbolsIn; + + +/***/ }), +/* 505 */ +/***/ (function(module, exports) { + +/** + * 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; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; +} + +module.exports = arrayPush; + + +/***/ }), +/* 506 */ +/***/ (function(module, exports, __webpack_require__) { + +var overArg = __webpack_require__(415); + +/** Built-in value references. */ +var getPrototype = overArg(Object.getPrototypeOf, Object); + +module.exports = getPrototype; + + +/***/ }), +/* 507 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseGetAllKeys = __webpack_require__(508), + getSymbols = __webpack_require__(312), + keys = __webpack_require__(132); + +/** + * 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; + + +/***/ }), +/* 508 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayPush = __webpack_require__(505), + isArray = __webpack_require__(82); + +/** + * 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; + + +/***/ }), +/* 509 */ +/***/ (function(module, exports, __webpack_require__) { + +var root = __webpack_require__(81); + +/** Built-in value references. */ +var Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; + + +/***/ }), +/* 510 */ +/***/ (function(module, exports) { + +/** + * 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); + + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; +} + +module.exports = mapToArray; + + +/***/ }), +/* 511 */ +/***/ (function(module, exports) { + +/** + * 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); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; +} + +module.exports = setToArray; + + +/***/ }), +/* 512 */ +/***/ (function(module, exports, __webpack_require__) { + +var asciiToArray = __webpack_require__(1262), + hasUnicode = __webpack_require__(513), + unicodeToArray = __webpack_require__(1263); + +/** + * 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; + + +/***/ }), +/* 513 */ +/***/ (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; + + +/***/ }), +/* 514 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* jshint node: true */ + +function makeArrayFrom(obj) { + return Array.prototype.slice.apply(obj); +} +var + PENDING = "pending", + RESOLVED = "resolved", + REJECTED = "rejected"; + +function SynchronousPromise(handler) { + this.status = PENDING; + this._continuations = []; + this._parent = null; + this._paused = false; + if (handler) { + handler.call( + this, + this._continueWith.bind(this), + this._failWith.bind(this) + ); + } +} + +function looksLikeAPromise(obj) { + return obj && typeof (obj.then) === "function"; +} + +SynchronousPromise.prototype = { + then: function (nextFn, catchFn) { + var next = SynchronousPromise.unresolved()._setParent(this); + if (this._isRejected()) { + if (this._paused) { + this._continuations.push({ + promise: next, + nextFn: nextFn, + catchFn: catchFn + }); + return next; + } + if (catchFn) { + try { + var catchResult = catchFn(this._error); + if (looksLikeAPromise(catchResult)) { + this._chainPromiseData(catchResult, next); + return next; + } else { + return SynchronousPromise.resolve(catchResult)._setParent(this); + } + } catch (e) { + return SynchronousPromise.reject(e)._setParent(this); + } + } + return SynchronousPromise.reject(this._error)._setParent(this); + } + this._continuations.push({ + promise: next, + nextFn: nextFn, + catchFn: catchFn + }); + this._runResolutions(); + return next; + }, + catch: function (handler) { + if (this._isResolved()) { + return SynchronousPromise.resolve(this._data)._setParent(this); + } + var next = SynchronousPromise.unresolved()._setParent(this); + this._continuations.push({ + promise: next, + catchFn: handler + }); + this._runRejections(); + return next; + }, + finally: function(callback) { + var ran = false; + function runFinally() { + if (!ran) { + ran = true; + return callback(); + } + } + return this.then(runFinally) + .catch(runFinally); + }, + pause: function () { + this._paused = true; + return this; + }, + resume: function () { + var firstPaused = this._findFirstPaused(); + if (firstPaused) { + firstPaused._paused = false; + firstPaused._runResolutions(); + firstPaused._runRejections(); + } + return this; + }, + _findAncestry: function () { + return this._continuations.reduce(function (acc, cur) { + if (cur.promise) { + var node = { + promise: cur.promise, + children: cur.promise._findAncestry() + }; + acc.push(node); + } + return acc; + }, []); + }, + _setParent: function (parent) { + if (this._parent) { + throw new Error("parent already set"); + } + this._parent = parent; + return this; + }, + _continueWith: function (data) { + var firstPending = this._findFirstPending(); + if (firstPending) { + firstPending._data = data; + firstPending._setResolved(); + } + }, + _findFirstPending: function () { + return this._findFirstAncestor(function (test) { + return test._isPending && test._isPending(); + }); + }, + _findFirstPaused: function () { + return this._findFirstAncestor(function (test) { + return test._paused; + }); + }, + _findFirstAncestor: function (matching) { + var test = this; + var result; + while (test) { + if (matching(test)) { + result = test; + } + test = test._parent; + } + return result; + }, + _failWith: function (error) { + var firstRejected = this._findFirstPending(); + if (firstRejected) { + firstRejected._error = error; + firstRejected._setRejected(); + } + }, + _takeContinuations: function () { + return this._continuations.splice(0, this._continuations.length); + }, + _runRejections: function () { + if (this._paused || !this._isRejected()) { + return; + } + var + error = this._error, + continuations = this._takeContinuations(), + self = this; + continuations.forEach(function (cont) { + if (cont.catchFn) { + try { + var catchResult = cont.catchFn(error); + self._handleUserFunctionResult(catchResult, cont.promise); + } catch (e) { + var message = e.message; + cont.promise.reject(e); + } + } else { + cont.promise.reject(error); + } + }); + }, + _runResolutions: function () { + if (this._paused || !this._isResolved() || this._isPending()) { + return; + } + var continuations = this._takeContinuations(); + if (looksLikeAPromise(this._data)) { + return this._handleWhenResolvedDataIsPromise(this._data); + } + var data = this._data; + var self = this; + continuations.forEach(function (cont) { + if (cont.nextFn) { + try { + var result = cont.nextFn(data); + self._handleUserFunctionResult(result, cont.promise); + } catch (e) { + self._handleResolutionError(e, cont); + } + } else if (cont.promise) { + cont.promise.resolve(data); + } + }); + }, + _handleResolutionError: function (e, continuation) { + this._setRejected(); + if (continuation.catchFn) { + try { + continuation.catchFn(e); + return; + } catch (e2) { + e = e2; + } + } + if (continuation.promise) { + continuation.promise.reject(e); + } + }, + _handleWhenResolvedDataIsPromise: function (data) { + var self = this; + return data.then(function (result) { + self._data = result; + self._runResolutions(); + }).catch(function (error) { + self._error = error; + self._setRejected(); + self._runRejections(); + }); + }, + _handleUserFunctionResult: function (data, nextSynchronousPromise) { + if (looksLikeAPromise(data)) { + this._chainPromiseData(data, nextSynchronousPromise); + } else { + nextSynchronousPromise.resolve(data); + } + }, + _chainPromiseData: function (promiseData, nextSynchronousPromise) { + promiseData.then(function (newData) { + nextSynchronousPromise.resolve(newData); + }).catch(function (newError) { + nextSynchronousPromise.reject(newError); + }); + }, + _setResolved: function () { + this.status = RESOLVED; + if (!this._paused) { + this._runResolutions(); + } + }, + _setRejected: function () { + this.status = REJECTED; + if (!this._paused) { + this._runRejections(); + } + }, + _isPending: function () { + return this.status === PENDING; + }, + _isResolved: function () { + return this.status === RESOLVED; + }, + _isRejected: function () { + return this.status === REJECTED; + } +}; + +SynchronousPromise.resolve = function (result) { + return new SynchronousPromise(function (resolve, reject) { + if (looksLikeAPromise(result)) { + result.then(function (newResult) { + resolve(newResult); + }).catch(function (error) { + reject(error); + }); + } else { + resolve(result); + } + }); +}; + +SynchronousPromise.reject = function (result) { + return new SynchronousPromise(function (resolve, reject) { + reject(result); + }); +}; + +SynchronousPromise.unresolved = function () { + return new SynchronousPromise(function (resolve, reject) { + this.resolve = resolve; + this.reject = reject; + }); +}; + +SynchronousPromise.all = function () { + var args = makeArrayFrom(arguments); + if (Array.isArray(args[0])) { + args = args[0]; + } + if (!args.length) { + return SynchronousPromise.resolve([]); + } + return new SynchronousPromise(function (resolve, reject) { + var + allData = [], + numResolved = 0, + doResolve = function () { + if (numResolved === args.length) { + resolve(allData); + } + }, + rejected = false, + doReject = function (err) { + if (rejected) { + return; + } + rejected = true; + reject(err); + }; + args.forEach(function (arg, idx) { + SynchronousPromise.resolve(arg).then(function (thisResult) { + allData[idx] = thisResult; + numResolved += 1; + doResolve(); + }).catch(function (err) { + doReject(err); + }); + }); + }); +}; + +/* jshint ignore:start */ +if (Promise === SynchronousPromise) { + throw new Error("Please use SynchronousPromise.installGlobally() to install globally"); +} +var RealPromise = Promise; +SynchronousPromise.installGlobally = function(__awaiter) { + if (Promise === SynchronousPromise) { + return __awaiter; + } + var result = patchAwaiterIfRequired(__awaiter); + Promise = SynchronousPromise; + return result; +}; + +SynchronousPromise.uninstallGlobally = function() { + if (Promise === SynchronousPromise) { + Promise = RealPromise; + } +}; + +function patchAwaiterIfRequired(__awaiter) { + if (typeof(__awaiter) === "undefined" || __awaiter.__patched) { + return __awaiter; + } + var originalAwaiter = __awaiter; + __awaiter = function() { + var Promise = RealPromise; + originalAwaiter.apply(this, makeArrayFrom(arguments)); + }; + __awaiter.__patched = true; + return __awaiter; +} +/* jshint ignore:end */ + +module.exports = { + SynchronousPromise: SynchronousPromise +}; + + +/***/ }), +/* 515 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseAssignValue = __webpack_require__(235), + baseForOwn = __webpack_require__(516), + baseIteratee = __webpack_require__(517); + +/** + * Creates an object with the same keys as `object` and values 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 2.4.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 _.mapKeys + * @example + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ +function mapValues(object, iteratee) { + var result = {}; + iteratee = baseIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; +} + +module.exports = mapValues; + + +/***/ }), +/* 516 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseFor = __webpack_require__(1269), + keys = __webpack_require__(132); + +/** + * 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); +} + +module.exports = baseForOwn; + + +/***/ }), +/* 517 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseMatches = __webpack_require__(1271), + baseMatchesProperty = __webpack_require__(1282), + identity = __webpack_require__(1286), + isArray = __webpack_require__(82), + property = __webpack_require__(1287); + +/** + * 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; + + +/***/ }), +/* 518 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqualDeep = __webpack_require__(1273), + isObjectLike = __webpack_require__(110); + +/** + * 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; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); +} + +module.exports = baseIsEqual; + + +/***/ }), +/* 519 */ +/***/ (function(module, exports, __webpack_require__) { + +var SetCache = __webpack_require__(1274), + arraySome = __webpack_require__(1277), + cacheHas = __webpack_require__(1278); + +/** 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; + } + // Assume cyclic values are equal. + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + 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); + } + 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; +} + +module.exports = equalArrays; + + +/***/ }), +/* 520 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(92); + +/** + * 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); +} + +module.exports = isStrictComparable; + + +/***/ }), +/* 521 */ +/***/ (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 = matchesStrictComparable; + + +/***/ }), +/* 522 */ +/***/ (function(module, exports, __webpack_require__) { + +var castPath = __webpack_require__(498), + toKey = __webpack_require__(234); + +/** + * 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); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; +} + +module.exports = baseGet; + + +/***/ }), +/* 523 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +exports.__esModule = true; +exports.getIn = getIn; +exports.default = void 0; + +var _propertyExpr = __webpack_require__(238); + +var _has = _interopRequireDefault(__webpack_require__(167)); + +var trim = function trim(part) { + return part.substr(0, part.length - 1).substr(1); +}; + +function getIn(schema, path, value, context) { + var parent, lastPart, lastPartDebug; // if only one "value" arg then use it for both + + context = context || value; + if (!path) return { + parent: parent, + parentPath: path, + schema: schema + }; + (0, _propertyExpr.forEach)(path, function (_part, isBracket, isArray) { + var part = isBracket ? trim(_part) : _part; + + if (isArray || (0, _has.default)(schema, '_subType')) { + // we skipped an array: foo[].bar + var idx = isArray ? parseInt(part, 10) : 0; + schema = schema.resolve({ + context: context, + parent: parent, + value: value + })._subType; + + if (value) { + if (isArray && idx >= value.length) { + throw new Error("Yup.reach cannot resolve an array item at index: " + _part + ", in the path: " + path + ". " + "because there is no value at that index. "); + } + + value = value[idx]; + } + } + + if (!isArray) { + schema = schema.resolve({ + context: context, + parent: parent, + value: value + }); + if (!(0, _has.default)(schema, 'fields') || !(0, _has.default)(schema.fields, part)) throw new Error("The schema does not contain the path: " + path + ". " + ("(failed at: " + lastPartDebug + " which is a type: \"" + schema._type + "\") ")); + schema = schema.fields[part]; + parent = value; + value = value && value[part]; + lastPart = part; + lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part; + } + }); + return { + schema: schema, + parent: parent, + parentPath: lastPart + }; +} + +var reach = function reach(obj, path, value, context) { + return getIn(obj, path, value, context).schema; +}; + +var _default = reach; +exports.default = _default; + +/***/ }), +/* 524 */ +/***/ (function(module, exports) { + +function _taggedTemplateLiteralLoose(strings, raw) { + if (!raw) { + raw = strings.slice(0); + } + + strings.raw = raw; + return strings; +} + +module.exports = _taggedTemplateLiteralLoose; + +/***/ }), +/* 525 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayReduce = __webpack_require__(1297), + deburr = __webpack_require__(1298), + words = __webpack_require__(1301); + +/** Used to compose unicode capture groups. */ +var rsApos = "['\u2019]"; + +/** Used to match apostrophes. */ +var reApos = RegExp(rsApos, 'g'); + +/** + * Creates a function like `_.camelCase`. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ +function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; +} + +module.exports = createCompounder; + + +/***/ }), +/* 526 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = makePath; + +function makePath(strings) { + for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + values[_key - 1] = arguments[_key]; + } + + var path = strings.reduce(function (str, next) { + var value = values.shift(); + return str + (value == null ? '' : value) + next; + }); + return path.replace(/^\./, ''); +} + +module.exports = exports["default"]; + +/***/ }), +/* 527 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(1323), __esModule: true }; + +/***/ }), +/* 528 */ +/***/ (function(module, exports, __webpack_require__) { + +var has = __webpack_require__(130); +var toIObject = __webpack_require__(140); +var arrayIndexOf = __webpack_require__(1326)(false); +var IE_PROTO = __webpack_require__(319)('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; +}; + + +/***/ }), +/* 529 */ +/***/ (function(module, exports, __webpack_require__) { + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(191); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; + + +/***/ }), +/* 530 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +var _iterator = __webpack_require__(1328); + +var _iterator2 = _interopRequireDefault(_iterator); + +var _symbol = __webpack_require__(1336); + +var _symbol2 = _interopRequireDefault(_symbol); + +var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { + return typeof obj === "undefined" ? "undefined" : _typeof(obj); +} : function (obj) { + return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 531 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var LIBRARY = __webpack_require__(192); +var $export = __webpack_require__(77); +var redefine = __webpack_require__(532); +var hide = __webpack_require__(129); +var Iterators = __webpack_require__(170); +var $iterCreate = __webpack_require__(1331); +var setToStringTag = __webpack_require__(242); +var getPrototypeOf = __webpack_require__(534); +var ITERATOR = __webpack_require__(65)('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; +}; + + +/***/ }), +/* 532 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(129); + + +/***/ }), +/* 533 */ +/***/ (function(module, exports, __webpack_require__) { + +var document = __webpack_require__(59).document; +module.exports = document && document.documentElement; + + +/***/ }), +/* 534 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(130); +var toObject = __webpack_require__(169); +var IE_PROTO = __webpack_require__(319)('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; +}; + + +/***/ }), +/* 535 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = __webpack_require__(528); +var hiddenKeys = __webpack_require__(321).concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return $keys(O, hiddenKeys); +}; + + +/***/ }), +/* 536 */ +/***/ (function(module, exports) { + + + +/***/ }), +/* 537 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(1356), __esModule: true }; + +/***/ }), +/* 538 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _styles = __webpack_require__(21); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function ListRow(_ref) { + var cells = _ref.cells, + onClick = _ref.onClick; + return _react["default"].createElement(_styles.ListRow, { + onClick: onClick + }, Object.keys(cells).map(function (key) { + return _react["default"].createElement("td", { + key: key, + className: "".concat(key, "-cell") + }, _react["default"].createElement("p", null, cells[key])); + })); +} + +ListRow.defaultProps = { + cells: {}, + onClick: function onClick() {} +}; +ListRow.propTypes = { + cells: _propTypes["default"].instanceOf(Object), + onClick: _propTypes["default"].func +}; +var _default = ListRow; +exports["default"] = _default; + +/***/ }), +/* 539 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _lodash = __webpack_require__(8); + +var _styles = __webpack_require__(21); + +var _Icon = _interopRequireDefault(__webpack_require__(101)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function TableHeader(_ref) { + var headers = _ref.headers, + onChangeSort = _ref.onChangeSort, + onSelectAll = _ref.onSelectAll, + rows = _ref.rows, + shouldAddTd = _ref.shouldAddTd, + sortBy = _ref.sortBy, + sortOrder = _ref.sortOrder, + withBulkAction = _ref.withBulkAction; + var checked = rows.length > 0 && rows.every(function (row) { + return row._isChecked === true; + }); + var shouldDisplayNotChecked = rows.some(function (row) { + return row._isChecked === true; + }) && !checked; + return _react["default"].createElement("thead", null, _react["default"].createElement("tr", null, withBulkAction && _react["default"].createElement("td", { + className: "checkCell" + }, _react["default"].createElement(_styles.Checkbox, { + onChange: onSelectAll, + checked: checked, + shouldDisplayNotChecked: shouldDisplayNotChecked + })), headers.map(function (header) { + var isSortEnabled = header.isSortEnabled, + name = header.name, + value = header.value; + var shouldDisplaySort = isSortEnabled && sortBy === value; + var firstElementThatCanBeSorted = (0, _lodash.get)(headers.filter(function (h) { + return h.isSortEnabled; + }), [0, 'value'], null); + return _react["default"].createElement("td", { + key: value, + onClick: function onClick() { + onChangeSort({ + sortBy: value, + firstElementThatCanBeSorted: firstElementThatCanBeSorted, + isSortEnabled: isSortEnabled + }); + } + }, _react["default"].createElement("p", { + className: isSortEnabled ? 'clickable' : '' + }, name, shouldDisplaySort && _react["default"].createElement(_Icon["default"], { + icon: sortOrder || 'asc' + }))); + }), shouldAddTd && _react["default"].createElement("td", null))); +} + +TableHeader.defaultProps = { + headers: [], + onChangeSort: function onChangeSort() {}, + onSelectAll: function onSelectAll() {}, + rows: [], + shouldAddTd: false, + sortBy: null, + sortOrder: 'asc', + withBulkAction: false +}; +TableHeader.propTypes = { + headers: _propTypes["default"].arrayOf(_propTypes["default"].shape({ + isSortEnabled: _propTypes["default"].bool, + name: _propTypes["default"].string, + value: _propTypes["default"].string + })), + onChangeSort: _propTypes["default"].func, + onSelectAll: _propTypes["default"].func, + rows: _propTypes["default"].instanceOf(Array), + shouldAddTd: _propTypes["default"].bool, + sortBy: _propTypes["default"].string, + sortOrder: _propTypes["default"].string, + withBulkAction: _propTypes["default"].bool +}; +var _default = TableHeader; +exports["default"] = _default; + +/***/ }), +/* 540 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _lodash = __webpack_require__(8); + +var _styles = __webpack_require__(21); + +var _Icon = _interopRequireDefault(__webpack_require__(101)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function TableRow(_ref) { + var headers = _ref.headers, + _onClick = _ref.onClick, + onSelect = _ref.onSelect, + row = _ref.row, + rowLinks = _ref.rowLinks, + withBulkAction = _ref.withBulkAction; + var displayedCells = headers.map(function (header) { + return header.value; + }); + return _react["default"].createElement("tr", { + onClick: function onClick(e) { + e.preventDefault(); + e.stopPropagation(); + + _onClick(e, row); + } + }, withBulkAction && _react["default"].createElement("td", null, _react["default"].createElement(_styles.Checkbox, { + onClick: function onClick(e) { + e.stopPropagation(); + }, + onChange: onSelect, + checked: row._isChecked + })), displayedCells.map(function (cellName) { + var displayedValue = !(0, _lodash.isObject)(row[cellName]) ? row[cellName] : '-'; + return _react["default"].createElement("td", { + key: cellName, + className: "".concat(cellName, "-cell") + }, _react["default"].createElement("p", null, displayedValue || '-')); + }), rowLinks.length > 0 && _react["default"].createElement("td", null, _react["default"].createElement("div", { + style: { + width: 'fit-content', + "float": 'right' + } + }, _react["default"].createElement(_styles.Links, null, rowLinks.map(function (icon, index) { + return _react["default"].createElement("button", { + key: index + icon, + onClick: function onClick(e) { + e.preventDefault(); + e.stopPropagation(); + icon.onClick(row); + }, + type: "button" + }, _react["default"].createElement(_Icon["default"], { + className: "link-icon", + icon: icon.icon + })); + }))))); +} + +TableRow.defaultProps = { + headers: [], + onClick: function onClick() {}, + onSelect: function onSelect() {}, + row: {}, + rowLinks: [], + withBulkAction: false +}; +TableRow.propTypes = { + headers: _propTypes["default"].arrayOf(_propTypes["default"].shape({ + isSortEnabled: _propTypes["default"].bool, + name: _propTypes["default"].string, + value: _propTypes["default"].string + })), + onClick: _propTypes["default"].func, + onSelect: _propTypes["default"].func, + row: _propTypes["default"].object, + rowLinks: _propTypes["default"].arrayOf(_propTypes["default"].shape({ + icon: _propTypes["default"].node + })), + withBulkAction: _propTypes["default"].bool +}; +var _default = TableRow; +exports["default"] = _default; + +/***/ }), +/* 541 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = __webpack_require__(1); + +var _useEventListener = _interopRequireDefault(__webpack_require__(542)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function useActiveKeys() { + var isEnabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + var _useState = (0, _react.useState)([]), + _useState2 = _slicedToArray(_useState, 2), + activeKeys = _useState2[0], + setActiveKeys = _useState2[1]; + + (0, _useEventListener["default"])('keydown', function (e) { + if (!activeKeys.includes(e.keyCode)) { + setActiveKeys(function (prevKeys) { + return [].concat(_toConsumableArray(prevKeys), [e.keyCode]); + }); + } + }, isEnabled); + (0, _useEventListener["default"])('keyup', function (e) { + setActiveKeys(function (prevKeys) { + return prevKeys.filter(function (key) { + return key !== e.keyCode; + }); + }); + }, isEnabled); + return activeKeys; +} + +var _default = useActiveKeys; +exports["default"] = _default; + +/***/ }), +/* 542 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _react = __webpack_require__(1); + +function useEventListener(event, eventListener) { + var isEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var listenerRef = (0, _react.useRef)(); + listenerRef.current = eventListener; + (0, _react.useEffect)(function () { + function handleEvent(e) { + listenerRef.current(e); + } + + if (isEnabled) { + window.addEventListener(event, handleEvent); + } else { + window.removeEventListener(event, handleEvent); + } + + return function () { + window.removeEventListener(event, handleEvent); + }; + }, [event, isEnabled]); +} + +var _default = useEventListener; +exports["default"] = _default; + +/***/ }), +/* 543 */ +/***/ (function(module, exports) { + +exports.__esModule = true; +var ATTRIBUTE_NAMES = exports.ATTRIBUTE_NAMES = { + BODY: "bodyAttributes", + HTML: "htmlAttributes", + TITLE: "titleAttributes" +}; + +var TAG_NAMES = exports.TAG_NAMES = { + BASE: "base", + BODY: "body", + HEAD: "head", + HTML: "html", + LINK: "link", + META: "meta", + NOSCRIPT: "noscript", + SCRIPT: "script", + STYLE: "style", + TITLE: "title" +}; + +var VALID_TAG_NAMES = exports.VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) { + return TAG_NAMES[name]; +}); + +var TAG_PROPERTIES = exports.TAG_PROPERTIES = { + CHARSET: "charset", + CSS_TEXT: "cssText", + HREF: "href", + HTTPEQUIV: "http-equiv", + INNER_HTML: "innerHTML", + ITEM_PROP: "itemprop", + NAME: "name", + PROPERTY: "property", + REL: "rel", + SRC: "src" +}; + +var REACT_TAG_MAP = exports.REACT_TAG_MAP = { + accesskey: "accessKey", + charset: "charSet", + class: "className", + contenteditable: "contentEditable", + contextmenu: "contextMenu", + "http-equiv": "httpEquiv", + itemprop: "itemProp", + tabindex: "tabIndex" +}; + +var HELMET_PROPS = exports.HELMET_PROPS = { + DEFAULT_TITLE: "defaultTitle", + DEFER: "defer", + ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters", + ON_CHANGE_CLIENT_STATE: "onChangeClientState", + TITLE_TEMPLATE: "titleTemplate" +}; + +var HTML_TAG_MAP = exports.HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) { + obj[REACT_TAG_MAP[key]] = key; + return obj; +}, {}); + +var SELF_CLOSING_TAGS = exports.SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE]; + +var HELMET_ATTRIBUTE = exports.HELMET_ATTRIBUTE = "data-react-helmet"; + +/***/ }), +/* 544 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));var _reactstrap=__webpack_require__(71);function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding: 18px 30px !important;\n"]);_templateObject=function _templateObject(){return data;};return data;}var ContainerFluid=(0,_styledComponents["default"])(_reactstrap.Container)(_templateObject());ContainerFluid.defaultProps={fluid:true};var _default=ContainerFluid;exports["default"]=_default; + +/***/ }), +/* 545 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.mapDispatchToProps=mapDispatchToProps;exports["default"]=exports.LocaleToggle=void 0;var _classCallCheck2=_interopRequireDefault(__webpack_require__(16));var _createClass2=_interopRequireDefault(__webpack_require__(17));var _assertThisInitialized2=_interopRequireDefault(__webpack_require__(13));var _possibleConstructorReturn2=_interopRequireDefault(__webpack_require__(18));var _getPrototypeOf2=_interopRequireDefault(__webpack_require__(19));var _inherits2=_interopRequireDefault(__webpack_require__(20));var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _reactRedux=__webpack_require__(62);var _reselect=__webpack_require__(57);var _redux=__webpack_require__(63);var _classnames=_interopRequireDefault(__webpack_require__(23));var _reactstrap=__webpack_require__(71);var _selectors=_interopRequireDefault(__webpack_require__(546));var _actions=__webpack_require__(1390);var _i18n=__webpack_require__(327);var _Wrapper=_interopRequireDefault(__webpack_require__(1408));function _createSuper(Derived){return function(){var Super=(0,_getPrototypeOf2["default"])(Derived),result;if(_isNativeReflectConstruct()){var NewTarget=(0,_getPrototypeOf2["default"])(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2["default"])(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true;}catch(e){return false;}}var LocaleToggle=/*#__PURE__*/function(_React$Component){(0,_inherits2["default"])(LocaleToggle,_React$Component);var _super=_createSuper(LocaleToggle);function LocaleToggle(){var _this;(0,_classCallCheck2["default"])(this,LocaleToggle);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"state",{isOpen:false});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"getFlagUrl",function(locale){switch(locale){case'en':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/us.svg';case'pt-BR':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/br.svg';case'zh':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/tw.svg';case'zh-Hans':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/cn.svg';case'ar':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/sa.svg';case'ko':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/kr.svg';case'ja':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/jp.svg';case'vi':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/vn.svg';case'sk':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/sk.svg';case'cs':return'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/cz.svg';default:return"https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/".concat(locale,".svg");}});(0,_defineProperty2["default"])((0,_assertThisInitialized2["default"])(_this),"toggle",function(){return _this.setState(function(prevState){return{isOpen:!prevState.isOpen};});});return _this;}(0,_createClass2["default"])(LocaleToggle,[{key:"render",value:function render(){var _this2=this;var _this$props=this.props,locale=_this$props.currentLocale.locale,className=_this$props.className;var style=(0,_classnames["default"])('localeDropdownMenu',className);return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],null,/*#__PURE__*/_react["default"].createElement(_reactstrap.ButtonDropdown,{isOpen:this.state.isOpen,toggle:this.toggle},/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownToggle,{className:"localeDropdownContent"},/*#__PURE__*/_react["default"].createElement("span",null,locale),/*#__PURE__*/_react["default"].createElement("img",{src:this.getFlagUrl(locale),alt:locale})),/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownMenu,{className:style},_i18n.languages.map(function(language){return/*#__PURE__*/_react["default"].createElement(_reactstrap.DropdownItem,{key:language,onClick:function onClick(){return _this2.props.changeLocale(language);},className:(0,_classnames["default"])('localeToggleItem',locale===language?'localeToggleItemActive':'')},language.toUpperCase());}))));}}]);return LocaleToggle;}(_react["default"].Component);exports.LocaleToggle=LocaleToggle;LocaleToggle.defaultProps={className:null};LocaleToggle.propTypes={className:_propTypes["default"].string,changeLocale:_propTypes["default"].func.isRequired,currentLocale:_propTypes["default"].object.isRequired};var mapStateToProps=(0,_reselect.createStructuredSelector)({currentLocale:(0,_selectors["default"])()});function mapDispatchToProps(dispatch){return(0,_redux.bindActionCreators)({changeLocale:_actions.changeLocale},dispatch);}var withConnect=(0,_reactRedux.connect)(mapStateToProps,mapDispatchToProps);var _default=(0,_redux.compose)(withConnect)(LocaleToggle);exports["default"]=_default; + +/***/ }), +/* 546 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.selectLocale=exports.selectLanguage=exports["default"]=void 0;var _reselect=__webpack_require__(57);/** + * Direct selector to the languageToggle state domain + */var selectLanguage=function selectLanguage(){return function(state){return state.get('language');};};/** + * Select the language locale + */exports.selectLanguage=selectLanguage;var selectLocale=function selectLocale(){return(0,_reselect.createSelector)(selectLanguage(),function(languageState){return languageState.get('locale');});};exports.selectLocale=selectLocale;var makeSelectLocale=function makeSelectLocale(){return(0,_reselect.createSelector)(selectLocale(),function(locale){return{locale:locale};});};var _default=makeSelectLocale;exports["default"]=_default; + +/***/ }), +/* 547 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.Wave=exports.SocialLinkWrapper=exports.Separator=exports.P=exports.LinkWrapper=exports.Container=exports.Block=exports.ALink=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireWildcard(__webpack_require__(4));function _templateObject14(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n height: 24px;\n margin-bottom: 30px;\n font-size: 14px;\n font-weight: 500;\n a {\n display: block;\n width: 100%;\n height: 100%;\n color: #333740 !important;\n text-decoration: none;\n line-height: 18px;\n img,\n span {\n display: inline-block;\n vertical-align: middle;\n }\n img {\n height: 24px;\n width: 24px;\n object-fit: contain;\n }\n span {\n width: calc(100% - 24px);\n padding-left: 11px;\n font-weight: 600;\n }\n &:hover {\n text-decoration: none;\n }\n }\n"]);_templateObject14=function _templateObject14(){return data;};return data;}function _templateObject13(){var data=(0,_taggedTemplateLiteral2["default"])(["\n content: '\f121';\n color: #f0811e;\n "],["\n content: '\\f121';\n color: #f0811e;\n "]);_templateObject13=function _templateObject13(){return data;};return data;}function _templateObject12(){var data=(0,_taggedTemplateLiteral2["default"])(["\n content: '\f02d';\n color: #42b88e;\n "],["\n content: '\\f02d';\n color: #42b88e;\n "]);_templateObject12=function _templateObject12(){return data;};return data;}function _templateObject11(){var data=(0,_taggedTemplateLiteral2["default"])(["\n width: calc(50% - 6px);\n position: relative;\n padding: 21px 30px;\n padding-left: 95px;\n height: auto;\n line-height: 18px;\n background-color: #f7f8f8;\n\n &:hover,\n focus,\n active {\n text-decoration: none;\n outline: 0;\n }\n\n &:before {\n position: absolute;\n left: 30px;\n top: 38px;\n font-family: 'FontAwesome';\n font-size: 38px;\n\n ","\n }\n\n > p {\n margin: 0;\n font-size: 13px;\n &:first-child {\n font-size: 16px;\n }\n color: #919BAE;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n .bold {\n color: #333740\n font-weight: 600;\n }\n"]);_templateObject11=function _templateObject11(){return data;};return data;}function _templateObject10(){var data=(0,_taggedTemplateLiteral2["default"])(["\n height: 2px;\n background-color: #f7f8f8;\n"]);_templateObject10=function _templateObject10(){return data;};return data;}function _templateObject9(){var data=(0,_taggedTemplateLiteral2["default"])(["\n background-color: #005fea;\n "]);_templateObject9=function _templateObject9(){return data;};return data;}function _templateObject8(){var data=(0,_taggedTemplateLiteral2["default"])(["\n background-color: #333740;\n "]);_templateObject8=function _templateObject8(){return data;};return data;}function _templateObject7(){var data=(0,_taggedTemplateLiteral2["default"])(["\n margin-top: 9px;\n font-size: 14px;\n color: #005fea;\n &:before {\n font-size: 12px;\n }\n &:hover {\n color: #005fea;\n }\n "]);_templateObject7=function _templateObject7(){return data;};return data;}function _templateObject6(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding-left: 20px;\n margin-top: 16px;\n color: #ffffff;\n text-transform: uppercase;\n font-size: 13px;\n font-weight: 500;\n &:before {\n font-size: 16px;\n }\n &:hover {\n color: #ffffff;\n }\n "]);_templateObject6=function _templateObject6(){return data;};return data;}function _templateObject5(){var data=(0,_taggedTemplateLiteral2["default"])(["\n display: inline-block;\n position: relative;\n height: 34px;\n padding-right: 20px;\n border-radius: 3px;\n text-overflow: ellipsis;\n overflow: hidden;\n line-height: 34px;\n font-size: 13px;\n\n &:before {\n content: '\f105';\n\n font-weight: 600;\n margin-right: 10px;\n font-family: 'FontAwesome';\n }\n\n &:hover,\n focus,\n active {\n text-decoration: none;\n outline: 0;\n }\n\n &:hover::after {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n border-radius: 0.3rem;\n content: '';\n opacity: 0.1;\n background: #ffffff;\n }\n\n ","\n\n ","\n\n ","\n"],["\n display: inline-block;\n position: relative;\n height: 34px;\n padding-right: 20px;\n border-radius: 3px;\n text-overflow: ellipsis;\n overflow: hidden;\n line-height: 34px;\n font-size: 13px;\n\n &:before {\n content: '\\f105';\n\n font-weight: 600;\n margin-right: 10px;\n font-family: 'FontAwesome';\n }\n\n &:hover,\n focus,\n active {\n text-decoration: none;\n outline: 0;\n }\n\n &:hover::after {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n border-radius: 0.3rem;\n content: '';\n opacity: 0.1;\n background: #ffffff;\n }\n\n ","\n\n ","\n\n ","\n"]);_templateObject5=function _templateObject5(){return data;};return data;}function _templateObject4(){var data=(0,_taggedTemplateLiteral2["default"])(["\n &:before {\n content: '\uD83D\uDC4B';\n position: absolute;\n top: 24px;\n right: 30px;\n font-size: 50px;\n }\n"]);_templateObject4=function _templateObject4(){return data;};return data;}function _templateObject3(){var data=(0,_taggedTemplateLiteral2["default"])(["\n max-width: 550px;\n padding-top: 10px;\n padding-right: 30px;\n color: #5c5f66;\n font-size: 14px;\n b {\n font-weight: 600;\n }\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding: 47px 13px 0 13px;\n > div {\n margin: 0;\n }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n width: 100%;\n position: relative;\n margin-bottom: 34px;\n background: #ffffff;\n padding: 19px 30px 30px 30px;\n box-shadow: 0 2px 4px 0 #e3e9f3;\n border-radius: 3px;\n line-heigth: 18px;\n\n a {\n position: relative;\n text-decoration: none;\n\n &:hover::after {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n border-radius: 0.3rem;\n content: '';\n opacity: 0.1;\n background: #ffffff;\n }\n }\n h2,\n p {\n line-height: 18px;\n }\n h2 {\n display: inline-block;\n }\n #mainHeader {\n &:after {\n content: '';\n width: 100%;\n height: 3px;\n margin-top: 4px;\n display: block;\n background: #f0b41e;\n }\n }\n\n .social-wrapper {\n span {\n display: inline-block;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n > div:nth-child(2n) {\n padding-right: 0;\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Block=_styledComponents["default"].div(_templateObject());exports.Block=Block;var Container=_styledComponents["default"].div(_templateObject2());exports.Container=Container;var P=_styledComponents["default"].p(_templateObject3());exports.P=P;var Wave=_styledComponents["default"].div(_templateObject4());exports.Wave=Wave;var ALink=_styledComponents["default"].a(_templateObject5(),function(_ref){var type=_ref.type;return type==='blog'||type==='documentation'?(0,_styledComponents.css)(_templateObject6()):(0,_styledComponents.css)(_templateObject7());},function(_ref2){var type=_ref2.type;return type==='blog'&&(0,_styledComponents.css)(_templateObject8());},function(_ref3){var type=_ref3.type;return type==='documentation'&&(0,_styledComponents.css)(_templateObject9());});exports.ALink=ALink;var Separator=_styledComponents["default"].div(_templateObject10());exports.Separator=Separator;var LinkWrapper=_styledComponents["default"].a(_templateObject11(),function(_ref4){var type=_ref4.type;if(type==='doc'){return(0,_styledComponents.css)(_templateObject12());}return(0,_styledComponents.css)(_templateObject13());});exports.LinkWrapper=LinkWrapper;var SocialLinkWrapper=_styledComponents["default"].div(_templateObject14());exports.SocialLinkWrapper=SocialLinkWrapper; + +/***/ }), +/* 548 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _strapiHelperPlugin=__webpack_require__(10);/** + * NotFoundPage + * + * This is the page we show when the user visits a url that doesn't have a route + * + * NOTE: while this component should technically be a stateless functional + * component (SFC), hot reloading does not currently support SFCs. If hot + * reloading is not a neccessity for you then you can refactor it and remove + * the linting exception. + */var NotFoundPage=function NotFoundPage(props){return/*#__PURE__*/_react["default"].createElement(_strapiHelperPlugin.NotFound,props);};NotFoundPage.propTypes={history:_propTypes["default"].shape({goBack:_propTypes["default"].func.isRequired}).isRequired};var _default=NotFoundPage;exports["default"]=_default; + +/***/ }), +/* 549 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = _default; +exports.operationReducer = exports.playerReducer = void 0; + +var _player = _interopRequireDefault(__webpack_require__(1430)); + +var _operation = _interopRequireDefault(__webpack_require__(1431)); + +function _default() { + var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var action = arguments.length > 1 ? arguments[1] : undefined; + return { + player: (0, _player["default"])(state.player, action), + operation: (0, _operation["default"])(state.operation, action) + }; +} + +var playerReducer = _player["default"]; +exports.playerReducer = playerReducer; +var operationReducer = _operation["default"]; +exports.operationReducer = operationReducer; + +/***/ }), +/* 550 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var Fullscreen = +/*#__PURE__*/ +function () { + function Fullscreen() { + (0, _classCallCheck2["default"])(this, Fullscreen); + } + + (0, _createClass2["default"])(Fullscreen, [{ + key: "request", + value: function request(elm) { + if (elm.requestFullscreen) { + elm.requestFullscreen(); + } else if (elm.webkitRequestFullscreen) { + elm.webkitRequestFullscreen(); + } else if (elm.mozRequestFullScreen) { + elm.mozRequestFullScreen(); + } else if (elm.msRequestFullscreen) { + elm.msRequestFullscreen(); + } + } + }, { + key: "exit", + value: function exit() { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } + } + }, { + key: "addEventListener", + value: function addEventListener(handler) { + document.addEventListener('fullscreenchange', handler); + document.addEventListener('webkitfullscreenchange', handler); + document.addEventListener('mozfullscreenchange', handler); + document.addEventListener('MSFullscreenChange', handler); + } + }, { + key: "removeEventListener", + value: function removeEventListener(handler) { + document.removeEventListener('fullscreenchange', handler); + document.removeEventListener('webkitfullscreenchange', handler); + document.removeEventListener('mozfullscreenchange', handler); + document.removeEventListener('MSFullscreenChange', handler); + } + }, { + key: "isFullscreen", + get: function get() { + return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement; + } + }, { + key: "enabled", + get: function get() { + return document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled; + } + }]); + return Fullscreen; +}(); + +var _default = new Fullscreen(); + +exports["default"] = _default; + +/***/ }), +/* 551 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + actions: _propTypes["default"].object, + player: _propTypes["default"].object, + position: _propTypes["default"].string, + className: _propTypes["default"].string +}; +var defaultProps = { + position: 'left' +}; + +var BigPlayButton = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(BigPlayButton, _Component); + + function BigPlayButton(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, BigPlayButton); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(BigPlayButton).call(this, props, context)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(BigPlayButton, [{ + key: "componentDidMount", + value: function componentDidMount() {} + }, { + key: "handleClick", + value: function handleClick() { + var actions = this.props.actions; + actions.play(); + } + }, { + key: "render", + value: function render() { + var _this$props = this.props, + player = _this$props.player, + position = _this$props.position; + return _react["default"].createElement("button", { + className: (0, _classnames["default"])('video-react-big-play-button', "video-react-big-play-button-".concat(position), this.props.className, { + 'big-play-button-hide': player.hasStarted || !player.currentSrc + }), + type: "button", + "aria-live": "polite", + tabIndex: "0", + onClick: this.handleClick + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Play Video")); + } + }]); + return BigPlayButton; +}(_react.Component); + +exports["default"] = BigPlayButton; +BigPlayButton.propTypes = propTypes; +BigPlayButton.defaultProps = defaultProps; +BigPlayButton.displayName = 'BigPlayButton'; + +/***/ }), +/* 552 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = LoadingSpinner; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +function LoadingSpinner(_ref) { + var player = _ref.player, + className = _ref.className; + + if (player.error) { + return null; + } + + return _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-loading-spinner', className) + }); +} + +LoadingSpinner.propTypes = propTypes; +LoadingSpinner.displayName = 'LoadingSpinner'; + +/***/ }), +/* 553 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + poster: _propTypes["default"].string, + player: _propTypes["default"].object, + actions: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +function PosterImage(_ref) { + var poster = _ref.poster, + player = _ref.player, + actions = _ref.actions, + className = _ref.className; + + if (!poster || player.hasStarted) { + return null; + } + + return _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-poster', className), + style: { + backgroundImage: "url(\"".concat(poster, "\")") + }, + onClick: function onClick() { + if (player.paused) { + actions.play(); + } + } + }); +} + +PosterImage.propTypes = propTypes; +PosterImage.displayName = 'PosterImage'; +var _default = PosterImage; +exports["default"] = _default; + +/***/ }), +/* 554 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _objectSpread2 = _interopRequireDefault(__webpack_require__(112)); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _utils = __webpack_require__(93); + +var propTypes = { + actions: _propTypes["default"].object, + player: _propTypes["default"].object, + children: _propTypes["default"].any, + startTime: _propTypes["default"].number, + loop: _propTypes["default"].bool, + muted: _propTypes["default"].bool, + autoPlay: _propTypes["default"].bool, + playsInline: _propTypes["default"].bool, + src: _propTypes["default"].string, + poster: _propTypes["default"].string, + className: _propTypes["default"].string, + preload: _propTypes["default"].oneOf(['auto', 'metadata', 'none']), + crossOrigin: _propTypes["default"].string, + onLoadStart: _propTypes["default"].func, + onWaiting: _propTypes["default"].func, + onCanPlay: _propTypes["default"].func, + onCanPlayThrough: _propTypes["default"].func, + onPlaying: _propTypes["default"].func, + onEnded: _propTypes["default"].func, + onSeeking: _propTypes["default"].func, + onSeeked: _propTypes["default"].func, + onPlay: _propTypes["default"].func, + onPause: _propTypes["default"].func, + onProgress: _propTypes["default"].func, + onDurationChange: _propTypes["default"].func, + onError: _propTypes["default"].func, + onSuspend: _propTypes["default"].func, + onAbort: _propTypes["default"].func, + onEmptied: _propTypes["default"].func, + onStalled: _propTypes["default"].func, + onLoadedMetadata: _propTypes["default"].func, + onLoadedData: _propTypes["default"].func, + onTimeUpdate: _propTypes["default"].func, + onRateChange: _propTypes["default"].func, + onVolumeChange: _propTypes["default"].func, + onResize: _propTypes["default"].func +}; + +var Video = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(Video, _Component); + + function Video(props) { + var _this; + + (0, _classCallCheck2["default"])(this, Video); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Video).call(this, props)); + _this.video = null; // the html5 video + + _this.play = _this.play.bind((0, _assertThisInitialized2["default"])(_this)); + _this.pause = _this.pause.bind((0, _assertThisInitialized2["default"])(_this)); + _this.seek = _this.seek.bind((0, _assertThisInitialized2["default"])(_this)); + _this.forward = _this.forward.bind((0, _assertThisInitialized2["default"])(_this)); + _this.replay = _this.replay.bind((0, _assertThisInitialized2["default"])(_this)); + _this.toggleFullscreen = _this.toggleFullscreen.bind((0, _assertThisInitialized2["default"])(_this)); + _this.getProperties = _this.getProperties.bind((0, _assertThisInitialized2["default"])(_this)); + _this.renderChildren = _this.renderChildren.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleLoadStart = _this.handleLoadStart.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleCanPlay = _this.handleCanPlay.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleCanPlayThrough = _this.handleCanPlayThrough.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handlePlay = _this.handlePlay.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handlePlaying = _this.handlePlaying.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handlePause = _this.handlePause.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleEnded = _this.handleEnded.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleWaiting = _this.handleWaiting.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleSeeking = _this.handleSeeking.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleSeeked = _this.handleSeeked.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleFullscreenChange = _this.handleFullscreenChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleError = _this.handleError.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleSuspend = _this.handleSuspend.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleAbort = _this.handleAbort.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleEmptied = _this.handleEmptied.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleStalled = _this.handleStalled.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleLoadedMetaData = _this.handleLoadedMetaData.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleLoadedData = _this.handleLoadedData.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleTimeUpdate = _this.handleTimeUpdate.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleRateChange = _this.handleRateChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleVolumeChange = _this.handleVolumeChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleDurationChange = _this.handleDurationChange.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleProgress = (0, _utils.throttle)(_this.handleProgress.bind((0, _assertThisInitialized2["default"])(_this)), 250); + _this.handleKeypress = _this.handleKeypress.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(Video, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.forceUpdate(); // make sure the children can get the video property + } // get all video properties + + }, { + key: "getProperties", + value: function getProperties() { + var _this2 = this; + + if (!this.video) { + return null; + } + + return _utils.mediaProperties.reduce(function (properties, key) { + properties[key] = _this2.video[key]; + return properties; + }, {}); + } // get playback rate + + }, { + key: "play", + // play the video + value: function play() { + var promise = this.video.play(); + + if (promise !== undefined) { + promise["catch"](function () {}).then(function () {}); + } + } // pause the video + + }, { + key: "pause", + value: function pause() { + var promise = this.video.pause(); + + if (promise !== undefined) { + promise["catch"](function () {}).then(function () {}); + } + } // Change the video source and re-load the video: + + }, { + key: "load", + value: function load() { + this.video.load(); + } // Add a new text track to the video + + }, { + key: "addTextTrack", + value: function addTextTrack() { + var _this$video; + + (_this$video = this.video).addTextTrack.apply(_this$video, arguments); + } // Check if your browser can play different types of video: + + }, { + key: "canPlayType", + value: function canPlayType() { + var _this$video2; + + (_this$video2 = this.video).canPlayType.apply(_this$video2, arguments); + } // toggle play + + }, { + key: "togglePlay", + value: function togglePlay() { + if (this.video.paused) { + this.play(); + } else { + this.pause(); + } + } // seek video by time + + }, { + key: "seek", + value: function seek(time) { + try { + this.video.currentTime = time; + } catch (e) {// console.log(e, 'Video is not ready.') + } + } // jump forward x seconds + + }, { + key: "forward", + value: function forward(seconds) { + this.seek(this.video.currentTime + seconds); + } // jump back x seconds + + }, { + key: "replay", + value: function replay(seconds) { + this.forward(-seconds); + } // enter or exist full screen + + }, { + key: "toggleFullscreen", + value: function toggleFullscreen() { + var _this$props = this.props, + player = _this$props.player, + actions = _this$props.actions; + actions.toggleFullscreen(player); + } // Fired when the user agent + // begins looking for media data + + }, { + key: "handleLoadStart", + value: function handleLoadStart() { + var _this$props2 = this.props, + actions = _this$props2.actions, + onLoadStart = _this$props2.onLoadStart; + actions.handleLoadStart(this.getProperties()); + + if (onLoadStart) { + onLoadStart.apply(void 0, arguments); + } + } // A handler for events that + // signal that waiting has ended + + }, { + key: "handleCanPlay", + value: function handleCanPlay() { + var _this$props3 = this.props, + actions = _this$props3.actions, + onCanPlay = _this$props3.onCanPlay; + actions.handleCanPlay(this.getProperties()); + + if (onCanPlay) { + onCanPlay.apply(void 0, arguments); + } + } // A handler for events that + // signal that waiting has ended + + }, { + key: "handleCanPlayThrough", + value: function handleCanPlayThrough() { + var _this$props4 = this.props, + actions = _this$props4.actions, + onCanPlayThrough = _this$props4.onCanPlayThrough; + actions.handleCanPlayThrough(this.getProperties()); + + if (onCanPlayThrough) { + onCanPlayThrough.apply(void 0, arguments); + } + } // A handler for events that + // signal that waiting has ended + + }, { + key: "handlePlaying", + value: function handlePlaying() { + var _this$props5 = this.props, + actions = _this$props5.actions, + onPlaying = _this$props5.onPlaying; + actions.handlePlaying(this.getProperties()); + + if (onPlaying) { + onPlaying.apply(void 0, arguments); + } + } // Fired whenever the media has been started + + }, { + key: "handlePlay", + value: function handlePlay() { + var _this$props6 = this.props, + actions = _this$props6.actions, + onPlay = _this$props6.onPlay; + actions.handlePlay(this.getProperties()); + + if (onPlay) { + onPlay.apply(void 0, arguments); + } + } // Fired whenever the media has been paused + + }, { + key: "handlePause", + value: function handlePause() { + var _this$props7 = this.props, + actions = _this$props7.actions, + onPause = _this$props7.onPause; + actions.handlePause(this.getProperties()); + + if (onPause) { + onPause.apply(void 0, arguments); + } + } // Fired when the duration of + // the media resource is first known or changed + + }, { + key: "handleDurationChange", + value: function handleDurationChange() { + var _this$props8 = this.props, + actions = _this$props8.actions, + onDurationChange = _this$props8.onDurationChange; + actions.handleDurationChange(this.getProperties()); + + if (onDurationChange) { + onDurationChange.apply(void 0, arguments); + } + } // Fired while the user agent + // is downloading media data + + }, { + key: "handleProgress", + value: function handleProgress() { + var _this$props9 = this.props, + actions = _this$props9.actions, + onProgress = _this$props9.onProgress; + + if (this.video) { + actions.handleProgressChange(this.getProperties()); + } + + if (onProgress) { + onProgress.apply(void 0, arguments); + } + } // Fired when the end of the media resource + // is reached (currentTime == duration) + + }, { + key: "handleEnded", + value: function handleEnded() { + var _this$props10 = this.props, + loop = _this$props10.loop, + player = _this$props10.player, + actions = _this$props10.actions, + onEnded = _this$props10.onEnded; + + if (loop) { + this.seek(0); + this.play(); + } else if (!player.paused) { + this.pause(); + } + + actions.handleEnd(this.getProperties()); + + if (onEnded) { + onEnded.apply(void 0, arguments); + } + } // Fired whenever the media begins waiting + + }, { + key: "handleWaiting", + value: function handleWaiting() { + var _this$props11 = this.props, + actions = _this$props11.actions, + onWaiting = _this$props11.onWaiting; + actions.handleWaiting(this.getProperties()); + + if (onWaiting) { + onWaiting.apply(void 0, arguments); + } + } // Fired whenever the player + // is jumping to a new time + + }, { + key: "handleSeeking", + value: function handleSeeking() { + var _this$props12 = this.props, + actions = _this$props12.actions, + onSeeking = _this$props12.onSeeking; + actions.handleSeeking(this.getProperties()); + + if (onSeeking) { + onSeeking.apply(void 0, arguments); + } + } // Fired when the player has + // finished jumping to a new time + + }, { + key: "handleSeeked", + value: function handleSeeked() { + var _this$props13 = this.props, + actions = _this$props13.actions, + onSeeked = _this$props13.onSeeked; + actions.handleSeeked(this.getProperties()); + + if (onSeeked) { + onSeeked.apply(void 0, arguments); + } + } // Handle Fullscreen Change + + }, { + key: "handleFullscreenChange", + value: function handleFullscreenChange() {} // Fires when the browser is + // intentionally not getting media data + + }, { + key: "handleSuspend", + value: function handleSuspend() { + var _this$props14 = this.props, + actions = _this$props14.actions, + onSuspend = _this$props14.onSuspend; + actions.handleSuspend(this.getProperties()); + + if (onSuspend) { + onSuspend.apply(void 0, arguments); + } + } // Fires when the loading of an audio/video is aborted + + }, { + key: "handleAbort", + value: function handleAbort() { + var _this$props15 = this.props, + actions = _this$props15.actions, + onAbort = _this$props15.onAbort; + actions.handleAbort(this.getProperties()); + + if (onAbort) { + onAbort.apply(void 0, arguments); + } + } // Fires when the current playlist is empty + + }, { + key: "handleEmptied", + value: function handleEmptied() { + var _this$props16 = this.props, + actions = _this$props16.actions, + onEmptied = _this$props16.onEmptied; + actions.handleEmptied(this.getProperties()); + + if (onEmptied) { + onEmptied.apply(void 0, arguments); + } + } // Fires when the browser is trying to + // get media data, but data is not available + + }, { + key: "handleStalled", + value: function handleStalled() { + var _this$props17 = this.props, + actions = _this$props17.actions, + onStalled = _this$props17.onStalled; + actions.handleStalled(this.getProperties()); + + if (onStalled) { + onStalled.apply(void 0, arguments); + } + } // Fires when the browser has loaded + // meta data for the audio/video + + }, { + key: "handleLoadedMetaData", + value: function handleLoadedMetaData() { + var _this$props18 = this.props, + actions = _this$props18.actions, + onLoadedMetadata = _this$props18.onLoadedMetadata, + startTime = _this$props18.startTime; + + if (startTime && startTime > 0) { + this.video.currentTime = startTime; + } + + actions.handleLoadedMetaData(this.getProperties()); + + if (onLoadedMetadata) { + onLoadedMetadata.apply(void 0, arguments); + } + } // Fires when the browser has loaded + // the current frame of the audio/video + + }, { + key: "handleLoadedData", + value: function handleLoadedData() { + var _this$props19 = this.props, + actions = _this$props19.actions, + onLoadedData = _this$props19.onLoadedData; + actions.handleLoadedData(this.getProperties()); + + if (onLoadedData) { + onLoadedData.apply(void 0, arguments); + } + } // Fires when the current + // playback position has changed + + }, { + key: "handleTimeUpdate", + value: function handleTimeUpdate() { + var _this$props20 = this.props, + actions = _this$props20.actions, + onTimeUpdate = _this$props20.onTimeUpdate; + actions.handleTimeUpdate(this.getProperties()); + + if (onTimeUpdate) { + onTimeUpdate.apply(void 0, arguments); + } + } + /** + * Fires when the playing speed of the audio/video is changed + */ + + }, { + key: "handleRateChange", + value: function handleRateChange() { + var _this$props21 = this.props, + actions = _this$props21.actions, + onRateChange = _this$props21.onRateChange; + actions.handleRateChange(this.getProperties()); + + if (onRateChange) { + onRateChange.apply(void 0, arguments); + } + } // Fires when the volume has been changed + + }, { + key: "handleVolumeChange", + value: function handleVolumeChange() { + var _this$props22 = this.props, + actions = _this$props22.actions, + onVolumeChange = _this$props22.onVolumeChange; + actions.handleVolumeChange(this.getProperties()); + + if (onVolumeChange) { + onVolumeChange.apply(void 0, arguments); + } + } // Fires when an error occurred + // during the loading of an audio/video + + }, { + key: "handleError", + value: function handleError() { + var _this$props23 = this.props, + actions = _this$props23.actions, + onError = _this$props23.onError; + actions.handleError(this.getProperties()); + + if (onError) { + onError.apply(void 0, arguments); + } + } + }, { + key: "handleResize", + value: function handleResize() { + var _this$props24 = this.props, + actions = _this$props24.actions, + onResize = _this$props24.onResize; + actions.handleResize(this.getProperties()); + + if (onResize) { + onResize.apply(void 0, arguments); + } + } + }, { + key: "handleKeypress", + value: function handleKeypress() {} + }, { + key: "renderChildren", + value: function renderChildren() { + var _this3 = this; + + var props = (0, _objectSpread2["default"])({}, this.props, { + video: this.video + }); // to make sure the children can get video property + + if (!this.video) { + return null; + } // only keep , , elements + + + return _react["default"].Children.toArray(this.props.children).filter(_utils.isVideoChild).map(function (c) { + var cprops; + + if (typeof c.type === 'string') { + // add onError to + if (c.type === 'source') { + cprops = (0, _objectSpread2["default"])({}, c.props); + var preOnError = cprops.onError; + + cprops.onError = function () { + if (preOnError) { + preOnError.apply(void 0, arguments); + } + + _this3.handleError.apply(_this3, arguments); + }; + } + } else { + cprops = props; + } + + return _react["default"].cloneElement(c, cprops); + }); + } + }, { + key: "render", + value: function render() { + var _this4 = this; + + var _this$props25 = this.props, + loop = _this$props25.loop, + poster = _this$props25.poster, + preload = _this$props25.preload, + src = _this$props25.src, + autoPlay = _this$props25.autoPlay, + playsInline = _this$props25.playsInline, + muted = _this$props25.muted, + crossOrigin = _this$props25.crossOrigin, + videoId = _this$props25.videoId; + return _react["default"].createElement("video", { + className: (0, _classnames["default"])('video-react-video', this.props.className), + id: videoId, + crossOrigin: crossOrigin, + ref: function ref(c) { + _this4.video = c; + }, + muted: muted, + preload: preload, + loop: loop, + playsInline: playsInline, + autoPlay: autoPlay, + poster: poster, + src: src, + onLoadStart: this.handleLoadStart, + onWaiting: this.handleWaiting, + onCanPlay: this.handleCanPlay, + onCanPlayThrough: this.handleCanPlayThrough, + onPlaying: this.handlePlaying, + onEnded: this.handleEnded, + onSeeking: this.handleSeeking, + onSeeked: this.handleSeeked, + onPlay: this.handlePlay, + onPause: this.handlePause, + onProgress: this.handleProgress, + onDurationChange: this.handleDurationChange, + onError: this.handleError, + onSuspend: this.handleSuspend, + onAbort: this.handleAbort, + onEmptied: this.handleEmptied, + onStalled: this.handleStalled, + onLoadedMetadata: this.handleLoadedMetaData, + onLoadedData: this.handleLoadedData, + onTimeUpdate: this.handleTimeUpdate, + onRateChange: this.handleRateChange, + onVolumeChange: this.handleVolumeChange, + tabIndex: "-1" + }, this.renderChildren()); + } + }, { + key: "playbackRate", + get: function get() { + return this.video.playbackRate; + } // set playback rate + // speed of video + , + set: function set(rate) { + this.video.playbackRate = rate; + } + }, { + key: "muted", + get: function get() { + return this.video.muted; + }, + set: function set(val) { + this.video.muted = val; + } + }, { + key: "volume", + get: function get() { + return this.video.volume; + }, + set: function set(val) { + if (val > 1) { + val = 1; + } + + if (val < 0) { + val = 0; + } + + this.video.volume = val; + } // video width + + }, { + key: "videoWidth", + get: function get() { + return this.video.videoWidth; + } // video height + + }, { + key: "videoHeight", + get: function get() { + return this.video.videoHeight; + } + }]); + return Video; +}(_react.Component); + +exports["default"] = Video; +Video.propTypes = propTypes; +Video.displayName = 'Video'; + +/***/ }), +/* 555 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + manager: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +var Bezel = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(Bezel, _Component); + + function Bezel(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, Bezel); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Bezel).call(this, props, context)); + _this.timer = null; + props.manager.subscribeToOperationStateChange(_this.handleStateChange.bind((0, _assertThisInitialized2["default"])(_this))); + _this.state = { + hidden: true, + operation: {} + }; + return _this; + } + + (0, _createClass2["default"])(Bezel, [{ + key: "handleStateChange", + value: function handleStateChange(state, prevState) { + var _this2 = this; + + if (state.count !== prevState.count && state.operation.source === 'shortcut') { + if (this.timer) { + // previous animation is not finished + clearTimeout(this.timer); // cancel it + + this.timer = null; + } // show it + // update operation + + + this.setState({ + hidden: false, + count: state.count, + operation: state.operation + }); // hide it after 0.5s + + this.timer = setTimeout(function () { + _this2.setState({ + hidden: true + }); + + _this2.timer = null; + }, 500); + } + } + }, { + key: "render", + value: function render() { + // only displays for shortcut so far + if (this.state.operation.source !== 'shortcut') { + return null; + } + + var style = this.state.hidden ? { + display: 'none' + } : null; + return _react["default"].createElement("div", { + className: (0, _classnames["default"])({ + 'video-react-bezel': true, + 'video-react-bezel-animation': this.state.count % 2 === 0, + 'video-react-bezel-animation-alt': this.state.count % 2 === 1 + }, this.props.className), + style: style, + role: "status", + "aria-label": this.state.operation.action + }, _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-bezel-icon', "video-react-bezel-icon-".concat(this.state.operation.action)) + })); + } + }]); + return Bezel; +}(_react.Component); + +exports["default"] = Bezel; +Bezel.propTypes = propTypes; +Bezel.displayName = 'Bezel'; + +/***/ }), +/* 556 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _defineProperty2 = _interopRequireDefault(__webpack_require__(11)); + +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(48)); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _react = __webpack_require__(1); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _dom = __webpack_require__(245); + +var propTypes = { + clickable: _propTypes["default"].bool, + dblclickable: _propTypes["default"].bool, + manager: _propTypes["default"].object, + actions: _propTypes["default"].object, + player: _propTypes["default"].object, + shortcuts: _propTypes["default"].array +}; +var defaultProps = { + clickable: true, + dblclickable: true +}; + +var Shortcut = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(Shortcut, _Component); + + function Shortcut(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, Shortcut); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Shortcut).call(this, props, context)); + _this.defaultShortcuts = [{ + keyCode: 32, + // spacebar + handle: _this.togglePlay + }, { + keyCode: 75, + // k + handle: _this.togglePlay + }, { + keyCode: 70, + // f + handle: _this.toggleFullscreen + }, { + keyCode: 37, + // Left arrow + handle: function handle(player, actions) { + if (!player.hasStarted) { + return; + } + + actions.replay(5, { + action: 'replay-5', + source: 'shortcut' + }); // Go back 5 seconds + } + }, { + keyCode: 74, + // j + handle: function handle(player, actions) { + if (!player.hasStarted) { + return; + } + + actions.replay(10, { + action: 'replay-10', + source: 'shortcut' + }); // Go back 10 seconds + } + }, { + keyCode: 39, + // Right arrow + handle: function handle(player, actions) { + if (!player.hasStarted) { + return; + } + + actions.forward(5, { + action: 'forward-5', + source: 'shortcut' + }); // Go forward 5 seconds + } + }, { + keyCode: 76, + // l + handle: function handle(player, actions) { + if (!player.hasStarted) { + return; + } + + actions.forward(10, { + action: 'forward-10', + source: 'shortcut' + }); // Go forward 10 seconds + } + }, { + keyCode: 36, + // Home + handle: function handle(player, actions) { + if (!player.hasStarted) { + return; + } + + actions.seek(0); // Go to beginning of video + } + }, { + keyCode: 35, + // End + handle: function handle(player, actions) { + if (!player.hasStarted) { + return; + } // Go to end of video + + + actions.seek(player.duration); + } + }, { + keyCode: 38, + // Up arrow + handle: function handle(player, actions) { + // Increase volume 5% + var v = player.volume + 0.05; + + if (v > 1) { + v = 1; + } + + actions.changeVolume(v, { + action: 'volume-up', + source: 'shortcut' + }); + } + }, { + keyCode: 40, + // Down arrow + handle: function handle(player, actions) { + // Decrease volume 5% + var v = player.volume - 0.05; + + if (v < 0) { + v = 0; + } + + var action = v > 0 ? 'volume-down' : 'volume-off'; + actions.changeVolume(v, { + action: action, + source: 'shortcut' + }); + } + }, { + keyCode: 190, + // Shift + > + shift: true, + handle: function handle(player, actions) { + // Increase speed + var playbackRate = player.playbackRate; + + if (playbackRate >= 1.5) { + playbackRate = 2; + } else if (playbackRate >= 1.25) { + playbackRate = 1.5; + } else if (playbackRate >= 1.0) { + playbackRate = 1.25; + } else if (playbackRate >= 0.5) { + playbackRate = 1.0; + } else if (playbackRate >= 0.25) { + playbackRate = 0.5; + } else if (playbackRate >= 0) { + playbackRate = 0.25; + } + + actions.changeRate(playbackRate, { + action: 'fast-forward', + source: 'shortcut' + }); + } + }, { + keyCode: 188, + // Shift + < + shift: true, + handle: function handle(player, actions) { + // Decrease speed + var playbackRate = player.playbackRate; + + if (playbackRate <= 0.5) { + playbackRate = 0.25; + } else if (playbackRate <= 1.0) { + playbackRate = 0.5; + } else if (playbackRate <= 1.25) { + playbackRate = 1.0; + } else if (playbackRate <= 1.5) { + playbackRate = 1.25; + } else if (playbackRate <= 2) { + playbackRate = 1.5; + } + + actions.changeRate(playbackRate, { + action: 'fast-rewind', + source: 'shortcut' + }); + } + }]; + _this.shortcuts = (0, _toConsumableArray2["default"])(_this.defaultShortcuts); + _this.mergeShortcuts = _this.mergeShortcuts.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleKeyPress = _this.handleKeyPress.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleDoubleClick = _this.handleDoubleClick.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(Shortcut, [{ + key: "componentDidMount", + value: function componentDidMount() { + this.mergeShortcuts(); + document.addEventListener('keydown', this.handleKeyPress); + document.addEventListener('click', this.handleClick); + document.addEventListener('dblclick', this.handleDoubleClick); + } + }, { + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (prevProps.shortcuts !== this.props.shortcuts) { + this.mergeShortcuts(); + } + } + }, { + key: "componentWillUnmount", + value: function componentWillUnmount() { + document.removeEventListener('keydown', this.handleKeyPress); + document.removeEventListener('click', this.handleClick); + document.removeEventListener('dblclick', this.handleDoubleClick); + } // merge the shortcuts from props + + }, { + key: "mergeShortcuts", + value: function mergeShortcuts() { + var getShortcutKey = function getShortcutKey(_ref) { + var _ref$keyCode = _ref.keyCode, + keyCode = _ref$keyCode === void 0 ? 0 : _ref$keyCode, + _ref$ctrl = _ref.ctrl, + ctrl = _ref$ctrl === void 0 ? false : _ref$ctrl, + _ref$shift = _ref.shift, + shift = _ref$shift === void 0 ? false : _ref$shift, + _ref$alt = _ref.alt, + alt = _ref$alt === void 0 ? false : _ref$alt; + return "".concat(keyCode, ":").concat(ctrl, ":").concat(shift, ":").concat(alt); + }; + + var defaultShortcuts = this.defaultShortcuts.reduce(function (shortcuts, shortcut) { + return Object.assign(shortcuts, (0, _defineProperty2["default"])({}, getShortcutKey(shortcut), shortcut)); + }, {}); + var mergedShortcuts = (this.props.shortcuts || []).reduce(function (shortcuts, shortcut) { + var keyCode = shortcut.keyCode, + handle = shortcut.handle; + + if (keyCode && typeof handle === 'function') { + return Object.assign(shortcuts, (0, _defineProperty2["default"])({}, getShortcutKey(shortcut), shortcut)); + } + + return shortcuts; + }, defaultShortcuts); + + var gradeShortcut = function gradeShortcut(s) { + var score = 0; + var ps = ['ctrl', 'shift', 'alt']; + ps.forEach(function (key) { + if (s[key]) { + score++; + } + }); + return score; + }; + + this.shortcuts = Object.keys(mergedShortcuts).map(function (key) { + return mergedShortcuts[key]; + }).sort(function (a, b) { + return gradeShortcut(b) - gradeShortcut(a); + }); + } + }, { + key: "togglePlay", + value: function togglePlay(player, actions) { + if (player.paused) { + actions.play({ + action: 'play', + source: 'shortcut' + }); + } else { + actions.pause({ + action: 'pause', + source: 'shortcut' + }); + } + } + }, { + key: "toggleFullscreen", + value: function toggleFullscreen(player, actions) { + actions.toggleFullscreen(player); + } + }, { + key: "handleKeyPress", + value: function handleKeyPress(e) { + var _this$props = this.props, + player = _this$props.player, + actions = _this$props.actions; + + if (!player.isActive) { + return; + } + + if (document.activeElement && ((0, _dom.hasClass)(document.activeElement, 'video-react-control') || (0, _dom.hasClass)(document.activeElement, 'video-react-menu-button-active') || // || hasClass(document.activeElement, 'video-react-slider') + (0, _dom.hasClass)(document.activeElement, 'video-react-big-play-button'))) { + return; + } + + var keyCode = e.keyCode || e.which; + var ctrl = e.ctrlKey || e.metaKey; + var shift = e.shiftKey; + var alt = e.altKey; + var shortcut = this.shortcuts.filter(function (s) { + if (!s.keyCode || s.keyCode - keyCode !== 0) { + return false; + } + + if (s.ctrl !== undefined && s.ctrl !== ctrl || s.shift !== undefined && s.shift !== shift || s.alt !== undefined && s.alt !== alt) { + return false; + } + + return true; + })[0]; + + if (shortcut) { + shortcut.handle(player, actions); + e.preventDefault(); + } + } // only if player is active and player is ready + + }, { + key: "canBeClicked", + value: function canBeClicked(player, e) { + if (!player.isActive || e.target.nodeName !== 'VIDEO' || player.readyState !== 4) { + return false; + } + + return true; + } + }, { + key: "handleClick", + value: function handleClick(e) { + var _this$props2 = this.props, + player = _this$props2.player, + actions = _this$props2.actions, + clickable = _this$props2.clickable; + + if (!this.canBeClicked(player, e) || !clickable) { + return; + } + + this.togglePlay(player, actions); // e.preventDefault(); + } + }, { + key: "handleDoubleClick", + value: function handleDoubleClick(e) { + var _this$props3 = this.props, + player = _this$props3.player, + actions = _this$props3.actions, + dblclickable = _this$props3.dblclickable; + + if (!this.canBeClicked(player, e) || !dblclickable) { + return; + } + + this.toggleFullscreen(player, actions); // e.preventDefault(); + } // this component dose not render anything + // it's just for the key down event + + }, { + key: "render", + value: function render() { + return null; + } + }]); + return Shortcut; +}(_react.Component); + +exports["default"] = Shortcut; +Shortcut.propTypes = propTypes; +Shortcut.defaultProps = defaultProps; +Shortcut.displayName = 'Shortcut'; + +/***/ }), +/* 557 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(37)); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _ProgressControl = _interopRequireDefault(__webpack_require__(558)); + +var _PlayToggle = _interopRequireDefault(__webpack_require__(563)); + +var _ForwardControl = _interopRequireDefault(__webpack_require__(564)); + +var _ReplayControl = _interopRequireDefault(__webpack_require__(566)); + +var _FullscreenToggle = _interopRequireDefault(__webpack_require__(567)); + +var _RemainingTimeDisplay = _interopRequireDefault(__webpack_require__(568)); + +var _CurrentTimeDisplay = _interopRequireDefault(__webpack_require__(569)); + +var _DurationDisplay = _interopRequireDefault(__webpack_require__(570)); + +var _TimeDivider = _interopRequireDefault(__webpack_require__(571)); + +var _VolumeMenuButton = _interopRequireDefault(__webpack_require__(572)); + +var _PlaybackRateMenuButton = _interopRequireDefault(__webpack_require__(330)); + +var _utils = __webpack_require__(93); + +var propTypes = { + children: _propTypes["default"].any, + autoHide: _propTypes["default"].bool, + autoHideTime: _propTypes["default"].number, + // used in Player + disableDefaultControls: _propTypes["default"].bool, + disableCompletely: _propTypes["default"].bool, + className: _propTypes["default"].string +}; +var defaultProps = { + autoHide: true, + disableCompletely: false +}; + +var ControlBar = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(ControlBar, _Component); + + function ControlBar(props) { + var _this; + + (0, _classCallCheck2["default"])(this, ControlBar); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(ControlBar).call(this, props)); + _this.getDefaultChildren = _this.getDefaultChildren.bind((0, _assertThisInitialized2["default"])(_this)); + _this.getFullChildren = _this.getFullChildren.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(ControlBar, [{ + key: "getDefaultChildren", + value: function getDefaultChildren() { + return [_react["default"].createElement(_PlayToggle["default"], { + key: "play-toggle", + order: 1 + }), _react["default"].createElement(_VolumeMenuButton["default"], { + key: "volume-menu-button", + order: 4 + }), _react["default"].createElement(_CurrentTimeDisplay["default"], { + key: "current-time-display", + order: 5.1 + }), _react["default"].createElement(_TimeDivider["default"], { + key: "time-divider", + order: 5.2 + }), _react["default"].createElement(_DurationDisplay["default"], { + key: "duration-display", + order: 5.3 + }), _react["default"].createElement(_ProgressControl["default"], { + key: "progress-control", + order: 6 + }), _react["default"].createElement(_FullscreenToggle["default"], { + key: "fullscreen-toggle", + order: 8 + })]; + } + }, { + key: "getFullChildren", + value: function getFullChildren() { + return [_react["default"].createElement(_PlayToggle["default"], { + key: "play-toggle", + order: 1 + }), _react["default"].createElement(_ReplayControl["default"], { + key: "replay-control", + order: 2 + }), _react["default"].createElement(_ForwardControl["default"], { + key: "forward-control", + order: 3 + }), _react["default"].createElement(_VolumeMenuButton["default"], { + key: "volume-menu-button", + order: 4 + }), _react["default"].createElement(_CurrentTimeDisplay["default"], { + key: "current-time-display", + order: 5 + }), _react["default"].createElement(_TimeDivider["default"], { + key: "time-divider", + order: 6 + }), _react["default"].createElement(_DurationDisplay["default"], { + key: "duration-display", + order: 7 + }), _react["default"].createElement(_ProgressControl["default"], { + key: "progress-control", + order: 8 + }), _react["default"].createElement(_RemainingTimeDisplay["default"], { + key: "remaining-time-display", + order: 9 + }), _react["default"].createElement(_PlaybackRateMenuButton["default"], { + rates: [1, 1.25, 1.5, 2], + key: "playback-rate", + order: 10 + }), _react["default"].createElement(_FullscreenToggle["default"], { + key: "fullscreen-toggle", + order: 11 + })]; + } + }, { + key: "getChildren", + value: function getChildren() { + var children = _react["default"].Children.toArray(this.props.children); + + var defaultChildren = this.props.disableDefaultControls ? [] : this.getDefaultChildren(); + var _this$props = this.props, + className = _this$props.className, + parentProps = (0, _objectWithoutProperties2["default"])(_this$props, ["className"]); // remove className + + return (0, _utils.mergeAndSortChildren)(defaultChildren, children, parentProps); + } + }, { + key: "render", + value: function render() { + var _this$props2 = this.props, + autoHide = _this$props2.autoHide, + className = _this$props2.className, + disableCompletely = _this$props2.disableCompletely; + var children = this.getChildren(); + return disableCompletely ? null : _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-control-bar', { + 'video-react-control-bar-auto-hide': autoHide + }, className) + }, children); + } + }]); + return ControlBar; +}(_react.Component); + +exports["default"] = ControlBar; +ControlBar.propTypes = propTypes; +ControlBar.defaultProps = defaultProps; +ControlBar.displayName = 'ControlBar'; + +/***/ }), +/* 558 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _reactDom = __webpack_require__(32); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var Dom = _interopRequireWildcard(__webpack_require__(245)); + +var _SeekBar = _interopRequireDefault(__webpack_require__(559)); + +var propTypes = { + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +var ProgressControl = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(ProgressControl, _Component); + + function ProgressControl(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, ProgressControl); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(ProgressControl).call(this, props, context)); + _this.state = { + mouseTime: { + time: null, + position: 0 + } + }; + _this.handleMouseMoveThrottle = _this.handleMouseMove.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(ProgressControl, [{ + key: "handleMouseMove", + value: function handleMouseMove(event) { + if (!event.pageX) { + return; + } + + var duration = this.props.player.duration; + var node = (0, _reactDom.findDOMNode)(this.seekBar); + var newTime = Dom.getPointerPosition(node, event).x * duration; + var position = event.pageX - Dom.findElPosition(node).left; + this.setState({ + mouseTime: { + time: newTime, + position: position + } + }); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var className = this.props.className; + return _react["default"].createElement("div", { + onMouseMove: this.handleMouseMoveThrottle, + className: (0, _classnames["default"])('video-react-progress-control video-react-control', className) + }, _react["default"].createElement(_SeekBar["default"], (0, _extends2["default"])({ + mouseTime: this.state.mouseTime, + ref: function ref(c) { + _this2.seekBar = c; + } + }, this.props))); + } + }]); + return ProgressControl; +}(_react.Component); + +exports["default"] = ProgressControl; +ProgressControl.propTypes = propTypes; +ProgressControl.displayName = 'ProgressControl'; + +/***/ }), +/* 559 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _Slider = _interopRequireDefault(__webpack_require__(329)); + +var _PlayProgressBar = _interopRequireDefault(__webpack_require__(560)); + +var _LoadProgressBar = _interopRequireDefault(__webpack_require__(561)); + +var _MouseTimeDisplay = _interopRequireDefault(__webpack_require__(562)); + +var _utils = __webpack_require__(93); + +var propTypes = { + player: _propTypes["default"].object, + mouseTime: _propTypes["default"].object, + actions: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +var SeekBar = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(SeekBar, _Component); + + function SeekBar(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, SeekBar); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(SeekBar).call(this, props, context)); + _this.getPercent = _this.getPercent.bind((0, _assertThisInitialized2["default"])(_this)); + _this.getNewTime = _this.getNewTime.bind((0, _assertThisInitialized2["default"])(_this)); + _this.stepForward = _this.stepForward.bind((0, _assertThisInitialized2["default"])(_this)); + _this.stepBack = _this.stepBack.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleMouseDown = _this.handleMouseDown.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleMouseMove = _this.handleMouseMove.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleMouseUp = _this.handleMouseUp.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(SeekBar, [{ + key: "componentDidMount", + value: function componentDidMount() {} + }, { + key: "componentDidUpdate", + value: function componentDidUpdate() {} + /** + * Get percentage of video played + * + * @return {Number} Percentage played + * @method getPercent + */ + + }, { + key: "getPercent", + value: function getPercent() { + var _this$props$player = this.props.player, + currentTime = _this$props$player.currentTime, + seekingTime = _this$props$player.seekingTime, + duration = _this$props$player.duration; + var time = seekingTime || currentTime; + var percent = time / duration; + return percent >= 1 ? 1 : percent; + } + }, { + key: "getNewTime", + value: function getNewTime(event) { + var duration = this.props.player.duration; + var distance = this.slider.calculateDistance(event); + var newTime = distance * duration; // Don't let video end while scrubbing. + + return newTime === duration ? newTime - 0.1 : newTime; + } + }, { + key: "handleMouseDown", + value: function handleMouseDown() {} + }, { + key: "handleMouseUp", + value: function handleMouseUp(event) { + var actions = this.props.actions; + var newTime = this.getNewTime(event); // Set new time (tell video to seek to new time) + + actions.seek(newTime); + actions.handleEndSeeking(newTime); + } + }, { + key: "handleMouseMove", + value: function handleMouseMove(event) { + var actions = this.props.actions; + var newTime = this.getNewTime(event); + actions.handleSeekingTime(newTime); + } + }, { + key: "stepForward", + value: function stepForward() { + var actions = this.props.actions; + actions.forward(5); + } + }, { + key: "stepBack", + value: function stepBack() { + var actions = this.props.actions; + actions.replay(5); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props = this.props, + _this$props$player2 = _this$props.player, + currentTime = _this$props$player2.currentTime, + seekingTime = _this$props$player2.seekingTime, + duration = _this$props$player2.duration, + buffered = _this$props$player2.buffered, + mouseTime = _this$props.mouseTime; + var time = seekingTime || currentTime; + return _react["default"].createElement(_Slider["default"], { + ref: function ref(input) { + _this2.slider = input; + }, + label: "video progress bar", + className: (0, _classnames["default"])('video-react-progress-holder', this.props.className), + valuenow: (this.getPercent() * 100).toFixed(2), + valuetext: (0, _utils.formatTime)(time, duration), + onMouseDown: this.handleMouseDown, + onMouseMove: this.handleMouseMove, + onMouseUp: this.handleMouseUp, + getPercent: this.getPercent, + stepForward: this.stepForward, + stepBack: this.stepBack + }, _react["default"].createElement(_LoadProgressBar["default"], { + buffered: buffered, + currentTime: time, + duration: duration + }), _react["default"].createElement(_MouseTimeDisplay["default"], { + duration: duration, + mouseTime: mouseTime + }), _react["default"].createElement(_PlayProgressBar["default"], { + currentTime: time, + duration: duration + })); + } + }]); + return SeekBar; +}(_react.Component); + +exports["default"] = SeekBar; +SeekBar.propTypes = propTypes; +SeekBar.displayName = 'SeekBar'; + +/***/ }), +/* 560 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = PlayProgressBar; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _utils = __webpack_require__(93); + +var propTypes = { + currentTime: _propTypes["default"].number, + duration: _propTypes["default"].number, + percentage: _propTypes["default"].string, + className: _propTypes["default"].string +}; // Shows play progress + +function PlayProgressBar(_ref) { + var currentTime = _ref.currentTime, + duration = _ref.duration, + percentage = _ref.percentage, + className = _ref.className; + return _react["default"].createElement("div", { + "data-current-time": (0, _utils.formatTime)(currentTime, duration), + className: (0, _classnames["default"])('video-react-play-progress video-react-slider-bar', className), + style: { + width: percentage + } + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Progress: ".concat(percentage))); +} + +PlayProgressBar.propTypes = propTypes; +PlayProgressBar.displayName = 'PlayProgressBar'; + +/***/ }), +/* 561 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = LoadProgressBar; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + duration: _propTypes["default"].number, + buffered: _propTypes["default"].object, + className: _propTypes["default"].string +}; // Shows load progress + +function LoadProgressBar(_ref) { + var buffered = _ref.buffered, + duration = _ref.duration, + className = _ref.className; + + if (!buffered || !buffered.length) { + return null; + } + + var bufferedEnd = buffered.end(buffered.length - 1); + var style = {}; + + if (bufferedEnd > duration) { + bufferedEnd = duration; + } // get the percent width of a time compared to the total end + + + function percentify(time, end) { + var percent = time / end || 0; // no NaN + + return "".concat((percent >= 1 ? 1 : percent) * 100, "%"); + } // the width of the progress bar + + + style.width = percentify(bufferedEnd, duration); + var parts = []; // add child elements to represent the individual buffered time ranges + + for (var i = 0; i < buffered.length; i++) { + var start = buffered.start(i); + var end = buffered.end(i); // set the percent based on the width of the progress bar (bufferedEnd) + + var part = _react["default"].createElement("div", { + style: { + left: percentify(start, bufferedEnd), + width: percentify(end - start, bufferedEnd) + }, + key: "part-".concat(i) + }); + + parts.push(part); + } + + if (parts.length === 0) { + parts = null; + } + + return _react["default"].createElement("div", { + style: style, + className: (0, _classnames["default"])('video-react-load-progress', className) + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Loaded: 0%"), parts); +} + +LoadProgressBar.propTypes = propTypes; +LoadProgressBar.displayName = 'LoadProgressBar'; + +/***/ }), +/* 562 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _utils = __webpack_require__(93); + +function MouseTimeDisplay(_ref) { + var duration = _ref.duration, + mouseTime = _ref.mouseTime, + className = _ref.className, + text = _ref.text; + + if (!mouseTime.time) { + return null; + } + + var time = text || (0, _utils.formatTime)(mouseTime.time, duration); + return _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-mouse-display', className), + style: { + left: "".concat(mouseTime.position, "px") + }, + "data-current-time": time + }); +} + +MouseTimeDisplay.propTypes = { + duration: _propTypes["default"].number, + mouseTime: _propTypes["default"].object, + className: _propTypes["default"].string +}; +MouseTimeDisplay.displayName = 'MouseTimeDisplay'; +var _default = MouseTimeDisplay; +exports["default"] = _default; + +/***/ }), +/* 563 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + actions: _propTypes["default"].object, + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +var PlayToggle = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(PlayToggle, _Component); + + function PlayToggle(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, PlayToggle); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(PlayToggle).call(this, props, context)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(PlayToggle, [{ + key: "handleClick", + value: function handleClick() { + var _this$props = this.props, + actions = _this$props.actions, + player = _this$props.player; + + if (player.paused) { + actions.play(); + } else { + actions.pause(); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props2 = this.props, + player = _this$props2.player, + className = _this$props2.className; + var controlText = player.paused ? 'Play' : 'Pause'; + return _react["default"].createElement("button", { + ref: function ref(c) { + _this2.button = c; + }, + className: (0, _classnames["default"])(className, { + 'video-react-play-control': true, + 'video-react-control': true, + 'video-react-button': true, + 'video-react-paused': player.paused, + 'video-react-playing': !player.paused + }), + type: "button", + tabIndex: "0", + onClick: this.handleClick + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, controlText)); + } + }]); + return PlayToggle; +}(_react.Component); + +exports["default"] = PlayToggle; +PlayToggle.propTypes = propTypes; +PlayToggle.displayName = 'PlayToggle'; + +/***/ }), +/* 564 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _ForwardReplayControl = _interopRequireDefault(__webpack_require__(565)); + +// Pass mode into parent function +var ForwardControl = (0, _ForwardReplayControl["default"])('forward'); +ForwardControl.displayName = 'ForwardControl'; +var _default = ForwardControl; +exports["default"] = _default; + +/***/ }), +/* 565 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var propTypes = { + actions: _propTypes["default"].object, + className: _propTypes["default"].string, + seconds: _propTypes["default"].oneOf([5, 10, 30]) +}; +var defaultProps = { + seconds: 10 +}; + +var _default = function _default(mode) { + var ForwardReplayControl = + /*#__PURE__*/ + function (_Component) { + (0, _inherits2["default"])(ForwardReplayControl, _Component); + + function ForwardReplayControl(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, ForwardReplayControl); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(ForwardReplayControl).call(this, props, context)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(ForwardReplayControl, [{ + key: "handleClick", + value: function handleClick() { + var _this$props = this.props, + actions = _this$props.actions, + seconds = _this$props.seconds; // Depends mode to implement different actions + + if (mode === 'forward') { + actions.forward(seconds); + } else { + actions.replay(seconds); + } + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props2 = this.props, + seconds = _this$props2.seconds, + className = _this$props2.className; + var classNames = ['video-react-control', 'video-react-button', 'video-react-icon']; + classNames.push("video-react-icon-".concat(mode, "-").concat(seconds), "video-react-".concat(mode, "-control")); + + if (className) { + classNames.push(className); + } + + return _react["default"].createElement("button", { + ref: function ref(c) { + _this2.button = c; + }, + className: classNames.join(' '), + type: "button", + onClick: this.handleClick + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "".concat(mode, " ").concat(seconds, " seconds"))); + } + }]); + return ForwardReplayControl; + }(_react.Component); + + ForwardReplayControl.propTypes = propTypes; + ForwardReplayControl.defaultProps = defaultProps; + return ForwardReplayControl; +}; + +exports["default"] = _default; + +/***/ }), +/* 566 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _ForwardReplayControl = _interopRequireDefault(__webpack_require__(565)); + +// Pass mode into parent function +var ReplayControl = (0, _ForwardReplayControl["default"])('replay'); +ReplayControl.displayName = 'ReplayControl'; +var _default = ReplayControl; +exports["default"] = _default; + +/***/ }), +/* 567 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + actions: _propTypes["default"].object, + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +var FullscreenToggle = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(FullscreenToggle, _Component); + + function FullscreenToggle(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, FullscreenToggle); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(FullscreenToggle).call(this, props, context)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(FullscreenToggle, [{ + key: "handleClick", + value: function handleClick() { + var _this$props = this.props, + player = _this$props.player, + actions = _this$props.actions; + actions.toggleFullscreen(player); + } + }, { + key: "render", + value: function render() { + var _this2 = this; + + var _this$props2 = this.props, + player = _this$props2.player, + className = _this$props2.className; + return _react["default"].createElement("button", { + className: (0, _classnames["default"])(className, { + 'video-react-icon-fullscreen-exit': player.isFullscreen, + 'video-react-icon-fullscreen': !player.isFullscreen + }, 'video-react-fullscreen-control video-react-control video-react-button video-react-icon'), + ref: function ref(c) { + _this2.button = c; + }, + type: "button", + tabIndex: "0", + onClick: this.handleClick + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Non-Fullscreen")); + } + }]); + return FullscreenToggle; +}(_react.Component); + +exports["default"] = FullscreenToggle; +FullscreenToggle.propTypes = propTypes; +FullscreenToggle.displayName = 'FullscreenToggle'; + +/***/ }), +/* 568 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _utils = __webpack_require__(93); + +var propTypes = { + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +function RemainingTimeDisplay(_ref) { + var _ref$player = _ref.player, + currentTime = _ref$player.currentTime, + duration = _ref$player.duration, + className = _ref.className; + var remainingTime = duration - currentTime; + var formattedTime = (0, _utils.formatTime)(remainingTime); + return _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-remaining-time video-react-time-control video-react-control', className) + }, _react["default"].createElement("div", { + className: "video-react-remaining-time-display", + "aria-live": "off" + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Remaining Time "), "-".concat(formattedTime))); +} + +RemainingTimeDisplay.propTypes = propTypes; +RemainingTimeDisplay.displayName = 'RemainingTimeDisplay'; +var _default = RemainingTimeDisplay; +exports["default"] = _default; + +/***/ }), +/* 569 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _utils = __webpack_require__(93); + +var propTypes = { + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +function CurrentTimeDisplay(_ref) { + var _ref$player = _ref.player, + currentTime = _ref$player.currentTime, + duration = _ref$player.duration, + className = _ref.className; + var formattedTime = (0, _utils.formatTime)(currentTime, duration); + return _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-current-time video-react-time-control video-react-control', className) + }, _react["default"].createElement("div", { + className: "video-react-current-time-display", + "aria-live": "off" + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Current Time "), formattedTime)); +} + +CurrentTimeDisplay.propTypes = propTypes; +CurrentTimeDisplay.displayName = 'CurrentTimeDisplay'; +var _default = CurrentTimeDisplay; +exports["default"] = _default; + +/***/ }), +/* 570 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _utils = __webpack_require__(93); + +var propTypes = { + player: _propTypes["default"].object, + className: _propTypes["default"].string +}; + +function DurationDisplay(_ref) { + var duration = _ref.player.duration, + className = _ref.className; + var formattedTime = (0, _utils.formatTime)(duration); + return _react["default"].createElement("div", { + className: (0, _classnames["default"])(className, 'video-react-duration video-react-time-control video-react-control') + }, _react["default"].createElement("div", { + className: "video-react-duration-display", + "aria-live": "off" + }, _react["default"].createElement("span", { + className: "video-react-control-text" + }, "Duration Time "), formattedTime)); +} + +DurationDisplay.propTypes = propTypes; +DurationDisplay.displayName = 'DurationDisplay'; +var _default = DurationDisplay; +exports["default"] = _default; + +/***/ }), +/* 571 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = TimeDivider; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + separator: _propTypes["default"].string, + className: _propTypes["default"].string +}; + +function TimeDivider(_ref) { + var separator = _ref.separator, + className = _ref.className; + var separatorText = separator || '/'; + return _react["default"].createElement("div", { + className: (0, _classnames["default"])('video-react-time-control video-react-time-divider', className), + dir: "ltr" + }, _react["default"].createElement("div", null, _react["default"].createElement("span", null, separatorText))); +} + +TimeDivider.propTypes = propTypes; +TimeDivider.displayName = 'TimeDivider'; + +/***/ }), +/* 572 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _PopupButton = _interopRequireDefault(__webpack_require__(1432)); + +var _VolumeBar = _interopRequireDefault(__webpack_require__(1434)); + +var propTypes = { + player: _propTypes["default"].object, + actions: _propTypes["default"].object, + vertical: _propTypes["default"].bool, + className: _propTypes["default"].string, + alwaysShowVolume: _propTypes["default"].bool +}; +var defaultProps = { + vertical: false +}; + +var VolumeMenuButton = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(VolumeMenuButton, _Component); + + function VolumeMenuButton(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, VolumeMenuButton); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(VolumeMenuButton).call(this, props, context)); + _this.state = { + active: false + }; + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleFocus = _this.handleFocus.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleBlur = _this.handleBlur.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(VolumeMenuButton, [{ + key: "handleClick", + value: function handleClick() { + var _this$props = this.props, + player = _this$props.player, + actions = _this$props.actions; + actions.mute(!player.muted); + } + }, { + key: "handleFocus", + value: function handleFocus() { + this.setState({ + active: true + }); + } + }, { + key: "handleBlur", + value: function handleBlur() { + this.setState({ + active: false + }); + } + }, { + key: "render", + value: function render() { + var _this$props2 = this.props, + vertical = _this$props2.vertical, + player = _this$props2.player, + className = _this$props2.className; + var inline = !vertical; + var level = this.volumeLevel; + return _react["default"].createElement(_PopupButton["default"], { + className: (0, _classnames["default"])(className, { + 'video-react-volume-menu-button-vertical': vertical, + 'video-react-volume-menu-button-horizontal': !vertical, + 'video-react-vol-muted': player.muted, + 'video-react-vol-0': level === 0 && !player.muted, + 'video-react-vol-1': level === 1, + 'video-react-vol-2': level === 2, + 'video-react-vol-3': level === 3, + 'video-react-slider-active': this.props.alwaysShowVolume || this.state.active, + 'video-react-lock-showing': this.props.alwaysShowVolume || this.state.active + }, 'video-react-volume-menu-button'), + onClick: this.handleClick, + inline: inline + }, _react["default"].createElement(_VolumeBar["default"], (0, _extends2["default"])({ + onFocus: this.handleFocus, + onBlur: this.handleBlur + }, this.props))); + } + }, { + key: "volumeLevel", + get: function get() { + var _this$props$player = this.props.player, + volume = _this$props$player.volume, + muted = _this$props$player.muted; + var level = 3; + + if (volume === 0 || muted) { + level = 0; + } else if (volume < 0.33) { + level = 1; + } else if (volume < 0.67) { + level = 2; + } + + return level; + } + }]); + return VolumeMenuButton; +}(_react.Component); + +VolumeMenuButton.propTypes = propTypes; +VolumeMenuButton.defaultProps = defaultProps; +VolumeMenuButton.displayName = 'VolumeMenuButton'; +var _default = VolumeMenuButton; +exports["default"] = _default; + +/***/ }), +/* 573 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _extends2 = _interopRequireDefault(__webpack_require__(14)); + +var _objectSpread2 = _interopRequireDefault(__webpack_require__(112)); + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var propTypes = { + tagName: _propTypes["default"].string, + onClick: _propTypes["default"].func.isRequired, + onFocus: _propTypes["default"].func, + onBlur: _propTypes["default"].func, + className: _propTypes["default"].string +}; +var defaultProps = { + tagName: 'div' +}; + +var ClickableComponent = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(ClickableComponent, _Component); + + function ClickableComponent(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, ClickableComponent); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(ClickableComponent).call(this, props, context)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleFocus = _this.handleFocus.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleBlur = _this.handleBlur.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleKeypress = _this.handleKeypress.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(ClickableComponent, [{ + key: "handleKeypress", + value: function handleKeypress(event) { + // Support Space (32) or Enter (13) key operation to fire a click event + if (event.which === 32 || event.which === 13) { + event.preventDefault(); + this.handleClick(event); + } + } + }, { + key: "handleClick", + value: function handleClick(event) { + var onClick = this.props.onClick; + onClick(event); + } + }, { + key: "handleFocus", + value: function handleFocus(e) { + document.addEventListener('keydown', this.handleKeypress); + + if (this.props.onFocus) { + this.props.onFocus(e); + } + } + }, { + key: "handleBlur", + value: function handleBlur(e) { + document.removeEventListener('keydown', this.handleKeypress); + + if (this.props.onBlur) { + this.props.onBlur(e); + } + } + }, { + key: "render", + value: function render() { + var Tag = this.props.tagName; + var props = (0, _objectSpread2["default"])({}, this.props); + delete props.tagName; + delete props.className; + return _react["default"].createElement(Tag, (0, _extends2["default"])({ + className: (0, _classnames["default"])(this.props.className), + role: "button", + tabIndex: "0", + onClick: this.handleClick, + onFocus: this.handleFocus, + onBlur: this.handleBlur + }, props)); + } + }]); + return ClickableComponent; +}(_react.Component); + +exports["default"] = ClickableComponent; +ClickableComponent.propTypes = propTypes; +ClickableComponent.defaultProps = defaultProps; +ClickableComponent.displayName = 'ClickableComponent'; + +/***/ }), +/* 574 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireWildcard = __webpack_require__(9); + +var _interopRequireDefault = __webpack_require__(0); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports["default"] = void 0; + +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(16)); + +var _createClass2 = _interopRequireDefault(__webpack_require__(17)); + +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(18)); + +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(19)); + +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(13)); + +var _inherits2 = _interopRequireDefault(__webpack_require__(20)); + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireWildcard(__webpack_require__(1)); + +var _classnames = _interopRequireDefault(__webpack_require__(23)); + +var _Menu = _interopRequireDefault(__webpack_require__(1436)); + +var _MenuItem = _interopRequireDefault(__webpack_require__(1437)); + +var _ClickableComponent = _interopRequireDefault(__webpack_require__(573)); + +var propTypes = { + inline: _propTypes["default"].bool, + items: _propTypes["default"].array, + className: _propTypes["default"].string, + onSelectItem: _propTypes["default"].func, + children: _propTypes["default"].any, + selectedIndex: _propTypes["default"].number +}; + +var MenuButton = +/*#__PURE__*/ +function (_Component) { + (0, _inherits2["default"])(MenuButton, _Component); + + function MenuButton(props, context) { + var _this; + + (0, _classCallCheck2["default"])(this, MenuButton); + _this = (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(MenuButton).call(this, props, context)); + _this.state = { + active: false, + activateIndex: props.selectedIndex || 0 + }; + _this.commitSelection = _this.commitSelection.bind((0, _assertThisInitialized2["default"])(_this)); + _this.activateMenuItem = _this.activateMenuItem.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this)); + _this.renderMenu = _this.renderMenu.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleFocus = _this.handleFocus.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleBlur = _this.handleBlur.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleUpArrow = _this.handleUpArrow.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleDownArrow = _this.handleDownArrow.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleEscape = _this.handleEscape.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleReturn = _this.handleReturn.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleTab = _this.handleTab.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleKeyPress = _this.handleKeyPress.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleSelectItem = _this.handleSelectItem.bind((0, _assertThisInitialized2["default"])(_this)); + _this.handleIndexChange = _this.handleIndexChange.bind((0, _assertThisInitialized2["default"])(_this)); + return _this; + } + + (0, _createClass2["default"])(MenuButton, [{ + key: "componentDidUpdate", + value: function componentDidUpdate(prevProps) { + if (prevProps.selectedIndex !== this.props.selectedIndex) { + this.activateMenuItem(this.props.selectedIndex); + } + } + }, { + key: "commitSelection", + value: function commitSelection(index) { + this.setState({ + activateIndex: index, + active: false + }); + this.handleIndexChange(index); + } + }, { + key: "activateMenuItem", + value: function activateMenuItem(index) { + this.setState({ + activateIndex: index + }); + this.handleIndexChange(index); + } + }, { + key: "handleIndexChange", + value: function handleIndexChange(index) { + var onSelectItem = this.props.onSelectItem; + onSelectItem(index); + } + }, { + key: "handleClick", + value: function handleClick() { + this.setState(function (prevState) { + return { + active: !prevState.active + }; + }); + } + }, { + key: "handleFocus", + value: function handleFocus() { + document.addEventListener('keydown', this.handleKeyPress); + } + }, { + key: "handleBlur", + value: function handleBlur() { + this.setState({ + active: false + }); + document.removeEventListener('keydown', this.handleKeyPress); + } + }, { + key: "handleUpArrow", + value: function handleUpArrow(e) { + var items = this.props.items; + + if (this.state.active) { + e.preventDefault(); + var newIndex = this.state.activateIndex - 1; + + if (newIndex < 0) { + newIndex = items.length ? items.length - 1 : 0; + } + + this.activateMenuItem(newIndex); + } + } + }, { + key: "handleDownArrow", + value: function handleDownArrow(e) { + var items = this.props.items; + + if (this.state.active) { + e.preventDefault(); + var newIndex = this.state.activateIndex + 1; + + if (newIndex >= items.length) { + newIndex = 0; + } + + this.activateMenuItem(newIndex); + } + } + }, { + key: "handleTab", + value: function handleTab(e) { + if (this.state.active) { + e.preventDefault(); + this.commitSelection(this.state.activateIndex); + } + } + }, { + key: "handleReturn", + value: function handleReturn(e) { + e.preventDefault(); + + if (this.state.active) { + this.commitSelection(this.state.activateIndex); + } else { + this.setState({ + active: true + }); + } + } + }, { + key: "handleEscape", + value: function handleEscape() { + this.setState({ + active: false, + activateIndex: 0 + }); + } + }, { + key: "handleKeyPress", + value: function handleKeyPress(event) { + // Escape (27) key + if (event.which === 27) { + this.handleEscape(event); + } else if (event.which === 9) { + // Tab (9) key + this.handleTab(event); + } else if (event.which === 13) { + // Enter (13) key + this.handleReturn(event); + } else if (event.which === 38) { + // Up (38) key + this.handleUpArrow(event); + } else if (event.which === 40) { + // Down (40) key press + this.handleDownArrow(event); + } + } + }, { + key: "handleSelectItem", + value: function handleSelectItem(i) { + this.commitSelection(i); + } + }, { + key: "renderMenu", + value: function renderMenu() { + var _this2 = this; + + if (!this.state.active) { + return null; + } + + var items = this.props.items; + return _react["default"].createElement(_Menu["default"], null, items.map(function (item, i) { + return _react["default"].createElement(_MenuItem["default"], { + item: item, + index: i, + onSelectItem: _this2.handleSelectItem, + activateIndex: _this2.state.activateIndex, + key: "item-".concat(i++) + }); + })); + } + }, { + key: "render", + value: function render() { + var _this3 = this; + + var _this$props = this.props, + inline = _this$props.inline, + className = _this$props.className; + return _react["default"].createElement(_ClickableComponent["default"], { + className: (0, _classnames["default"])(className, { + 'video-react-menu-button-inline': !!inline, + 'video-react-menu-button-popup': !inline, + 'video-react-menu-button-active': this.state.active + }, 'video-react-control video-react-button video-react-menu-button'), + role: "button", + tabIndex: "0", + ref: function ref(c) { + _this3.menuButton = c; + }, + onClick: this.handleClick, + onFocus: this.handleFocus, + onBlur: this.handleBlur + }, this.props.children, this.renderMenu()); + } + }]); + return MenuButton; +}(_react.Component); + +exports["default"] = MenuButton; +MenuButton.propTypes = propTypes; +MenuButton.displayName = 'MenuButton'; + +/***/ }), +/* 575 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var React = __webpack_require__(1); +var React__default = _interopDefault(React); +__webpack_require__(331); +__webpack_require__(246); +__webpack_require__(32); +__webpack_require__(2); +var utils = __webpack_require__(247); +__webpack_require__(332); +var reactSelect = __webpack_require__(579); +__webpack_require__(195); +__webpack_require__(333); +var stateManager = __webpack_require__(580); + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +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); } + +var compareOption = function compareOption(inputValue, option) { + if (inputValue === void 0) { + inputValue = ''; + } + + var candidate = String(inputValue).toLowerCase(); + var optionValue = String(option.value).toLowerCase(); + var optionLabel = String(option.label).toLowerCase(); + return optionValue === candidate || optionLabel === candidate; +}; + +var builtins = { + formatCreateLabel: function formatCreateLabel(inputValue) { + return "Create \"" + inputValue + "\""; + }, + isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) { + return !(!inputValue || selectValue.some(function (option) { + return compareOption(inputValue, option); + }) || selectOptions.some(function (option) { + return compareOption(inputValue, option); + })); + }, + getNewOptionData: function getNewOptionData(inputValue, optionLabel) { + return { + label: optionLabel, + value: inputValue, + __isNew__: true + }; + } +}; +var defaultProps = _extends({ + allowCreateWhileLoading: false, + createOptionPosition: 'last' +}, builtins); +var makeCreatableSelect = function makeCreatableSelect(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inheritsLoose(Creatable, _Component); + + function Creatable(props) { + var _this; + + _this = _Component.call(this, props) || this; + _this.select = void 0; + + _this.onChange = function (newValue, actionMeta) { + var _this$props = _this.props, + getNewOptionData = _this$props.getNewOptionData, + inputValue = _this$props.inputValue, + isMulti = _this$props.isMulti, + onChange = _this$props.onChange, + onCreateOption = _this$props.onCreateOption, + value = _this$props.value, + name = _this$props.name; + + if (actionMeta.action !== 'select-option') { + return onChange(newValue, actionMeta); + } + + var newOption = _this.state.newOption; + var valueArray = Array.isArray(newValue) ? newValue : [newValue]; + + if (valueArray[valueArray.length - 1] === newOption) { + if (onCreateOption) onCreateOption(inputValue);else { + var newOptionData = getNewOptionData(inputValue, inputValue); + var newActionMeta = { + action: 'create-option', + name: name + }; + + if (isMulti) { + onChange([].concat(utils.cleanValue(value), [newOptionData]), newActionMeta); + } else { + onChange(newOptionData, newActionMeta); + } + } + return; + } + + onChange(newValue, actionMeta); + }; + + var options = props.options || []; + _this.state = { + newOption: undefined, + options: options + }; + return _this; + } + + var _proto = Creatable.prototype; + + _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) { + var allowCreateWhileLoading = nextProps.allowCreateWhileLoading, + createOptionPosition = nextProps.createOptionPosition, + formatCreateLabel = nextProps.formatCreateLabel, + getNewOptionData = nextProps.getNewOptionData, + inputValue = nextProps.inputValue, + isLoading = nextProps.isLoading, + isValidNewOption = nextProps.isValidNewOption, + value = nextProps.value; + var options = nextProps.options || []; + var newOption = this.state.newOption; + + if (isValidNewOption(inputValue, utils.cleanValue(value), options)) { + newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue)); + } else { + newOption = undefined; + } + + this.setState({ + newOption: newOption, + options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(options) : [].concat(options, [newOption]) : options + }); + }; + + _proto.focus = function focus() { + this.select.focus(); + }; + + _proto.blur = function blur() { + this.select.blur(); + }; + + _proto.render = function render() { + var _this2 = this; + + var options = this.state.options; + return React__default.createElement(SelectComponent, _extends({}, this.props, { + ref: function ref(_ref) { + _this2.select = _ref; + }, + options: options, + onChange: this.onChange + })); + }; + + return Creatable; + }(React.Component), _class.defaultProps = defaultProps, _temp; +}; // TODO: do this in package entrypoint + +var SelectCreatable = makeCreatableSelect(reactSelect.Select); +var Creatable = stateManager.manageState(SelectCreatable); + +exports.default = Creatable; +exports.defaultProps = defaultProps; +exports.makeCreatableSelect = makeCreatableSelect; + + +/***/ }), +/* 576 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var sheet = __webpack_require__(577); +var Stylis = _interopDefault(__webpack_require__(404)); +__webpack_require__(1450); + +// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet +// inlined to avoid umd wrapper and peerDep warnings/installing stylis +// since we use stylis after closure compiler +var delimiter = '/*|*/'; +var needle = delimiter + '}'; + +function toSheet(block) { + if (block) { + Sheet.current.insert(block + '}'); + } +} + +var Sheet = { + current: null +}; +var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) { + switch (context) { + // property + case 1: + { + switch (content.charCodeAt(0)) { + case 64: + { + // @import + Sheet.current.insert(content + ';'); + return ''; + } + // charcode for l + + case 108: + { + // charcode for b + // this ignores label + if (content.charCodeAt(2) === 98) { + return ''; + } + } + } + + break; + } + // selector + + case 2: + { + if (ns === 0) return content + delimiter; + break; + } + // at-rule + + case 3: + { + switch (ns) { + // @font-face, @page + case 102: + case 112: + { + Sheet.current.insert(selectors[0] + content); + return ''; + } + + default: + { + return content + (at === 0 ? delimiter : ''); + } + } + } + + case -2: + { + content.split(needle).forEach(toSheet); + } + } +}; + +var createCache = function createCache(options) { + if (options === undefined) options = {}; + var key = options.key || 'css'; + var stylisOptions; + + if (options.prefix !== undefined) { + stylisOptions = { + prefix: options.prefix + }; + } + + var stylis = new Stylis(stylisOptions); + + if (false) {} + + var inserted = {}; // $FlowFixMe + + var container; + + { + container = options.container || document.head; + var nodes = document.querySelectorAll("style[data-emotion-" + key + "]"); + Array.prototype.forEach.call(nodes, function (node) { + var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe + + attrib.split(' ').forEach(function (id) { + inserted[id] = true; + }); + + if (node.parentNode !== container) { + container.appendChild(node); + } + }); + } + + var _insert; + + { + stylis.use(options.stylisPlugins)(ruleSheet); + + _insert = function insert(selector, serialized, sheet, shouldCache) { + var name = serialized.name; + Sheet.current = sheet; + + if (false) { var map; } + + stylis(selector, serialized.styles); + + if (shouldCache) { + cache.inserted[name] = true; + } + }; + } + + if (false) { var commentEnd, commentStart; } + + var cache = { + key: key, + sheet: new sheet.StyleSheet({ + key: key, + container: container, + nonce: options.nonce, + speedy: options.speedy + }), + nonce: options.nonce, + inserted: inserted, + registered: {}, + insert: _insert + }; + return cache; +}; + +exports.default = createCache; + + +/***/ }), +/* 577 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +/* + +Based off glamor's StyleSheet, thanks Sunil ❤️ + +high performance StyleSheet for css-in-js systems + +- uses multiple style tags behind the scenes for millions of rules +- uses `insertRule` for appending in production for *much* faster performance + +// usage + +import { StyleSheet } from '@emotion/sheet' + +let styleSheet = new StyleSheet({ key: '', container: document.head }) + +styleSheet.insert('#box { border: 1px solid red; }') +- appends a css rule into the stylesheet + +styleSheet.flush() +- empties the stylesheet of all its contents + +*/ +// $FlowFixMe +function sheetForTag(tag) { + if (tag.sheet) { + // $FlowFixMe + return tag.sheet; + } // this weirdness brought to you by firefox + + /* istanbul ignore next */ + + + for (var i = 0; i < document.styleSheets.length; i++) { + if (document.styleSheets[i].ownerNode === tag) { + // $FlowFixMe + return document.styleSheets[i]; + } + } +} + +function createStyleElement(options) { + var tag = document.createElement('style'); + tag.setAttribute('data-emotion', options.key); + + if (options.nonce !== undefined) { + tag.setAttribute('nonce', options.nonce); + } + + tag.appendChild(document.createTextNode('')); + return tag; +} + +var StyleSheet = +/*#__PURE__*/ +function () { + function StyleSheet(options) { + this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy; + this.tags = []; + this.ctr = 0; + this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets + + this.key = options.key; + this.container = options.container; + this.before = null; + } + + var _proto = StyleSheet.prototype; + + _proto.insert = function insert(rule) { + // the max length is how many rules we have per style tag, it's 65000 in speedy mode + // it's 1 in dev because we insert source maps that map a single rule to a location + // and you can only have one source map per style tag + if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) { + var _tag = createStyleElement(this); + + var before; + + if (this.tags.length === 0) { + before = this.before; + } else { + before = this.tags[this.tags.length - 1].nextSibling; + } + + this.container.insertBefore(_tag, before); + this.tags.push(_tag); + } + + var tag = this.tags[this.tags.length - 1]; + + if (this.isSpeedy) { + var sheet = sheetForTag(tag); + + try { + // this is a really hot path + // we check the second character first because having "i" + // as the second character will happen less often than + // having "@" as the first character + var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers + // the big drawback is that the css won't be editable in devtools + + sheet.insertRule(rule, // we need to insert @import rules before anything else + // otherwise there will be an error + // technically this means that the @import rules will + // _usually_(not always since there could be multiple style tags) + // be the first ones in prod and generally later in dev + // this shouldn't really matter in the real world though + // @import is generally only used for font faces from google fonts and etc. + // so while this could be technically correct then it would be slower and larger + // for a tiny bit of correctness that won't matter in the real world + isImportRule ? 0 : sheet.cssRules.length); + } catch (e) { + if (false) {} + } + } else { + tag.appendChild(document.createTextNode(rule)); + } + + this.ctr++; + }; + + _proto.flush = function flush() { + // $FlowFixMe + this.tags.forEach(function (tag) { + return tag.parentNode.removeChild(tag); + }); + this.tags = []; + this.ctr = 0; + }; + + return StyleSheet; +}(); + +exports.StyleSheet = StyleSheet; + + +/***/ }), +/* 578 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var hashString = _interopDefault(__webpack_require__(1452)); +var unitless = _interopDefault(__webpack_require__(405)); +var memoize = _interopDefault(__webpack_require__(406)); + +var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; +var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."; +var hyphenateRegex = /[A-Z]|^ms/g; +var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g; + +var isCustomProperty = function isCustomProperty(property) { + return property.charCodeAt(1) === 45; +}; + +var isProcessableValue = function isProcessableValue(value) { + return value != null && typeof value !== 'boolean'; +}; + +var processStyleName = memoize(function (styleName) { + return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase(); +}); + +var processStyleValue = function processStyleValue(key, value) { + switch (key) { + case 'animation': + case 'animationName': + { + if (typeof value === 'string') { + return value.replace(animationRegex, function (match, p1, p2) { + cursor = { + name: p1, + styles: p2, + next: cursor + }; + return p1; + }); + } + } + } + + if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { + return value + 'px'; + } + + return value; +}; + +if (false) { var hyphenatedCache, hyphenPattern, msPattern, oldProcessStyleValue, contentValues, contentValuePattern; } + +var shouldWarnAboutInterpolatingClassNameFromCss = true; + +function handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) { + if (interpolation == null) { + return ''; + } + + if (interpolation.__emotion_styles !== undefined) { + if (false) {} + + return interpolation; + } + + switch (typeof interpolation) { + case 'boolean': + { + return ''; + } + + case 'object': + { + if (interpolation.anim === 1) { + cursor = { + name: interpolation.name, + styles: interpolation.styles, + next: cursor + }; + return interpolation.name; + } + + if (interpolation.styles !== undefined) { + var next = interpolation.next; + + if (next !== undefined) { + // not the most efficient thing ever but this is a pretty rare case + // and there will be very few iterations of this generally + while (next !== undefined) { + cursor = { + name: next.name, + styles: next.styles, + next: cursor + }; + next = next.next; + } + } + + var styles = interpolation.styles + ";"; + + if (false) {} + + return styles; + } + + return createStringFromObject(mergedProps, registered, interpolation); + } + + case 'function': + { + if (mergedProps !== undefined) { + var previousCursor = cursor; + var result = interpolation(mergedProps); + cursor = previousCursor; + return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation); + } else if (false) {} + + break; + } + + case 'string': + if (false) { var replaced, matched; } + + break; + } // finalize string values (regular strings and functions interpolated into css calls) + + + if (registered == null) { + return interpolation; + } + + var cached = registered[interpolation]; + + if (false) {} + + return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation; +} + +function createStringFromObject(mergedProps, registered, obj) { + var string = ''; + + if (Array.isArray(obj)) { + for (var i = 0; i < obj.length; i++) { + string += handleInterpolation(mergedProps, registered, obj[i], false); + } + } else { + for (var _key in obj) { + var value = obj[_key]; + + if (typeof value !== 'object') { + if (registered != null && registered[value] !== undefined) { + string += _key + "{" + registered[value] + "}"; + } else if (isProcessableValue(value)) { + string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";"; + } + } else { + if (_key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') { + throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.'); + } + + if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) { + for (var _i = 0; _i < value.length; _i++) { + if (isProcessableValue(value[_i])) { + string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";"; + } + } + } else { + var interpolated = handleInterpolation(mergedProps, registered, value, false); + + switch (_key) { + case 'animation': + case 'animationName': + { + string += processStyleName(_key) + ":" + interpolated + ";"; + break; + } + + default: + { + if (false) {} + + string += _key + "{" + interpolated + "}"; + } + } + } + } + } + } + + return string; +} + +var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g; +var sourceMapPattern; + +if (false) {} // this is the cursor for keyframes +// keyframes are stored on the SerializedStyles object as a linked list + + +var cursor; +var serializeStyles = function serializeStyles(args, registered, mergedProps) { + if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) { + return args[0]; + } + + var stringMode = true; + var styles = ''; + cursor = undefined; + var strings = args[0]; + + if (strings == null || strings.raw === undefined) { + stringMode = false; + styles += handleInterpolation(mergedProps, registered, strings, false); + } else { + if (false) {} + + styles += strings[0]; + } // we start at 1 since we've already handled the first arg + + + for (var i = 1; i < args.length; i++) { + styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46); + + if (stringMode) { + if (false) {} + + styles += strings[i]; + } + } + + var sourceMap; + + if (false) {} // using a global regex with .exec is stateful so lastIndex has to be reset each time + + + labelPattern.lastIndex = 0; + var identifierName = ''; + var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5 + + while ((match = labelPattern.exec(styles)) !== null) { + identifierName += '-' + // $FlowFixMe we know it's not null + match[1]; + } + + var name = hashString(styles) + identifierName; + + if (false) {} + + return { + name: name, + styles: styles, + next: cursor + }; +}; + +exports.serializeStyles = serializeStyles; + + +/***/ }), +/* 579 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var React = __webpack_require__(1); +var React__default = _interopDefault(React); +var memoizeOne = _interopDefault(__webpack_require__(331)); +var core = __webpack_require__(246); +var reactDom = __webpack_require__(32); +var utils = __webpack_require__(247); +var index = __webpack_require__(332); +var _css = _interopDefault(__webpack_require__(195)); + +var diacritics = [{ + base: 'A', + letters: /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g +}, { + base: 'AA', + letters: /[\uA732]/g +}, { + base: 'AE', + letters: /[\u00C6\u01FC\u01E2]/g +}, { + base: 'AO', + letters: /[\uA734]/g +}, { + base: 'AU', + letters: /[\uA736]/g +}, { + base: 'AV', + letters: /[\uA738\uA73A]/g +}, { + base: 'AY', + letters: /[\uA73C]/g +}, { + base: 'B', + letters: /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g +}, { + base: 'C', + letters: /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g +}, { + base: 'D', + letters: /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g +}, { + base: 'DZ', + letters: /[\u01F1\u01C4]/g +}, { + base: 'Dz', + letters: /[\u01F2\u01C5]/g +}, { + base: 'E', + letters: /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g +}, { + base: 'F', + letters: /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g +}, { + base: 'G', + letters: /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g +}, { + base: 'H', + letters: /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g +}, { + base: 'I', + letters: /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g +}, { + base: 'J', + letters: /[\u004A\u24BF\uFF2A\u0134\u0248]/g +}, { + base: 'K', + letters: /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g +}, { + base: 'L', + letters: /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g +}, { + base: 'LJ', + letters: /[\u01C7]/g +}, { + base: 'Lj', + letters: /[\u01C8]/g +}, { + base: 'M', + letters: /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g +}, { + base: 'N', + letters: /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g +}, { + base: 'NJ', + letters: /[\u01CA]/g +}, { + base: 'Nj', + letters: /[\u01CB]/g +}, { + base: 'O', + letters: /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g +}, { + base: 'OI', + letters: /[\u01A2]/g +}, { + base: 'OO', + letters: /[\uA74E]/g +}, { + base: 'OU', + letters: /[\u0222]/g +}, { + base: 'P', + letters: /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g +}, { + base: 'Q', + letters: /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g +}, { + base: 'R', + letters: /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g +}, { + base: 'S', + letters: /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g +}, { + base: 'T', + letters: /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g +}, { + base: 'TZ', + letters: /[\uA728]/g +}, { + base: 'U', + letters: /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g +}, { + base: 'V', + letters: /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g +}, { + base: 'VY', + letters: /[\uA760]/g +}, { + base: 'W', + letters: /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g +}, { + base: 'X', + letters: /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g +}, { + base: 'Y', + letters: /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g +}, { + base: 'Z', + letters: /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g +}, { + base: 'a', + letters: /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g +}, { + base: 'aa', + letters: /[\uA733]/g +}, { + base: 'ae', + letters: /[\u00E6\u01FD\u01E3]/g +}, { + base: 'ao', + letters: /[\uA735]/g +}, { + base: 'au', + letters: /[\uA737]/g +}, { + base: 'av', + letters: /[\uA739\uA73B]/g +}, { + base: 'ay', + letters: /[\uA73D]/g +}, { + base: 'b', + letters: /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g +}, { + base: 'c', + letters: /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g +}, { + base: 'd', + letters: /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g +}, { + base: 'dz', + letters: /[\u01F3\u01C6]/g +}, { + base: 'e', + letters: /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g +}, { + base: 'f', + letters: /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g +}, { + base: 'g', + letters: /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g +}, { + base: 'h', + letters: /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g +}, { + base: 'hv', + letters: /[\u0195]/g +}, { + base: 'i', + letters: /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g +}, { + base: 'j', + letters: /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g +}, { + base: 'k', + letters: /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g +}, { + base: 'l', + letters: /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g +}, { + base: 'lj', + letters: /[\u01C9]/g +}, { + base: 'm', + letters: /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g +}, { + base: 'n', + letters: /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g +}, { + base: 'nj', + letters: /[\u01CC]/g +}, { + base: 'o', + letters: /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g +}, { + base: 'oi', + letters: /[\u01A3]/g +}, { + base: 'ou', + letters: /[\u0223]/g +}, { + base: 'oo', + letters: /[\uA74F]/g +}, { + base: 'p', + letters: /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g +}, { + base: 'q', + letters: /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g +}, { + base: 'r', + letters: /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g +}, { + base: 's', + letters: /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g +}, { + base: 't', + letters: /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g +}, { + base: 'tz', + letters: /[\uA729]/g +}, { + base: 'u', + letters: /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g +}, { + base: 'v', + letters: /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g +}, { + base: 'vy', + letters: /[\uA761]/g +}, { + base: 'w', + letters: /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g +}, { + base: 'x', + letters: /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g +}, { + base: 'y', + letters: /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g +}, { + base: 'z', + letters: /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g +}]; +var stripDiacritics = function stripDiacritics(str) { + for (var i = 0; i < diacritics.length; i++) { + str = str.replace(diacritics[i].letters, diacritics[i].base); + } + + return str; +}; + +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); } + +var trimString = function trimString(str) { + return str.replace(/^\s+|\s+$/g, ''); +}; + +var defaultStringify = function defaultStringify(option) { + return option.label + " " + option.value; +}; + +var createFilter = function createFilter(config) { + return function (option, rawInput) { + var _ignoreCase$ignoreAcc = _extends({ + ignoreCase: true, + ignoreAccents: true, + stringify: defaultStringify, + trim: true, + matchFrom: 'any' + }, config), + ignoreCase = _ignoreCase$ignoreAcc.ignoreCase, + ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents, + stringify = _ignoreCase$ignoreAcc.stringify, + trim = _ignoreCase$ignoreAcc.trim, + matchFrom = _ignoreCase$ignoreAcc.matchFrom; + + var input = trim ? trimString(rawInput) : rawInput; + var candidate = trim ? trimString(stringify(option)) : stringify(option); + + if (ignoreCase) { + input = input.toLowerCase(); + candidate = candidate.toLowerCase(); + } + + if (ignoreAccents) { + input = stripDiacritics(input); + candidate = stripDiacritics(candidate); + } + + return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1; + }; +}; + +function _extends$1() { _extends$1 = 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$1.apply(this, arguments); } + +var _ref = true ? { + name: "1laao21-a11yText", + styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;" +} : undefined; + +var A11yText = function A11yText(props) { + return core.jsx("span", _extends$1({ + css: _ref + }, props)); +}; + +function _extends$2() { _extends$2 = 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$2.apply(this, arguments); } + +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 DummyInput(_ref) { + var inProp = _ref.in, + out = _ref.out, + onExited = _ref.onExited, + appear = _ref.appear, + enter = _ref.enter, + exit = _ref.exit, + innerRef = _ref.innerRef, + emotion = _ref.emotion, + props = _objectWithoutPropertiesLoose(_ref, ["in", "out", "onExited", "appear", "enter", "exit", "innerRef", "emotion"]); + + return core.jsx("input", _extends$2({ + ref: innerRef + }, props, { + css: + /*#__PURE__*/ + _css({ + label: 'dummyInput', + // get rid of any default styles + background: 0, + border: 0, + fontSize: 'inherit', + outline: 0, + padding: 0, + // important! without `width` browsers won't allow focus + width: 1, + // remove cursor on desktop + color: 'transparent', + // remove cursor on mobile whilst maintaining "scroll into view" behaviour + left: -100, + opacity: 0, + position: 'relative', + transform: 'scale(0)' + }, true ? "" : undefined) + })); +} + +function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var NodeResolver = +/*#__PURE__*/ +function (_Component) { + _inheritsLoose(NodeResolver, _Component); + + function NodeResolver() { + return _Component.apply(this, arguments) || this; + } + + var _proto = NodeResolver.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.props.innerRef(reactDom.findDOMNode(this)); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.props.innerRef(null); + }; + + _proto.render = function render() { + return this.props.children; + }; + + return NodeResolver; +}(React.Component); + +var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position']; +var LOCK_STYLES = { + boxSizing: 'border-box', + // account for possible declaration `width: 100%;` on body + overflow: 'hidden', + position: 'relative', + height: '100%' +}; + +function preventTouchMove(e) { + e.preventDefault(); +} +function allowTouchMove(e) { + e.stopPropagation(); +} +function preventInertiaScroll() { + var top = this.scrollTop; + var totalScroll = this.scrollHeight; + var currentScroll = top + this.offsetHeight; + + if (top === 0) { + this.scrollTop = 1; + } else if (currentScroll === totalScroll) { + this.scrollTop = top - 1; + } +} // `ontouchstart` check works on most browsers +// `maxTouchPoints` works on IE10/11 and Surface + +function isTouchDevice() { + return 'ontouchstart' in window || navigator.maxTouchPoints; +} + +function _inheritsLoose$1(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } +var canUseDOM = !!( window.document && window.document.createElement); +var activeScrollLocks = 0; + +var ScrollLock = +/*#__PURE__*/ +function (_Component) { + _inheritsLoose$1(ScrollLock, _Component); + + function ScrollLock() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _Component.call.apply(_Component, [this].concat(args)) || this; + _this.originalStyles = {}; + _this.listenerOptions = { + capture: false, + passive: false + }; + return _this; + } + + var _proto = ScrollLock.prototype; + + _proto.componentDidMount = function componentDidMount() { + var _this2 = this; + + if (!canUseDOM) return; + var _this$props = this.props, + accountForScrollbars = _this$props.accountForScrollbars, + touchScrollTarget = _this$props.touchScrollTarget; + var target = document.body; + var targetStyle = target && target.style; + + if (accountForScrollbars) { + // store any styles already applied to the body + STYLE_KEYS.forEach(function (key) { + var val = targetStyle && targetStyle[key]; + _this2.originalStyles[key] = val; + }); + } // apply the lock styles and padding if this is the first scroll lock + + + if (accountForScrollbars && activeScrollLocks < 1) { + var currentPadding = parseInt(this.originalStyles.paddingRight, 10) || 0; + var clientWidth = document.body ? document.body.clientWidth : 0; + var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0; + Object.keys(LOCK_STYLES).forEach(function (key) { + var val = LOCK_STYLES[key]; + + if (targetStyle) { + targetStyle[key] = val; + } + }); + + if (targetStyle) { + targetStyle.paddingRight = adjustedPadding + "px"; + } + } // account for touch devices + + + if (target && isTouchDevice()) { + // Mobile Safari ignores { overflow: hidden } declaration on the body. + target.addEventListener('touchmove', preventTouchMove, this.listenerOptions); // Allow scroll on provided target + + if (touchScrollTarget) { + touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, this.listenerOptions); + touchScrollTarget.addEventListener('touchmove', allowTouchMove, this.listenerOptions); + } + } // increment active scroll locks + + + activeScrollLocks += 1; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + var _this3 = this; + + if (!canUseDOM) return; + var _this$props2 = this.props, + accountForScrollbars = _this$props2.accountForScrollbars, + touchScrollTarget = _this$props2.touchScrollTarget; + var target = document.body; + var targetStyle = target && target.style; // safely decrement active scroll locks + + activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any + + if (accountForScrollbars && activeScrollLocks < 1) { + STYLE_KEYS.forEach(function (key) { + var val = _this3.originalStyles[key]; + + if (targetStyle) { + targetStyle[key] = val; + } + }); + } // remove touch listeners + + + if (target && isTouchDevice()) { + target.removeEventListener('touchmove', preventTouchMove, this.listenerOptions); + + if (touchScrollTarget) { + touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, this.listenerOptions); + touchScrollTarget.removeEventListener('touchmove', allowTouchMove, this.listenerOptions); + } + } + }; + + _proto.render = function render() { + return null; + }; + + return ScrollLock; +}(React.Component); + +ScrollLock.defaultProps = { + accountForScrollbars: true +}; + +function _inheritsLoose$2(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var _ref$1 = true ? { + name: "1dsbpcp", + styles: "position:fixed;left:0;bottom:0;right:0;top:0;" +} : undefined; + +// NOTE: +// We shouldn't need this after updating to React v16.3.0, which introduces: +// - createRef() https://reactjs.org/docs/react-api.html#reactcreateref +// - forwardRef() https://reactjs.org/docs/react-api.html#reactforwardref +var ScrollBlock = +/*#__PURE__*/ +function (_PureComponent) { + _inheritsLoose$2(ScrollBlock, _PureComponent); + + function ScrollBlock() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _PureComponent.call.apply(_PureComponent, [this].concat(args)) || this; + _this.state = { + touchScrollTarget: null + }; + + _this.getScrollTarget = function (ref) { + if (ref === _this.state.touchScrollTarget) return; + + _this.setState({ + touchScrollTarget: ref + }); + }; + + _this.blurSelectInput = function () { + if (document.activeElement) { + document.activeElement.blur(); + } + }; + + return _this; + } + + var _proto = ScrollBlock.prototype; + + _proto.render = function render() { + var _this$props = this.props, + children = _this$props.children, + isEnabled = _this$props.isEnabled; + var touchScrollTarget = this.state.touchScrollTarget; // bail early if not enabled + + if (!isEnabled) return children; + /* + * Div + * ------------------------------ + * blocks scrolling on non-body elements behind the menu + * NodeResolver + * ------------------------------ + * we need a reference to the scrollable element to "unlock" scroll on + * mobile devices + * ScrollLock + * ------------------------------ + * actually does the scroll locking + */ + + return core.jsx("div", null, core.jsx("div", { + onClick: this.blurSelectInput, + css: _ref$1 + }), core.jsx(NodeResolver, { + innerRef: this.getScrollTarget + }, children), touchScrollTarget ? core.jsx(ScrollLock, { + touchScrollTarget: touchScrollTarget + }) : null); + }; + + return ScrollBlock; +}(React.PureComponent); + +function _objectWithoutPropertiesLoose$1(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 _inheritsLoose$3(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var ScrollCaptor = +/*#__PURE__*/ +function (_Component) { + _inheritsLoose$3(ScrollCaptor, _Component); + + function ScrollCaptor() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _Component.call.apply(_Component, [this].concat(args)) || this; + _this.isBottom = false; + _this.isTop = false; + _this.scrollTarget = void 0; + _this.touchStart = void 0; + + _this.cancelScroll = function (event) { + event.preventDefault(); + event.stopPropagation(); + }; + + _this.handleEventDelta = function (event, delta) { + var _this$props = _this.props, + onBottomArrive = _this$props.onBottomArrive, + onBottomLeave = _this$props.onBottomLeave, + onTopArrive = _this$props.onTopArrive, + onTopLeave = _this$props.onTopLeave; + var _this$scrollTarget = _this.scrollTarget, + scrollTop = _this$scrollTarget.scrollTop, + scrollHeight = _this$scrollTarget.scrollHeight, + clientHeight = _this$scrollTarget.clientHeight; + var target = _this.scrollTarget; + var isDeltaPositive = delta > 0; + var availableScroll = scrollHeight - clientHeight - scrollTop; + var shouldCancelScroll = false; // reset bottom/top flags + + if (availableScroll > delta && _this.isBottom) { + if (onBottomLeave) onBottomLeave(event); + _this.isBottom = false; + } + + if (isDeltaPositive && _this.isTop) { + if (onTopLeave) onTopLeave(event); + _this.isTop = false; + } // bottom limit + + + if (isDeltaPositive && delta > availableScroll) { + if (onBottomArrive && !_this.isBottom) { + onBottomArrive(event); + } + + target.scrollTop = scrollHeight; + shouldCancelScroll = true; + _this.isBottom = true; // top limit + } else if (!isDeltaPositive && -delta > scrollTop) { + if (onTopArrive && !_this.isTop) { + onTopArrive(event); + } + + target.scrollTop = 0; + shouldCancelScroll = true; + _this.isTop = true; + } // cancel scroll + + + if (shouldCancelScroll) { + _this.cancelScroll(event); + } + }; + + _this.onWheel = function (event) { + _this.handleEventDelta(event, event.deltaY); + }; + + _this.onTouchStart = function (event) { + // set touch start so we can calculate touchmove delta + _this.touchStart = event.changedTouches[0].clientY; + }; + + _this.onTouchMove = function (event) { + var deltaY = _this.touchStart - event.changedTouches[0].clientY; + + _this.handleEventDelta(event, deltaY); + }; + + _this.getScrollTarget = function (ref) { + _this.scrollTarget = ref; + }; + + return _this; + } + + var _proto = ScrollCaptor.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.startListening(this.scrollTarget); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.stopListening(this.scrollTarget); + }; + + _proto.startListening = function startListening(el) { + // bail early if no element is available to attach to + if (!el) return; // all the if statements are to appease Flow 😢 + + if (typeof el.addEventListener === 'function') { + el.addEventListener('wheel', this.onWheel, false); + } + + if (typeof el.addEventListener === 'function') { + el.addEventListener('touchstart', this.onTouchStart, false); + } + + if (typeof el.addEventListener === 'function') { + el.addEventListener('touchmove', this.onTouchMove, false); + } + }; + + _proto.stopListening = function stopListening(el) { + // all the if statements are to appease Flow 😢 + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('wheel', this.onWheel, false); + } + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('touchstart', this.onTouchStart, false); + } + + if (typeof el.removeEventListener === 'function') { + el.removeEventListener('touchmove', this.onTouchMove, false); + } + }; + + _proto.render = function render() { + return React__default.createElement(NodeResolver, { + innerRef: this.getScrollTarget + }, this.props.children); + }; + + return ScrollCaptor; +}(React.Component); + +function ScrollCaptorSwitch(_ref) { + var _ref$isEnabled = _ref.isEnabled, + isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled, + props = _objectWithoutPropertiesLoose$1(_ref, ["isEnabled"]); + + return isEnabled ? React__default.createElement(ScrollCaptor, props) : props.children; +} + +var instructionsAriaMessage = function instructionsAriaMessage(event, context) { + if (context === void 0) { + context = {}; + } + + var _context = context, + isSearchable = _context.isSearchable, + isMulti = _context.isMulti, + label = _context.label, + isDisabled = _context.isDisabled; + + switch (event) { + case 'menu': + return "Use Up and Down to choose options" + (isDisabled ? '' : ', press Enter to select the currently focused option') + ", press Escape to exit the menu, press Tab to select the option and exit the menu."; + + case 'input': + return (label ? label : 'Select') + " is focused " + (isSearchable ? ',type to refine list' : '') + ", press Down to open the menu, " + (isMulti ? ' press left to focus selected values' : ''); + + case 'value': + return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value'; + } +}; +var valueEventAriaMessage = function valueEventAriaMessage(event, context) { + var value = context.value, + isDisabled = context.isDisabled; + if (!value) return; + + switch (event) { + case 'deselect-option': + case 'pop-value': + case 'remove-value': + return "option " + value + ", deselected."; + + case 'select-option': + return isDisabled ? "option " + value + " is disabled. Select another option." : "option " + value + ", selected."; + } +}; +var valueFocusAriaMessage = function valueFocusAriaMessage(_ref) { + var focusedValue = _ref.focusedValue, + getOptionLabel = _ref.getOptionLabel, + selectValue = _ref.selectValue; + return "value " + getOptionLabel(focusedValue) + " focused, " + (selectValue.indexOf(focusedValue) + 1) + " of " + selectValue.length + "."; +}; +var optionFocusAriaMessage = function optionFocusAriaMessage(_ref2) { + var focusedOption = _ref2.focusedOption, + getOptionLabel = _ref2.getOptionLabel, + options = _ref2.options; + return "option " + getOptionLabel(focusedOption) + " focused" + (focusedOption.isDisabled ? ' disabled' : '') + ", " + (options.indexOf(focusedOption) + 1) + " of " + options.length + "."; +}; +var resultsAriaMessage = function resultsAriaMessage(_ref3) { + var inputValue = _ref3.inputValue, + screenReaderMessage = _ref3.screenReaderMessage; + return "" + screenReaderMessage + (inputValue ? ' for search term ' + inputValue : '') + "."; +}; + +var formatGroupLabel = function formatGroupLabel(group) { + return group.label; +}; +var getOptionLabel = function getOptionLabel(option) { + return option.label; +}; +var getOptionValue = function getOptionValue(option) { + return option.value; +}; +var isOptionDisabled = function isOptionDisabled(option) { + return !!option.isDisabled; +}; + +function _extends$3() { _extends$3 = 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$3.apply(this, arguments); } +var defaultStyles = { + clearIndicator: index.clearIndicatorCSS, + container: index.containerCSS, + control: index.css, + dropdownIndicator: index.dropdownIndicatorCSS, + group: index.groupCSS, + groupHeading: index.groupHeadingCSS, + indicatorsContainer: index.indicatorsContainerCSS, + indicatorSeparator: index.indicatorSeparatorCSS, + input: index.inputCSS, + loadingIndicator: index.loadingIndicatorCSS, + loadingMessage: index.loadingMessageCSS, + menu: index.menuCSS, + menuList: index.menuListCSS, + menuPortal: index.menuPortalCSS, + multiValue: index.multiValueCSS, + multiValueLabel: index.multiValueLabelCSS, + multiValueRemove: index.multiValueRemoveCSS, + noOptionsMessage: index.noOptionsMessageCSS, + option: index.optionCSS, + placeholder: index.placeholderCSS, + singleValue: index.css$1, + valueContainer: index.valueContainerCSS +}; // Merge Utility +// Allows consumers to extend a base Select with additional styles + +function mergeStyles(source, target) { + if (target === void 0) { + target = {}; + } + + // initialize with source styles + var styles = _extends$3({}, source); // massage in target styles + + + Object.keys(target).forEach(function (key) { + if (source[key]) { + styles[key] = function (rsCss, props) { + return target[key](source[key](rsCss, props), props); + }; + } else { + styles[key] = target[key]; + } + }); + return styles; +} + +var colors = { + primary: '#2684FF', + primary75: '#4C9AFF', + primary50: '#B2D4FF', + primary25: '#DEEBFF', + danger: '#DE350B', + dangerLight: '#FFBDAD', + neutral0: 'hsl(0, 0%, 100%)', + neutral5: 'hsl(0, 0%, 95%)', + neutral10: 'hsl(0, 0%, 90%)', + neutral20: 'hsl(0, 0%, 80%)', + neutral30: 'hsl(0, 0%, 70%)', + neutral40: 'hsl(0, 0%, 60%)', + neutral50: 'hsl(0, 0%, 50%)', + neutral60: 'hsl(0, 0%, 40%)', + neutral70: 'hsl(0, 0%, 30%)', + neutral80: 'hsl(0, 0%, 20%)', + neutral90: 'hsl(0, 0%, 10%)' +}; +var borderRadius = 4; // Used to calculate consistent margin/padding on elements + +var baseUnit = 4; // The minimum height of the control + +var controlHeight = 38; // The amount of space between the control and menu */ + +var menuGutter = baseUnit * 2; +var spacing = { + baseUnit: baseUnit, + controlHeight: controlHeight, + menuGutter: menuGutter +}; +var defaultTheme = { + borderRadius: borderRadius, + colors: colors, + spacing: spacing +}; + +function _objectWithoutPropertiesLoose$2(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 _extends$4() { _extends$4 = 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$4.apply(this, arguments); } + +function _inheritsLoose$4(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } +var defaultProps = { + backspaceRemovesValue: true, + blurInputOnSelect: utils.isTouchCapable(), + captureMenuScroll: !utils.isTouchCapable(), + closeMenuOnSelect: true, + closeMenuOnScroll: false, + components: {}, + controlShouldRenderValue: true, + escapeClearsValue: false, + filterOption: createFilter(), + formatGroupLabel: formatGroupLabel, + getOptionLabel: getOptionLabel, + getOptionValue: getOptionValue, + isDisabled: false, + isLoading: false, + isMulti: false, + isRtl: false, + isSearchable: true, + isOptionDisabled: isOptionDisabled, + loadingMessage: function loadingMessage() { + return 'Loading...'; + }, + maxMenuHeight: 300, + minMenuHeight: 140, + menuIsOpen: false, + menuPlacement: 'bottom', + menuPosition: 'absolute', + menuShouldBlockScroll: false, + menuShouldScrollIntoView: !utils.isMobileDevice(), + noOptionsMessage: function noOptionsMessage() { + return 'No options'; + }, + openMenuOnFocus: false, + openMenuOnClick: true, + options: [], + pageSize: 5, + placeholder: 'Select...', + screenReaderStatus: function screenReaderStatus(_ref) { + var count = _ref.count; + return count + " result" + (count !== 1 ? 's' : '') + " available"; + }, + styles: {}, + tabIndex: '0', + tabSelectsValue: true +}; +var instanceId = 1; + +var Select = +/*#__PURE__*/ +function (_Component) { + _inheritsLoose$4(Select, _Component); + + // Misc. Instance Properties + // ------------------------------ + // TODO + // Refs + // ------------------------------ + // Lifecycle + // ------------------------------ + function Select(_props) { + var _this; + + _this = _Component.call(this, _props) || this; + _this.state = { + ariaLiveSelection: '', + ariaLiveContext: '', + focusedOption: null, + focusedValue: null, + inputIsHidden: false, + isFocused: false, + menuOptions: { + render: [], + focusable: [] + }, + selectValue: [] + }; + _this.blockOptionHover = false; + _this.isComposing = false; + _this.clearFocusValueOnUpdate = false; + _this.commonProps = void 0; + _this.components = void 0; + _this.hasGroups = false; + _this.initialTouchX = 0; + _this.initialTouchY = 0; + _this.inputIsHiddenAfterUpdate = void 0; + _this.instancePrefix = ''; + _this.openAfterFocus = false; + _this.scrollToFocusedOptionOnUpdate = false; + _this.userIsDragging = void 0; + _this.controlRef = null; + + _this.getControlRef = function (ref) { + _this.controlRef = ref; + }; + + _this.focusedOptionRef = null; + + _this.getFocusedOptionRef = function (ref) { + _this.focusedOptionRef = ref; + }; + + _this.menuListRef = null; + + _this.getMenuListRef = function (ref) { + _this.menuListRef = ref; + }; + + _this.inputRef = null; + + _this.getInputRef = function (ref) { + _this.inputRef = ref; + }; + + _this.cacheComponents = function (components) { + _this.components = index.defaultComponents({ + components: components + }); + }; + + _this.focus = _this.focusInput; + _this.blur = _this.blurInput; + + _this.onChange = function (newValue, actionMeta) { + var _this$props = _this.props, + onChange = _this$props.onChange, + name = _this$props.name; + onChange(newValue, _extends$4({}, actionMeta, { + name: name + })); + }; + + _this.setValue = function (newValue, action, option) { + if (action === void 0) { + action = 'set-value'; + } + + var _this$props2 = _this.props, + closeMenuOnSelect = _this$props2.closeMenuOnSelect, + isMulti = _this$props2.isMulti; + + _this.onInputChange('', { + action: 'set-value' + }); + + if (closeMenuOnSelect) { + _this.inputIsHiddenAfterUpdate = !isMulti; + + _this.onMenuClose(); + } // when the select value should change, we should reset focusedValue + + + _this.clearFocusValueOnUpdate = true; + + _this.onChange(newValue, { + action: action, + option: option + }); + }; + + _this.selectOption = function (newValue) { + var _this$props3 = _this.props, + blurInputOnSelect = _this$props3.blurInputOnSelect, + isMulti = _this$props3.isMulti; + var selectValue = _this.state.selectValue; + + if (isMulti) { + if (_this.isOptionSelected(newValue, selectValue)) { + var candidate = _this.getOptionValue(newValue); + + _this.setValue(selectValue.filter(function (i) { + return _this.getOptionValue(i) !== candidate; + }), 'deselect-option', newValue); + + _this.announceAriaLiveSelection({ + event: 'deselect-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + if (!_this.isOptionDisabled(newValue, selectValue)) { + _this.setValue([].concat(selectValue, [newValue]), 'select-option', newValue); + + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + // announce that option is disabled + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue), + isDisabled: true + } + }); + } + } + } else { + if (!_this.isOptionDisabled(newValue, selectValue)) { + _this.setValue(newValue, 'select-option'); + + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue) + } + }); + } else { + // announce that option is disabled + _this.announceAriaLiveSelection({ + event: 'select-option', + context: { + value: _this.getOptionLabel(newValue), + isDisabled: true + } + }); + } + } + + if (blurInputOnSelect) { + _this.blurInput(); + } + }; + + _this.removeValue = function (removedValue) { + var selectValue = _this.state.selectValue; + + var candidate = _this.getOptionValue(removedValue); + + var newValue = selectValue.filter(function (i) { + return _this.getOptionValue(i) !== candidate; + }); + + _this.onChange(newValue.length ? newValue : null, { + action: 'remove-value', + removedValue: removedValue + }); + + _this.announceAriaLiveSelection({ + event: 'remove-value', + context: { + value: removedValue ? _this.getOptionLabel(removedValue) : '' + } + }); + + _this.focusInput(); + }; + + _this.clearValue = function () { + var isMulti = _this.props.isMulti; + + _this.onChange(isMulti ? [] : null, { + action: 'clear' + }); + }; + + _this.popValue = function () { + var selectValue = _this.state.selectValue; + var lastSelectedValue = selectValue[selectValue.length - 1]; + var newValue = selectValue.slice(0, selectValue.length - 1); + + _this.announceAriaLiveSelection({ + event: 'pop-value', + context: { + value: lastSelectedValue ? _this.getOptionLabel(lastSelectedValue) : '' + } + }); + + _this.onChange(newValue.length ? newValue : null, { + action: 'pop-value', + removedValue: lastSelectedValue + }); + }; + + _this.getOptionLabel = function (data) { + return _this.props.getOptionLabel(data); + }; + + _this.getOptionValue = function (data) { + return _this.props.getOptionValue(data); + }; + + _this.getStyles = function (key, props) { + var base = defaultStyles[key](props); + base.boxSizing = 'border-box'; + var custom = _this.props.styles[key]; + return custom ? custom(base, props) : base; + }; + + _this.getElementId = function (element) { + return _this.instancePrefix + "-" + element; + }; + + _this.getActiveDescendentId = function () { + var menuIsOpen = _this.props.menuIsOpen; + var _this$state = _this.state, + menuOptions = _this$state.menuOptions, + focusedOption = _this$state.focusedOption; + if (!focusedOption || !menuIsOpen) return undefined; + var index = menuOptions.focusable.indexOf(focusedOption); + var option = menuOptions.render[index]; + return option && option.key; + }; + + _this.announceAriaLiveSelection = function (_ref2) { + var event = _ref2.event, + context = _ref2.context; + + _this.setState({ + ariaLiveSelection: valueEventAriaMessage(event, context) + }); + }; + + _this.announceAriaLiveContext = function (_ref3) { + var event = _ref3.event, + context = _ref3.context; + + _this.setState({ + ariaLiveContext: instructionsAriaMessage(event, _extends$4({}, context, { + label: _this.props['aria-label'] + })) + }); + }; + + _this.onMenuMouseDown = function (event) { + if (event.button !== 0) { + return; + } + + event.stopPropagation(); + event.preventDefault(); + + _this.focusInput(); + }; + + _this.onMenuMouseMove = function (event) { + _this.blockOptionHover = false; + }; + + _this.onControlMouseDown = function (event) { + var openMenuOnClick = _this.props.openMenuOnClick; + + if (!_this.state.isFocused) { + if (openMenuOnClick) { + _this.openAfterFocus = true; + } + + _this.focusInput(); + } else if (!_this.props.menuIsOpen) { + if (openMenuOnClick) { + _this.openMenu('first'); + } + } else { + if ( // $FlowFixMe + event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') { + _this.onMenuClose(); + } + } + + if ( // $FlowFixMe + event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') { + event.preventDefault(); + } + }; + + _this.onDropdownIndicatorMouseDown = function (event) { + // ignore mouse events that weren't triggered by the primary button + if (event && event.type === 'mousedown' && event.button !== 0) { + return; + } + + if (_this.props.isDisabled) return; + var _this$props4 = _this.props, + isMulti = _this$props4.isMulti, + menuIsOpen = _this$props4.menuIsOpen; + + _this.focusInput(); + + if (menuIsOpen) { + _this.inputIsHiddenAfterUpdate = !isMulti; + + _this.onMenuClose(); + } else { + _this.openMenu('first'); + } + + event.preventDefault(); + event.stopPropagation(); + }; + + _this.onClearIndicatorMouseDown = function (event) { + // ignore mouse events that weren't triggered by the primary button + if (event && event.type === 'mousedown' && event.button !== 0) { + return; + } + + _this.clearValue(); + + event.stopPropagation(); + _this.openAfterFocus = false; + + if (event.type === 'touchend') { + _this.focusInput(); + } else { + setTimeout(function () { + return _this.focusInput(); + }); + } + }; + + _this.onScroll = function (event) { + if (typeof _this.props.closeMenuOnScroll === 'boolean') { + if (event.target instanceof HTMLElement && utils.isDocumentElement(event.target)) { + _this.props.onMenuClose(); + } + } else if (typeof _this.props.closeMenuOnScroll === 'function') { + if (_this.props.closeMenuOnScroll(event)) { + _this.props.onMenuClose(); + } + } + }; + + _this.onCompositionStart = function () { + _this.isComposing = true; + }; + + _this.onCompositionEnd = function () { + _this.isComposing = false; + }; + + _this.onTouchStart = function (_ref4) { + var touches = _ref4.touches; + var touch = touches.item(0); + + if (!touch) { + return; + } + + _this.initialTouchX = touch.clientX; + _this.initialTouchY = touch.clientY; + _this.userIsDragging = false; + }; + + _this.onTouchMove = function (_ref5) { + var touches = _ref5.touches; + var touch = touches.item(0); + + if (!touch) { + return; + } + + var deltaX = Math.abs(touch.clientX - _this.initialTouchX); + var deltaY = Math.abs(touch.clientY - _this.initialTouchY); + var moveThreshold = 5; + _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold; + }; + + _this.onTouchEnd = function (event) { + if (_this.userIsDragging) return; // close the menu if the user taps outside + // we're checking on event.target here instead of event.currentTarget, because we want to assert information + // on events on child elements, not the document (which we've attached this handler to). + + if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) { + _this.blurInput(); + } // reset move vars + + + _this.initialTouchX = 0; + _this.initialTouchY = 0; + }; + + _this.onControlTouchEnd = function (event) { + if (_this.userIsDragging) return; + + _this.onControlMouseDown(event); + }; + + _this.onClearIndicatorTouchEnd = function (event) { + if (_this.userIsDragging) return; + + _this.onClearIndicatorMouseDown(event); + }; + + _this.onDropdownIndicatorTouchEnd = function (event) { + if (_this.userIsDragging) return; + + _this.onDropdownIndicatorMouseDown(event); + }; + + _this.handleInputChange = function (event) { + var inputValue = event.currentTarget.value; + _this.inputIsHiddenAfterUpdate = false; + + _this.onInputChange(inputValue, { + action: 'input-change' + }); + + _this.onMenuOpen(); + }; + + _this.onInputFocus = function (event) { + var _this$props5 = _this.props, + isSearchable = _this$props5.isSearchable, + isMulti = _this$props5.isMulti; + + if (_this.props.onFocus) { + _this.props.onFocus(event); + } + + _this.inputIsHiddenAfterUpdate = false; + + _this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + + _this.setState({ + isFocused: true + }); + + if (_this.openAfterFocus || _this.props.openMenuOnFocus) { + _this.openMenu('first'); + } + + _this.openAfterFocus = false; + }; + + _this.onInputBlur = function (event) { + if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) { + _this.inputRef.focus(); + + return; + } + + if (_this.props.onBlur) { + _this.props.onBlur(event); + } + + _this.onInputChange('', { + action: 'input-blur' + }); + + _this.onMenuClose(); + + _this.setState({ + focusedValue: null, + isFocused: false + }); + }; + + _this.onOptionHover = function (focusedOption) { + if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) { + return; + } + + _this.setState({ + focusedOption: focusedOption + }); + }; + + _this.shouldHideSelectedOptions = function () { + var _this$props6 = _this.props, + hideSelectedOptions = _this$props6.hideSelectedOptions, + isMulti = _this$props6.isMulti; + if (hideSelectedOptions === undefined) return isMulti; + return hideSelectedOptions; + }; + + _this.onKeyDown = function (event) { + var _this$props7 = _this.props, + isMulti = _this$props7.isMulti, + backspaceRemovesValue = _this$props7.backspaceRemovesValue, + escapeClearsValue = _this$props7.escapeClearsValue, + inputValue = _this$props7.inputValue, + isClearable = _this$props7.isClearable, + isDisabled = _this$props7.isDisabled, + menuIsOpen = _this$props7.menuIsOpen, + onKeyDown = _this$props7.onKeyDown, + tabSelectsValue = _this$props7.tabSelectsValue, + openMenuOnFocus = _this$props7.openMenuOnFocus; + var _this$state2 = _this.state, + focusedOption = _this$state2.focusedOption, + focusedValue = _this$state2.focusedValue, + selectValue = _this$state2.selectValue; + if (isDisabled) return; + + if (typeof onKeyDown === 'function') { + onKeyDown(event); + + if (event.defaultPrevented) { + return; + } + } // Block option hover events when the user has just pressed a key + + + _this.blockOptionHover = true; + + switch (event.key) { + case 'ArrowLeft': + if (!isMulti || inputValue) return; + + _this.focusValue('previous'); + + break; + + case 'ArrowRight': + if (!isMulti || inputValue) return; + + _this.focusValue('next'); + + break; + + case 'Delete': + case 'Backspace': + if (inputValue) return; + + if (focusedValue) { + _this.removeValue(focusedValue); + } else { + if (!backspaceRemovesValue) return; + + if (isMulti) { + _this.popValue(); + } else if (isClearable) { + _this.clearValue(); + } + } + + break; + + case 'Tab': + if (_this.isComposing) return; + + if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused + // option is already selected; it breaks the flow of navigation + openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) { + return; + } + + _this.selectOption(focusedOption); + + break; + + case 'Enter': + if (event.keyCode === 229) { + // ignore the keydown event from an Input Method Editor(IME) + // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode + break; + } + + if (menuIsOpen) { + if (!focusedOption) return; + if (_this.isComposing) return; + + _this.selectOption(focusedOption); + + break; + } + + return; + + case 'Escape': + if (menuIsOpen) { + _this.inputIsHiddenAfterUpdate = false; + + _this.onInputChange('', { + action: 'menu-close' + }); + + _this.onMenuClose(); + } else if (isClearable && escapeClearsValue) { + _this.clearValue(); + } + + break; + + case ' ': + // space + if (inputValue) { + return; + } + + if (!menuIsOpen) { + _this.openMenu('first'); + + break; + } + + if (!focusedOption) return; + + _this.selectOption(focusedOption); + + break; + + case 'ArrowUp': + if (menuIsOpen) { + _this.focusOption('up'); + } else { + _this.openMenu('last'); + } + + break; + + case 'ArrowDown': + if (menuIsOpen) { + _this.focusOption('down'); + } else { + _this.openMenu('first'); + } + + break; + + case 'PageUp': + if (!menuIsOpen) return; + + _this.focusOption('pageup'); + + break; + + case 'PageDown': + if (!menuIsOpen) return; + + _this.focusOption('pagedown'); + + break; + + case 'Home': + if (!menuIsOpen) return; + + _this.focusOption('first'); + + break; + + case 'End': + if (!menuIsOpen) return; + + _this.focusOption('last'); + + break; + + default: + return; + } + + event.preventDefault(); + }; + + _this.buildMenuOptions = function (props, selectValue) { + var _props$inputValue = props.inputValue, + inputValue = _props$inputValue === void 0 ? '' : _props$inputValue, + options = props.options; + + var toOption = function toOption(option, id) { + var isDisabled = _this.isOptionDisabled(option, selectValue); + + var isSelected = _this.isOptionSelected(option, selectValue); + + var label = _this.getOptionLabel(option); + + var value = _this.getOptionValue(option); + + if (_this.shouldHideSelectedOptions() && isSelected || !_this.filterOption({ + label: label, + value: value, + data: option + }, inputValue)) { + return; + } + + var onHover = isDisabled ? undefined : function () { + return _this.onOptionHover(option); + }; + var onSelect = isDisabled ? undefined : function () { + return _this.selectOption(option); + }; + var optionId = _this.getElementId('option') + "-" + id; + return { + innerProps: { + id: optionId, + onClick: onSelect, + onMouseMove: onHover, + onMouseOver: onHover, + tabIndex: -1 + }, + data: option, + isDisabled: isDisabled, + isSelected: isSelected, + key: optionId, + label: label, + type: 'option', + value: value + }; + }; + + return options.reduce(function (acc, item, itemIndex) { + if (item.options) { + // TODO needs a tidier implementation + if (!_this.hasGroups) _this.hasGroups = true; + var items = item.options; + var children = items.map(function (child, i) { + var option = toOption(child, itemIndex + "-" + i); + if (option) acc.focusable.push(child); + return option; + }).filter(Boolean); + + if (children.length) { + var groupId = _this.getElementId('group') + "-" + itemIndex; + acc.render.push({ + type: 'group', + key: groupId, + data: item, + options: children + }); + } + } else { + var option = toOption(item, "" + itemIndex); + + if (option) { + acc.render.push(option); + acc.focusable.push(item); + } + } + + return acc; + }, { + render: [], + focusable: [] + }); + }; + + var _value = _props.value; + _this.cacheComponents = memoizeOne(_this.cacheComponents, index.exportedEqual).bind(_assertThisInitialized(_assertThisInitialized(_this))); + + _this.cacheComponents(_props.components); + + _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId); + + var _selectValue = utils.cleanValue(_value); + + _this.buildMenuOptions = memoizeOne(_this.buildMenuOptions, function (newArgs, lastArgs) { + var _ref6 = newArgs, + newProps = _ref6[0], + newSelectValue = _ref6[1]; + var _ref7 = lastArgs, + lastProps = _ref7[0], + lastSelectValue = _ref7[1]; + return index.exportedEqual(newSelectValue, lastSelectValue) && index.exportedEqual(newProps.inputValue, lastProps.inputValue) && index.exportedEqual(newProps.options, lastProps.options); + }).bind(_assertThisInitialized(_assertThisInitialized(_this))); + + var _menuOptions = _props.menuIsOpen ? _this.buildMenuOptions(_props, _selectValue) : { + render: [], + focusable: [] + }; + + _this.state.menuOptions = _menuOptions; + _this.state.selectValue = _selectValue; + return _this; + } + + var _proto = Select.prototype; + + _proto.componentDidMount = function componentDidMount() { + this.startListeningComposition(); + this.startListeningToTouch(); + + if (this.props.closeMenuOnScroll && document && document.addEventListener) { + // Listen to all scroll events, and filter them out inside of 'onScroll' + document.addEventListener('scroll', this.onScroll, true); + } + + if (this.props.autoFocus) { + this.focusInput(); + } + }; + + _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) { + var _this$props8 = this.props, + options = _this$props8.options, + value = _this$props8.value, + menuIsOpen = _this$props8.menuIsOpen, + inputValue = _this$props8.inputValue; // re-cache custom components + + this.cacheComponents(nextProps.components); // rebuild the menu options + + if (nextProps.value !== value || nextProps.options !== options || nextProps.menuIsOpen !== menuIsOpen || nextProps.inputValue !== inputValue) { + var selectValue = utils.cleanValue(nextProps.value); + var menuOptions = nextProps.menuIsOpen ? this.buildMenuOptions(nextProps, selectValue) : { + render: [], + focusable: [] + }; + var focusedValue = this.getNextFocusedValue(selectValue); + var focusedOption = this.getNextFocusedOption(menuOptions.focusable); + this.setState({ + menuOptions: menuOptions, + selectValue: selectValue, + focusedOption: focusedOption, + focusedValue: focusedValue + }); + } // some updates should toggle the state of the input visibility + + + if (this.inputIsHiddenAfterUpdate != null) { + this.setState({ + inputIsHidden: this.inputIsHiddenAfterUpdate + }); + delete this.inputIsHiddenAfterUpdate; + } + }; + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var _this$props9 = this.props, + isDisabled = _this$props9.isDisabled, + menuIsOpen = _this$props9.menuIsOpen; + var isFocused = this.state.isFocused; + + if ( // ensure focus is restored correctly when the control becomes enabled + isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens + isFocused && menuIsOpen && !prevProps.menuIsOpen) { + this.focusInput(); + } // scroll the focused option into view if necessary + + + if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) { + utils.scrollIntoView(this.menuListRef, this.focusedOptionRef); + this.scrollToFocusedOptionOnUpdate = false; + } + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.stopListeningComposition(); + this.stopListeningToTouch(); + document.removeEventListener('scroll', this.onScroll, true); + }; + + // ============================== + // Consumer Handlers + // ============================== + _proto.onMenuOpen = function onMenuOpen() { + this.props.onMenuOpen(); + }; + + _proto.onMenuClose = function onMenuClose() { + var _this$props10 = this.props, + isSearchable = _this$props10.isSearchable, + isMulti = _this$props10.isMulti; + this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + this.onInputChange('', { + action: 'menu-close' + }); + this.props.onMenuClose(); + }; + + _proto.onInputChange = function onInputChange(newValue, actionMeta) { + this.props.onInputChange(newValue, actionMeta); + } // ============================== + // Methods + // ============================== + ; + + _proto.focusInput = function focusInput() { + if (!this.inputRef) return; + this.inputRef.focus(); + }; + + _proto.blurInput = function blurInput() { + if (!this.inputRef) return; + this.inputRef.blur(); + } // aliased for consumers + ; + + _proto.openMenu = function openMenu(focusOption) { + var _this2 = this; + + var _this$state3 = this.state, + selectValue = _this$state3.selectValue, + isFocused = _this$state3.isFocused; + var menuOptions = this.buildMenuOptions(this.props, selectValue); + var isMulti = this.props.isMulti; + var openAtIndex = focusOption === 'first' ? 0 : menuOptions.focusable.length - 1; + + if (!isMulti) { + var selectedIndex = menuOptions.focusable.indexOf(selectValue[0]); + + if (selectedIndex > -1) { + openAtIndex = selectedIndex; + } + } // only scroll if the menu isn't already open + + + this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef); + this.inputIsHiddenAfterUpdate = false; + this.setState({ + menuOptions: menuOptions, + focusedValue: null, + focusedOption: menuOptions.focusable[openAtIndex] + }, function () { + _this2.onMenuOpen(); + + _this2.announceAriaLiveContext({ + event: 'menu' + }); + }); + }; + + _proto.focusValue = function focusValue(direction) { + var _this$props11 = this.props, + isMulti = _this$props11.isMulti, + isSearchable = _this$props11.isSearchable; + var _this$state4 = this.state, + selectValue = _this$state4.selectValue, + focusedValue = _this$state4.focusedValue; // Only multiselects support value focusing + + if (!isMulti) return; + this.setState({ + focusedOption: null + }); + var focusedIndex = selectValue.indexOf(focusedValue); + + if (!focusedValue) { + focusedIndex = -1; + this.announceAriaLiveContext({ + event: 'value' + }); + } + + var lastIndex = selectValue.length - 1; + var nextFocus = -1; + if (!selectValue.length) return; + + switch (direction) { + case 'previous': + if (focusedIndex === 0) { + // don't cycle from the start to the end + nextFocus = 0; + } else if (focusedIndex === -1) { + // if nothing is focused, focus the last value first + nextFocus = lastIndex; + } else { + nextFocus = focusedIndex - 1; + } + + break; + + case 'next': + if (focusedIndex > -1 && focusedIndex < lastIndex) { + nextFocus = focusedIndex + 1; + } + + break; + } + + if (nextFocus === -1) { + this.announceAriaLiveContext({ + event: 'input', + context: { + isSearchable: isSearchable, + isMulti: isMulti + } + }); + } + + this.setState({ + inputIsHidden: nextFocus !== -1, + focusedValue: selectValue[nextFocus] + }); + }; + + _proto.focusOption = function focusOption(direction) { + if (direction === void 0) { + direction = 'first'; + } + + var pageSize = this.props.pageSize; + var _this$state5 = this.state, + focusedOption = _this$state5.focusedOption, + menuOptions = _this$state5.menuOptions; + var options = menuOptions.focusable; + if (!options.length) return; + var nextFocus = 0; // handles 'first' + + var focusedIndex = options.indexOf(focusedOption); + + if (!focusedOption) { + focusedIndex = -1; + this.announceAriaLiveContext({ + event: 'menu' + }); + } + + if (direction === 'up') { + nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1; + } else if (direction === 'down') { + nextFocus = (focusedIndex + 1) % options.length; + } else if (direction === 'pageup') { + nextFocus = focusedIndex - pageSize; + if (nextFocus < 0) nextFocus = 0; + } else if (direction === 'pagedown') { + nextFocus = focusedIndex + pageSize; + if (nextFocus > options.length - 1) nextFocus = options.length - 1; + } else if (direction === 'last') { + nextFocus = options.length - 1; + } + + this.scrollToFocusedOptionOnUpdate = true; + this.setState({ + focusedOption: options[nextFocus], + focusedValue: null + }); + this.announceAriaLiveContext({ + event: 'menu', + context: { + isDisabled: isOptionDisabled(options[nextFocus]) + } + }); + }; + + // ============================== + // Getters + // ============================== + _proto.getTheme = function getTheme() { + // Use the default theme if there are no customizations. + if (!this.props.theme) { + return defaultTheme; + } // If the theme prop is a function, assume the function + // knows how to merge the passed-in default theme with + // its own modifications. + + + if (typeof this.props.theme === 'function') { + return this.props.theme(defaultTheme); + } // Otherwise, if a plain theme object was passed in, + // overlay it with the default theme. + + + return _extends$4({}, defaultTheme, this.props.theme); + }; + + _proto.getCommonProps = function getCommonProps() { + var clearValue = this.clearValue, + getStyles = this.getStyles, + setValue = this.setValue, + selectOption = this.selectOption, + props = this.props; + var classNamePrefix = props.classNamePrefix, + isMulti = props.isMulti, + isRtl = props.isRtl, + options = props.options; + var selectValue = this.state.selectValue; + var hasValue = this.hasValue(); + + var getValue = function getValue() { + return selectValue; + }; + + var cx = utils.classNames.bind(null, classNamePrefix); + return { + cx: cx, + clearValue: clearValue, + getStyles: getStyles, + getValue: getValue, + hasValue: hasValue, + isMulti: isMulti, + isRtl: isRtl, + options: options, + selectOption: selectOption, + setValue: setValue, + selectProps: props, + theme: this.getTheme() + }; + }; + + _proto.getNextFocusedValue = function getNextFocusedValue(nextSelectValue) { + if (this.clearFocusValueOnUpdate) { + this.clearFocusValueOnUpdate = false; + return null; + } + + var _this$state6 = this.state, + focusedValue = _this$state6.focusedValue, + lastSelectValue = _this$state6.selectValue; + var lastFocusedIndex = lastSelectValue.indexOf(focusedValue); + + if (lastFocusedIndex > -1) { + var nextFocusedIndex = nextSelectValue.indexOf(focusedValue); + + if (nextFocusedIndex > -1) { + // the focused value is still in the selectValue, return it + return focusedValue; + } else if (lastFocusedIndex < nextSelectValue.length) { + // the focusedValue is not present in the next selectValue array by + // reference, so return the new value at the same index + return nextSelectValue[lastFocusedIndex]; + } + } + + return null; + }; + + _proto.getNextFocusedOption = function getNextFocusedOption(options) { + var lastFocusedOption = this.state.focusedOption; + return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0]; + }; + + _proto.hasValue = function hasValue() { + var selectValue = this.state.selectValue; + return selectValue.length > 0; + }; + + _proto.hasOptions = function hasOptions() { + return !!this.state.menuOptions.render.length; + }; + + _proto.countOptions = function countOptions() { + return this.state.menuOptions.focusable.length; + }; + + _proto.isClearable = function isClearable() { + var _this$props12 = this.props, + isClearable = _this$props12.isClearable, + isMulti = _this$props12.isMulti; // single select, by default, IS NOT clearable + // multi select, by default, IS clearable + + if (isClearable === undefined) return isMulti; + return isClearable; + }; + + _proto.isOptionDisabled = function isOptionDisabled(option, selectValue) { + return typeof this.props.isOptionDisabled === 'function' ? this.props.isOptionDisabled(option, selectValue) : false; + }; + + _proto.isOptionSelected = function isOptionSelected(option, selectValue) { + var _this3 = this; + + if (selectValue.indexOf(option) > -1) return true; + + if (typeof this.props.isOptionSelected === 'function') { + return this.props.isOptionSelected(option, selectValue); + } + + var candidate = this.getOptionValue(option); + return selectValue.some(function (i) { + return _this3.getOptionValue(i) === candidate; + }); + }; + + _proto.filterOption = function filterOption(option, inputValue) { + return this.props.filterOption ? this.props.filterOption(option, inputValue) : true; + }; + + _proto.formatOptionLabel = function formatOptionLabel(data, context) { + if (typeof this.props.formatOptionLabel === 'function') { + var inputValue = this.props.inputValue; + var selectValue = this.state.selectValue; + return this.props.formatOptionLabel(data, { + context: context, + inputValue: inputValue, + selectValue: selectValue + }); + } else { + return this.getOptionLabel(data); + } + }; + + _proto.formatGroupLabel = function formatGroupLabel(data) { + return this.props.formatGroupLabel(data); + } // ============================== + // Mouse Handlers + // ============================== + ; + + // ============================== + // Composition Handlers + // ============================== + _proto.startListeningComposition = function startListeningComposition() { + if (document && document.addEventListener) { + document.addEventListener('compositionstart', this.onCompositionStart, false); + document.addEventListener('compositionend', this.onCompositionEnd, false); + } + }; + + _proto.stopListeningComposition = function stopListeningComposition() { + if (document && document.removeEventListener) { + document.removeEventListener('compositionstart', this.onCompositionStart); + document.removeEventListener('compositionend', this.onCompositionEnd); + } + }; + + // ============================== + // Touch Handlers + // ============================== + _proto.startListeningToTouch = function startListeningToTouch() { + if (document && document.addEventListener) { + document.addEventListener('touchstart', this.onTouchStart, false); + document.addEventListener('touchmove', this.onTouchMove, false); + document.addEventListener('touchend', this.onTouchEnd, false); + } + }; + + _proto.stopListeningToTouch = function stopListeningToTouch() { + if (document && document.removeEventListener) { + document.removeEventListener('touchstart', this.onTouchStart); + document.removeEventListener('touchmove', this.onTouchMove); + document.removeEventListener('touchend', this.onTouchEnd); + } + }; + + // ============================== + // Renderers + // ============================== + _proto.constructAriaLiveMessage = function constructAriaLiveMessage() { + var _this$state7 = this.state, + ariaLiveContext = _this$state7.ariaLiveContext, + selectValue = _this$state7.selectValue, + focusedValue = _this$state7.focusedValue, + focusedOption = _this$state7.focusedOption; + var _this$props13 = this.props, + options = _this$props13.options, + menuIsOpen = _this$props13.menuIsOpen, + inputValue = _this$props13.inputValue, + screenReaderStatus = _this$props13.screenReaderStatus; // An aria live message representing the currently focused value in the select. + + var focusedValueMsg = focusedValue ? valueFocusAriaMessage({ + focusedValue: focusedValue, + getOptionLabel: this.getOptionLabel, + selectValue: selectValue + }) : ''; // An aria live message representing the currently focused option in the select. + + var focusedOptionMsg = focusedOption && menuIsOpen ? optionFocusAriaMessage({ + focusedOption: focusedOption, + getOptionLabel: this.getOptionLabel, + options: options + }) : ''; // An aria live message representing the set of focusable results and current searchterm/inputvalue. + + var resultsMsg = resultsAriaMessage({ + inputValue: inputValue, + screenReaderMessage: screenReaderStatus({ + count: this.countOptions() + }) + }); + return focusedValueMsg + " " + focusedOptionMsg + " " + resultsMsg + " " + ariaLiveContext; + }; + + _proto.renderInput = function renderInput() { + var _this$props14 = this.props, + isDisabled = _this$props14.isDisabled, + isSearchable = _this$props14.isSearchable, + inputId = _this$props14.inputId, + inputValue = _this$props14.inputValue, + tabIndex = _this$props14.tabIndex; + var Input = this.components.Input; + var inputIsHidden = this.state.inputIsHidden; + var id = inputId || this.getElementId('input'); // aria attributes makes the JSX "noisy", separated for clarity + + var ariaAttributes = { + 'aria-autocomplete': 'list', + 'aria-label': this.props['aria-label'], + 'aria-labelledby': this.props['aria-labelledby'] + }; + + if (!isSearchable) { + // use a dummy input to maintain focus/blur functionality + return React__default.createElement(DummyInput, _extends$4({ + id: id, + innerRef: this.getInputRef, + onBlur: this.onInputBlur, + onChange: utils.noop, + onFocus: this.onInputFocus, + readOnly: true, + disabled: isDisabled, + tabIndex: tabIndex, + value: "" + }, ariaAttributes)); + } + + var _this$commonProps = this.commonProps, + cx = _this$commonProps.cx, + theme = _this$commonProps.theme, + selectProps = _this$commonProps.selectProps; + return React__default.createElement(Input, _extends$4({ + autoCapitalize: "none", + autoComplete: "off", + autoCorrect: "off", + cx: cx, + getStyles: this.getStyles, + id: id, + innerRef: this.getInputRef, + isDisabled: isDisabled, + isHidden: inputIsHidden, + onBlur: this.onInputBlur, + onChange: this.handleInputChange, + onFocus: this.onInputFocus, + selectProps: selectProps, + spellCheck: "false", + tabIndex: tabIndex, + theme: theme, + type: "text", + value: inputValue + }, ariaAttributes)); + }; + + _proto.renderPlaceholderOrValue = function renderPlaceholderOrValue() { + var _this4 = this; + + var _this$components = this.components, + MultiValue = _this$components.MultiValue, + MultiValueContainer = _this$components.MultiValueContainer, + MultiValueLabel = _this$components.MultiValueLabel, + MultiValueRemove = _this$components.MultiValueRemove, + SingleValue = _this$components.SingleValue, + Placeholder = _this$components.Placeholder; + var commonProps = this.commonProps; + var _this$props15 = this.props, + controlShouldRenderValue = _this$props15.controlShouldRenderValue, + isDisabled = _this$props15.isDisabled, + isMulti = _this$props15.isMulti, + inputValue = _this$props15.inputValue, + placeholder = _this$props15.placeholder; + var _this$state8 = this.state, + selectValue = _this$state8.selectValue, + focusedValue = _this$state8.focusedValue, + isFocused = _this$state8.isFocused; + + if (!this.hasValue() || !controlShouldRenderValue) { + return inputValue ? null : React__default.createElement(Placeholder, _extends$4({}, commonProps, { + key: "placeholder", + isDisabled: isDisabled, + isFocused: isFocused + }), placeholder); + } + + if (isMulti) { + var selectValues = selectValue.map(function (opt, index) { + var isOptionFocused = opt === focusedValue; + return React__default.createElement(MultiValue, _extends$4({}, commonProps, { + components: { + Container: MultiValueContainer, + Label: MultiValueLabel, + Remove: MultiValueRemove + }, + isFocused: isOptionFocused, + isDisabled: isDisabled, + key: _this4.getOptionValue(opt), + index: index, + removeProps: { + onClick: function onClick() { + return _this4.removeValue(opt); + }, + onTouchEnd: function onTouchEnd() { + return _this4.removeValue(opt); + }, + onMouseDown: function onMouseDown(e) { + e.preventDefault(); + e.stopPropagation(); + } + }, + data: opt + }), _this4.formatOptionLabel(opt, 'value')); + }); + return selectValues; + } + + if (inputValue) { + return null; + } + + var singleValue = selectValue[0]; + return React__default.createElement(SingleValue, _extends$4({}, commonProps, { + data: singleValue, + isDisabled: isDisabled + }), this.formatOptionLabel(singleValue, 'value')); + }; + + _proto.renderClearIndicator = function renderClearIndicator() { + var ClearIndicator = this.components.ClearIndicator; + var commonProps = this.commonProps; + var _this$props16 = this.props, + isDisabled = _this$props16.isDisabled, + isLoading = _this$props16.isLoading; + var isFocused = this.state.isFocused; + + if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) { + return null; + } + + var innerProps = { + onMouseDown: this.onClearIndicatorMouseDown, + onTouchEnd: this.onClearIndicatorTouchEnd, + 'aria-hidden': 'true' + }; + return React__default.createElement(ClearIndicator, _extends$4({}, commonProps, { + innerProps: innerProps, + isFocused: isFocused + })); + }; + + _proto.renderLoadingIndicator = function renderLoadingIndicator() { + var LoadingIndicator = this.components.LoadingIndicator; + var commonProps = this.commonProps; + var _this$props17 = this.props, + isDisabled = _this$props17.isDisabled, + isLoading = _this$props17.isLoading; + var isFocused = this.state.isFocused; + if (!LoadingIndicator || !isLoading) return null; + var innerProps = { + 'aria-hidden': 'true' + }; + return React__default.createElement(LoadingIndicator, _extends$4({}, commonProps, { + innerProps: innerProps, + isDisabled: isDisabled, + isFocused: isFocused + })); + }; + + _proto.renderIndicatorSeparator = function renderIndicatorSeparator() { + var _this$components2 = this.components, + DropdownIndicator = _this$components2.DropdownIndicator, + IndicatorSeparator = _this$components2.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator + + if (!DropdownIndicator || !IndicatorSeparator) return null; + var commonProps = this.commonProps; + var isDisabled = this.props.isDisabled; + var isFocused = this.state.isFocused; + return React__default.createElement(IndicatorSeparator, _extends$4({}, commonProps, { + isDisabled: isDisabled, + isFocused: isFocused + })); + }; + + _proto.renderDropdownIndicator = function renderDropdownIndicator() { + var DropdownIndicator = this.components.DropdownIndicator; + if (!DropdownIndicator) return null; + var commonProps = this.commonProps; + var isDisabled = this.props.isDisabled; + var isFocused = this.state.isFocused; + var innerProps = { + onMouseDown: this.onDropdownIndicatorMouseDown, + onTouchEnd: this.onDropdownIndicatorTouchEnd, + 'aria-hidden': 'true' + }; + return React__default.createElement(DropdownIndicator, _extends$4({}, commonProps, { + innerProps: innerProps, + isDisabled: isDisabled, + isFocused: isFocused + })); + }; + + _proto.renderMenu = function renderMenu() { + var _this5 = this; + + var _this$components3 = this.components, + Group = _this$components3.Group, + GroupHeading = _this$components3.GroupHeading, + Menu = _this$components3.Menu, + MenuList = _this$components3.MenuList, + MenuPortal = _this$components3.MenuPortal, + LoadingMessage = _this$components3.LoadingMessage, + NoOptionsMessage = _this$components3.NoOptionsMessage, + Option = _this$components3.Option; + var commonProps = this.commonProps; + var _this$state9 = this.state, + focusedOption = _this$state9.focusedOption, + menuOptions = _this$state9.menuOptions; + var _this$props18 = this.props, + captureMenuScroll = _this$props18.captureMenuScroll, + inputValue = _this$props18.inputValue, + isLoading = _this$props18.isLoading, + loadingMessage = _this$props18.loadingMessage, + minMenuHeight = _this$props18.minMenuHeight, + maxMenuHeight = _this$props18.maxMenuHeight, + menuIsOpen = _this$props18.menuIsOpen, + menuPlacement = _this$props18.menuPlacement, + menuPosition = _this$props18.menuPosition, + menuPortalTarget = _this$props18.menuPortalTarget, + menuShouldBlockScroll = _this$props18.menuShouldBlockScroll, + menuShouldScrollIntoView = _this$props18.menuShouldScrollIntoView, + noOptionsMessage = _this$props18.noOptionsMessage, + onMenuScrollToTop = _this$props18.onMenuScrollToTop, + onMenuScrollToBottom = _this$props18.onMenuScrollToBottom; + if (!menuIsOpen) return null; // TODO: Internal Option Type here + + var render = function render(props) { + // for performance, the menu options in state aren't changed when the + // focused option changes so we calculate additional props based on that + var isFocused = focusedOption === props.data; + props.innerRef = isFocused ? _this5.getFocusedOptionRef : undefined; + return React__default.createElement(Option, _extends$4({}, commonProps, props, { + isFocused: isFocused + }), _this5.formatOptionLabel(props.data, 'menu')); + }; + + var menuUI; + + if (this.hasOptions()) { + menuUI = menuOptions.render.map(function (item) { + if (item.type === 'group') { + var type = item.type, + group = _objectWithoutPropertiesLoose$2(item, ["type"]); + + var headingId = item.key + "-heading"; + return React__default.createElement(Group, _extends$4({}, commonProps, group, { + Heading: GroupHeading, + headingProps: { + id: headingId + }, + label: _this5.formatGroupLabel(item.data) + }), item.options.map(function (option) { + return render(option); + })); + } else if (item.type === 'option') { + return render(item); + } + }); + } else if (isLoading) { + var message = loadingMessage({ + inputValue: inputValue + }); + if (message === null) return null; + menuUI = React__default.createElement(LoadingMessage, commonProps, message); + } else { + var _message = noOptionsMessage({ + inputValue: inputValue + }); + + if (_message === null) return null; + menuUI = React__default.createElement(NoOptionsMessage, commonProps, _message); + } + + var menuPlacementProps = { + minMenuHeight: minMenuHeight, + maxMenuHeight: maxMenuHeight, + menuPlacement: menuPlacement, + menuPosition: menuPosition, + menuShouldScrollIntoView: menuShouldScrollIntoView + }; + var menuElement = React__default.createElement(index.MenuPlacer, _extends$4({}, commonProps, menuPlacementProps), function (_ref8) { + var ref = _ref8.ref, + _ref8$placerProps = _ref8.placerProps, + placement = _ref8$placerProps.placement, + maxHeight = _ref8$placerProps.maxHeight; + return React__default.createElement(Menu, _extends$4({}, commonProps, menuPlacementProps, { + innerRef: ref, + innerProps: { + onMouseDown: _this5.onMenuMouseDown, + onMouseMove: _this5.onMenuMouseMove + }, + isLoading: isLoading, + placement: placement + }), React__default.createElement(ScrollCaptorSwitch, { + isEnabled: captureMenuScroll, + onTopArrive: onMenuScrollToTop, + onBottomArrive: onMenuScrollToBottom + }, React__default.createElement(ScrollBlock, { + isEnabled: menuShouldBlockScroll + }, React__default.createElement(MenuList, _extends$4({}, commonProps, { + innerRef: _this5.getMenuListRef, + isLoading: isLoading, + maxHeight: maxHeight + }), menuUI)))); + }); // positioning behaviour is almost identical for portalled and fixed, + // so we use the same component. the actual portalling logic is forked + // within the component based on `menuPosition` + + return menuPortalTarget || menuPosition === 'fixed' ? React__default.createElement(MenuPortal, _extends$4({}, commonProps, { + appendTo: menuPortalTarget, + controlElement: this.controlRef, + menuPlacement: menuPlacement, + menuPosition: menuPosition + }), menuElement) : menuElement; + }; + + _proto.renderFormField = function renderFormField() { + var _this6 = this; + + var _this$props19 = this.props, + delimiter = _this$props19.delimiter, + isDisabled = _this$props19.isDisabled, + isMulti = _this$props19.isMulti, + name = _this$props19.name; + var selectValue = this.state.selectValue; + if (!name || isDisabled) return; + + if (isMulti) { + if (delimiter) { + var value = selectValue.map(function (opt) { + return _this6.getOptionValue(opt); + }).join(delimiter); + return React__default.createElement("input", { + name: name, + type: "hidden", + value: value + }); + } else { + var input = selectValue.length > 0 ? selectValue.map(function (opt, i) { + return React__default.createElement("input", { + key: "i-" + i, + name: name, + type: "hidden", + value: _this6.getOptionValue(opt) + }); + }) : React__default.createElement("input", { + name: name, + type: "hidden" + }); + return React__default.createElement("div", null, input); + } + } else { + var _value2 = selectValue[0] ? this.getOptionValue(selectValue[0]) : ''; + + return React__default.createElement("input", { + name: name, + type: "hidden", + value: _value2 + }); + } + }; + + _proto.renderLiveRegion = function renderLiveRegion() { + if (!this.state.isFocused) return null; + return React__default.createElement(A11yText, { + "aria-live": "polite" + }, React__default.createElement("p", { + id: "aria-selection-event" + }, "\xA0", this.state.ariaLiveSelection), React__default.createElement("p", { + id: "aria-context" + }, "\xA0", this.constructAriaLiveMessage())); + }; + + _proto.render = function render() { + var _this$components4 = this.components, + Control = _this$components4.Control, + IndicatorsContainer = _this$components4.IndicatorsContainer, + SelectContainer = _this$components4.SelectContainer, + ValueContainer = _this$components4.ValueContainer; + var _this$props20 = this.props, + className = _this$props20.className, + id = _this$props20.id, + isDisabled = _this$props20.isDisabled, + menuIsOpen = _this$props20.menuIsOpen; + var isFocused = this.state.isFocused; + var commonProps = this.commonProps = this.getCommonProps(); + return React__default.createElement(SelectContainer, _extends$4({}, commonProps, { + className: className, + innerProps: { + id: id, + onKeyDown: this.onKeyDown + }, + isDisabled: isDisabled, + isFocused: isFocused + }), this.renderLiveRegion(), React__default.createElement(Control, _extends$4({}, commonProps, { + innerRef: this.getControlRef, + innerProps: { + onMouseDown: this.onControlMouseDown, + onTouchEnd: this.onControlTouchEnd + }, + isDisabled: isDisabled, + isFocused: isFocused, + menuIsOpen: menuIsOpen + }), React__default.createElement(ValueContainer, _extends$4({}, commonProps, { + isDisabled: isDisabled + }), this.renderPlaceholderOrValue(), this.renderInput()), React__default.createElement(IndicatorsContainer, _extends$4({}, commonProps, { + isDisabled: isDisabled + }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField()); + }; + + return Select; +}(React.Component); + +Select.defaultProps = defaultProps; + +exports.Select = Select; +exports.createFilter = createFilter; +exports.defaultProps = defaultProps; +exports.defaultTheme = defaultTheme; +exports.mergeStyles = mergeStyles; + + +/***/ }), +/* 580 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var React = __webpack_require__(1); +var React__default = _interopDefault(React); + +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 _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 _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } +var defaultProps = { + defaultInputValue: '', + defaultMenuIsOpen: false, + defaultValue: null +}; + +var manageState = function manageState(SelectComponent) { + var _class, _temp; + + return _temp = _class = + /*#__PURE__*/ + function (_Component) { + _inheritsLoose(StateManager, _Component); + + function StateManager() { + var _this; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + _this = _Component.call.apply(_Component, [this].concat(args)) || this; + _this.select = void 0; + _this.state = { + inputValue: _this.props.inputValue !== undefined ? _this.props.inputValue : _this.props.defaultInputValue, + menuIsOpen: _this.props.menuIsOpen !== undefined ? _this.props.menuIsOpen : _this.props.defaultMenuIsOpen, + value: _this.props.value !== undefined ? _this.props.value : _this.props.defaultValue + }; + + _this.onChange = function (value, actionMeta) { + _this.callProp('onChange', value, actionMeta); + + _this.setState({ + value: value + }); + }; + + _this.onInputChange = function (value, actionMeta) { + // TODO: for backwards compatibility, we allow the prop to return a new + // value, but now inputValue is a controllable prop we probably shouldn't + var newValue = _this.callProp('onInputChange', value, actionMeta); + + _this.setState({ + inputValue: newValue !== undefined ? newValue : value + }); + }; + + _this.onMenuOpen = function () { + _this.callProp('onMenuOpen'); + + _this.setState({ + menuIsOpen: true + }); + }; + + _this.onMenuClose = function () { + _this.callProp('onMenuClose'); + + _this.setState({ + menuIsOpen: false + }); + }; + + return _this; + } + + var _proto = StateManager.prototype; + + _proto.focus = function focus() { + this.select.focus(); + }; + + _proto.blur = function blur() { + this.select.blur(); + } // FIXME: untyped flow code, return any + ; + + _proto.getProp = function getProp(key) { + return this.props[key] !== undefined ? this.props[key] : this.state[key]; + } // FIXME: untyped flow code, return any + ; + + _proto.callProp = function callProp(name) { + if (typeof this.props[name] === 'function') { + var _this$props; + + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + args[_key2 - 1] = arguments[_key2]; + } + + return (_this$props = this.props)[name].apply(_this$props, args); + } + }; + + _proto.render = function render() { + var _this2 = this; + + var _this$props2 = this.props, + defaultInputValue = _this$props2.defaultInputValue, + defaultMenuIsOpen = _this$props2.defaultMenuIsOpen, + defaultValue = _this$props2.defaultValue, + props = _objectWithoutPropertiesLoose(_this$props2, ["defaultInputValue", "defaultMenuIsOpen", "defaultValue"]); + + return React__default.createElement(SelectComponent, _extends({}, props, { + ref: function ref(_ref) { + _this2.select = _ref; + }, + inputValue: this.getProp('inputValue'), + menuIsOpen: this.getProp('menuIsOpen'), + onChange: this.onChange, + onInputChange: this.onInputChange, + onMenuClose: this.onMenuClose, + onMenuOpen: this.onMenuOpen, + value: this.getProp('value') + })); + }; + + return StateManager; + }(React.Component), _class.defaultProps = defaultProps, _temp; +}; + +exports.manageState = manageState; + + +/***/ }), +/* 581 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.URL_REGEX=exports.NAME_REGEX=void 0;var NAME_REGEX=new RegExp('(^$)|(^[A-Za-z][_0-9A-Za-z ]*$)');exports.NAME_REGEX=NAME_REGEX;var URL_REGEX=new RegExp('(^$)|((https?://.*)(d*)/?(.*))');exports.URL_REGEX=URL_REGEX; + +/***/ }), +/* 582 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.SET_APP_ERROR=exports.GET_PLUGINS_FROM_MARKETPLACE_SUCCEEDED=void 0;/* + * + * Admin constants + * + */var GET_PLUGINS_FROM_MARKETPLACE_SUCCEEDED='StrapiAdmin/Admin/GET_PLUGINS_FROM_MARKETPLACE_SUCCEEDED';exports.GET_PLUGINS_FROM_MARKETPLACE_SUCCEEDED=GET_PLUGINS_FROM_MARKETPLACE_SUCCEEDED;var SET_APP_ERROR='StrapiAdmin/Admin/SET_APP_ERROR';exports.SET_APP_ERROR=SET_APP_ERROR; + +/***/ }), +/* 583 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _CSSTransition = _interopRequireDefault(__webpack_require__(1500)); + +var _ReplaceTransition = _interopRequireDefault(__webpack_require__(1504)); + +var _TransitionGroup = _interopRequireDefault(__webpack_require__(586)); + +var _Transition = _interopRequireDefault(__webpack_require__(584)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +module.exports = { + Transition: _Transition.default, + TransitionGroup: _TransitionGroup.default, + ReplaceTransition: _ReplaceTransition.default, + CSSTransition: _CSSTransition.default +}; + +/***/ }), +/* 584 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0; + +var PropTypes = _interopRequireWildcard(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _reactDom = _interopRequireDefault(__webpack_require__(32)); + +var _reactLifecyclesCompat = __webpack_require__(141); + +var _PropTypes = __webpack_require__(585); + +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 _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 _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +var UNMOUNTED = 'unmounted'; +exports.UNMOUNTED = UNMOUNTED; +var EXITED = 'exited'; +exports.EXITED = EXITED; +var ENTERING = 'entering'; +exports.ENTERING = ENTERING; +var ENTERED = 'entered'; +exports.ENTERED = ENTERED; +var EXITING = 'exiting'; +/** + * The Transition component lets you describe a transition from one component + * state to another _over time_ with a simple declarative API. Most commonly + * it's used to animate the mounting and unmounting of a component, but can also + * be used to describe in-place transition states as well. + * + * --- + * + * **Note**: `Transition` is a platform-agnostic base component. If you're using + * transitions in CSS, you'll probably want to use + * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition) + * instead. It inherits all the features of `Transition`, but contains + * additional features necessary to play nice with CSS transitions (hence the + * name of the component). + * + * --- + * + * By default the `Transition` component does not alter the behavior of the + * component it renders, it only tracks "enter" and "exit" states for the + * components. It's up to you to give meaning and effect to those states. For + * example we can add styles to a component when it enters or exits: + * + * ```jsx + * import { Transition } from 'react-transition-group'; + * + * const duration = 300; + * + * const defaultStyle = { + * transition: `opacity ${duration}ms ease-in-out`, + * opacity: 0, + * } + * + * const transitionStyles = { + * entering: { opacity: 0 }, + * entered: { opacity: 1 }, + * }; + * + * const Fade = ({ in: inProp }) => ( + * + * {state => ( + *
    + * I'm a fade Transition! + *
    + * )} + *
    + * ); + * ``` + * + * There are 4 main states a Transition can be in: + * - `'entering'` + * - `'entered'` + * - `'exiting'` + * - `'exited'` + * + * Transition state is toggled via the `in` prop. When `true` the component + * begins the "Enter" stage. During this stage, the component will shift from + * its current transition state, to `'entering'` for the duration of the + * transition and then to the `'entered'` stage once it's complete. Let's take + * the following example (we'll use the + * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook): + * + * ```jsx + * function App() { + * const [inProp, setInProp] = useState(false); + * return ( + *
    + * + * {state => ( + * // ... + * )} + * + * + *
    + * ); + * } + * ``` + * + * When the button is clicked the component will shift to the `'entering'` state + * and stay there for 500ms (the value of `timeout`) before it finally switches + * to `'entered'`. + * + * When `in` is `false` the same thing happens except the state moves from + * `'exiting'` to `'exited'`. + */ + +exports.EXITING = EXITING; + +var Transition = +/*#__PURE__*/ +function (_React$Component) { + _inheritsLoose(Transition, _React$Component); + + function Transition(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears + + var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; + var initialStatus; + _this.appearStatus = null; + + if (props.in) { + if (appear) { + initialStatus = EXITED; + _this.appearStatus = ENTERING; + } else { + initialStatus = ENTERED; + } + } else { + if (props.unmountOnExit || props.mountOnEnter) { + initialStatus = UNMOUNTED; + } else { + initialStatus = EXITED; + } + } + + _this.state = { + status: initialStatus + }; + _this.nextCallback = null; + return _this; + } + + var _proto = Transition.prototype; + + _proto.getChildContext = function getChildContext() { + return { + transitionGroup: null // allows for nested Transitions + + }; + }; + + Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { + var nextIn = _ref.in; + + if (nextIn && prevState.status === UNMOUNTED) { + return { + status: EXITED + }; + } + + return null; + }; // getSnapshotBeforeUpdate(prevProps) { + // let nextStatus = null + // if (prevProps !== this.props) { + // const { status } = this.state + // if (this.props.in) { + // if (status !== ENTERING && status !== ENTERED) { + // nextStatus = ENTERING + // } + // } else { + // if (status === ENTERING || status === ENTERED) { + // nextStatus = EXITING + // } + // } + // } + // return { nextStatus } + // } + + + _proto.componentDidMount = function componentDidMount() { + this.updateStatus(true, this.appearStatus); + }; + + _proto.componentDidUpdate = function componentDidUpdate(prevProps) { + var nextStatus = null; + + if (prevProps !== this.props) { + var status = this.state.status; + + if (this.props.in) { + if (status !== ENTERING && status !== ENTERED) { + nextStatus = ENTERING; + } + } else { + if (status === ENTERING || status === ENTERED) { + nextStatus = EXITING; + } + } + } + + this.updateStatus(false, nextStatus); + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.cancelNextCallback(); + }; + + _proto.getTimeouts = function getTimeouts() { + var timeout = this.props.timeout; + var exit, enter, appear; + exit = enter = appear = timeout; + + if (timeout != null && typeof timeout !== 'number') { + exit = timeout.exit; + enter = timeout.enter; // TODO: remove fallback for next major + + appear = timeout.appear !== undefined ? timeout.appear : enter; + } + + return { + exit: exit, + enter: enter, + appear: appear + }; + }; + + _proto.updateStatus = function updateStatus(mounting, nextStatus) { + if (mounting === void 0) { + mounting = false; + } + + if (nextStatus !== null) { + // nextStatus will always be ENTERING or EXITING. + this.cancelNextCallback(); + + var node = _reactDom.default.findDOMNode(this); + + if (nextStatus === ENTERING) { + this.performEnter(node, mounting); + } else { + this.performExit(node); + } + } else if (this.props.unmountOnExit && this.state.status === EXITED) { + this.setState({ + status: UNMOUNTED + }); + } + }; + + _proto.performEnter = function performEnter(node, mounting) { + var _this2 = this; + + var enter = this.props.enter; + var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting; + var timeouts = this.getTimeouts(); + var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED + // if we are mounting and running this it means appear _must_ be set + + if (!mounting && !enter) { + this.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(node); + }); + return; + } + + this.props.onEnter(node, appearing); + this.safeSetState({ + status: ENTERING + }, function () { + _this2.props.onEntering(node, appearing); + + _this2.onTransitionEnd(node, enterTimeout, function () { + _this2.safeSetState({ + status: ENTERED + }, function () { + _this2.props.onEntered(node, appearing); + }); + }); + }); + }; + + _proto.performExit = function performExit(node) { + var _this3 = this; + + var exit = this.props.exit; + var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED + + if (!exit) { + this.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(node); + }); + return; + } + + this.props.onExit(node); + this.safeSetState({ + status: EXITING + }, function () { + _this3.props.onExiting(node); + + _this3.onTransitionEnd(node, timeouts.exit, function () { + _this3.safeSetState({ + status: EXITED + }, function () { + _this3.props.onExited(node); + }); + }); + }); + }; + + _proto.cancelNextCallback = function cancelNextCallback() { + if (this.nextCallback !== null) { + this.nextCallback.cancel(); + this.nextCallback = null; + } + }; + + _proto.safeSetState = function safeSetState(nextState, callback) { + // This shouldn't be necessary, but there are weird race conditions with + // setState callbacks and unmounting in testing, so always make sure that + // we can cancel any pending setState callbacks after we unmount. + callback = this.setNextCallback(callback); + this.setState(nextState, callback); + }; + + _proto.setNextCallback = function setNextCallback(callback) { + var _this4 = this; + + var active = true; + + this.nextCallback = function (event) { + if (active) { + active = false; + _this4.nextCallback = null; + callback(event); + } + }; + + this.nextCallback.cancel = function () { + active = false; + }; + + return this.nextCallback; + }; + + _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) { + this.setNextCallback(handler); + var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; + + if (!node || doesNotHaveTimeoutOrListener) { + setTimeout(this.nextCallback, 0); + return; + } + + if (this.props.addEndListener) { + this.props.addEndListener(node, this.nextCallback); + } + + if (timeout != null) { + setTimeout(this.nextCallback, timeout); + } + }; + + _proto.render = function render() { + var status = this.state.status; + + if (status === UNMOUNTED) { + return null; + } + + var _this$props = this.props, + children = _this$props.children, + childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition + + + delete childProps.in; + delete childProps.mountOnEnter; + delete childProps.unmountOnExit; + delete childProps.appear; + delete childProps.enter; + delete childProps.exit; + delete childProps.timeout; + delete childProps.addEndListener; + delete childProps.onEnter; + delete childProps.onEntering; + delete childProps.onEntered; + delete childProps.onExit; + delete childProps.onExiting; + delete childProps.onExited; + + if (typeof children === 'function') { + return children(status, childProps); + } + + var child = _react.default.Children.only(children); + + return _react.default.cloneElement(child, childProps); + }; + + return Transition; +}(_react.default.Component); + +Transition.contextTypes = { + transitionGroup: PropTypes.object +}; +Transition.childContextTypes = { + transitionGroup: function transitionGroup() {} +}; +Transition.propTypes = false ? undefined : {}; + +function noop() {} + +Transition.defaultProps = { + in: false, + mountOnEnter: false, + unmountOnExit: false, + appear: false, + enter: true, + exit: true, + onEnter: noop, + onEntering: noop, + onEntered: noop, + onExit: noop, + onExiting: noop, + onExited: noop +}; +Transition.UNMOUNTED = 0; +Transition.EXITED = 1; +Transition.ENTERING = 2; +Transition.ENTERED = 3; +Transition.EXITING = 4; + +var _default = (0, _reactLifecyclesCompat.polyfill)(Transition); + +exports.default = _default; + +/***/ }), +/* 585 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.classNamesShape = exports.timeoutsShape = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var timeoutsShape = false ? undefined : null; +exports.timeoutsShape = timeoutsShape; +var classNamesShape = false ? undefined : null; +exports.classNamesShape = classNamesShape; + +/***/ }), +/* 586 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; +exports.default = void 0; + +var _propTypes = _interopRequireDefault(__webpack_require__(2)); + +var _react = _interopRequireDefault(__webpack_require__(1)); + +var _reactLifecyclesCompat = __webpack_require__(141); + +var _ChildMapping = __webpack_require__(1505); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +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 _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 _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +var values = Object.values || function (obj) { + return Object.keys(obj).map(function (k) { + return obj[k]; + }); +}; + +var defaultProps = { + component: 'div', + childFactory: function childFactory(child) { + return child; + } + /** + * The `` component manages a set of transition components + * (`` and ``) in a list. Like with the transition + * components, `` is a state machine for managing the mounting + * and unmounting of components over time. + * + * Consider the example below. As items are removed or added to the TodoList the + * `in` prop is toggled automatically by the ``. + * + * Note that `` does not define any animation behavior! + * Exactly _how_ a list item animates is up to the individual transition + * component. This means you can mix and match animations across different list + * items. + */ + +}; + +var TransitionGroup = +/*#__PURE__*/ +function (_React$Component) { + _inheritsLoose(TransitionGroup, _React$Component); + + function TransitionGroup(props, context) { + var _this; + + _this = _React$Component.call(this, props, context) || this; + + var handleExited = _this.handleExited.bind(_assertThisInitialized(_assertThisInitialized(_this))); // Initial children should all be entering, dependent on appear + + + _this.state = { + handleExited: handleExited, + firstRender: true + }; + return _this; + } + + var _proto = TransitionGroup.prototype; + + _proto.getChildContext = function getChildContext() { + return { + transitionGroup: { + isMounting: !this.appeared + } + }; + }; + + _proto.componentDidMount = function componentDidMount() { + this.appeared = true; + this.mounted = true; + }; + + _proto.componentWillUnmount = function componentWillUnmount() { + this.mounted = false; + }; + + TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) { + var prevChildMapping = _ref.children, + handleExited = _ref.handleExited, + firstRender = _ref.firstRender; + return { + children: firstRender ? (0, _ChildMapping.getInitialChildMapping)(nextProps, handleExited) : (0, _ChildMapping.getNextChildMapping)(nextProps, prevChildMapping, handleExited), + firstRender: false + }; + }; + + _proto.handleExited = function handleExited(child, node) { + var currentChildMapping = (0, _ChildMapping.getChildMapping)(this.props.children); + if (child.key in currentChildMapping) return; + + if (child.props.onExited) { + child.props.onExited(node); + } + + if (this.mounted) { + this.setState(function (state) { + var children = _extends({}, state.children); + + delete children[child.key]; + return { + children: children + }; + }); + } + }; + + _proto.render = function render() { + var _this$props = this.props, + Component = _this$props.component, + childFactory = _this$props.childFactory, + props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]); + + var children = values(this.state.children).map(childFactory); + delete props.appear; + delete props.enter; + delete props.exit; + + if (Component === null) { + return children; + } + + return _react.default.createElement(Component, props, children); + }; + + return TransitionGroup; +}(_react.default.Component); + +TransitionGroup.childContextTypes = { + transitionGroup: _propTypes.default.object.isRequired +}; +TransitionGroup.propTypes = false ? undefined : {}; +TransitionGroup.defaultProps = defaultProps; + +var _default = (0, _reactLifecyclesCompat.polyfill)(TransitionGroup); + +exports.default = _default; +module.exports = exports["default"]; + +/***/ }), +/* 587 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"name\":\"strapi-plugin-content-type-builder\",\"version\":\"3.0.0-beta.19.4\",\"description\":\"Strapi plugin to create content type (API).\",\"strapi\":{\"name\":\"Content Type Builder\",\"icon\":\"paint-brush\",\"description\":\"content-type-builder.plugin.description\"},\"dependencies\":{\"@sindresorhus/slugify\":\"0.9.1\",\"classnames\":\"^2.2.6\",\"fs-extra\":\"^7.0.0\",\"immutable\":\"^3.8.2\",\"invariant\":\"^2.2.1\",\"lodash\":\"^4.17.11\",\"pluralize\":\"^7.0.0\",\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\",\"react-intl\":\"^2.8.0\",\"react-redux\":\"7.0.2\",\"react-router\":\"^5.0.0\",\"react-router-dom\":\"^5.0.0\",\"react-transition-group\":\"^2.5.0\",\"reactstrap\":\"^5.0.0\",\"redux\":\"^4.0.1\",\"redux-immutable\":\"^4.0.0\",\"reselect\":\"^3.0.1\",\"strapi-generate\":\"3.0.0-beta.19.4\",\"strapi-generate-api\":\"3.0.0-beta.19.4\",\"strapi-helper-plugin\":\"3.0.0-beta.19.4\",\"strapi-utils\":\"3.0.0-beta.19.4\",\"yup\":\"^0.27.0\"},\"author\":{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"},\"maintainers\":[{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"}],\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strapi/strapi.git\"},\"engines\":{\"node\":\">=10.0.0\",\"npm\":\">=6.0.0\"},\"license\":\"MIT\",\"gitHead\":\"24bd311678a5ce8901bbeb9df1aae79c2f5ed096\"}"); + +/***/ }), +/* 588 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var DataManagerContext=(0,_react.createContext)();var _default=DataManagerContext;exports["default"]=_default; + +/***/ }), +/* 589 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SCROLL_DIRECTION_VERTICAL = exports.SCROLL_DIRECTION_HORIZONTAL = exports.SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_BACKWARD = undefined; +exports.default = defaultOverscanIndicesGetter; + +var _types = __webpack_require__(114); + +var SCROLL_DIRECTION_BACKWARD = exports.SCROLL_DIRECTION_BACKWARD = -1; + +var SCROLL_DIRECTION_FORWARD = exports.SCROLL_DIRECTION_FORWARD = 1; + +var SCROLL_DIRECTION_HORIZONTAL = exports.SCROLL_DIRECTION_HORIZONTAL = 'horizontal'; +var SCROLL_DIRECTION_VERTICAL = exports.SCROLL_DIRECTION_VERTICAL = 'vertical'; + +/** + * Calculates the number of cells to overscan before and after a specified range. + * This function ensures that overscanning doesn't exceed the available cells. + */ + +function defaultOverscanIndicesGetter(_ref) { + var cellCount = _ref.cellCount, + overscanCellsCount = _ref.overscanCellsCount, + scrollDirection = _ref.scrollDirection, + startIndex = _ref.startIndex, + stopIndex = _ref.stopIndex; + + if (scrollDirection === SCROLL_DIRECTION_FORWARD) { + return { + overscanStartIndex: Math.max(0, startIndex), + overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount) + }; + } else { + return { + overscanStartIndex: Math.max(0, startIndex - overscanCellsCount), + overscanStopIndex: Math.min(cellCount - 1, stopIndex) + }; + } +} + +/***/ }), +/* 590 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultCellRangeRenderer; + +var _types = __webpack_require__(114); + +/** + * Default implementation of cellRangeRenderer used by Grid. + * This renderer supports cell-caching while the user is scrolling. + */ + +function defaultCellRangeRenderer(_ref) { + var cellCache = _ref.cellCache, + cellRenderer = _ref.cellRenderer, + columnSizeAndPositionManager = _ref.columnSizeAndPositionManager, + columnStartIndex = _ref.columnStartIndex, + columnStopIndex = _ref.columnStopIndex, + deferredMeasurementCache = _ref.deferredMeasurementCache, + horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment, + isScrolling = _ref.isScrolling, + isScrollingOptOut = _ref.isScrollingOptOut, + parent = _ref.parent, + rowSizeAndPositionManager = _ref.rowSizeAndPositionManager, + rowStartIndex = _ref.rowStartIndex, + rowStopIndex = _ref.rowStopIndex, + styleCache = _ref.styleCache, + verticalOffsetAdjustment = _ref.verticalOffsetAdjustment, + visibleColumnIndices = _ref.visibleColumnIndices, + visibleRowIndices = _ref.visibleRowIndices; + + var renderedCells = []; + + // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes). + // User cannot scroll beyond these size limitations. + // In order to work around this, ScalingCellSizeAndPositionManager compresses offsets. + // We should never cache styles for compressed offsets though as this can lead to bugs. + // See issue #576 for more. + var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted(); + + var canCacheStyle = !isScrolling && !areOffsetsAdjusted; + + for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) { + var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex); + + for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) { + var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex); + var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop; + var key = rowIndex + '-' + columnIndex; + var style = void 0; + + // Cache style objects so shallow-compare doesn't re-render unnecessarily. + if (canCacheStyle && styleCache[key]) { + style = styleCache[key]; + } else { + // In deferred mode, cells will be initially rendered before we know their size. + // Don't interfere with CellMeasurer's measurements by setting an invalid size. + if (deferredMeasurementCache && !deferredMeasurementCache.has(rowIndex, columnIndex)) { + // Position not-yet-measured cells at top/left 0,0, + // And give them width/height of 'auto' so they can grow larger than the parent Grid if necessary. + // Positioning them further to the right/bottom influences their measured size. + style = { + height: 'auto', + left: 0, + position: 'absolute', + top: 0, + width: 'auto' + }; + } else { + style = { + height: rowDatum.size, + left: columnDatum.offset + horizontalOffsetAdjustment, + position: 'absolute', + top: rowDatum.offset + verticalOffsetAdjustment, + width: columnDatum.size + }; + + styleCache[key] = style; + } + } + + var cellRendererParams = { + columnIndex: columnIndex, + isScrolling: isScrolling, + isVisible: isVisible, + key: key, + parent: parent, + rowIndex: rowIndex, + style: style + }; + + var renderedCell = void 0; + + // Avoid re-creating cells while scrolling. + // This can lead to the same cell being created many times and can cause performance issues for "heavy" cells. + // If a scroll is in progress- cache and reuse cells. + // This cache will be thrown away once scrolling completes. + // However if we are scaling scroll positions and sizes, we should also avoid caching. + // This is because the offset changes slightly as scroll position changes and caching leads to stale values. + // For more info refer to issue #395 + // + // If isScrollingOptOut is specified, we always cache cells. + // For more info refer to issue #1028 + if ((isScrollingOptOut || isScrolling) && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) { + if (!cellCache[key]) { + cellCache[key] = cellRenderer(cellRendererParams); + } + + renderedCell = cellCache[key]; + + // If the user is no longer scrolling, don't cache cells. + // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint. + } else { + renderedCell = cellRenderer(cellRendererParams); + } + + if (renderedCell == null || renderedCell === false) { + continue; + } + + if (false) {} + + renderedCells.push(renderedCell); + } + } + + return renderedCells; +} + +function warnAboutMissingStyle(parent, renderedCell) { + if (false) {} +} + +/***/ }), +/* 591 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(0); + +exports.__esModule = true; +exports.default = scrollbarSize; + +var _canUseDOM = _interopRequireDefault(__webpack_require__(1546)); + +var size; + +function scrollbarSize(recalc) { + if (!size && size !== 0 || recalc) { + if (_canUseDOM.default) { + var scrollDiv = document.createElement('div'); + scrollDiv.style.position = 'absolute'; + scrollDiv.style.top = '-9999px'; + scrollDiv.style.width = '50px'; + scrollDiv.style.height = '50px'; + scrollDiv.style.overflow = 'scroll'; + document.body.appendChild(scrollDiv); + size = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + } + } + + return size; +} + +module.exports = exports["default"]; + +/***/ }), +/* 592 */ +/***/ (function(module, exports, __webpack_require__) { + +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(91); +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; + } +}; + + +/***/ }), +/* 593 */ +/***/ (function(module, exports, __webpack_require__) { + +// check on default Array iterator +var Iterators = __webpack_require__(170); +var ITERATOR = __webpack_require__(65)('iterator'); +var ArrayProto = Array.prototype; + +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; + + +/***/ }), +/* 594 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(91); +var aFunction = __webpack_require__(214); +var SPECIES = __webpack_require__(65)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; + + +/***/ }), +/* 595 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(153); +var invoke = __webpack_require__(1552); +var html = __webpack_require__(533); +var cel = __webpack_require__(277); +var global = __webpack_require__(59); +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__(191)(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 +}; + + +/***/ }), +/* 596 */ +/***/ (function(module, exports) { + +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; + + +/***/ }), +/* 597 */ +/***/ (function(module, exports, __webpack_require__) { + +var anObject = __webpack_require__(91); +var isObject = __webpack_require__(109); +var newPromiseCapability = __webpack_require__(341); + +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; +}; + + +/***/ }), +/* 598 */ +/***/ (function(module, exports, __webpack_require__) { + +var ITERATOR = __webpack_require__(65)('iterator'); +var SAFE_CLOSING = false; + +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 */ } + +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; +}; + + +/***/ }), +/* 599 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.bpfrpt_proptype_ScrollIndices = undefined; + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var bpfrpt_proptype_ScrollIndices = true ? null : undefined; +exports.bpfrpt_proptype_ScrollIndices = bpfrpt_proptype_ScrollIndices; + +/***/ }), +/* 600 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) { + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = createDetectElementResize; +/** + * Detect Element Resize. + * https://github.com/sdecima/javascript-detect-element-resize + * Sebastian Decima + * + * Forked from version 0.5.3; includes the following modifications: + * 1) Guard against unsafe 'window' and 'document' references (to support SSR). + * 2) Defer initialization code via a top-level function wrapper (to support SSR). + * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children. + * 4) Add nonce for style element. + * 5) Added support for injecting custom window object + **/ + +function createDetectElementResize(nonce, hostWindow) { + // Check `document` and `window` in case of server-side rendering + var _window; + if (typeof hostWindow !== 'undefined') { + _window = hostWindow; + } else if (typeof window !== 'undefined') { + _window = window; + } else if (typeof self !== 'undefined') { + _window = self; + } else { + _window = global; + } + + var attachEvent = typeof _window.document !== 'undefined' && _window.document.attachEvent; + + if (!attachEvent) { + var requestFrame = function () { + var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) { + return _window.setTimeout(fn, 20); + }; + return function (fn) { + return raf(fn); + }; + }(); + + var cancelFrame = function () { + var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout; + return function (id) { + return cancel(id); + }; + }(); + + var resetTriggers = function resetTriggers(element) { + var triggers = element.__resizeTriggers__, + expand = triggers.firstElementChild, + contract = triggers.lastElementChild, + expandChild = expand.firstElementChild; + contract.scrollLeft = contract.scrollWidth; + contract.scrollTop = contract.scrollHeight; + expandChild.style.width = expand.offsetWidth + 1 + 'px'; + expandChild.style.height = expand.offsetHeight + 1 + 'px'; + expand.scrollLeft = expand.scrollWidth; + expand.scrollTop = expand.scrollHeight; + }; + + var checkTriggers = function checkTriggers(element) { + return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height; + }; + + var scrollListener = function scrollListener(e) { + // Don't measure (which forces) reflow for scrolls that happen inside of children! + if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) { + return; + } + + var element = this; + resetTriggers(this); + if (this.__resizeRAF__) { + cancelFrame(this.__resizeRAF__); + } + this.__resizeRAF__ = requestFrame(function () { + if (checkTriggers(element)) { + element.__resizeLast__.width = element.offsetWidth; + element.__resizeLast__.height = element.offsetHeight; + element.__resizeListeners__.forEach(function (fn) { + fn.call(element, e); + }); + } + }); + }; + + /* Detect CSS Animations support to detect element display/re-attach */ + var animation = false, + keyframeprefix = '', + animationstartevent = 'animationstart', + domPrefixes = 'Webkit Moz O ms'.split(' '), + startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '), + pfx = ''; + { + var elm = _window.document.createElement('fakeelement'); + if (elm.style.animationName !== undefined) { + animation = true; + } + + if (animation === false) { + for (var i = 0; i < domPrefixes.length; i++) { + if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) { + pfx = domPrefixes[i]; + keyframeprefix = '-' + pfx.toLowerCase() + '-'; + animationstartevent = startEvents[i]; + animation = true; + break; + } + } + } + } + + var animationName = 'resizeanim'; + var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } '; + var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; '; + } + + var createStyles = function createStyles(doc) { + if (!doc.getElementById('detectElementResize')) { + //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360 + var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', + head = doc.head || doc.getElementsByTagName('head')[0], + style = doc.createElement('style'); + + style.id = 'detectElementResize'; + style.type = 'text/css'; + + if (nonce != null) { + style.setAttribute('nonce', nonce); + } + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(doc.createTextNode(css)); + } + + head.appendChild(style); + } + }; + + var addResizeListener = function addResizeListener(element, fn) { + if (attachEvent) { + element.attachEvent('onresize', fn); + } else { + if (!element.__resizeTriggers__) { + var doc = element.ownerDocument; + var elementStyle = _window.getComputedStyle(element); + if (elementStyle && elementStyle.position == 'static') { + element.style.position = 'relative'; + } + createStyles(doc); + element.__resizeLast__ = {}; + element.__resizeListeners__ = []; + (element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers'; + element.__resizeTriggers__.innerHTML = '
    ' + '
    '; + element.appendChild(element.__resizeTriggers__); + resetTriggers(element); + element.addEventListener('scroll', scrollListener, true); + + /* Listen for a css animation to detect element display/re-attach */ + if (animationstartevent) { + element.__resizeTriggers__.__animationListener__ = function animationListener(e) { + if (e.animationName == animationName) { + resetTriggers(element); + } + }; + element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__); + } + } + element.__resizeListeners__.push(fn); + } + }; + + var removeResizeListener = function removeResizeListener(element, fn) { + if (attachEvent) { + element.detachEvent('onresize', fn); + } else { + element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1); + if (!element.__resizeListeners__.length) { + element.removeEventListener('scroll', scrollListener, true); + if (element.__resizeTriggers__.__animationListener__) { + element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__); + element.__resizeTriggers__.__animationListener__ = null; + } + try { + element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__); + } catch (e) { + // Preact compat; see developit/preact-compat/issues/228 + } + } + } + }; + + return { + addResizeListener: addResizeListener, + removeResizeListener: removeResizeListener + }; +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), +/* 601 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.CellMeasurerCache = exports.CellMeasurer = undefined; + +var _CellMeasurer = __webpack_require__(1563); + +var _CellMeasurer2 = _interopRequireDefault(_CellMeasurer); + +var _CellMeasurerCache = __webpack_require__(1564); + +var _CellMeasurerCache2 = _interopRequireDefault(_CellMeasurerCache); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +exports.default = _CellMeasurer2.default; +exports.CellMeasurer = _CellMeasurer2.default; +exports.CellMeasurerCache = _CellMeasurerCache2.default; + +/***/ }), +/* 602 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.bpfrpt_proptype_CellMeasureCache = undefined; + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var bpfrpt_proptype_CellMeasureCache = true ? null : undefined; +exports.bpfrpt_proptype_CellMeasureCache = bpfrpt_proptype_CellMeasureCache; + +/***/ }), +/* 603 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.bpfrpt_proptype_Scroll = exports.bpfrpt_proptype_RenderedRows = exports.bpfrpt_proptype_RowRenderer = exports.bpfrpt_proptype_RowRendererParams = undefined; + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +var bpfrpt_proptype_RowRendererParams = true ? null : undefined; +var bpfrpt_proptype_RowRenderer = true ? null : undefined; +var bpfrpt_proptype_RenderedRows = true ? null : undefined; +var bpfrpt_proptype_Scroll = true ? null : undefined; +exports.bpfrpt_proptype_RowRendererParams = bpfrpt_proptype_RowRendererParams; +exports.bpfrpt_proptype_RowRenderer = bpfrpt_proptype_RowRenderer; +exports.bpfrpt_proptype_RenderedRows = bpfrpt_proptype_RenderedRows; +exports.bpfrpt_proptype_Scroll = bpfrpt_proptype_Scroll; + +/***/ }), +/* 604 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.bpfrpt_proptype_Positioner = exports.bpfrpt_proptype_CellMeasurerCache = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = undefined; + +var _extends2 = __webpack_require__(79); + +var _extends3 = _interopRequireDefault(_extends2); + +var _defineProperty2 = __webpack_require__(1588); + +var _defineProperty3 = _interopRequireDefault(_defineProperty2); + +var _getPrototypeOf = __webpack_require__(60); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(34); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(39); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(50); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(51); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _clsx = __webpack_require__(171); + +var _clsx2 = _interopRequireDefault(_clsx); + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _reactLifecyclesCompat = __webpack_require__(141); + +var _PositionCache = __webpack_require__(1589); + +var _PositionCache2 = _interopRequireDefault(_PositionCache); + +var _requestAnimationTimeout = __webpack_require__(338); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var emptyObject = {}; + +/** + * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. + * This improves performance and makes scrolling smoother. + */ + +var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = exports.DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150; + +/** + * This component efficiently displays arbitrarily positioned cells using windowing techniques. + * Cell position is determined by an injected `cellPositioner` property. + * Windowing is vertical; this component does not support horizontal scrolling. + * + * Rendering occurs in two phases: + * 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch. + * Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled. + * After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells + * in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes). + * All measurements are permanently cached (keyed by `keyMapper`) for performance purposes. + * 2) Second pass uses the external `cellPositioner` to layout cells. + * At this time the positioner has access to cached size measurements for all cells. + * The positions it returns are cached by Masonry for fast access later. + * Phase one is repeated if the user scrolls beyond the current layout's bounds. + * If the layout is invalidated due to eg a resize, cached positions can be cleared using `recomputeCellPositions()`. + * + * Animation constraints: + * Simple animations are supported (eg translate/slide into place on initial reveal). + * More complex animations are not (eg flying from one position to another on resize). + * + * Layout constraints: + * This component supports multi-column layout. + * The height of each item may vary. + * The width of each item must not exceed the width of the column it is "in". + * The left position of all items within a column must align. + * (Items may not span multiple columns.) + */ + +var Masonry = function (_React$PureComponent) { + (0, _inherits3.default)(Masonry, _React$PureComponent); + + function Masonry() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, Masonry); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Masonry.__proto__ || (0, _getPrototypeOf2.default)(Masonry)).call.apply(_ref, [this].concat(args))), _this), _this.state = { + isScrolling: false, + scrollTop: 0 + }, _this._invalidateOnUpdateStartIndex = null, _this._invalidateOnUpdateStopIndex = null, _this._positionCache = new _PositionCache2.default(), _this._startIndex = null, _this._startIndexMemoized = null, _this._stopIndex = null, _this._stopIndexMemoized = null, _this._debounceResetIsScrollingCallback = function () { + _this.setState({ + isScrolling: false + }); + }, _this._setScrollingContainerRef = function (ref) { + _this._scrollingContainer = ref; + }, _this._onScroll = function (event) { + var height = _this.props.height; + + + var eventScrollTop = event.currentTarget.scrollTop; + + // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events, + // Gradually converging on a scrollTop that is within the bounds of the new, smaller height. + // This causes a series of rapid renders that is slow for long lists. + // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds. + var scrollTop = Math.min(Math.max(0, _this._getEstimatedTotalHeight() - height), eventScrollTop); + + // On iOS, we can arrive at negative offsets by swiping past the start or end. + // Avoid re-rendering in this case as it can cause problems; see #532 for more. + if (eventScrollTop !== scrollTop) { + return; + } + + // Prevent pointer events from interrupting a smooth scroll + _this._debounceResetIsScrolling(); + + // Certain devices (like Apple touchpad) rapid-fire duplicate events. + // Don't force a re-render if this is the case. + // The mouse may move faster then the animation frame does. + // Use requestAnimationFrame to avoid over-updating. + if (_this.state.scrollTop !== scrollTop) { + _this.setState({ + isScrolling: true, + scrollTop: scrollTop + }); + } + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(Masonry, [{ + key: 'clearCellPositions', + value: function clearCellPositions() { + this._positionCache = new _PositionCache2.default(); + this.forceUpdate(); + } + + // HACK This method signature was intended for Grid + + }, { + key: 'invalidateCellSizeAfterRender', + value: function invalidateCellSizeAfterRender(_ref2) { + var index = _ref2.rowIndex; + + if (this._invalidateOnUpdateStartIndex === null) { + this._invalidateOnUpdateStartIndex = index; + this._invalidateOnUpdateStopIndex = index; + } else { + this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, index); + this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, index); + } + } + }, { + key: 'recomputeCellPositions', + value: function recomputeCellPositions() { + var stopIndex = this._positionCache.count - 1; + + this._positionCache = new _PositionCache2.default(); + this._populatePositionCache(0, stopIndex); + + this.forceUpdate(); + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + this._checkInvalidateOnUpdate(); + this._invokeOnScrollCallback(); + this._invokeOnCellsRenderedCallback(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + this._checkInvalidateOnUpdate(); + this._invokeOnScrollCallback(); + this._invokeOnCellsRenderedCallback(); + + if (this.props.scrollTop !== prevProps.scrollTop) { + this._debounceResetIsScrolling(); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this._debounceResetIsScrollingId) { + (0, _requestAnimationTimeout.cancelAnimationTimeout)(this._debounceResetIsScrollingId); + } + } + }, { + key: 'render', + value: function render() { + var _this2 = this; + + var _props = this.props, + autoHeight = _props.autoHeight, + cellCount = _props.cellCount, + cellMeasurerCache = _props.cellMeasurerCache, + cellRenderer = _props.cellRenderer, + className = _props.className, + height = _props.height, + id = _props.id, + keyMapper = _props.keyMapper, + overscanByPixels = _props.overscanByPixels, + role = _props.role, + style = _props.style, + tabIndex = _props.tabIndex, + width = _props.width, + rowDirection = _props.rowDirection; + var _state = this.state, + isScrolling = _state.isScrolling, + scrollTop = _state.scrollTop; + + + var children = []; + + var estimateTotalHeight = this._getEstimatedTotalHeight(); + + var shortestColumnSize = this._positionCache.shortestColumnSize; + var measuredCellCount = this._positionCache.count; + + var startIndex = 0; + var stopIndex = void 0; + + this._positionCache.range(Math.max(0, scrollTop - overscanByPixels), height + overscanByPixels * 2, function (index, left, top) { + var _style; + + if (typeof stopIndex === 'undefined') { + startIndex = index; + stopIndex = index; + } else { + startIndex = Math.min(startIndex, index); + stopIndex = Math.max(stopIndex, index); + } + + children.push(cellRenderer({ + index: index, + isScrolling: isScrolling, + key: keyMapper(index), + parent: _this2, + style: (_style = { + height: cellMeasurerCache.getHeight(index) + }, (0, _defineProperty3.default)(_style, rowDirection === 'ltr' ? 'left' : 'right', left), (0, _defineProperty3.default)(_style, 'position', 'absolute'), (0, _defineProperty3.default)(_style, 'top', top), (0, _defineProperty3.default)(_style, 'width', cellMeasurerCache.getWidth(index)), _style) + })); + }); + + // We need to measure additional cells for this layout + if (shortestColumnSize < scrollTop + height + overscanByPixels && measuredCellCount < cellCount) { + var batchSize = Math.min(cellCount - measuredCellCount, Math.ceil((scrollTop + height + overscanByPixels - shortestColumnSize) / cellMeasurerCache.defaultHeight * width / cellMeasurerCache.defaultWidth)); + + for (var _index = measuredCellCount; _index < measuredCellCount + batchSize; _index++) { + stopIndex = _index; + + children.push(cellRenderer({ + index: _index, + isScrolling: isScrolling, + key: keyMapper(_index), + parent: this, + style: { + width: cellMeasurerCache.getWidth(_index) + } + })); + } + } + + this._startIndex = startIndex; + this._stopIndex = stopIndex; + + return React.createElement( + 'div', + { + ref: this._setScrollingContainerRef, + 'aria-label': this.props['aria-label'], + className: (0, _clsx2.default)('ReactVirtualized__Masonry', className), + id: id, + onScroll: this._onScroll, + role: role, + style: (0, _extends3.default)({ + boxSizing: 'border-box', + direction: 'ltr', + height: autoHeight ? 'auto' : height, + overflowX: 'hidden', + overflowY: estimateTotalHeight < height ? 'hidden' : 'auto', + position: 'relative', + width: width, + WebkitOverflowScrolling: 'touch', + willChange: 'transform' + }, style), + tabIndex: tabIndex }, + React.createElement( + 'div', + { + className: 'ReactVirtualized__Masonry__innerScrollContainer', + style: { + width: '100%', + height: estimateTotalHeight, + maxWidth: '100%', + maxHeight: estimateTotalHeight, + overflow: 'hidden', + pointerEvents: isScrolling ? 'none' : '', + position: 'relative' + } }, + children + ) + ); + } + }, { + key: '_checkInvalidateOnUpdate', + value: function _checkInvalidateOnUpdate() { + if (typeof this._invalidateOnUpdateStartIndex === 'number') { + var _startIndex = this._invalidateOnUpdateStartIndex; + var _stopIndex = this._invalidateOnUpdateStopIndex; + + this._invalidateOnUpdateStartIndex = null; + this._invalidateOnUpdateStopIndex = null; + + // Query external layout logic for position of newly-measured cells + this._populatePositionCache(_startIndex, _stopIndex); + + this.forceUpdate(); + } + } + }, { + key: '_debounceResetIsScrolling', + value: function _debounceResetIsScrolling() { + var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval; + + + if (this._debounceResetIsScrollingId) { + (0, _requestAnimationTimeout.cancelAnimationTimeout)(this._debounceResetIsScrollingId); + } + + this._debounceResetIsScrollingId = (0, _requestAnimationTimeout.requestAnimationTimeout)(this._debounceResetIsScrollingCallback, scrollingResetTimeInterval); + } + }, { + key: '_getEstimatedTotalHeight', + value: function _getEstimatedTotalHeight() { + var _props2 = this.props, + cellCount = _props2.cellCount, + cellMeasurerCache = _props2.cellMeasurerCache, + width = _props2.width; + + + var estimatedColumnCount = Math.max(1, Math.floor(width / cellMeasurerCache.defaultWidth)); + + return this._positionCache.estimateTotalHeight(cellCount, estimatedColumnCount, cellMeasurerCache.defaultHeight); + } + }, { + key: '_invokeOnScrollCallback', + value: function _invokeOnScrollCallback() { + var _props3 = this.props, + height = _props3.height, + onScroll = _props3.onScroll; + var scrollTop = this.state.scrollTop; + + + if (this._onScrollMemoized !== scrollTop) { + onScroll({ + clientHeight: height, + scrollHeight: this._getEstimatedTotalHeight(), + scrollTop: scrollTop + }); + + this._onScrollMemoized = scrollTop; + } + } + }, { + key: '_invokeOnCellsRenderedCallback', + value: function _invokeOnCellsRenderedCallback() { + if (this._startIndexMemoized !== this._startIndex || this._stopIndexMemoized !== this._stopIndex) { + var _onCellsRendered = this.props.onCellsRendered; + + + _onCellsRendered({ + startIndex: this._startIndex, + stopIndex: this._stopIndex + }); + + this._startIndexMemoized = this._startIndex; + this._stopIndexMemoized = this._stopIndex; + } + } + }, { + key: '_populatePositionCache', + value: function _populatePositionCache(startIndex, stopIndex) { + var _props4 = this.props, + cellMeasurerCache = _props4.cellMeasurerCache, + cellPositioner = _props4.cellPositioner; + + + for (var _index2 = startIndex; _index2 <= stopIndex; _index2++) { + var _cellPositioner = cellPositioner(_index2), + _left = _cellPositioner.left, + _top = _cellPositioner.top; + + this._positionCache.setPosition(_index2, _left, _top, cellMeasurerCache.getHeight(_index2)); + } + } + }], [{ + key: 'getDerivedStateFromProps', + value: function getDerivedStateFromProps(nextProps, prevState) { + if (nextProps.scrollTop !== undefined && prevState.scrollTop !== nextProps.scrollTop) { + return { + isScrolling: true, + scrollTop: nextProps.scrollTop + }; + } + + return null; + } + }]); + return Masonry; +}(React.PureComponent); + +Masonry.defaultProps = { + autoHeight: false, + keyMapper: identity, + onCellsRendered: noop, + onScroll: noop, + overscanByPixels: 20, + role: 'grid', + scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL, + style: emptyObject, + tabIndex: 0, + rowDirection: 'ltr' +}; +Masonry.propTypes = true ? null : undefined; + + +function identity(value) { + return value; +} + +function noop() {} + +var bpfrpt_proptype_CellMeasurerCache = true ? null : undefined; + + +(0, _reactLifecyclesCompat.polyfill)(Masonry); + +exports.default = Masonry; +var bpfrpt_proptype_Positioner = true ? null : undefined; +exports.bpfrpt_proptype_CellMeasurerCache = bpfrpt_proptype_CellMeasurerCache; +exports.bpfrpt_proptype_Positioner = bpfrpt_proptype_Positioner; + +/***/ }), +/* 605 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultCellDataGetter; + +var _types = __webpack_require__(197); + +/** + * Default accessor for returning a cell value for a given attribute. + * This function expects to operate on either a vanilla Object or an Immutable Map. + * You should override the column's cellDataGetter if your data is some other type of object. + */ +function defaultCellDataGetter(_ref) { + var dataKey = _ref.dataKey, + rowData = _ref.rowData; + + if (typeof rowData.get === 'function') { + return rowData.get(dataKey); + } else { + return rowData[dataKey]; + } +} + +/***/ }), +/* 606 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultCellRenderer; + +var _types = __webpack_require__(197); + +/** + * Default cell renderer that displays an attribute as a simple string + * You should override the column's cellRenderer if your data is some other type of object. + */ +function defaultCellRenderer(_ref) { + var cellData = _ref.cellData; + + if (cellData == null) { + return ''; + } else { + return String(cellData); + } +} + +/***/ }), +/* 607 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultHeaderRowRenderer; + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _types = __webpack_require__(197); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function defaultHeaderRowRenderer(_ref) { + var className = _ref.className, + columns = _ref.columns, + style = _ref.style; + + return React.createElement( + 'div', + { className: className, role: 'row', style: style }, + columns + ); +} +defaultHeaderRowRenderer.propTypes = true ? null : undefined; + +/***/ }), +/* 608 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = defaultHeaderRenderer; + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _SortIndicator = __webpack_require__(609); + +var _SortIndicator2 = _interopRequireDefault(_SortIndicator); + +var _types = __webpack_require__(197); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +/** + * Default table header renderer. + */ +function defaultHeaderRenderer(_ref) { + var dataKey = _ref.dataKey, + label = _ref.label, + sortBy = _ref.sortBy, + sortDirection = _ref.sortDirection; + + var showSortIndicator = sortBy === dataKey; + var children = [React.createElement( + 'span', + { + className: 'ReactVirtualized__Table__headerTruncatedText', + key: 'label', + title: typeof label === 'string' ? label : null }, + label + )]; + + if (showSortIndicator) { + children.push(React.createElement(_SortIndicator2.default, { key: 'SortIndicator', sortDirection: sortDirection })); + } + + return children; +} +defaultHeaderRenderer.propTypes = true ? null : undefined; + +/***/ }), +/* 609 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = SortIndicator; + +var _clsx = __webpack_require__(171); + +var _clsx2 = _interopRequireDefault(_clsx); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _SortDirection = __webpack_require__(249); + +var _SortDirection2 = _interopRequireDefault(_SortDirection); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Displayed beside a header to indicate that a Table is currently sorted by this column. + */ +function SortIndicator(_ref) { + var sortDirection = _ref.sortDirection; + + var classNames = (0, _clsx2.default)('ReactVirtualized__Table__sortableHeaderIcon', { + 'ReactVirtualized__Table__sortableHeaderIcon--ASC': sortDirection === _SortDirection2.default.ASC, + 'ReactVirtualized__Table__sortableHeaderIcon--DESC': sortDirection === _SortDirection2.default.DESC + }); + + return React.createElement( + 'svg', + { className: classNames, width: 18, height: 18, viewBox: '0 0 24 24' }, + sortDirection === _SortDirection2.default.ASC ? React.createElement('path', { d: 'M7 14l5-5 5 5z' }) : React.createElement('path', { d: 'M7 10l5 5 5-5z' }), + React.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }) + ); +} + +SortIndicator.propTypes = false ? undefined : {}; + +/***/ }), +/* 610 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _extends2 = __webpack_require__(79); + +var _extends3 = _interopRequireDefault(_extends2); + +exports.default = defaultRowRenderer; + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _types = __webpack_require__(197); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Default row renderer for Table. + */ +function defaultRowRenderer(_ref) { + var className = _ref.className, + columns = _ref.columns, + index = _ref.index, + key = _ref.key, + onRowClick = _ref.onRowClick, + onRowDoubleClick = _ref.onRowDoubleClick, + onRowMouseOut = _ref.onRowMouseOut, + onRowMouseOver = _ref.onRowMouseOver, + onRowRightClick = _ref.onRowRightClick, + rowData = _ref.rowData, + style = _ref.style; + + var a11yProps = { 'aria-rowindex': index + 1 }; + + if (onRowClick || onRowDoubleClick || onRowMouseOut || onRowMouseOver || onRowRightClick) { + a11yProps['aria-label'] = 'row'; + a11yProps.tabIndex = 0; + + if (onRowClick) { + a11yProps.onClick = function (event) { + return onRowClick({ event: event, index: index, rowData: rowData }); + }; + } + if (onRowDoubleClick) { + a11yProps.onDoubleClick = function (event) { + return onRowDoubleClick({ event: event, index: index, rowData: rowData }); + }; + } + if (onRowMouseOut) { + a11yProps.onMouseOut = function (event) { + return onRowMouseOut({ event: event, index: index, rowData: rowData }); + }; + } + if (onRowMouseOver) { + a11yProps.onMouseOver = function (event) { + return onRowMouseOver({ event: event, index: index, rowData: rowData }); + }; + } + if (onRowRightClick) { + a11yProps.onContextMenu = function (event) { + return onRowRightClick({ event: event, index: index, rowData: rowData }); + }; + } + } + + return React.createElement( + 'div', + (0, _extends3.default)({}, a11yProps, { + className: className, + key: key, + role: 'row', + style: style }), + columns + ); +} +defaultRowRenderer.propTypes = true ? null : undefined; + +/***/ }), +/* 611 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _getPrototypeOf = __webpack_require__(60); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(34); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _possibleConstructorReturn2 = __webpack_require__(50); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(51); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _defaultHeaderRenderer = __webpack_require__(608); + +var _defaultHeaderRenderer2 = _interopRequireDefault(_defaultHeaderRenderer); + +var _defaultCellRenderer = __webpack_require__(606); + +var _defaultCellRenderer2 = _interopRequireDefault(_defaultCellRenderer); + +var _defaultCellDataGetter = __webpack_require__(605); + +var _defaultCellDataGetter2 = _interopRequireDefault(_defaultCellDataGetter); + +var _SortDirection = __webpack_require__(249); + +var _SortDirection2 = _interopRequireDefault(_SortDirection); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Describes the header and cell contents of a table column. + */ +var Column = function (_React$Component) { + (0, _inherits3.default)(Column, _React$Component); + + function Column() { + (0, _classCallCheck3.default)(this, Column); + return (0, _possibleConstructorReturn3.default)(this, (Column.__proto__ || (0, _getPrototypeOf2.default)(Column)).apply(this, arguments)); + } + + return Column; +}(React.Component); + +Column.defaultProps = { + cellDataGetter: _defaultCellDataGetter2.default, + cellRenderer: _defaultCellRenderer2.default, + defaultSortDirection: _SortDirection2.default.ASC, + flexGrow: 0, + flexShrink: 1, + headerRenderer: _defaultHeaderRenderer2.default, + style: {} +}; +exports.default = Column; +Column.propTypes = false ? undefined : {}; + +/***/ }), +/* 612 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.IS_SCROLLING_TIMEOUT = undefined; + +var _extends2 = __webpack_require__(79); + +var _extends3 = _interopRequireDefault(_extends2); + +var _getPrototypeOf = __webpack_require__(60); + +var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); + +var _classCallCheck2 = __webpack_require__(34); + +var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +var _createClass2 = __webpack_require__(39); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _possibleConstructorReturn2 = __webpack_require__(50); + +var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); + +var _inherits2 = __webpack_require__(51); + +var _inherits3 = _interopRequireDefault(_inherits2); + +var _react = __webpack_require__(1); + +var React = _interopRequireWildcard(_react); + +var _reactDom = __webpack_require__(32); + +var ReactDOM = _interopRequireWildcard(_reactDom); + +var _onScroll = __webpack_require__(1608); + +var _dimensions = __webpack_require__(1609); + +var _detectElementResize = __webpack_require__(600); + +var _detectElementResize2 = _interopRequireDefault(_detectElementResize); + +var _propTypes = __webpack_require__(2); + +var _propTypes2 = _interopRequireDefault(_propTypes); + +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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress. + * This improves performance and makes scrolling smoother. + */ +var IS_SCROLLING_TIMEOUT = exports.IS_SCROLLING_TIMEOUT = 150; + +var getWindow = function getWindow() { + return typeof window !== 'undefined' ? window : undefined; +}; + +var WindowScroller = function (_React$PureComponent) { + (0, _inherits3.default)(WindowScroller, _React$PureComponent); + + function WindowScroller() { + var _ref; + + var _temp, _this, _ret; + + (0, _classCallCheck3.default)(this, WindowScroller); + + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WindowScroller.__proto__ || (0, _getPrototypeOf2.default)(WindowScroller)).call.apply(_ref, [this].concat(args))), _this), _this._window = getWindow(), _this._isMounted = false, _this._positionFromTop = 0, _this._positionFromLeft = 0, _this.state = (0, _extends3.default)({}, (0, _dimensions.getDimensions)(_this.props.scrollElement, _this.props), { + isScrolling: false, + scrollLeft: 0, + scrollTop: 0 + }), _this._registerChild = function (element) { + if (element && !(element instanceof Element)) { + console.warn('WindowScroller registerChild expects to be passed Element or null'); + } + _this._child = element; + _this.updatePosition(); + }, _this._onChildScroll = function (_ref2) { + var scrollTop = _ref2.scrollTop; + + if (_this.state.scrollTop === scrollTop) { + return; + } + + var scrollElement = _this.props.scrollElement; + if (scrollElement) { + if (typeof scrollElement.scrollTo === 'function') { + scrollElement.scrollTo(0, scrollTop + _this._positionFromTop); + } else { + scrollElement.scrollTop = scrollTop + _this._positionFromTop; + } + } + }, _this._registerResizeListener = function (element) { + if (element === window) { + window.addEventListener('resize', _this._onResize, false); + } else { + _this._detectElementResize.addResizeListener(element, _this._onResize); + } + }, _this._unregisterResizeListener = function (element) { + if (element === window) { + window.removeEventListener('resize', _this._onResize, false); + } else if (element) { + _this._detectElementResize.removeResizeListener(element, _this._onResize); + } + }, _this._onResize = function () { + _this.updatePosition(); + }, _this.__handleWindowScrollEvent = function () { + if (!_this._isMounted) { + return; + } + + var onScroll = _this.props.onScroll; + + + var scrollElement = _this.props.scrollElement; + if (scrollElement) { + var scrollOffset = (0, _dimensions.getScrollOffset)(scrollElement); + var _scrollLeft = Math.max(0, scrollOffset.left - _this._positionFromLeft); + var _scrollTop = Math.max(0, scrollOffset.top - _this._positionFromTop); + + _this.setState({ + isScrolling: true, + scrollLeft: _scrollLeft, + scrollTop: _scrollTop + }); + + onScroll({ + scrollLeft: _scrollLeft, + scrollTop: _scrollTop + }); + } + }, _this.__resetIsScrolling = function () { + _this.setState({ + isScrolling: false + }); + }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); + } + + (0, _createClass3.default)(WindowScroller, [{ + key: 'updatePosition', + value: function updatePosition() { + var scrollElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.scrollElement; + var onResize = this.props.onResize; + var _state = this.state, + height = _state.height, + width = _state.width; + + + var thisNode = this._child || ReactDOM.findDOMNode(this); + if (thisNode instanceof Element && scrollElement) { + var offset = (0, _dimensions.getPositionOffset)(thisNode, scrollElement); + this._positionFromTop = offset.top; + this._positionFromLeft = offset.left; + } + + var dimensions = (0, _dimensions.getDimensions)(scrollElement, this.props); + if (height !== dimensions.height || width !== dimensions.width) { + this.setState({ + height: dimensions.height, + width: dimensions.width + }); + onResize({ + height: dimensions.height, + width: dimensions.width + }); + } + } + }, { + key: 'componentDidMount', + value: function componentDidMount() { + var scrollElement = this.props.scrollElement; + + this._detectElementResize = (0, _detectElementResize2.default)(); + + this.updatePosition(scrollElement); + + if (scrollElement) { + (0, _onScroll.registerScrollListener)(this, scrollElement); + this._registerResizeListener(scrollElement); + } + + this._isMounted = true; + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + var scrollElement = this.props.scrollElement; + var prevScrollElement = prevProps.scrollElement; + + + if (prevScrollElement !== scrollElement && prevScrollElement != null && scrollElement != null) { + this.updatePosition(scrollElement); + + (0, _onScroll.unregisterScrollListener)(this, prevScrollElement); + (0, _onScroll.registerScrollListener)(this, scrollElement); + + this._unregisterResizeListener(prevScrollElement); + this._registerResizeListener(scrollElement); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + var scrollElement = this.props.scrollElement; + if (scrollElement) { + (0, _onScroll.unregisterScrollListener)(this, scrollElement); + this._unregisterResizeListener(scrollElement); + } + + this._isMounted = false; + } + }, { + key: 'render', + value: function render() { + var children = this.props.children; + var _state2 = this.state, + isScrolling = _state2.isScrolling, + scrollTop = _state2.scrollTop, + scrollLeft = _state2.scrollLeft, + height = _state2.height, + width = _state2.width; + + + return children({ + onChildScroll: this._onChildScroll, + registerChild: this._registerChild, + height: height, + isScrolling: isScrolling, + scrollLeft: scrollLeft, + scrollTop: scrollTop, + width: width + }); + } + + // Referenced by utils/onScroll + + + // Referenced by utils/onScroll + + }]); + return WindowScroller; +}(React.PureComponent); + +WindowScroller.defaultProps = { + onResize: function onResize() {}, + onScroll: function onScroll() {}, + scrollingResetTimeInterval: IS_SCROLLING_TIMEOUT, + scrollElement: getWindow(), + serverHeight: 0, + serverWidth: 0 +}; +WindowScroller.propTypes = true ? null : undefined; +exports.default = WindowScroller; + +/***/ }), +/* 613 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=_interopRequireDefault(__webpack_require__(1));var _core=__webpack_require__(53);var _propTypes=_interopRequireDefault(__webpack_require__(2));var Icon=function Icon(_ref){var type=_ref.type;var icoName=type==='collectionType'?'contentType':type;return/*#__PURE__*/_react["default"].createElement(_core.AttributeIcon,{type:icoName||'dynamiczone',style:{margin:'auto 20px auto 0'}});};Icon.defaultProps={type:'dynamiczone'};Icon.propTypes={type:_propTypes["default"].string};var _default=Icon;exports["default"]=_default; + +/***/ }), +/* 614 */ +/***/ (function(module, exports, __webpack_require__) { + +/* global define */ + +(function (root, pluralize) { + /* istanbul ignore else */ + if (true) { + // Node. + module.exports = pluralize(); + } else {} +})(this, function () { + // Rule storage - pluralize and singularize need to be run sequentially, + // while other rules can be optimized using an object for instant lookups. + var pluralRules = []; + var singularRules = []; + var uncountables = {}; + var irregularPlurals = {}; + var irregularSingles = {}; + + /** + * Sanitize a pluralization rule to a usable regular expression. + * + * @param {(RegExp|string)} rule + * @return {RegExp} + */ + function sanitizeRule (rule) { + if (typeof rule === 'string') { + return new RegExp('^' + rule + '$', 'i'); + } + + return rule; + } + + /** + * Pass in a word token to produce a function that can replicate the case on + * another word. + * + * @param {string} word + * @param {string} token + * @return {Function} + */ + function restoreCase (word, token) { + // Tokens are an exact match. + if (word === token) return token; + + // Upper cased words. E.g. "HELLO". + if (word === word.toUpperCase()) return token.toUpperCase(); + + // Title cased words. E.g. "Title". + if (word[0] === word[0].toUpperCase()) { + return token.charAt(0).toUpperCase() + token.substr(1).toLowerCase(); + } + + // Lower cased words. E.g. "test". + return token.toLowerCase(); + } + + /** + * Interpolate a regexp string. + * + * @param {string} str + * @param {Array} args + * @return {string} + */ + function interpolate (str, args) { + return str.replace(/\$(\d{1,2})/g, function (match, index) { + return args[index] || ''; + }); + } + + /** + * Replace a word using a rule. + * + * @param {string} word + * @param {Array} rule + * @return {string} + */ + function replace (word, rule) { + return word.replace(rule[0], function (match, index) { + var result = interpolate(rule[1], arguments); + + if (match === '') { + return restoreCase(word[index - 1], result); + } + + return restoreCase(match, result); + }); + } + + /** + * Sanitize a word by passing in the word and sanitization rules. + * + * @param {string} token + * @param {string} word + * @param {Array} rules + * @return {string} + */ + function sanitizeWord (token, word, rules) { + // Empty string or doesn't need fixing. + if (!token.length || uncountables.hasOwnProperty(token)) { + return word; + } + + var len = rules.length; + + // Iterate over the sanitization rules and use the first one to match. + while (len--) { + var rule = rules[len]; + + if (rule[0].test(word)) return replace(word, rule); + } + + return word; + } + + /** + * Replace a word with the updated word. + * + * @param {Object} replaceMap + * @param {Object} keepMap + * @param {Array} rules + * @return {Function} + */ + function replaceWord (replaceMap, keepMap, rules) { + return function (word) { + // Get the correct token and case restoration functions. + var token = word.toLowerCase(); + + // Check against the keep object map. + if (keepMap.hasOwnProperty(token)) { + return restoreCase(word, token); + } + + // Check against the replacement map for a direct word replacement. + if (replaceMap.hasOwnProperty(token)) { + return restoreCase(word, replaceMap[token]); + } + + // Run all the rules against the word. + return sanitizeWord(token, word, rules); + }; + } + + /** + * Check if a word is part of the map. + */ + function checkWord (replaceMap, keepMap, rules, bool) { + return function (word) { + var token = word.toLowerCase(); + + if (keepMap.hasOwnProperty(token)) return true; + if (replaceMap.hasOwnProperty(token)) return false; + + return sanitizeWord(token, token, rules) === token; + }; + } + + /** + * Pluralize or singularize a word based on the passed in count. + * + * @param {string} word + * @param {number} count + * @param {boolean} inclusive + * @return {string} + */ + function pluralize (word, count, inclusive) { + var pluralized = count === 1 + ? pluralize.singular(word) : pluralize.plural(word); + + return (inclusive ? count + ' ' : '') + pluralized; + } + + /** + * Pluralize a word. + * + * @type {Function} + */ + pluralize.plural = replaceWord( + irregularSingles, irregularPlurals, pluralRules + ); + + /** + * Check if a word is plural. + * + * @type {Function} + */ + pluralize.isPlural = checkWord( + irregularSingles, irregularPlurals, pluralRules + ); + + /** + * Singularize a word. + * + * @type {Function} + */ + pluralize.singular = replaceWord( + irregularPlurals, irregularSingles, singularRules + ); + + /** + * Check if a word is singular. + * + * @type {Function} + */ + pluralize.isSingular = checkWord( + irregularPlurals, irregularSingles, singularRules + ); + + /** + * Add a pluralization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addPluralRule = function (rule, replacement) { + pluralRules.push([sanitizeRule(rule), replacement]); + }; + + /** + * Add a singularization rule to the collection. + * + * @param {(string|RegExp)} rule + * @param {string} replacement + */ + pluralize.addSingularRule = function (rule, replacement) { + singularRules.push([sanitizeRule(rule), replacement]); + }; + + /** + * Add an uncountable word rule. + * + * @param {(string|RegExp)} word + */ + pluralize.addUncountableRule = function (word) { + if (typeof word === 'string') { + uncountables[word.toLowerCase()] = true; + return; + } + + // Set singular and plural references for the word. + pluralize.addPluralRule(word, '$0'); + pluralize.addSingularRule(word, '$0'); + }; + + /** + * Add an irregular word definition. + * + * @param {string} single + * @param {string} plural + */ + pluralize.addIrregularRule = function (single, plural) { + plural = plural.toLowerCase(); + single = single.toLowerCase(); + + irregularSingles[single] = plural; + irregularPlurals[plural] = single; + }; + + /** + * Irregular rules. + */ + [ + // Pronouns. + ['I', 'we'], + ['me', 'us'], + ['he', 'they'], + ['she', 'they'], + ['them', 'them'], + ['myself', 'ourselves'], + ['yourself', 'yourselves'], + ['itself', 'themselves'], + ['herself', 'themselves'], + ['himself', 'themselves'], + ['themself', 'themselves'], + ['is', 'are'], + ['was', 'were'], + ['has', 'have'], + ['this', 'these'], + ['that', 'those'], + // Words ending in with a consonant and `o`. + ['echo', 'echoes'], + ['dingo', 'dingoes'], + ['volcano', 'volcanoes'], + ['tornado', 'tornadoes'], + ['torpedo', 'torpedoes'], + // Ends with `us`. + ['genus', 'genera'], + ['viscus', 'viscera'], + // Ends with `ma`. + ['stigma', 'stigmata'], + ['stoma', 'stomata'], + ['dogma', 'dogmata'], + ['lemma', 'lemmata'], + ['schema', 'schemata'], + ['anathema', 'anathemata'], + // Other irregular rules. + ['ox', 'oxen'], + ['axe', 'axes'], + ['die', 'dice'], + ['yes', 'yeses'], + ['foot', 'feet'], + ['eave', 'eaves'], + ['goose', 'geese'], + ['tooth', 'teeth'], + ['quiz', 'quizzes'], + ['human', 'humans'], + ['proof', 'proofs'], + ['carve', 'carves'], + ['valve', 'valves'], + ['looey', 'looies'], + ['thief', 'thieves'], + ['groove', 'grooves'], + ['pickaxe', 'pickaxes'], + ['whiskey', 'whiskies'] + ].forEach(function (rule) { + return pluralize.addIrregularRule(rule[0], rule[1]); + }); + + /** + * Pluralization rules. + */ + [ + [/s?$/i, 's'], + [/[^\u0000-\u007F]$/i, '$0'], + [/([^aeiou]ese)$/i, '$1'], + [/(ax|test)is$/i, '$1es'], + [/(alias|[^aou]us|tlas|gas|ris)$/i, '$1es'], + [/(e[mn]u)s?$/i, '$1s'], + [/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i, '$1'], + [/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1i'], + [/(alumn|alg|vertebr)(?:a|ae)$/i, '$1ae'], + [/(seraph|cherub)(?:im)?$/i, '$1im'], + [/(her|at|gr)o$/i, '$1oes'], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i, '$1a'], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i, '$1a'], + [/sis$/i, 'ses'], + [/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i, '$1$2ves'], + [/([^aeiouy]|qu)y$/i, '$1ies'], + [/([^ch][ieo][ln])ey$/i, '$1ies'], + [/(x|ch|ss|sh|zz)$/i, '$1es'], + [/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'], + [/(m|l)(?:ice|ouse)$/i, '$1ice'], + [/(pe)(?:rson|ople)$/i, '$1ople'], + [/(child)(?:ren)?$/i, '$1ren'], + [/eaux$/i, '$0'], + [/m[ae]n$/i, 'men'], + ['thou', 'you'] + ].forEach(function (rule) { + return pluralize.addPluralRule(rule[0], rule[1]); + }); + + /** + * Singularization rules. + */ + [ + [/s$/i, ''], + [/(ss)$/i, '$1'], + [/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i, '$1fe'], + [/(ar|(?:wo|[ae])l|[eo][ao])ves$/i, '$1f'], + [/ies$/i, 'y'], + [/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i, '$1ie'], + [/\b(mon|smil)ies$/i, '$1ey'], + [/(m|l)ice$/i, '$1ouse'], + [/(seraph|cherub)im$/i, '$1'], + [/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i, '$1'], + [/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i, '$1sis'], + [/(movie|twelve|abuse|e[mn]u)s$/i, '$1'], + [/(test)(?:is|es)$/i, '$1is'], + [/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i, '$1us'], + [/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i, '$1um'], + [/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i, '$1on'], + [/(alumn|alg|vertebr)ae$/i, '$1a'], + [/(cod|mur|sil|vert|ind)ices$/i, '$1ex'], + [/(matr|append)ices$/i, '$1ix'], + [/(pe)(rson|ople)$/i, '$1rson'], + [/(child)ren$/i, '$1'], + [/(eau)x?$/i, '$1'], + [/men$/i, 'man'] + ].forEach(function (rule) { + return pluralize.addSingularRule(rule[0], rule[1]); + }); + + /** + * Uncountable rules. + */ + [ + // Singular words with no plurals. + 'adulthood', + 'advice', + 'agenda', + 'aid', + 'alcohol', + 'ammo', + 'anime', + 'athletics', + 'audio', + 'bison', + 'blood', + 'bream', + 'buffalo', + 'butter', + 'carp', + 'cash', + 'chassis', + 'chess', + 'clothing', + 'cod', + 'commerce', + 'cooperation', + 'corps', + 'debris', + 'diabetes', + 'digestion', + 'elk', + 'energy', + 'equipment', + 'excretion', + 'expertise', + 'flounder', + 'fun', + 'gallows', + 'garbage', + 'graffiti', + 'headquarters', + 'health', + 'herpes', + 'highjinks', + 'homework', + 'housework', + 'information', + 'jeans', + 'justice', + 'kudos', + 'labour', + 'literature', + 'machinery', + 'mackerel', + 'mail', + 'media', + 'mews', + 'moose', + 'music', + 'manga', + 'news', + 'pike', + 'plankton', + 'pliers', + 'pollution', + 'premises', + 'rain', + 'research', + 'rice', + 'salmon', + 'scissors', + 'series', + 'sewage', + 'shambles', + 'shrimp', + 'species', + 'staff', + 'swine', + 'tennis', + 'traffic', + 'transporation', + 'trout', + 'tuna', + 'wealth', + 'welfare', + 'whiting', + 'wildebeest', + 'wildlife', + 'you', + // Regexes. + /[^aeiou]ese$/i, // "chinese", "japanese" + /deer$/i, // "deer", "reindeer" + /fish$/i, // "fish", "blowfish", "angelfish" + /measles$/i, + /o[iu]s$/i, // "carnivorous" + /pox$/i, // "chickpox", "smallpox" + /sheep$/i + ].forEach(pluralize.addUncountableRule); + + return pluralize; +}); + + +/***/ }), +/* 615 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _taggedTemplateLiteral2=_interopRequireDefault(__webpack_require__(5));var _styledComponents=_interopRequireDefault(__webpack_require__(4));function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n padding: 0 15px;\n background-color: #fff;\n list-style: none;\n font-size: 13px;\n > li {\n label {\n flex-shrink: 1;\n width: fit-content !important;\n cursor: pointer;\n }\n\n .check-wrapper {\n z-index: 9;\n > input {\n z-index: 1;\n }\n }\n .chevron {\n margin: auto;\n\n font-size: 11px;\n color: #919bae;\n }\n }\n .li-multi-menu {\n margin-bottom: -3px;\n }\n .li {\n line-height: 27px;\n position: relative;\n > p {\n margin: 0;\n }\n\n &:hover {\n > p::after {\n content: attr(datadescr);\n position: absolute;\n left: 0;\n color: #007eff;\n font-weight: 700;\n z-index: 100;\n }\n &::after {\n content: '';\n position: absolute;\n z-index: 1;\n top: 0;\n left: -30px;\n right: -30px;\n bottom: 0;\n background-color: #e6f0fb;\n }\n }\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var Ul=_styledComponents["default"].ul(_templateObject());var _default=Ul;exports["default"]=_default; + +/***/ }), +/* 616 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _toConsumableArray2=_interopRequireDefault(__webpack_require__(48));var _lodash=__webpack_require__(8);var _makeUnique=_interopRequireDefault(__webpack_require__(113));var retrieveComponentsFromSchema=function retrieveComponentsFromSchema(attributes,allComponentsData){var allComponents=Object.keys(attributes).reduce(function(acc,current){var type=(0,_lodash.get)(attributes,[current,'type'],'');if(type==='component'){var currentComponentName=attributes[current].component;// Push the existing compo +acc.push(currentComponentName);var currentComponentAttributes=(0,_lodash.get)(allComponentsData,[currentComponentName,'schema','attributes'],{});// Retrieve the nested ones +acc.push.apply(acc,(0,_toConsumableArray2["default"])(retrieveComponentsFromSchema(currentComponentAttributes,allComponentsData)));}if(type==='dynamiczone'){var dynamicZoneComponents=attributes[current].components;var componentsFromDZComponents=dynamicZoneComponents.reduce(function(acc2,currentUid){var compoAttrs=(0,_lodash.get)(allComponentsData,[currentUid,'schema','attributes'],{});return[].concat((0,_toConsumableArray2["default"])(acc2),(0,_toConsumableArray2["default"])(retrieveComponentsFromSchema(compoAttrs,allComponents)));},[]);return[].concat((0,_toConsumableArray2["default"])(acc),(0,_toConsumableArray2["default"])(dynamicZoneComponents),(0,_toConsumableArray2["default"])(componentsFromDZComponents));}return acc;},[]);return(0,_makeUnique["default"])(allComponents);};var _default=retrieveComponentsFromSchema;exports["default"]=_default; + +/***/ }), +/* 617 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"name\":\"strapi-plugin-content-manager\",\"version\":\"3.0.0-beta.19.4\",\"description\":\"A powerful UI to easily manage your data.\",\"strapi\":{\"name\":\"Content Manager\",\"icon\":\"plug\",\"description\":\"content-manager.plugin.description\",\"required\":true},\"dependencies\":{\"@sindresorhus/slugify\":\"0.9.1\",\"classnames\":\"^2.2.6\",\"codemirror\":\"^5.46.0\",\"draft-js\":\"^0.10.5\",\"immutable\":\"^3.8.2\",\"invariant\":\"^2.2.1\",\"lodash\":\"^4.17.11\",\"pluralize\":\"^7.0.0\",\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\",\"react-intl\":\"^2.8.0\",\"react-redux\":\"^7.0.2\",\"react-router\":\"^5.0.0\",\"react-router-dom\":\"^5.0.0\",\"react-select\":\"^3.0.4\",\"react-transition-group\":\"^2.5.0\",\"reactstrap\":\"^5.0.0\",\"redux\":\"^4.0.1\",\"redux-immutable\":\"^4.0.0\",\"reselect\":\"^3.0.1\",\"showdown\":\"^1.9.0\",\"strapi-helper-plugin\":\"3.0.0-beta.19.4\",\"strapi-utils\":\"3.0.0-beta.19.4\",\"yup\":\"^0.27.0\"},\"author\":{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"},\"maintainers\":[{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"}],\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strapi/strapi.git\"},\"engines\":{\"node\":\">=10.0.0\",\"npm\":\">=6.0.0\"},\"license\":\"MIT\",\"gitHead\":\"24bd311678a5ce8901bbeb9df1aae79c2f5ed096\"}"); + +/***/ }), +/* 618 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DndProvider; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _DndContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(143); +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +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 refCount = 0; +/** + * A React component that provides the React-DnD context + */ + +var DndProvider = Object(react__WEBPACK_IMPORTED_MODULE_0__["memo"])(function (_ref) { + var children = _ref.children, + props = _objectWithoutProperties(_ref, ["children"]); + + var _getDndContextValue = getDndContextValue(props), + _getDndContextValue2 = _slicedToArray(_getDndContextValue, 2), + manager = _getDndContextValue2[0], + isGlobalInstance = _getDndContextValue2[1]; // memoized from props + + /** + * If the global context was used to store the DND context + * then where theres no more references to it we should + * clean it up to avoid memory leaks + */ + + + react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () { + if (isGlobalInstance) { + refCount++; + } + + return function () { + if (isGlobalInstance) { + refCount--; + + if (refCount === 0) { + var context = getGlobalContext(); + context[instanceSymbol] = null; + } + } + }; + }, []); + return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_DndContext__WEBPACK_IMPORTED_MODULE_1__[/* DndContext */ "a"].Provider, { + value: manager + }, children); +}); +DndProvider.displayName = 'DndProvider'; + +function getDndContextValue(props) { + if ('manager' in props) { + var _manager = { + dragDropManager: props.manager + }; + return [_manager, false]; + } + + var manager = createSingletonDndContext(props.backend, props.context, props.options, props.debugMode); + var isGlobalInstance = !props.context; + return [manager, isGlobalInstance]; +} + +var instanceSymbol = Symbol.for('__REACT_DND_CONTEXT_INSTANCE__'); + +function createSingletonDndContext(backend) { + var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getGlobalContext(); + var options = arguments.length > 2 ? arguments[2] : undefined; + var debugMode = arguments.length > 3 ? arguments[3] : undefined; + var ctx = context; + + if (!ctx[instanceSymbol]) { + ctx[instanceSymbol] = Object(_DndContext__WEBPACK_IMPORTED_MODULE_1__[/* createDndContext */ "b"])(backend, context, options, debugMode); + } + + return ctx[instanceSymbol]; +} + +function getGlobalContext() { + return typeof global !== 'undefined' ? global : window; +} +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(49))) + +/***/ }), +/* 619 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var LayoutDndContext=(0,_react.createContext)();var _default=LayoutDndContext;exports["default"]=_default; + +/***/ }), +/* 620 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var getHeight=function getHeight(withLongerHeight){return withLongerHeight?'102px':'30px';};var _default=getHeight;exports["default"]=_default; + +/***/ }), +/* 621 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.RESET_PROPS=exports.RESET_LIST_LABELS=exports.ON_CHANGE_LIST_LABELS=exports.GET_LAYOUT_SUCCEEDED=exports.GET_DATA_SUCCEEDED=exports.DELETE_LAYOUTS=exports.DELETE_LAYOUT=void 0;var DELETE_LAYOUT='ContentManager/Main/DELETE_LAYOUT';exports.DELETE_LAYOUT=DELETE_LAYOUT;var DELETE_LAYOUTS='ContentManager/Main/DELETE_LAYOUTS';exports.DELETE_LAYOUTS=DELETE_LAYOUTS;var GET_DATA_SUCCEEDED='ContentManager/Main/GET_DATA_SUCCEEDED';exports.GET_DATA_SUCCEEDED=GET_DATA_SUCCEEDED;var GET_LAYOUT_SUCCEEDED='ContentManager/Main/GET_LAYOUT_SUCCEEDED';exports.GET_LAYOUT_SUCCEEDED=GET_LAYOUT_SUCCEEDED;var ON_CHANGE_LIST_LABELS='ContentManager/Main/ON_CHANGE_LIST_LABELS';exports.ON_CHANGE_LIST_LABELS=ON_CHANGE_LIST_LABELS;var RESET_LIST_LABELS='ContentManager/Main/RESET_LIST_LABELS';exports.RESET_LIST_LABELS=RESET_LIST_LABELS;var RESET_PROPS='ContentManager/Main/RESET_PROPS';exports.RESET_PROPS=RESET_PROPS; + +/***/ }), +/* 622 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=exports.initialState=void 0;var _immutable=__webpack_require__(35);var _constants=__webpack_require__(621);/** + * + * main reducer + */var initialState=(0,_immutable.fromJS)({componentsAndModelsMainPossibleMainFields:{},components:[],initialLayouts:{},isLoading:true,layouts:{},models:[]});exports.initialState=initialState;function mainReducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:initialState;var action=arguments.length>1?arguments[1]:undefined;switch(action.type){case _constants.DELETE_LAYOUT:return state.removeIn(['layouts',action.uid]);case _constants.DELETE_LAYOUTS:return state.update('layouts',function(){return(0,_immutable.fromJS)({});});case _constants.GET_DATA_SUCCEEDED:return state.update('components',function(){return(0,_immutable.fromJS)(action.components);}).update('models',function(){return(0,_immutable.fromJS)(action.models);}).update('componentsAndModelsMainPossibleMainFields',function(){return(0,_immutable.fromJS)(action.mainFields);}).update('isLoading',function(){return false;});case _constants.GET_LAYOUT_SUCCEEDED:return state.updateIn(['layouts',action.uid],function(){return(0,_immutable.fromJS)(action.layout);}).updateIn(['initialLayouts',action.uid],function(){return(0,_immutable.fromJS)(action.layout);});case _constants.ON_CHANGE_LIST_LABELS:{var name=action.name,slug=action.slug,value=action.value;return state.updateIn(['layouts',slug,'contentType','layouts','list'],function(list){if(value){return list.push(name);}return list.filter(function(l){return l!==name;});});}case _constants.RESET_LIST_LABELS:return state.updateIn(['layouts',action.slug],function(){return state.getIn(['initialLayouts',action.slug]);});case _constants.RESET_PROPS:return initialState;default:return state;}}var _default=mainReducer;exports["default"]=_default; + +/***/ }), +/* 623 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"name\":\"strapi-plugin-users-permissions\",\"version\":\"3.0.0-beta.19.4\",\"description\":\"Protect your API with a full-authentication process based on JWT\",\"strapi\":{\"name\":\"Roles & Permissions\",\"icon\":\"users\",\"description\":\"users-permissions.plugin.description\",\"required\":true},\"scripts\":{\"test\":\"echo \\\"no tests yet\\\"\"},\"dependencies\":{\"@purest/providers\":\"^1.0.1\",\"bcryptjs\":\"^2.4.3\",\"classnames\":\"^2.2.6\",\"grant-koa\":\"^4.6.0\",\"immutable\":\"^3.8.2\",\"invariant\":\"^2.2.1\",\"jsonwebtoken\":\"^8.1.0\",\"koa2-ratelimit\":\"^0.9.0\",\"lodash\":\"^4.17.11\",\"purest\":\"3.1.0\",\"react\":\"^16.9.0\",\"react-dom\":\"^16.9.0\",\"react-intl\":\"^2.8.0\",\"react-redux\":\"^7.0.2\",\"react-router\":\"^5.0.0\",\"react-router-dom\":\"^5.0.0\",\"react-transition-group\":\"^2.5.0\",\"reactstrap\":\"^5.0.0\",\"redux-saga\":\"^0.16.0\",\"request\":\"^2.83.0\",\"strapi-helper-plugin\":\"3.0.0-beta.19.4\",\"strapi-utils\":\"3.0.0-beta.19.4\",\"uuid\":\"^3.1.0\"},\"devDependencies\":{\"koa\":\"^2.8.0\"},\"author\":{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"},\"maintainers\":[{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"}],\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strapi/strapi.git\"},\"engines\":{\"node\":\">=10.0.0\",\"npm\":\">=6.0.0\"},\"license\":\"MIT\",\"gitHead\":\"24bd311678a5ce8901bbeb9df1aae79c2f5ed096\"}"); + +/***/ }), +/* 624 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.addUser=addUser;exports.getPermissions=getPermissions;exports.getPermissionsSucceeded=getPermissionsSucceeded;exports.getPolicies=getPolicies;exports.getPoliciesSucceeded=getPoliciesSucceeded;exports.getRole=getRole;exports.getRoleSucceeded=getRoleSucceeded;exports.getRoutesSucceeded=getRoutesSucceeded;exports.getUser=getUser;exports.getUserSucceeded=getUserSucceeded;exports.onCancel=onCancel;exports.onChangeInput=onChangeInput;exports.onClickAdd=onClickAdd;exports.onClickDelete=onClickDelete;exports.resetShouldDisplayPoliciesHint=resetShouldDisplayPoliciesHint;exports.selectAllActions=selectAllActions;exports.setActionType=setActionType;exports.setErrors=setErrors;exports.setForm=setForm;exports.setInputPoliciesPath=setInputPoliciesPath;exports.setRoleId=setRoleId;exports.setShouldDisplayPolicieshint=setShouldDisplayPolicieshint;exports.submit=submit;exports.submitError=submitError;exports.submitSucceeded=submitSucceeded;exports.resetProps=void 0;var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);var _constants=__webpack_require__(344);/* + * + * EditPage actions + * + */function addUser(newUser){return{type:_constants.ADD_USER,newUser:newUser};}function getPermissions(){return{type:_constants.GET_PERMISSIONS};}function getPermissionsSucceeded(data){var permissions=(0,_immutable.Map)((0,_immutable.fromJS)(data.permissions));return{type:_constants.GET_PERMISSIONS_SUCCEEDED,permissions:permissions};}function getPolicies(){return{type:_constants.GET_POLICIES};}function getPoliciesSucceeded(policies){var formattedPolicies=policies.policies.reduce(function(acc,current){acc.push({value:current});return acc;},[]);return{type:_constants.GET_POLICIES_SUCCEEDED,policies:[{name:'users-permissions.Policies.InputSelect.empty',value:''}].concat(formattedPolicies)};}function getRole(id){return{type:_constants.GET_ROLE,id:id};}function getRoleSucceeded(data){var form=(0,_immutable.Map)({name:(0,_lodash.get)(data,['role','name']),description:(0,_lodash.get)(data,['role','description']),users:(0,_immutable.List)((0,_lodash.get)(data,['role','users'])),permissions:(0,_immutable.Map)((0,_immutable.fromJS)((0,_lodash.get)(data,['role','permissions'])))});return{type:_constants.GET_ROLE_SUCCEEDED,form:form};}function getRoutesSucceeded(routes){return{type:_constants.GET_ROUTES_SUCCEEDED,routes:routes};}function getUser(user){return{type:_constants.GET_USER,user:user};}function getUserSucceeded(users){return{type:_constants.GET_USER_SUCCEEDED,users:users.filter(function(o){return(0,_lodash.toString)(o.role)!=='0';})};}function onCancel(){return{type:_constants.ON_CANCEL};}function onChangeInput(_ref){var target=_ref.target;var keys=['modifiedData'].concat(target.name.split('.'));return{type:_constants.ON_CHANGE_INPUT,keys:keys,value:target.value};}function onClickAdd(itemToAdd){return{type:_constants.ON_CLICK_ADD,itemToAdd:itemToAdd};}function onClickDelete(itemToDelete){return{type:_constants.ON_CLICK_DELETE,itemToDelete:itemToDelete};}var resetProps=function resetProps(){return{type:_constants.RESET_PROPS};};exports.resetProps=resetProps;function resetShouldDisplayPoliciesHint(){return{type:_constants.RESET_SHOULD_DISPLAY_POLICIES_HINT};}function selectAllActions(name,shouldEnable){return{type:_constants.SELECT_ALL_ACTIONS,keys:['modifiedData'].concat(name.split('.')),shouldEnable:shouldEnable};}function setActionType(action){var actionType=action==='create'?'POST':'PUT';return{type:_constants.SET_ACTION_TYPE,actionType:actionType};}function setErrors(formErrors){return{type:_constants.SET_ERRORS,formErrors:formErrors};}function setForm(){var form=(0,_immutable.Map)({name:'',description:'',users:(0,_immutable.List)([]),permissions:(0,_immutable.Map)({})});return{type:_constants.SET_FORM,form:form};}function setInputPoliciesPath(path){var inputPath=(0,_lodash.replace)(path,'enabled','policy');return{type:_constants.SET_INPUT_POLICIES_PATH,inputPath:inputPath};}function setRoleId(roleId){return{type:_constants.SET_ROLE_ID,roleId:roleId};}function setShouldDisplayPolicieshint(){return{type:_constants.SET_SHOULD_DISPLAY_POLICIES_HINT};}function submit(context){return{type:_constants.SUBMIT,context:context};}function submitError(errors){return{type:_constants.SUBMIT_ERROR,errors:errors};}function submitSucceeded(){return{type:_constants.SUBMIT_SUCCEEDED};} + +/***/ }), +/* 625 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.selectEditPageDomain=exports.makeSelectRoleId=exports.makeSelectModifiedData=exports.makeSelectActionType=exports["default"]=void 0;var _reselect=__webpack_require__(57);var _pluginId=_interopRequireDefault(__webpack_require__(84));/** + * Direct selector to the editPage state domain + */var selectEditPageDomain=function selectEditPageDomain(){return function(state){return state.get("".concat(_pluginId["default"],"_editPage"));};};/** + * Default selector used by EditPage + */exports.selectEditPageDomain=selectEditPageDomain;var makeSelectEditPage=function makeSelectEditPage(){return(0,_reselect.createSelector)(selectEditPageDomain(),function(substate){return substate.toJS();});};var makeSelectActionType=function makeSelectActionType(){return(0,_reselect.createSelector)(selectEditPageDomain(),function(substate){return substate.get('actionType');});};exports.makeSelectActionType=makeSelectActionType;var makeSelectModifiedData=function makeSelectModifiedData(){return(0,_reselect.createSelector)(selectEditPageDomain(),function(substate){return substate.get('modifiedData').toJS();});};exports.makeSelectModifiedData=makeSelectModifiedData;var makeSelectRoleId=function makeSelectRoleId(){return(0,_reselect.createSelector)(selectEditPageDomain(),function(substate){return substate.get('roleId');});};exports.makeSelectRoleId=makeSelectRoleId;var _default=makeSelectEditPage;exports["default"]=_default; + +/***/ }), +/* 626 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.makeSelectModifiedData=exports.makeSelectDeleteEndPoint=exports.makeSelectDataToDelete=exports.makeSelectAllData=exports["default"]=void 0;var _reselect=__webpack_require__(57);var _pluginId=_interopRequireDefault(__webpack_require__(84));/** + * Direct selector to the homePage state domain + */var selectHomePageDomain=function selectHomePageDomain(){return function(state){return state.get("".concat(_pluginId["default"],"_homePage"));};};/** + * Default selector used by HomePage + */var selectHomePage=function selectHomePage(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.toJS();});};/** +* Other specific selectors +*/var makeSelectAllData=function makeSelectAllData(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.get('data').toJS();});};exports.makeSelectAllData=makeSelectAllData;var makeSelectDataToDelete=function makeSelectDataToDelete(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.get('dataToDelete').toJS();});};exports.makeSelectDataToDelete=makeSelectDataToDelete;var makeSelectDeleteEndPoint=function makeSelectDeleteEndPoint(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.get('deleteEndPoint');});};exports.makeSelectDeleteEndPoint=makeSelectDeleteEndPoint;var makeSelectModifiedData=function makeSelectModifiedData(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.get('modifiedData').toJS();});};exports.makeSelectModifiedData=makeSelectModifiedData;var _default=selectHomePage;exports["default"]=_default; + +/***/ }), +/* 627 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.cancelChanges=cancelChanges;exports.deleteData=deleteData;exports.deleteDataSucceeded=deleteDataSucceeded;exports.fetchData=fetchData;exports.fetchDataSucceeded=fetchDataSucceeded;exports.onChange=onChange;exports.resetProps=resetProps;exports.setDataToEdit=setDataToEdit;exports.setForm=setForm;exports.setFormErrors=setFormErrors;exports.submit=submit;exports.submitSucceeded=submitSucceeded;exports.unsetDataToEdit=unsetDataToEdit;var _immutable=__webpack_require__(35);var _lodash=__webpack_require__(8);var _constants=__webpack_require__(347);/* + * + * HomePage actions + * + */function cancelChanges(){return{type:_constants.CANCEL_CHANGES};}function deleteData(dataToDelete,deleteEndPoint){return{type:_constants.DELETE_DATA,dataToDelete:dataToDelete,deleteEndPoint:deleteEndPoint};}function deleteDataSucceeded(indexDataToDelete){return{type:_constants.DELETE_DATA_SUCCEEDED,indexDataToDelete:indexDataToDelete};}function fetchData(endPoint){return{type:_constants.FETCH_DATA,endPoint:endPoint};}function fetchDataSucceeded(data){if(!(0,_lodash.isArray)(data)){var list=Object.keys(data).reduce(function(acc,current){var obj=Object.assign({name:current},data[current]);acc.push(obj);return acc;},[]);return{type:_constants.FETCH_DATA_SUCCEEDED,data:list,modifiedData:(0,_immutable.fromJS)(data)};}return{type:_constants.FETCH_DATA_SUCCEEDED,data:data,modifiedData:(0,_immutable.fromJS)({})};}function onChange(_ref){var target=_ref.target;return{type:_constants.ON_CHANGE,keys:['modifiedData'].concat(target.name.split('.')),value:target.value};}function resetProps(){return{type:_constants.RESET_PROPS};}function setDataToEdit(dataToEdit){return{type:_constants.SET_DATA_TO_EDIT,dataToEdit:dataToEdit};}function setForm(data){return{type:_constants.SET_FORM,form:(0,_immutable.fromJS)(data)};}function setFormErrors(formErrors){return{type:_constants.SET_FORM_ERRORS,formErrors:formErrors};}function submit(endPoint,context){return{type:_constants.SUBMIT,endPoint:endPoint,context:context};}function submitSucceeded(){return{type:_constants.SUBMIT_SUCCEEDED};}function unsetDataToEdit(){return{type:_constants.UNSET_DATA_TO_EDIT};} + +/***/ }), +/* 628 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"name\":\"strapi-plugin-email\",\"version\":\"3.0.0-beta.19.4\",\"description\":\"This is the description of the plugin.\",\"strapi\":{\"name\":\"Email\",\"icon\":\"paper-plane\",\"description\":\"email.plugin.description\",\"required\":true},\"scripts\":{\"test\":\"echo \\\"no tests yet\\\"\"},\"dependencies\":{\"lodash\":\"^4.17.11\",\"strapi-provider-email-sendmail\":\"3.0.0-beta.19.4\",\"strapi-utils\":\"3.0.0-beta.19.4\"},\"devDependencies\":{\"react-copy-to-clipboard\":\"5.0.1\",\"rimraf\":\"3.0.0\",\"strapi-helper-plugin\":\"3.0.0-beta.19.4\"},\"author\":{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"},\"maintainers\":[{\"name\":\"Strapi team\",\"email\":\"hi@strapi.io\",\"url\":\"http://strapi.io\"}],\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/strapi/strapi.git\"},\"engines\":{\"node\":\">=10.0.0\",\"npm\":\">=6.0.0\"},\"license\":\"MIT\",\"gitHead\":\"24bd311678a5ce8901bbeb9df1aae79c2f5ed096\"}"); + +/***/ }), +/* 629 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.getSettings=getSettings;exports.getSettingsSucceeded=getSettingsSucceeded;exports.onCancel=onCancel;exports.onChange=onChange;exports.setErrors=setErrors;exports.submit=submit;exports.submitError=submitError;exports.submitSucceeded=submitSucceeded;var _constants=__webpack_require__(348);/** + * + * + * ConfigPage actions + * + */function getSettings(env){return{type:_constants.GET_SETTINGS,env:env};}function getSettingsSucceeded(settings,appEnvironments){return{type:_constants.GET_SETTINGS_SUCCEEDED,appEnvironments:appEnvironments,settings:settings,initialData:settings.config};}function onCancel(){return{type:_constants.ON_CANCEL};}function onChange(_ref){var target=_ref.target;var keys=['modifiedData'].concat(target.name.split('.'));var value=target.value;return{type:_constants.ON_CHANGE,keys:keys,value:value};}function setErrors(errors){return{type:_constants.SET_ERRORS,errors:errors};}function submit(){return{type:_constants.SUBMIT};}function submitError(errors){return{type:_constants.SUBMIT_ERROR,errors:errors};}function submitSucceeded(data){return{type:_constants.SUBMIT_SUCCEEDED,data:data};} + +/***/ }), +/* 630 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.makeSelectModifiedData=exports.makeSelectEnv=exports["default"]=void 0;var _reselect=__webpack_require__(57);var _pluginId=_interopRequireDefault(__webpack_require__(199));/** + * Direct selector to the configPage state domain + */var selectConfigPageDomain=function selectConfigPageDomain(){return function(state){return state.get("".concat(_pluginId["default"],"_configPage"));};};/** + * Default selector used by ConfigPage + */var selectConfigPage=function selectConfigPage(){return(0,_reselect.createSelector)(selectConfigPageDomain(),function(substate){return substate.toJS();});};var makeSelectEnv=function makeSelectEnv(){return(0,_reselect.createSelector)(selectConfigPageDomain(),function(substate){return substate.get('env');});};exports.makeSelectEnv=makeSelectEnv;var makeSelectModifiedData=function makeSelectModifiedData(){return(0,_reselect.createSelector)(selectConfigPageDomain(),function(substate){return substate.get('modifiedData').toJS();});};exports.makeSelectModifiedData=makeSelectModifiedData;var _default=selectConfigPage;exports["default"]=_default; + +/***/ }), +/* 631 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"name\":\"strapi-plugin-upload\",\"version\":\"3.0.0-beta.19.4\",\"description\":\"This is the description of the plugin.\",\"strapi\":{\"name\":\"Files Upload\",\"icon\":\"cloud-upload-alt\",\"description\":\"upload.plugin.description\"},\"scripts\":{\"test\":\"echo \\\"no tests yet\\\"\"},\"dependencies\":{\"immutable\":\"^3.8.2\",\"invariant\":\"^2.2.1\",\"lodash\":\"^4.17.11\",\"react\":\"^16.9.0\",\"react-copy-to-clipboard\":\"^5.0.1\",\"react-dom\":\"^16.9.0\",\"react-intl\":\"^2.8.0\",\"react-redux\":\"^7.0.2\",\"react-router\":\"^5.0.0\",\"react-router-dom\":\"^5.0.0\",\"react-transition-group\":\"^2.5.0\",\"reactstrap\":\"^5.0.0\",\"strapi-helper-plugin\":\"3.0.0-beta.19.4\",\"strapi-provider-upload-local\":\"3.0.0-beta.19.4\",\"strapi-utils\":\"3.0.0-beta.19.4\",\"stream-to-array\":\"^2.3.0\",\"uuid\":\"^3.2.1\"},\"author\":{\"name\":\"A Strapi developer\",\"email\":\"\",\"url\":\"\"},\"maintainers\":[{\"name\":\"A Strapi developer\",\"email\":\"\",\"url\":\"\"}],\"engines\":{\"node\":\">=10.0.0\",\"npm\":\">=6.0.0\"},\"license\":\"MIT\",\"gitHead\":\"24bd311678a5ce8901bbeb9df1aae79c2f5ed096\"}"); + +/***/ }), +/* 632 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.getSettings=getSettings;exports.getSettingsSucceeded=getSettingsSucceeded;exports.onCancel=onCancel;exports.onChange=onChange;exports.setErrors=setErrors;exports.submit=submit;exports.submitError=submitError;exports.submitSucceeded=submitSucceeded;var _constants=__webpack_require__(349);/** + * + * + * ConfigPage actions + * + */function getSettings(env){return{type:_constants.GET_SETTINGS,env:env};}function getSettingsSucceeded(settings,appEnvironments){return{type:_constants.GET_SETTINGS_SUCCEEDED,appEnvironments:appEnvironments,settings:settings,initialData:settings.config};}function onCancel(){return{type:_constants.ON_CANCEL};}function onChange(_ref){var target=_ref.target;var keys=['modifiedData'].concat(target.name.split('.'));var value=target.name==='sizeLimit'?Number(target.value)*1000:target.value;return{type:_constants.ON_CHANGE,keys:keys,value:value};}function setErrors(errors){return{type:_constants.SET_ERRORS,errors:errors};}function submit(){return{type:_constants.SUBMIT};}function submitError(errors){return{type:_constants.SUBMIT_ERROR,errors:errors};}function submitSucceeded(data){return{type:_constants.SUBMIT_SUCCEEDED,data:data};} + +/***/ }), +/* 633 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.makeSelectModifiedData=exports.makeSelectEnv=exports["default"]=void 0;var _reselect=__webpack_require__(57);var _pluginId=_interopRequireDefault(__webpack_require__(115));/** + * Direct selector to the configPage state domain + */var selectConfigPageDomain=function selectConfigPageDomain(){return function(state){return state.get("".concat(_pluginId["default"],"_configPage"));};};/** + * Default selector used by ConfigPage + */var selectConfigPage=function selectConfigPage(){return(0,_reselect.createSelector)(selectConfigPageDomain(),function(substate){return substate.toJS();});};var makeSelectEnv=function makeSelectEnv(){return(0,_reselect.createSelector)(selectConfigPageDomain(),function(substate){return substate.get('env');});};exports.makeSelectEnv=makeSelectEnv;var makeSelectModifiedData=function makeSelectModifiedData(){return(0,_reselect.createSelector)(selectConfigPageDomain(),function(substate){return substate.get('modifiedData').toJS();});};exports.makeSelectModifiedData=makeSelectModifiedData;var _default=selectConfigPage;exports["default"]=_default; + +/***/ }), +/* 634 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.useHomePageContext=exports.HomePageContextProvider=exports.HomePageContext=void 0;var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var HomePageContext=(0,_react.createContext)({});exports.HomePageContext=HomePageContext;var HomePageContextProvider=function HomePageContextProvider(_ref){var children=_ref.children,rest=(0,_objectWithoutProperties2["default"])(_ref,["children"]);return/*#__PURE__*/_react["default"].createElement(HomePageContext.Provider,{value:rest},children);};exports.HomePageContextProvider=HomePageContextProvider;var useHomePageContext=function useHomePageContext(){return(0,_react.useContext)(HomePageContext);};exports.useHomePageContext=useHomePageContext;HomePageContextProvider.propTypes={children:_propTypes["default"].node.isRequired,deleteData:_propTypes["default"].func.isRequired}; + +/***/ }), +/* 635 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports.changeParams=changeParams;exports.deleteData=deleteData;exports.deleteSuccess=deleteSuccess;exports.dropSuccess=dropSuccess;exports.getData=getData;exports.getDataSuccess=getDataSuccess;exports.onDrop=onDrop;exports.onSearch=onSearch;exports.setLoading=setLoading;exports.setParams=setParams;exports.onSearchSuccess=onSearchSuccess;exports.unsetLoading=unsetLoading;var _constants=__webpack_require__(350);/* + * + * HomePage actions + * + */function changeParams(_ref){var target=_ref.target;return{type:_constants.CHANGE_PARAMS,keys:target.name.split('.'),value:target.value};}function deleteData(dataToDelete){return{type:_constants.DELETE_DATA,dataToDelete:dataToDelete};}function deleteSuccess(){return{type:_constants.DELETE_SUCCESS};}function dropSuccess(newFiles){return{type:_constants.DROP_SUCCESS,newFiles:newFiles};}function getData(){return{type:_constants.GET_DATA};}function getDataSuccess(data,entriesNumber){return{type:_constants.GET_DATA_SUCCESS,data:data,entriesNumber:entriesNumber};}function onDrop(_ref2){var files=_ref2.dataTransfer.files;var formData=Object.keys(files).reduce(function(acc,current){acc.append('files',files[current]);return acc;},new FormData());return{type:_constants.ON_DROP,formData:formData};}function onSearch(_ref3){var target=_ref3.target;return{type:_constants.ON_SEARCH,value:target.value};}function setLoading(){return{type:_constants.SET_LOADING};}function setParams(params){return{type:_constants.SET_PARAMS,params:params};}function onSearchSuccess(data){return{type:_constants.ON_SEARCH_SUCCESS,data:data};}function unsetLoading(){return{type:_constants.UNSET_LOADING};} + +/***/ }), +/* 636 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports.makeSelectParams=exports.makeSelectSearch=exports["default"]=void 0;var _reselect=__webpack_require__(57);var _pluginId=_interopRequireDefault(__webpack_require__(115));/** + * Direct selector to the homePage state domain + */var selectHomePageDomain=function selectHomePageDomain(){return function(state){return state.get("".concat(_pluginId["default"],"_homePage"));};};/** + * Default selector used by HomePage + */var selectHomePage=function selectHomePage(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.toJS();});};var makeSelectParams=function makeSelectParams(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.get('params').toJS();});};exports.makeSelectParams=makeSelectParams;var makeSelectSearch=function makeSelectSearch(){return(0,_reselect.createSelector)(selectHomePageDomain(),function(substate){return substate.get('search');});};exports.makeSelectSearch=makeSelectSearch;var _default=selectHomePage;exports["default"]=_default; + +/***/ }), +/* 637 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "Portal", function() { return /* reexport */ PortalCompat; }); +__webpack_require__.d(__webpack_exports__, "PortalWithState", function() { return /* reexport */ es_PortalWithState; }); + +// EXTERNAL MODULE: ./node_modules/react-dom/index.js +var react_dom = __webpack_require__(32); +var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__(1); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./node_modules/prop-types/index.js +var prop_types = __webpack_require__(2); +var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types); + +// CONCATENATED MODULE: ./node_modules/react-portal/es/utils.js +var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); +// CONCATENATED MODULE: ./node_modules/react-portal/es/Portal.js +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + + +var Portal_Portal = function (_React$Component) { + _inherits(Portal, _React$Component); + + function Portal() { + _classCallCheck(this, Portal); + + return _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments)); + } + + _createClass(Portal, [{ + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this.defaultNode) { + document.body.removeChild(this.defaultNode); + } + this.defaultNode = null; + } + }, { + key: 'render', + value: function render() { + if (!canUseDOM) { + return null; + } + if (!this.props.node && !this.defaultNode) { + this.defaultNode = document.createElement('div'); + document.body.appendChild(this.defaultNode); + } + return react_dom_default.a.createPortal(this.props.children, this.props.node || this.defaultNode); + } + }]); + + return Portal; +}(react_default.a.Component); + +Portal_Portal.propTypes = { + children: prop_types_default.a.node.isRequired, + node: prop_types_default.a.any +}; + +/* harmony default export */ var es_Portal = (Portal_Portal); +// CONCATENATED MODULE: ./node_modules/react-portal/es/LegacyPortal.js +var LegacyPortal_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function LegacyPortal_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function LegacyPortal_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function LegacyPortal_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +// This file is a fallback for a consumer who is not yet on React 16 +// as createPortal was introduced in React 16 + + + + + +var LegacyPortal_Portal = function (_React$Component) { + LegacyPortal_inherits(Portal, _React$Component); + + function Portal() { + LegacyPortal_classCallCheck(this, Portal); + + return LegacyPortal_possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments)); + } + + LegacyPortal_createClass(Portal, [{ + key: 'componentDidMount', + value: function componentDidMount() { + this.renderPortal(); + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate(props) { + this.renderPortal(); + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + react_dom_default.a.unmountComponentAtNode(this.defaultNode || this.props.node); + if (this.defaultNode) { + document.body.removeChild(this.defaultNode); + } + this.defaultNode = null; + this.portal = null; + } + }, { + key: 'renderPortal', + value: function renderPortal(props) { + if (!this.props.node && !this.defaultNode) { + this.defaultNode = document.createElement('div'); + document.body.appendChild(this.defaultNode); + } + + var children = this.props.children; + // https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b + if (typeof this.props.children.type === 'function') { + children = react_default.a.cloneElement(this.props.children); + } + + this.portal = react_dom_default.a.unstable_renderSubtreeIntoContainer(this, children, this.props.node || this.defaultNode); + } + }, { + key: 'render', + value: function render() { + return null; + } + }]); + + return Portal; +}(react_default.a.Component); + +/* harmony default export */ var LegacyPortal = (LegacyPortal_Portal); + + +LegacyPortal_Portal.propTypes = { + children: prop_types_default.a.node.isRequired, + node: prop_types_default.a.any +}; +// CONCATENATED MODULE: ./node_modules/react-portal/es/PortalCompat.js + + + + + +var PortalCompat_Portal = void 0; + +if (react_dom_default.a.createPortal) { + PortalCompat_Portal = es_Portal; +} else { + PortalCompat_Portal = LegacyPortal; +} + +/* harmony default export */ var PortalCompat = (PortalCompat_Portal); +// CONCATENATED MODULE: ./node_modules/react-portal/es/PortalWithState.js +var PortalWithState_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function PortalWithState_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function PortalWithState_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function PortalWithState_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + + + + +var KEYCODES = { + ESCAPE: 27 +}; + +var PortalWithState_PortalWithState = function (_React$Component) { + PortalWithState_inherits(PortalWithState, _React$Component); + + function PortalWithState(props) { + PortalWithState_classCallCheck(this, PortalWithState); + + var _this = PortalWithState_possibleConstructorReturn(this, (PortalWithState.__proto__ || Object.getPrototypeOf(PortalWithState)).call(this, props)); + + _this.portalNode = null; + _this.state = { active: !!props.defaultOpen }; + _this.openPortal = _this.openPortal.bind(_this); + _this.closePortal = _this.closePortal.bind(_this); + _this.wrapWithPortal = _this.wrapWithPortal.bind(_this); + _this.handleOutsideMouseClick = _this.handleOutsideMouseClick.bind(_this); + _this.handleKeydown = _this.handleKeydown.bind(_this); + return _this; + } + + PortalWithState_createClass(PortalWithState, [{ + key: 'componentDidMount', + value: function componentDidMount() { + if (this.props.closeOnEsc) { + document.addEventListener('keydown', this.handleKeydown); + } + if (this.props.closeOnOutsideClick) { + document.addEventListener('click', this.handleOutsideMouseClick); + } + } + }, { + key: 'componentWillUnmount', + value: function componentWillUnmount() { + if (this.props.closeOnEsc) { + document.removeEventListener('keydown', this.handleKeydown); + } + if (this.props.closeOnOutsideClick) { + document.removeEventListener('click', this.handleOutsideMouseClick); + } + } + }, { + key: 'openPortal', + value: function openPortal(e) { + if (this.state.active) { + return; + } + if (e && e.nativeEvent) { + e.nativeEvent.stopImmediatePropagation(); + } + this.setState({ active: true }, this.props.onOpen); + } + }, { + key: 'closePortal', + value: function closePortal() { + if (!this.state.active) { + return; + } + this.setState({ active: false }, this.props.onClose); + } + }, { + key: 'wrapWithPortal', + value: function wrapWithPortal(children) { + var _this2 = this; + + if (!this.state.active) { + return null; + } + return react_default.a.createElement( + PortalCompat, + { + node: this.props.node, + key: 'react-portal', + ref: function ref(portalNode) { + return _this2.portalNode = portalNode; + } + }, + children + ); + } + }, { + key: 'handleOutsideMouseClick', + value: function handleOutsideMouseClick(e) { + if (!this.state.active) { + return; + } + var root = this.portalNode && (this.portalNode.props.node || this.portalNode.defaultNode); + if (!root || root.contains(e.target) || e.button && e.button !== 0) { + return; + } + this.closePortal(); + } + }, { + key: 'handleKeydown', + value: function handleKeydown(e) { + if (e.keyCode === KEYCODES.ESCAPE && this.state.active) { + this.closePortal(); + } + } + }, { + key: 'render', + value: function render() { + return this.props.children({ + openPortal: this.openPortal, + closePortal: this.closePortal, + portal: this.wrapWithPortal, + isOpen: this.state.active + }); + } + }]); + + return PortalWithState; +}(react_default.a.Component); + +PortalWithState_PortalWithState.propTypes = { + children: prop_types_default.a.func.isRequired, + defaultOpen: prop_types_default.a.bool, + node: prop_types_default.a.any, + closeOnEsc: prop_types_default.a.bool, + closeOnOutsideClick: prop_types_default.a.bool, + onOpen: prop_types_default.a.func, + onClose: prop_types_default.a.func +}; + +PortalWithState_PortalWithState.defaultProps = { + onOpen: function onOpen() {}, + onClose: function onClose() {} +}; + +/* harmony default export */ var es_PortalWithState = (PortalWithState_PortalWithState); +// CONCATENATED MODULE: ./node_modules/react-portal/es/index.js + + + + + +/***/ }), +/* 638 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return symbolObservablePonyfill; }); +function symbolObservablePonyfill(root) { + var result; + var Symbol = root.Symbol; + + if (typeof Symbol === 'function') { + if (Symbol.observable) { + result = Symbol.observable; + } else { + result = Symbol('observable'); + Symbol.observable = result; + } + } else { + result = '@@observable'; + } + + return result; +}; + + +/***/ }), +/* 639 */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), +/* 640 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// rawAsap provides everything we need except exception management. +var rawAsap = __webpack_require__(1714); +// RawTasks are recycled to reduce GC churn. +var freeTasks = []; +// We queue errors to ensure they are thrown in right order (FIFO). +// Array-as-queue is good enough here, since we are just dealing with exceptions. +var pendingErrors = []; +var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError); + +function throwFirstError() { + if (pendingErrors.length) { + throw pendingErrors.shift(); + } +} + +/** + * Calls a task as soon as possible after returning, in its own event, with priority + * over other events like animation, reflow, and repaint. An error thrown from an + * event will not interrupt, nor even substantially slow down the processing of + * other events, but will be rather postponed to a lower priority event. + * @param {{call}} task A callable object, typically a function that takes no + * arguments. + */ +module.exports = asap; +function asap(task) { + var rawTask; + if (freeTasks.length) { + rawTask = freeTasks.pop(); + } else { + rawTask = new RawTask(); + } + rawTask.task = task; + rawAsap(rawTask); +} + +// We wrap tasks with recyclable task objects. A task object implements +// `call`, just like a function. +function RawTask() { + this.task = null; +} + +// The sole purpose of wrapping the task is to catch the exception and recycle +// the task object after its single use. +RawTask.prototype.call = function () { + try { + this.task.call(); + } catch (error) { + if (asap.onerror) { + // This hook exists purely for testing purposes. + // Its name will be periodically randomized to break any code that + // depends on its existence. + asap.onerror(error); + } else { + // In a web browser, exceptions are not fatal. However, to avoid + // slowing down the queue of pending tasks, we rethrow the error in a + // lower priority turn. + pendingErrors.push(error); + requestErrorThrow(); + } + } finally { + this.task = null; + freeTasks[freeTasks.length] = this; + } +}; + + +/***/ }), +/* 641 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * 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. + * + */ + + + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var validateFormat = function validateFormat(format) {}; + +if (false) {} + +function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +} + +module.exports = invariant; + +/***/ }), +/* 642 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _default={COMPONENT:'component',EDIT_FIELD:'editField',EDIT_RELATION:'editRelation',FIELD:'field',RELATION:'relation'};exports["default"]=_default; + +/***/ }), +/* 643 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _react=__webpack_require__(1);var _LayoutDnd=_interopRequireDefault(__webpack_require__(619));var useLayoutDnd=function useLayoutDnd(){return(0,_react.useContext)(_LayoutDnd["default"]);};var _default=useLayoutDnd;exports["default"]=_default; + +/***/ }), +/* 644 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +// ESM COMPAT FLAG +__webpack_require__.r(__webpack_exports__); + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "getEmptyImage", function() { return /* reexport */ getEmptyImage; }); +__webpack_require__.d(__webpack_exports__, "NativeTypes", function() { return /* reexport */ NativeTypes_namespaceObject; }); + +// NAMESPACE OBJECT: ./node_modules/react-dnd-html5-backend/dist/esm/NativeTypes.js +var NativeTypes_namespaceObject = {}; +__webpack_require__.r(NativeTypes_namespaceObject); +__webpack_require__.d(NativeTypes_namespaceObject, "FILE", function() { return FILE; }); +__webpack_require__.d(NativeTypes_namespaceObject, "URL", function() { return URL; }); +__webpack_require__.d(NativeTypes_namespaceObject, "TEXT", function() { return TEXT; }); + +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/utils/js_utils.js +// cheap lodash replacements +function memoize(fn) { + var result = null; + + var memoized = function memoized() { + if (result == null) { + result = fn(); + } + + return result; + }; + + return memoized; +} +/** + * drop-in replacement for _.without + */ + +function without(items, item) { + return items.filter(function (i) { + return i !== item; + }); +} +function union(itemsA, itemsB) { + var set = new Set(); + + var insertItem = function insertItem(item) { + return set.add(item); + }; + + itemsA.forEach(insertItem); + itemsB.forEach(insertItem); + var result = []; + set.forEach(function (key) { + return result.push(key); + }); + return result; +} +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/EnterLeaveCounter.js +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; } + + + +var EnterLeaveCounter_EnterLeaveCounter = +/*#__PURE__*/ +function () { + function EnterLeaveCounter(isNodeInDocument) { + _classCallCheck(this, EnterLeaveCounter); + + this.entered = []; + this.isNodeInDocument = isNodeInDocument; + } + + _createClass(EnterLeaveCounter, [{ + key: "enter", + value: function enter(enteringNode) { + var _this = this; + + var previousLength = this.entered.length; + + var isNodeEntered = function isNodeEntered(node) { + return _this.isNodeInDocument(node) && (!node.contains || node.contains(enteringNode)); + }; + + this.entered = union(this.entered.filter(isNodeEntered), [enteringNode]); + return previousLength === 0 && this.entered.length > 0; + } + }, { + key: "leave", + value: function leave(leavingNode) { + var previousLength = this.entered.length; + this.entered = without(this.entered.filter(this.isNodeInDocument), leavingNode); + return previousLength > 0 && this.entered.length === 0; + } + }, { + key: "reset", + value: function reset() { + this.entered = []; + } + }]); + + return EnterLeaveCounter; +}(); + + +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/BrowserDetector.js + +var isFirefox = memoize(function () { + return /firefox/i.test(navigator.userAgent); +}); +var isSafari = memoize(function () { + return Boolean(window.safari); +}); +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/MonotonicInterpolant.js +function MonotonicInterpolant_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function MonotonicInterpolant_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 MonotonicInterpolant_createClass(Constructor, protoProps, staticProps) { if (protoProps) MonotonicInterpolant_defineProperties(Constructor.prototype, protoProps); if (staticProps) MonotonicInterpolant_defineProperties(Constructor, staticProps); return Constructor; } + +var MonotonicInterpolant = +/*#__PURE__*/ +function () { + function MonotonicInterpolant(xs, ys) { + MonotonicInterpolant_classCallCheck(this, MonotonicInterpolant); + + var length = xs.length; // Rearrange xs and ys so that xs is sorted + + var indexes = []; + + for (var i = 0; i < length; i++) { + indexes.push(i); + } + + indexes.sort(function (a, b) { + return xs[a] < xs[b] ? -1 : 1; + }); // Get consecutive differences and slopes + + var dys = []; + var dxs = []; + var ms = []; + var dx; + var dy; + + for (var _i = 0; _i < length - 1; _i++) { + dx = xs[_i + 1] - xs[_i]; + dy = ys[_i + 1] - ys[_i]; + dxs.push(dx); + dys.push(dy); + ms.push(dy / dx); + } // Get degree-1 coefficients + + + var c1s = [ms[0]]; + + for (var _i2 = 0; _i2 < dxs.length - 1; _i2++) { + var m2 = ms[_i2]; + var mNext = ms[_i2 + 1]; + + if (m2 * mNext <= 0) { + c1s.push(0); + } else { + dx = dxs[_i2]; + var dxNext = dxs[_i2 + 1]; + var common = dx + dxNext; + c1s.push(3 * common / ((common + dxNext) / m2 + (common + dx) / mNext)); + } + } + + c1s.push(ms[ms.length - 1]); // Get degree-2 and degree-3 coefficients + + var c2s = []; + var c3s = []; + var m; + + for (var _i3 = 0; _i3 < c1s.length - 1; _i3++) { + m = ms[_i3]; + var c1 = c1s[_i3]; + var invDx = 1 / dxs[_i3]; + + var _common = c1 + c1s[_i3 + 1] - m - m; + + c2s.push((m - c1 - _common) * invDx); + c3s.push(_common * invDx * invDx); + } + + this.xs = xs; + this.ys = ys; + this.c1s = c1s; + this.c2s = c2s; + this.c3s = c3s; + } + + MonotonicInterpolant_createClass(MonotonicInterpolant, [{ + key: "interpolate", + value: function interpolate(x) { + var xs = this.xs, + ys = this.ys, + c1s = this.c1s, + c2s = this.c2s, + c3s = this.c3s; // The rightmost point in the dataset should give an exact result + + var i = xs.length - 1; + + if (x === xs[i]) { + return ys[i]; + } // Search for the interval x is in, returning the corresponding y if x is one of the original xs + + + var low = 0; + var high = c3s.length - 1; + var mid; + + while (low <= high) { + mid = Math.floor(0.5 * (low + high)); + var xHere = xs[mid]; + + if (xHere < x) { + low = mid + 1; + } else if (xHere > x) { + high = mid - 1; + } else { + return ys[mid]; + } + } + + i = Math.max(0, high); // Interpolate + + var diff = x - xs[i]; + var diffSq = diff * diff; + return ys[i] + c1s[i] * diff + c2s[i] * diffSq + c3s[i] * diff * diffSq; + } + }]); + + return MonotonicInterpolant; +}(); + + +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/OffsetUtils.js + + +var ELEMENT_NODE = 1; +function getNodeClientOffset(node) { + var el = node.nodeType === ELEMENT_NODE ? node : node.parentElement; + + if (!el) { + return null; + } + + var _el$getBoundingClient = el.getBoundingClientRect(), + top = _el$getBoundingClient.top, + left = _el$getBoundingClient.left; + + return { + x: left, + y: top + }; +} +function getEventClientOffset(e) { + return { + x: e.clientX, + y: e.clientY + }; +} + +function isImageNode(node) { + return node.nodeName === 'IMG' && (isFirefox() || !document.documentElement.contains(node)); +} + +function getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight) { + var dragPreviewWidth = isImage ? dragPreview.width : sourceWidth; + var dragPreviewHeight = isImage ? dragPreview.height : sourceHeight; // Work around @2x coordinate discrepancies in browsers + + if (isSafari() && isImage) { + dragPreviewHeight /= window.devicePixelRatio; + dragPreviewWidth /= window.devicePixelRatio; + } + + return { + dragPreviewWidth: dragPreviewWidth, + dragPreviewHeight: dragPreviewHeight + }; +} + +function getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint) { + // The browsers will use the image intrinsic size under different conditions. + // Firefox only cares if it's an image, but WebKit also wants it to be detached. + var isImage = isImageNode(dragPreview); + var dragPreviewNode = isImage ? sourceNode : dragPreview; + var dragPreviewNodeOffsetFromClient = getNodeClientOffset(dragPreviewNode); + var offsetFromDragPreview = { + x: clientOffset.x - dragPreviewNodeOffsetFromClient.x, + y: clientOffset.y - dragPreviewNodeOffsetFromClient.y + }; + var sourceWidth = sourceNode.offsetWidth, + sourceHeight = sourceNode.offsetHeight; + var anchorX = anchorPoint.anchorX, + anchorY = anchorPoint.anchorY; + + var _getDragPreviewSize = getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight), + dragPreviewWidth = _getDragPreviewSize.dragPreviewWidth, + dragPreviewHeight = _getDragPreviewSize.dragPreviewHeight; + + var calculateYOffset = function calculateYOffset() { + var interpolantY = new MonotonicInterpolant([0, 0.5, 1], [// Dock to the top + offsetFromDragPreview.y, // Align at the center + offsetFromDragPreview.y / sourceHeight * dragPreviewHeight, // Dock to the bottom + offsetFromDragPreview.y + dragPreviewHeight - sourceHeight]); + var y = interpolantY.interpolate(anchorY); // Work around Safari 8 positioning bug + + if (isSafari() && isImage) { + // We'll have to wait for @3x to see if this is entirely correct + y += (window.devicePixelRatio - 1) * dragPreviewHeight; + } + + return y; + }; + + var calculateXOffset = function calculateXOffset() { + // Interpolate coordinates depending on anchor point + // If you know a simpler way to do this, let me know + var interpolantX = new MonotonicInterpolant([0, 0.5, 1], [// Dock to the left + offsetFromDragPreview.x, // Align at the center + offsetFromDragPreview.x / sourceWidth * dragPreviewWidth, // Dock to the right + offsetFromDragPreview.x + dragPreviewWidth - sourceWidth]); + return interpolantX.interpolate(anchorX); + }; // Force offsets if specified in the options. + + + var offsetX = offsetPoint.offsetX, + offsetY = offsetPoint.offsetY; + var isManualOffsetX = offsetX === 0 || offsetX; + var isManualOffsetY = offsetY === 0 || offsetY; + return { + x: isManualOffsetX ? offsetX : calculateXOffset(), + y: isManualOffsetY ? offsetY : calculateYOffset() + }; +} +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/NativeTypes.js +var FILE = '__NATIVE_FILE__'; +var URL = '__NATIVE_URL__'; +var TEXT = '__NATIVE_TEXT__'; +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/NativeDragSources/getDataFromDataTransfer.js +function getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) { + var result = typesToTry.reduce(function (resultSoFar, typeToTry) { + return resultSoFar || dataTransfer.getData(typeToTry); + }, ''); + return result != null ? result : defaultValue; +} +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/NativeDragSources/nativeTypesConfig.js +var _nativeTypesConfig; + +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 nativeTypesConfig = (_nativeTypesConfig = {}, _defineProperty(_nativeTypesConfig, FILE, { + exposeProperties: { + files: function files(dataTransfer) { + return Array.prototype.slice.call(dataTransfer.files); + }, + items: function items(dataTransfer) { + return dataTransfer.items; + } + }, + matchesTypes: ['Files'] +}), _defineProperty(_nativeTypesConfig, URL, { + exposeProperties: { + urls: function urls(dataTransfer, matchesTypes) { + return getDataFromDataTransfer(dataTransfer, matchesTypes, '').split('\n'); + } + }, + matchesTypes: ['Url', 'text/uri-list'] +}), _defineProperty(_nativeTypesConfig, TEXT, { + exposeProperties: { + text: function text(dataTransfer, matchesTypes) { + return getDataFromDataTransfer(dataTransfer, matchesTypes, ''); + } + }, + matchesTypes: ['Text', 'text/plain'] +}), _nativeTypesConfig); +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/NativeDragSources/NativeDragSource.js +function NativeDragSource_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function NativeDragSource_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 NativeDragSource_createClass(Constructor, protoProps, staticProps) { if (protoProps) NativeDragSource_defineProperties(Constructor.prototype, protoProps); if (staticProps) NativeDragSource_defineProperties(Constructor, staticProps); return Constructor; } + +var NativeDragSource = +/*#__PURE__*/ +function () { + function NativeDragSource(config) { + NativeDragSource_classCallCheck(this, NativeDragSource); + + this.config = config; + this.item = {}; + this.initializeExposedProperties(); + } + + NativeDragSource_createClass(NativeDragSource, [{ + key: "initializeExposedProperties", + value: function initializeExposedProperties() { + var _this = this; + + Object.keys(this.config.exposeProperties).forEach(function (property) { + Object.defineProperty(_this.item, property, { + configurable: true, + enumerable: true, + get: function get() { + // eslint-disable-next-line no-console + console.warn("Browser doesn't allow reading \"".concat(property, "\" until the drop event.")); + return null; + } + }); + }); + } + }, { + key: "loadDataTransfer", + value: function loadDataTransfer(dataTransfer) { + var _this2 = this; + + if (dataTransfer) { + var newProperties = {}; + Object.keys(this.config.exposeProperties).forEach(function (property) { + newProperties[property] = { + value: _this2.config.exposeProperties[property](dataTransfer, _this2.config.matchesTypes), + configurable: true, + enumerable: true + }; + }); + Object.defineProperties(this.item, newProperties); + } + } + }, { + key: "canDrag", + value: function canDrag() { + return true; + } + }, { + key: "beginDrag", + value: function beginDrag() { + return this.item; + } + }, { + key: "isDragging", + value: function isDragging(monitor, handle) { + return handle === monitor.getSourceId(); + } + }, { + key: "endDrag", + value: function endDrag() {// empty + } + }]); + + return NativeDragSource; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/NativeDragSources/index.js + + +function createNativeDragSource(type, dataTransfer) { + var result = new NativeDragSource(nativeTypesConfig[type]); + result.loadDataTransfer(dataTransfer); + return result; +} +function matchNativeItemType(dataTransfer) { + if (!dataTransfer) { + return null; + } + + var dataTransferTypes = Array.prototype.slice.call(dataTransfer.types || []); + return Object.keys(nativeTypesConfig).filter(function (nativeItemType) { + var matchesTypes = nativeTypesConfig[nativeItemType].matchesTypes; + return matchesTypes.some(function (t) { + return dataTransferTypes.indexOf(t) > -1; + }); + })[0] || null; +} +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/OptionsReader.js +function OptionsReader_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function OptionsReader_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 OptionsReader_createClass(Constructor, protoProps, staticProps) { if (protoProps) OptionsReader_defineProperties(Constructor.prototype, protoProps); if (staticProps) OptionsReader_defineProperties(Constructor, staticProps); return Constructor; } + +var OptionsReader = +/*#__PURE__*/ +function () { + function OptionsReader(globalContext) { + OptionsReader_classCallCheck(this, OptionsReader); + + this.globalContext = globalContext; + } + + OptionsReader_createClass(OptionsReader, [{ + key: "window", + get: function get() { + if (this.globalContext) { + return this.globalContext; + } else if (typeof window !== 'undefined') { + return window; + } + + return undefined; + } + }, { + key: "document", + get: function get() { + if (this.window) { + return this.window.document; + } + + return undefined; + } + }]); + + return OptionsReader; +}(); +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/HTML5Backend.js +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { HTML5Backend_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function HTML5Backend_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 HTML5Backend_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function HTML5Backend_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 HTML5Backend_createClass(Constructor, protoProps, staticProps) { if (protoProps) HTML5Backend_defineProperties(Constructor.prototype, protoProps); if (staticProps) HTML5Backend_defineProperties(Constructor, staticProps); return Constructor; } + + + + + + + + +var HTML5Backend_HTML5Backend = +/*#__PURE__*/ +function () { + function HTML5Backend(manager, globalContext) { + var _this = this; + + HTML5Backend_classCallCheck(this, HTML5Backend); + + this.sourcePreviewNodes = new Map(); + this.sourcePreviewNodeOptions = new Map(); + this.sourceNodes = new Map(); + this.sourceNodeOptions = new Map(); + this.dragStartSourceIds = null; + this.dropTargetIds = []; + this.dragEnterTargetIds = []; + this.currentNativeSource = null; + this.currentNativeHandle = null; + this.currentDragSourceNode = null; + this.altKeyPressed = false; + this.mouseMoveTimeoutTimer = null; + this.asyncEndDragFrameId = null; + this.dragOverTargetIds = null; + + this.getSourceClientOffset = function (sourceId) { + return getNodeClientOffset(_this.sourceNodes.get(sourceId)); + }; + + this.endDragNativeItem = function () { + if (!_this.isDraggingNativeItem()) { + return; + } + + _this.actions.endDrag(); + + _this.registry.removeSource(_this.currentNativeHandle); + + _this.currentNativeHandle = null; + _this.currentNativeSource = null; + }; + + this.isNodeInDocument = function (node) { + // Check the node either in the main document or in the current context + return _this.document && _this.document.body && document.body.contains(node); + }; + + this.endDragIfSourceWasRemovedFromDOM = function () { + var node = _this.currentDragSourceNode; + + if (_this.isNodeInDocument(node)) { + return; + } + + if (_this.clearCurrentDragSourceNode()) { + _this.actions.endDrag(); + } + }; + + this.handleTopDragStartCapture = function () { + _this.clearCurrentDragSourceNode(); + + _this.dragStartSourceIds = []; + }; + + this.handleTopDragStart = function (e) { + if (e.defaultPrevented) { + return; + } + + var dragStartSourceIds = _this.dragStartSourceIds; + _this.dragStartSourceIds = null; + var clientOffset = getEventClientOffset(e); // Avoid crashing if we missed a drop event or our previous drag died + + if (_this.monitor.isDragging()) { + _this.actions.endDrag(); + } // Don't publish the source just yet (see why below) + + + _this.actions.beginDrag(dragStartSourceIds || [], { + publishSource: false, + getSourceClientOffset: _this.getSourceClientOffset, + clientOffset: clientOffset + }); + + var dataTransfer = e.dataTransfer; + var nativeType = matchNativeItemType(dataTransfer); + + if (_this.monitor.isDragging()) { + if (dataTransfer && typeof dataTransfer.setDragImage === 'function') { + // Use custom drag image if user specifies it. + // If child drag source refuses drag but parent agrees, + // use parent's node as drag image. Neither works in IE though. + var sourceId = _this.monitor.getSourceId(); + + var sourceNode = _this.sourceNodes.get(sourceId); + + var dragPreview = _this.sourcePreviewNodes.get(sourceId) || sourceNode; + + if (dragPreview) { + var _this$getCurrentSourc = _this.getCurrentSourcePreviewNodeOptions(), + anchorX = _this$getCurrentSourc.anchorX, + anchorY = _this$getCurrentSourc.anchorY, + offsetX = _this$getCurrentSourc.offsetX, + offsetY = _this$getCurrentSourc.offsetY; + + var anchorPoint = { + anchorX: anchorX, + anchorY: anchorY + }; + var offsetPoint = { + offsetX: offsetX, + offsetY: offsetY + }; + var dragPreviewOffset = getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint); + dataTransfer.setDragImage(dragPreview, dragPreviewOffset.x, dragPreviewOffset.y); + } + } + + try { + // Firefox won't drag without setting data + dataTransfer.setData('application/json', {}); + } catch (err) {} // IE doesn't support MIME types in setData + // Store drag source node so we can check whether + // it is removed from DOM and trigger endDrag manually. + + + _this.setCurrentDragSourceNode(e.target); // Now we are ready to publish the drag source.. or are we not? + + + var _this$getCurrentSourc2 = _this.getCurrentSourcePreviewNodeOptions(), + captureDraggingState = _this$getCurrentSourc2.captureDraggingState; + + if (!captureDraggingState) { + // Usually we want to publish it in the next tick so that browser + // is able to screenshot the current (not yet dragging) state. + // + // It also neatly avoids a situation where render() returns null + // in the same tick for the source element, and browser freaks out. + setTimeout(function () { + return _this.actions.publishDragSource(); + }, 0); + } else { + // In some cases the user may want to override this behavior, e.g. + // to work around IE not supporting custom drag previews. + // + // When using a custom drag layer, the only way to prevent + // the default drag preview from drawing in IE is to screenshot + // the dragging state in which the node itself has zero opacity + // and height. In this case, though, returning null from render() + // will abruptly end the dragging, which is not obvious. + // + // This is the reason such behavior is strictly opt-in. + _this.actions.publishDragSource(); + } + } else if (nativeType) { + // A native item (such as URL) dragged from inside the document + _this.beginDragNativeItem(nativeType); + } else if (dataTransfer && !dataTransfer.types && (e.target && !e.target.hasAttribute || !e.target.hasAttribute('draggable'))) { + // Looks like a Safari bug: dataTransfer.types is null, but there was no draggable. + // Just let it drag. It's a native type (URL or text) and will be picked up in + // dragenter handler. + return; + } else { + // If by this time no drag source reacted, tell browser not to drag. + e.preventDefault(); + } + }; + + this.handleTopDragEndCapture = function () { + if (_this.clearCurrentDragSourceNode()) { + // Firefox can dispatch this event in an infinite loop + // if dragend handler does something like showing an alert. + // Only proceed if we have not handled it already. + _this.actions.endDrag(); + } + }; + + this.handleTopDragEnterCapture = function (e) { + _this.dragEnterTargetIds = []; + + var isFirstEnter = _this.enterLeaveCounter.enter(e.target); + + if (!isFirstEnter || _this.monitor.isDragging()) { + return; + } + + var dataTransfer = e.dataTransfer; + var nativeType = matchNativeItemType(dataTransfer); + + if (nativeType) { + // A native item (such as file or URL) dragged from outside the document + _this.beginDragNativeItem(nativeType, dataTransfer); + } + }; + + this.handleTopDragEnter = function (e) { + var dragEnterTargetIds = _this.dragEnterTargetIds; + _this.dragEnterTargetIds = []; + + if (!_this.monitor.isDragging()) { + // This is probably a native item type we don't understand. + return; + } + + _this.altKeyPressed = e.altKey; + + if (!isFirefox()) { + // Don't emit hover in `dragenter` on Firefox due to an edge case. + // If the target changes position as the result of `dragenter`, Firefox + // will still happily dispatch `dragover` despite target being no longer + // there. The easy solution is to only fire `hover` in `dragover` on FF. + _this.actions.hover(dragEnterTargetIds, { + clientOffset: getEventClientOffset(e) + }); + } + + var canDrop = dragEnterTargetIds.some(function (targetId) { + return _this.monitor.canDropOnTarget(targetId); + }); + + if (canDrop) { + // IE requires this to fire dragover events + e.preventDefault(); + + if (e.dataTransfer) { + e.dataTransfer.dropEffect = _this.getCurrentDropEffect(); + } + } + }; + + this.handleTopDragOverCapture = function () { + _this.dragOverTargetIds = []; + }; + + this.handleTopDragOver = function (e) { + var dragOverTargetIds = _this.dragOverTargetIds; + _this.dragOverTargetIds = []; + + if (!_this.monitor.isDragging()) { + // This is probably a native item type we don't understand. + // Prevent default "drop and blow away the whole document" action. + e.preventDefault(); + + if (e.dataTransfer) { + e.dataTransfer.dropEffect = 'none'; + } + + return; + } + + _this.altKeyPressed = e.altKey; + + _this.actions.hover(dragOverTargetIds || [], { + clientOffset: getEventClientOffset(e) + }); + + var canDrop = (dragOverTargetIds || []).some(function (targetId) { + return _this.monitor.canDropOnTarget(targetId); + }); + + if (canDrop) { + // Show user-specified drop effect. + e.preventDefault(); + + if (e.dataTransfer) { + e.dataTransfer.dropEffect = _this.getCurrentDropEffect(); + } + } else if (_this.isDraggingNativeItem()) { + // Don't show a nice cursor but still prevent default + // "drop and blow away the whole document" action. + e.preventDefault(); + } else { + e.preventDefault(); + + if (e.dataTransfer) { + e.dataTransfer.dropEffect = 'none'; + } + } + }; + + this.handleTopDragLeaveCapture = function (e) { + if (_this.isDraggingNativeItem()) { + e.preventDefault(); + } + + var isLastLeave = _this.enterLeaveCounter.leave(e.target); + + if (!isLastLeave) { + return; + } + + if (_this.isDraggingNativeItem()) { + _this.endDragNativeItem(); + } + }; + + this.handleTopDropCapture = function (e) { + _this.dropTargetIds = []; + e.preventDefault(); + + if (_this.isDraggingNativeItem()) { + _this.currentNativeSource.loadDataTransfer(e.dataTransfer); + } + + _this.enterLeaveCounter.reset(); + }; + + this.handleTopDrop = function (e) { + var dropTargetIds = _this.dropTargetIds; + _this.dropTargetIds = []; + + _this.actions.hover(dropTargetIds, { + clientOffset: getEventClientOffset(e) + }); + + _this.actions.drop({ + dropEffect: _this.getCurrentDropEffect() + }); + + if (_this.isDraggingNativeItem()) { + _this.endDragNativeItem(); + } else { + _this.endDragIfSourceWasRemovedFromDOM(); + } + }; + + this.handleSelectStart = function (e) { + var target = e.target; // Only IE requires us to explicitly say + // we want drag drop operation to start + + if (typeof target.dragDrop !== 'function') { + return; + } // Inputs and textareas should be selectable + + + if (target.tagName === 'INPUT' || target.tagName === 'SELECT' || target.tagName === 'TEXTAREA' || target.isContentEditable) { + return; + } // For other targets, ask IE + // to enable drag and drop + + + e.preventDefault(); + target.dragDrop(); + }; + + this.options = new OptionsReader(globalContext); + this.actions = manager.getActions(); + this.monitor = manager.getMonitor(); + this.registry = manager.getRegistry(); + this.enterLeaveCounter = new EnterLeaveCounter_EnterLeaveCounter(this.isNodeInDocument); + } // public for test + + + HTML5Backend_createClass(HTML5Backend, [{ + key: "setup", + value: function setup() { + if (this.window === undefined) { + return; + } + + if (this.window.__isReactDndBackendSetUp) { + throw new Error('Cannot have two HTML5 backends at the same time.'); + } + + this.window.__isReactDndBackendSetUp = true; + this.addEventListeners(this.window); + } + }, { + key: "teardown", + value: function teardown() { + if (this.window === undefined) { + return; + } + + this.window.__isReactDndBackendSetUp = false; + this.removeEventListeners(this.window); + this.clearCurrentDragSourceNode(); + + if (this.asyncEndDragFrameId) { + this.window.cancelAnimationFrame(this.asyncEndDragFrameId); + } + } + }, { + key: "connectDragPreview", + value: function connectDragPreview(sourceId, node, options) { + var _this2 = this; + + this.sourcePreviewNodeOptions.set(sourceId, options); + this.sourcePreviewNodes.set(sourceId, node); + return function () { + _this2.sourcePreviewNodes.delete(sourceId); + + _this2.sourcePreviewNodeOptions.delete(sourceId); + }; + } + }, { + key: "connectDragSource", + value: function connectDragSource(sourceId, node, options) { + var _this3 = this; + + this.sourceNodes.set(sourceId, node); + this.sourceNodeOptions.set(sourceId, options); + + var handleDragStart = function handleDragStart(e) { + return _this3.handleDragStart(e, sourceId); + }; + + var handleSelectStart = function handleSelectStart(e) { + return _this3.handleSelectStart(e); + }; + + node.setAttribute('draggable', 'true'); + node.addEventListener('dragstart', handleDragStart); + node.addEventListener('selectstart', handleSelectStart); + return function () { + _this3.sourceNodes.delete(sourceId); + + _this3.sourceNodeOptions.delete(sourceId); + + node.removeEventListener('dragstart', handleDragStart); + node.removeEventListener('selectstart', handleSelectStart); + node.setAttribute('draggable', 'false'); + }; + } + }, { + key: "connectDropTarget", + value: function connectDropTarget(targetId, node) { + var _this4 = this; + + var handleDragEnter = function handleDragEnter(e) { + return _this4.handleDragEnter(e, targetId); + }; + + var handleDragOver = function handleDragOver(e) { + return _this4.handleDragOver(e, targetId); + }; + + var handleDrop = function handleDrop(e) { + return _this4.handleDrop(e, targetId); + }; + + node.addEventListener('dragenter', handleDragEnter); + node.addEventListener('dragover', handleDragOver); + node.addEventListener('drop', handleDrop); + return function () { + node.removeEventListener('dragenter', handleDragEnter); + node.removeEventListener('dragover', handleDragOver); + node.removeEventListener('drop', handleDrop); + }; + } + }, { + key: "addEventListeners", + value: function addEventListeners(target) { + // SSR Fix (https://github.com/react-dnd/react-dnd/pull/813 + if (!target.addEventListener) { + return; + } + + target.addEventListener('dragstart', this.handleTopDragStart); + target.addEventListener('dragstart', this.handleTopDragStartCapture, true); + target.addEventListener('dragend', this.handleTopDragEndCapture, true); + target.addEventListener('dragenter', this.handleTopDragEnter); + target.addEventListener('dragenter', this.handleTopDragEnterCapture, true); + target.addEventListener('dragleave', this.handleTopDragLeaveCapture, true); + target.addEventListener('dragover', this.handleTopDragOver); + target.addEventListener('dragover', this.handleTopDragOverCapture, true); + target.addEventListener('drop', this.handleTopDrop); + target.addEventListener('drop', this.handleTopDropCapture, true); + } + }, { + key: "removeEventListeners", + value: function removeEventListeners(target) { + // SSR Fix (https://github.com/react-dnd/react-dnd/pull/813 + if (!target.removeEventListener) { + return; + } + + target.removeEventListener('dragstart', this.handleTopDragStart); + target.removeEventListener('dragstart', this.handleTopDragStartCapture, true); + target.removeEventListener('dragend', this.handleTopDragEndCapture, true); + target.removeEventListener('dragenter', this.handleTopDragEnter); + target.removeEventListener('dragenter', this.handleTopDragEnterCapture, true); + target.removeEventListener('dragleave', this.handleTopDragLeaveCapture, true); + target.removeEventListener('dragover', this.handleTopDragOver); + target.removeEventListener('dragover', this.handleTopDragOverCapture, true); + target.removeEventListener('drop', this.handleTopDrop); + target.removeEventListener('drop', this.handleTopDropCapture, true); + } + }, { + key: "getCurrentSourceNodeOptions", + value: function getCurrentSourceNodeOptions() { + var sourceId = this.monitor.getSourceId(); + var sourceNodeOptions = this.sourceNodeOptions.get(sourceId); + return _objectSpread({ + dropEffect: this.altKeyPressed ? 'copy' : 'move' + }, sourceNodeOptions || {}); + } + }, { + key: "getCurrentDropEffect", + value: function getCurrentDropEffect() { + if (this.isDraggingNativeItem()) { + // It makes more sense to default to 'copy' for native resources + return 'copy'; + } + + return this.getCurrentSourceNodeOptions().dropEffect; + } + }, { + key: "getCurrentSourcePreviewNodeOptions", + value: function getCurrentSourcePreviewNodeOptions() { + var sourceId = this.monitor.getSourceId(); + var sourcePreviewNodeOptions = this.sourcePreviewNodeOptions.get(sourceId); + return _objectSpread({ + anchorX: 0.5, + anchorY: 0.5, + captureDraggingState: false + }, sourcePreviewNodeOptions || {}); + } + }, { + key: "isDraggingNativeItem", + value: function isDraggingNativeItem() { + var itemType = this.monitor.getItemType(); + return Object.keys(NativeTypes_namespaceObject).some(function (key) { + return NativeTypes_namespaceObject[key] === itemType; + }); + } + }, { + key: "beginDragNativeItem", + value: function beginDragNativeItem(type, dataTransfer) { + this.clearCurrentDragSourceNode(); + this.currentNativeSource = createNativeDragSource(type, dataTransfer); + this.currentNativeHandle = this.registry.addSource(type, this.currentNativeSource); + this.actions.beginDrag([this.currentNativeHandle]); + } + }, { + key: "setCurrentDragSourceNode", + value: function setCurrentDragSourceNode(node) { + var _this5 = this; + + this.clearCurrentDragSourceNode(); + this.currentDragSourceNode = node; // A timeout of > 0 is necessary to resolve Firefox issue referenced + // See: + // * https://github.com/react-dnd/react-dnd/pull/928 + // * https://github.com/react-dnd/react-dnd/issues/869 + + var MOUSE_MOVE_TIMEOUT = 1000; // Receiving a mouse event in the middle of a dragging operation + // means it has ended and the drag source node disappeared from DOM, + // so the browser didn't dispatch the dragend event. + // + // We need to wait before we start listening for mousemove events. + // This is needed because the drag preview needs to be drawn or else it fires an 'mousemove' event + // immediately in some browsers. + // + // See: + // * https://github.com/react-dnd/react-dnd/pull/928 + // * https://github.com/react-dnd/react-dnd/issues/869 + // + + this.mouseMoveTimeoutTimer = setTimeout(function () { + return _this5.window && _this5.window.addEventListener('mousemove', _this5.endDragIfSourceWasRemovedFromDOM, true); + }, MOUSE_MOVE_TIMEOUT); + } + }, { + key: "clearCurrentDragSourceNode", + value: function clearCurrentDragSourceNode() { + if (this.currentDragSourceNode) { + this.currentDragSourceNode = null; + + if (this.window) { + this.window.clearTimeout(this.mouseMoveTimeoutTimer || undefined); + this.window.removeEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true); + } + + this.mouseMoveTimeoutTimer = null; + return true; + } + + return false; + } + }, { + key: "handleDragStart", + value: function handleDragStart(e, sourceId) { + if (e.defaultPrevented) { + return; + } + + if (!this.dragStartSourceIds) { + this.dragStartSourceIds = []; + } + + this.dragStartSourceIds.unshift(sourceId); + } + }, { + key: "handleDragEnter", + value: function handleDragEnter(e, targetId) { + this.dragEnterTargetIds.unshift(targetId); + } + }, { + key: "handleDragOver", + value: function handleDragOver(e, targetId) { + if (this.dragOverTargetIds === null) { + this.dragOverTargetIds = []; + } + + this.dragOverTargetIds.unshift(targetId); + } + }, { + key: "handleDrop", + value: function handleDrop(e, targetId) { + this.dropTargetIds.unshift(targetId); + } + }, { + key: "window", + get: function get() { + return this.options.window; + } + }, { + key: "document", + get: function get() { + return this.options.document; + } + }]); + + return HTML5Backend; +}(); + + +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/getEmptyImage.js +var emptyImage; +function getEmptyImage() { + if (!emptyImage) { + emptyImage = new Image(); + emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='; + } + + return emptyImage; +} +// CONCATENATED MODULE: ./node_modules/react-dnd-html5-backend/dist/esm/index.js + + + + + +var esm_createHTML5Backend = function createHTML5Backend(manager, context) { + return new HTML5Backend_HTML5Backend(manager, context); +}; + +/* harmony default export */ var esm = __webpack_exports__["default"] = (esm_createHTML5Backend); + +/***/ }), +/* 645 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _pluginId=_interopRequireDefault(__webpack_require__(105));var getRequestUrl=function getRequestUrl(path){return"/".concat(_pluginId["default"],"/").concat(path);};var _default=getRequestUrl;exports["default"]=_default; + +/***/ }), +/* 646 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (true) { + module.exports = __webpack_require__(875); +} else {} + + +/***/ }), +/* 647 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _defineProperty2=_interopRequireDefault(__webpack_require__(11));var _objectWithoutProperties2=_interopRequireDefault(__webpack_require__(37));var _react=_interopRequireDefault(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _LayoutDnd=_interopRequireDefault(__webpack_require__(619));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i span {\n background: #aed4fb;\n }\n }\n }\n\n .dragHandle {\n outline: none;\n text-decoration: none;\n margin-top: -1px;\n\n > span {\n vertical-align: middle;\n position: relative;\n display: inline-block;\n width: 6px;\n height: 1px;\n padding: 0px !important;\n background: #b3b5b9;\n overflow: visible !important;\n transition: background 0.25s ease-out;\n\n &:before,\n &:after {\n content: '';\n display: inline-block;\n width: 6px;\n height: 1px;\n background: inherit;\n }\n\n &:before {\n position: absolute;\n top: -2px;\n left: 0;\n }\n\n &:after {\n position: absolute;\n bottom: -2px;\n left: 0;\n }\n }\n }\n\n > div {\n width: 90%;\n > a {\n color: rgb(35, 56, 77);\n }\n > a:hover {\n text-decoration: none;\n }\n span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &:first-of-type {\n display: flex;\n align-items: center;\n transition: color 0.25s ease-out;\n\n &:hover {\n .dragHandle {\n > span {\n background: #007eff;\n }\n }\n > a {\n color: #007eff;\n }\n color: #007eff;\n }\n\n span {\n &:last-of-type {\n padding-left: 10px;\n }\n }\n }\n\n &:last-of-type {\n display: inline-block;\n height: 100%;\n padding-right: 0px;\n line-height: 18px;\n text-align: right;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n img {\n display: inline-block;\n height: 14px;\n }\n }\n }\n"]);_templateObject3=function _templateObject3(){return data;};return data;}function _templateObject2(){var data=(0,_taggedTemplateLiteral2["default"])(["\n position: relative;\n display: inline-block;\n width: 100%;\n height: 0px;\n\n &:after {\n position: absolute;\n top: -15px;\n left: -5px;\n content: '';\n display: inline-block;\n width: calc(100% + 10px);\n height: 1px;\n margin-bottom: -25px;\n box-shadow: 0px -2px 4px 0px rgba(227, 233, 243, 0.5);\n }\n"]);_templateObject2=function _templateObject2(){return data;};return data;}function _templateObject(){var data=(0,_taggedTemplateLiteral2["default"])(["\n max-height: 116px;\n\n > ul {\n margin: 0 -20px 0;\n padding: 0 20px !important;\n list-style: none !important;\n overflow: auto;\n max-height: 110px;\n }\n"]);_templateObject=function _templateObject(){return data;};return data;}var ListWrapper=_styledComponents["default"].div(_templateObject());exports.ListWrapper=ListWrapper;var ListShadow=_styledComponents["default"].div(_templateObject2());exports.ListShadow=ListShadow;var Li=_styledComponents["default"].li(_templateObject3());exports.Li=Li; + +/***/ }), +/* 649 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +var _interopRequireWildcard=__webpack_require__(9);var _interopRequireDefault=__webpack_require__(0);Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _slicedToArray2=_interopRequireDefault(__webpack_require__(31));var _react=_interopRequireWildcard(__webpack_require__(1));var _propTypes=_interopRequireDefault(__webpack_require__(2));var _lodash=__webpack_require__(8);var _reactIntl=__webpack_require__(15);var _reactFontawesome=__webpack_require__(45);var _icons=__webpack_require__(94);var _pluginId=_interopRequireDefault(__webpack_require__(105));var _useLayoutDnd2=_interopRequireDefault(__webpack_require__(643));var _GrabWrapper=_interopRequireDefault(__webpack_require__(1720));var _Link=_interopRequireDefault(__webpack_require__(1721));var _NameWrapper=_interopRequireDefault(__webpack_require__(1722));var _RemoveWrapper=_interopRequireDefault(__webpack_require__(1723));var _SubWrapper=_interopRequireDefault(__webpack_require__(1724));var _Wrapper=_interopRequireDefault(__webpack_require__(1725));var _Close=_interopRequireDefault(__webpack_require__(1726));/* eslint-disable */var DraggedField=(0,_react.forwardRef)(function(_ref,ref){var children=_ref.children,count=_ref.count,goTo=_ref.goTo,componentUid=_ref.componentUid,isDragging=_ref.isDragging,isHidden=_ref.isHidden,isOverDynamicZone=_ref.isOverDynamicZone,isSub=_ref.isSub,label=_ref.label,name=_ref.name,_onClick=_ref.onClick,onRemove=_ref.onRemove,selectedItem=_ref.selectedItem,style=_ref.style,type=_ref.type,withLongerHeight=_ref.withLongerHeight;var _useLayoutDnd=(0,_useLayoutDnd2["default"])(),isDraggingSibling=_useLayoutDnd.isDraggingSibling;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2["default"])(_useState,2),isOverRemove=_useState2[0],setIsOverRemove=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=(0,_slicedToArray2["default"])(_useState3,2),isOverEditBlock=_useState4[0],setIsOverEditBlock=_useState4[1];var opacity=isDragging?0.2:1;var isSelected=selectedItem===name;var showEditBlockOverState=isOverEditBlock&&!isOverDynamicZone;var displayedLabel=(0,_lodash.isEmpty)(label)?name:label;return/*#__PURE__*/_react["default"].createElement(_Wrapper["default"],{count:count,onDrag:function onDrag(){return setIsOverEditBlock(false);},isSelected:isSelected,isSub:isSub,isOverEditBlock:showEditBlockOverState,isOverRemove:isOverRemove,style:style,withLongerHeight:withLongerHeight},!isHidden&&/*#__PURE__*/_react["default"].createElement(_SubWrapper["default"],{className:"sub_wrapper",isSelected:isSelected,isOverEditBlock:isOverEditBlock,isOverRemove:isOverRemove,onMouseEnter:function onMouseEnter(){if(!isSub&&!isDraggingSibling){setIsOverEditBlock(true);}},onMouseLeave:function onMouseLeave(){setIsOverEditBlock(false);},onClick:function onClick(){_onClick(name);},style:{opacity:opacity},withLongerHeight:withLongerHeight},/*#__PURE__*/_react["default"].createElement(_GrabWrapper["default"],{className:"grab",isSelected:isSelected,isOverEditBlock:showEditBlockOverState,isOverRemove:isOverRemove,ref:ref,onClick:function onClick(e){e.stopPropagation();e.preventDefault();}},withLongerHeight?/*#__PURE__*/_react["default"].createElement(_icons.GrabLarge,{style:{marginRight:10,cursor:'move'}}):/*#__PURE__*/_react["default"].createElement(_icons.Grab,{style:{marginRight:10,cursor:'move'}})),/*#__PURE__*/_react["default"].createElement(_NameWrapper["default"],{className:"name",isSelected:isSelected,isOverEditBlock:showEditBlockOverState,isOverRemove:isOverRemove},children?/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement("span",null,displayedLabel),children):/*#__PURE__*/_react["default"].createElement("span",null,displayedLabel)),/*#__PURE__*/_react["default"].createElement(_RemoveWrapper["default"],{className:"remove",isSelected:isSelected,isOverEditBlock:showEditBlockOverState,isOverRemove:isOverRemove,onClick:onRemove,onMouseEnter:function onMouseEnter(){if(!isSub){setIsOverRemove(true);}},onMouseLeave:function onMouseLeave(){return setIsOverRemove(false);}},isOverRemove&&!isSelected&&/*#__PURE__*/_react["default"].createElement(_Close["default"],null),(showEditBlockOverState&&!isOverRemove||isSelected)&&/*#__PURE__*/_react["default"].createElement(_icons.Pencil,null),!showEditBlockOverState&&!isOverRemove&&!isSelected&&/*#__PURE__*/_react["default"].createElement(_Close["default"],{width:"10px",height:"10px"}))),type==='component'&&/*#__PURE__*/_react["default"].createElement(_reactIntl.FormattedMessage,{id:"".concat(_pluginId["default"],".components.FieldItem.linkToComponentLayout")},function(msg){return/*#__PURE__*/_react["default"].createElement(_Link["default"],{onClick:function onClick(e){e.stopPropagation();goTo("/plugins/".concat(_pluginId["default"],"/ctm-configurations/edit-settings/components/").concat(componentUid,"/"));}},/*#__PURE__*/_react["default"].createElement(_reactFontawesome.FontAwesomeIcon,{icon:"cog"}),msg);}));});DraggedField.defaultProps={children:null,count:1,goTo:function goTo(){},componentUid:null,isDragging:false,isHidden:false,isOverDynamicZone:false,isSub:false,label:'',onClick:function onClick(){},onRemove:function onRemove(){},selectedItem:'',shouldToggleDraggedFieldOverState:false,style:{},withLongerHeight:false};DraggedField.propTypes={children:_propTypes["default"].node,count:_propTypes["default"].number,goTo:_propTypes["default"].func,componentUid:_propTypes["default"].string,isDragging:_propTypes["default"].bool,isHidden:_propTypes["default"].bool,isOverDynamicZone:_propTypes["default"].bool,isSub:_propTypes["default"].bool,label:_propTypes["default"].string,name:_propTypes["default"].string.isRequired,onClick:_propTypes["default"].func,onRemove:_propTypes["default"].func,selectedItem:_propTypes["default"].string,style:_propTypes["default"].object,type:_propTypes["default"].string,withLongerHeight:_propTypes["default"].bool};DraggedField.displayName='DraggedField';var _default=DraggedField;exports["default"]=_default; + +/***/ }), +/* 650 */ +/***/ (function(module, exports, __webpack_require__) { + +/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { + "use strict"; + + if (global.setImmediate) { + return; + } + + var nextHandle = 1; // Spec says greater than zero + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global.document; + var registerImmediate; + + function setImmediate(callback) { + // Callback can either be a function or a string + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + // Copy function arguments + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + // Store and register the task + var task = { callback: callback, args: args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } + + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined, args); + break; + } + } + + function runIfPresent(handle) { + // From the spec: "Wait until any invocations of this algorithm started before this one have completed." + // So if we're currently running a task, we'll need to delay this invocation. + if (currentlyRunningATask) { + // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a + // "too much recursion" error. + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function () { runIfPresent(handle); }); + }; + } + + function canUsePostMessage() { + // The test against `importScripts` prevents this implementation from being installed inside a web worker, + // where `global.postMessage` means something completely different and can't be used for this purpose. + if (global.postMessage && !global.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global.onmessage; + global.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global.postMessage("", "*"); + global.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + + function installPostMessageImplementation() { + // Installs an event handler on `global` for the `message` event: see + // * https://developer.mozilla.org/en/DOM/window.postMessage + // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages + + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global && + typeof event.data === "string" && + event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + + if (global.addEventListener) { + global.addEventListener("message", onGlobalMessage, false); + } else { + global.attachEvent("onmessage", onGlobalMessage); + } + + registerImmediate = function(handle) { + global.postMessage(messagePrefix + handle, "*"); + }; + } + + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; + } + + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + // Create a + + diff --git a/server/public/production.html b/server/public/production.html new file mode 100644 index 00000000..f4b6bafa --- /dev/null +++ b/server/public/production.html @@ -0,0 +1,30 @@ + + + + + + Welcome to your Strapi app + + + + + + + + +
    +

    +
    +
    + <%= strapi.config.environment %> +

    The server is running successfully.

    +
    +
    +

    <%= serverTime %>

    +
    +
    +
    + + diff --git a/server/public/robots.txt b/server/public/robots.txt new file mode 100644 index 00000000..ff5d3164 --- /dev/null +++ b/server/public/robots.txt @@ -0,0 +1,3 @@ +# To prevent search engines from seeing the site altogether, uncomment the next two lines: +# User-Agent: * +# Disallow: / diff --git a/server/public/uploads/.gitkeep b/server/public/uploads/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/server/yarn.lock b/server/yarn.lock new file mode 100644 index 00000000..2f4b0283 --- /dev/null +++ b/server/yarn.lock @@ -0,0 +1,9672 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" + integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== + dependencies: + browserslist "^4.9.1" + invariant "^2.2.4" + semver "^5.5.0" + +"@babel/core@^7.4.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" + integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.9.0" + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helpers" "^7.9.0" + "@babel/parser" "^7.9.0" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce" + integrity sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA== + dependencies: + "@babel/types" "^7.9.0" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz#60bc0bc657f63a0924ff9a4b4a0b24a13cf4deee" + integrity sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz#c84097a427a061ac56a1c30ebf54b7b22d241503" + integrity sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-builder-react-jsx-experimental@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx-experimental/-/helper-builder-react-jsx-experimental-7.9.0.tgz#066d80262ade488f9c1b1823ce5db88a4cedaa43" + integrity sha512-3xJEiyuYU4Q/Ar9BsHisgdxZsRlsShMe90URZ0e6przL26CCs8NJbDoxH94kKT17PcxlMhsCAwZd90evCo26VQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-module-imports" "^7.8.3" + "@babel/types" "^7.9.0" + +"@babel/helper-builder-react-jsx@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.9.0.tgz#16bf391990b57732700a3278d4d9a81231ea8d32" + integrity sha512-weiIo4gaoGgnhff54GQ3P5wsUQmnSwpkvU0r6ZHq6TzoSzKy4JxHEgnxNytaKbov2a9z/CVNyzliuCOUPEX3Jw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/types" "^7.9.0" + +"@babel/helper-compilation-targets@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" + integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== + dependencies: + "@babel/compat-data" "^7.8.6" + browserslist "^4.9.1" + invariant "^2.2.4" + levenary "^1.1.1" + semver "^5.5.0" + +"@babel/helper-create-class-features-plugin@^7.8.3": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz#243a5b46e2f8f0f674dc1387631eb6b28b851de0" + integrity sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-split-export-declaration" "^7.8.3" + +"@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz#5d84180b588f560b7864efaeea89243e58312087" + integrity sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-regex" "^7.8.3" + regexpu-core "^4.7.0" + +"@babel/helper-define-map@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz#a0655cad5451c3760b726eba875f1cd8faa02c15" + integrity sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/types" "^7.8.3" + lodash "^4.17.13" + +"@babel/helper-explode-assignable-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz#a728dc5b4e89e30fc2dfc7d04fa28a930653f982" + integrity sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw== + dependencies: + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" + integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-hoist-variables@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz#1dbe9b6b55d78c9b4183fc8cdc6e30ceb83b7134" + integrity sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-member-expression-to-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" + integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" + integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-module-transforms@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" + integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-simple-access" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/template" "^7.8.6" + "@babel/types" "^7.9.0" + lodash "^4.17.13" + +"@babel/helper-optimise-call-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" + integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== + +"@babel/helper-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.8.3.tgz#139772607d51b93f23effe72105b319d2a4c6965" + integrity sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ== + dependencies: + lodash "^4.17.13" + +"@babel/helper-remap-async-to-generator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz#273c600d8b9bf5006142c1e35887d555c12edd86" + integrity sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-wrap-function" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" + integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" + +"@babel/helper-simple-access@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" + integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== + dependencies: + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" + integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== + +"@babel/helper-wrap-function@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610" + integrity sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.8.3" + "@babel/types" "^7.8.3" + +"@babel/helpers@^7.9.0": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" + integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== + dependencies: + "@babel/template" "^7.8.3" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" + +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.8.6", "@babel/parser@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" + integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== + +"@babel/plugin-proposal-async-generator-functions@^7.2.0", "@babel/plugin-proposal-async-generator-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" + integrity sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-remap-async-to-generator" "^7.8.3" + "@babel/plugin-syntax-async-generators" "^7.8.0" + +"@babel/plugin-proposal-class-properties@^7.4.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" + integrity sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-proposal-dynamic-import@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054" + integrity sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + +"@babel/plugin-proposal-json-strings@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz#da5216b238a98b58a1e05d6852104b10f9a70d6b" + integrity sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.0" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" + integrity sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + +"@babel/plugin-proposal-numeric-separator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8" + integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + +"@babel/plugin-proposal-object-rest-spread@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz#a28993699fc13df165995362693962ba6b061d6f" + integrity sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + +"@babel/plugin-proposal-optional-catch-binding@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz#9dee96ab1650eed88646ae9734ca167ac4a9c5c9" + integrity sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + +"@babel/plugin-proposal-optional-chaining@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58" + integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + +"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.8.3": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d" + integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.8" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-async-generators@^7.8.0": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-dynamic-import@^7.2.0", "@babel/plugin-syntax-dynamic-import@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-json-strings@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-jsx@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz#521b06c83c40480f1e58b4fd33b92eceb1d6ea94" + integrity sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.8.0", "@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f" + integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-object-rest-spread@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz#3acdece695e6b13aaf57fc291d1a800950c71391" + integrity sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-arrow-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" + integrity sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-async-to-generator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz#4308fad0d9409d71eafb9b1a6ee35f9d64b64086" + integrity sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-remap-async-to-generator" "^7.8.3" + +"@babel/plugin-transform-block-scoped-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz#437eec5b799b5852072084b3ae5ef66e8349e8a3" + integrity sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-block-scoping@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz#97d35dab66857a437c166358b91d09050c868f3a" + integrity sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + lodash "^4.17.13" + +"@babel/plugin-transform-classes@^7.9.0": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz#8603fc3cc449e31fdbdbc257f67717536a11af8d" + integrity sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-define-map" "^7.8.3" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-split-export-declaration" "^7.8.3" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz#96d0d28b7f7ce4eb5b120bb2e0e943343c86f81b" + integrity sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-destructuring@^7.8.3": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz#fadb2bc8e90ccaf5658de6f8d4d22ff6272a2f4b" + integrity sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e" + integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-duplicate-keys@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz#8d12df309aa537f272899c565ea1768e286e21f1" + integrity sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-exponentiation-operator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz#581a6d7f56970e06bf51560cd64f5e947b70d7b7" + integrity sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-for-of@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz#0f260e27d3e29cd1bb3128da5e76c761aa6c108e" + integrity sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-function-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz#279373cb27322aaad67c2683e776dfc47196ed8b" + integrity sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ== + dependencies: + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz#aef239823d91994ec7b68e55193525d76dbd5dc1" + integrity sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-member-expression-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz#963fed4b620ac7cbf6029c755424029fa3a40410" + integrity sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-modules-amd@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" + integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== + dependencies: + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helper-plugin-utils" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + +"@babel/plugin-transform-modules-commonjs@^7.6.0", "@babel/plugin-transform-modules-commonjs@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" + integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== + dependencies: + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-simple-access" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + +"@babel/plugin-transform-modules-systemjs@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" + integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== + dependencies: + "@babel/helper-hoist-variables" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helper-plugin-utils" "^7.8.3" + babel-plugin-dynamic-import-node "^2.3.0" + +"@babel/plugin-transform-modules-umd@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz#e909acae276fec280f9b821a5f38e1f08b480697" + integrity sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ== + dependencies: + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz#a2a72bffa202ac0e2d0506afd0939c5ecbc48c6c" + integrity sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + +"@babel/plugin-transform-new-target@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz#60cc2ae66d85c95ab540eb34babb6434d4c70c43" + integrity sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-object-super@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz#ebb6a1e7a86ffa96858bd6ac0102d65944261725" + integrity sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.3" + +"@babel/plugin-transform-parameters@^7.8.7": + version "7.9.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz#3028d0cc20ddc733166c6e9c8534559cee09f54a" + integrity sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-property-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz#33194300d8539c1ed28c62ad5087ba3807b98263" + integrity sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-react-display-name@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz#70ded987c91609f78353dd76d2fb2a0bb991e8e5" + integrity sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-react-jsx-development@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.9.0.tgz#3c2a130727caf00c2a293f0aed24520825dbf754" + integrity sha512-tK8hWKrQncVvrhvtOiPpKrQjfNX3DtkNLSX4ObuGcpS9p0QrGetKmlySIGR07y48Zft8WVgPakqd/bk46JrMSw== + dependencies: + "@babel/helper-builder-react-jsx-experimental" "^7.9.0" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + +"@babel/plugin-transform-react-jsx-self@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.9.0.tgz#f4f26a325820205239bb915bad8e06fcadabb49b" + integrity sha512-K2ObbWPKT7KUTAoyjCsFilOkEgMvFG+y0FqOl6Lezd0/13kMkkjHskVsZvblRPj1PHA44PrToaZANrryppzTvQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + +"@babel/plugin-transform-react-jsx-source@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.9.0.tgz#89ef93025240dd5d17d3122294a093e5e0183de0" + integrity sha512-K6m3LlSnTSfRkM6FcRk8saNEeaeyG5k7AVkBU2bZK3+1zdkSED3qNdsWrUgQBeTVD2Tp3VMmerxVO2yM5iITmw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + +"@babel/plugin-transform-react-jsx@^7.9.4": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz#86f576c8540bd06d0e95e0b61ea76d55f6cbd03f" + integrity sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw== + dependencies: + "@babel/helper-builder-react-jsx" "^7.9.0" + "@babel/helper-builder-react-jsx-experimental" "^7.9.0" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-jsx" "^7.8.3" + +"@babel/plugin-transform-regenerator@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8" + integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA== + dependencies: + regenerator-transform "^0.14.2" + +"@babel/plugin-transform-reserved-words@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz#9a0635ac4e665d29b162837dd3cc50745dfdf1f5" + integrity sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-runtime@^7.4.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b" + integrity sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + resolve "^1.8.1" + semver "^5.5.1" + +"@babel/plugin-transform-shorthand-properties@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8" + integrity sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-spread@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz#9c8ffe8170fdfb88b114ecb920b82fb6e95fe5e8" + integrity sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-sticky-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz#be7a1290f81dae767475452199e1f76d6175b100" + integrity sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-regex" "^7.8.3" + +"@babel/plugin-transform-template-literals@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz#7bfa4732b455ea6a43130adc0ba767ec0e402a80" + integrity sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-typeof-symbol@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412" + integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-transform-unicode-regex@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" + integrity sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/polyfill@^7.4.3": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.8.7.tgz#151ec24c7135481336168c3bd8b8bf0cf91c032f" + integrity sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.4" + +"@babel/preset-env@^7.4.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" + integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== + dependencies: + "@babel/compat-data" "^7.9.0" + "@babel/helper-compilation-targets" "^7.8.7" + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-proposal-async-generator-functions" "^7.8.3" + "@babel/plugin-proposal-dynamic-import" "^7.8.3" + "@babel/plugin-proposal-json-strings" "^7.8.3" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-proposal-numeric-separator" "^7.8.3" + "@babel/plugin-proposal-object-rest-spread" "^7.9.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" + "@babel/plugin-proposal-optional-chaining" "^7.9.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.8.0" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.8.3" + "@babel/plugin-transform-arrow-functions" "^7.8.3" + "@babel/plugin-transform-async-to-generator" "^7.8.3" + "@babel/plugin-transform-block-scoped-functions" "^7.8.3" + "@babel/plugin-transform-block-scoping" "^7.8.3" + "@babel/plugin-transform-classes" "^7.9.0" + "@babel/plugin-transform-computed-properties" "^7.8.3" + "@babel/plugin-transform-destructuring" "^7.8.3" + "@babel/plugin-transform-dotall-regex" "^7.8.3" + "@babel/plugin-transform-duplicate-keys" "^7.8.3" + "@babel/plugin-transform-exponentiation-operator" "^7.8.3" + "@babel/plugin-transform-for-of" "^7.9.0" + "@babel/plugin-transform-function-name" "^7.8.3" + "@babel/plugin-transform-literals" "^7.8.3" + "@babel/plugin-transform-member-expression-literals" "^7.8.3" + "@babel/plugin-transform-modules-amd" "^7.9.0" + "@babel/plugin-transform-modules-commonjs" "^7.9.0" + "@babel/plugin-transform-modules-systemjs" "^7.9.0" + "@babel/plugin-transform-modules-umd" "^7.9.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" + "@babel/plugin-transform-new-target" "^7.8.3" + "@babel/plugin-transform-object-super" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.8.7" + "@babel/plugin-transform-property-literals" "^7.8.3" + "@babel/plugin-transform-regenerator" "^7.8.7" + "@babel/plugin-transform-reserved-words" "^7.8.3" + "@babel/plugin-transform-shorthand-properties" "^7.8.3" + "@babel/plugin-transform-spread" "^7.8.3" + "@babel/plugin-transform-sticky-regex" "^7.8.3" + "@babel/plugin-transform-template-literals" "^7.8.3" + "@babel/plugin-transform-typeof-symbol" "^7.8.4" + "@babel/plugin-transform-unicode-regex" "^7.8.3" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.9.0" + browserslist "^4.9.1" + core-js-compat "^3.6.2" + invariant "^2.2.2" + levenary "^1.1.1" + semver "^5.5.0" + +"@babel/preset-modules@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" + integrity sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/preset-react@^7.0.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.9.4.tgz#c6c97693ac65b6b9c0b4f25b948a8f665463014d" + integrity sha512-AxylVB3FXeOTQXNXyiuAQJSvss62FEotbX2Pzx3K/7c+MKJMdSg6Ose6QYllkdCFA8EInCJVw7M/o5QbLuA4ZQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-react-display-name" "^7.8.3" + "@babel/plugin-transform-react-jsx" "^7.9.4" + "@babel/plugin-transform-react-jsx-development" "^7.9.0" + "@babel/plugin-transform-react-jsx-self" "^7.9.0" + "@babel/plugin-transform-react-jsx-source" "^7.9.0" + +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.3", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" + integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.8.3", "@babel/template@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" + integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + +"@babel/traverse@^7.4.5", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" + integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.9.0" + "@babel/helper-function-name" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.9.0" + "@babel/types" "^7.9.0" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.4.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" + integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@buffetjs/core@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@buffetjs/core/-/core-3.0.1.tgz#d508415a34d31f187008245b2e209e242c27e019" + integrity sha512-OLtHynNaaUJ03YRundxHRiXVs//IdFwep/fS3Xt8aYJH/xtVhPO5nqLGAkN8T6jyLVn+fxYZ7zy+T9ccrta3TQ== + dependencies: + "@buffetjs/hooks" "3.0.0" + "@buffetjs/icons" "3.0.0" + "@buffetjs/styles" "3.0.0" + "@buffetjs/utils" "3.0.0" + "@fortawesome/fontawesome-svg-core" "^1.2.25" + "@fortawesome/free-regular-svg-icons" "^5.11.2" + "@fortawesome/free-solid-svg-icons" "^5.11.2" + "@fortawesome/react-fontawesome" "^0.1.4" + invariant "^2.2.4" + moment "^2.24.0" + rc-input-number "^4.5.0" + react-dates "^21.5.1" + react-moment-proptypes "^1.7.0" + +"@buffetjs/custom@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@buffetjs/custom/-/custom-3.0.1.tgz#41ced07dc35e0442ecc4ec263e304b181f576e8e" + integrity sha512-TmsO8iKsOZPFigwEoJ2xxwzk7w0qT26QbKldmKepV1Y9LZHjWaSjjHEJpSlpzgU1/5FxOhaeQmTJTzWHMrvcUQ== + dependencies: + "@buffetjs/core" "3.0.1" + "@buffetjs/styles" "3.0.0" + "@buffetjs/utils" "3.0.0" + moment "^2.24.0" + react-moment-proptypes "^1.7.0" + +"@buffetjs/hooks@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@buffetjs/hooks/-/hooks-3.0.0.tgz#998a502a9acc419b49d0e437d60bc5d6df4727c5" + integrity sha512-4fi0DTgDElk5cKr7Z5jmRneasioQVUEWsv2oTXH+HA0IPiZS7Ob1dUcPsRltYcOFg/VygGHmbs0VPb6NCtl6Qw== + +"@buffetjs/icons@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@buffetjs/icons/-/icons-3.0.0.tgz#7c210df2cc741a303f3250bbac3e877da3d8bdad" + integrity sha512-6SFbizWbsTFzjTfIAK1/9PsnTJ3L5NwA3fqcgIZpGxSIdWH9+RIJXOPUfWaqFVpq9BChlul6HludcuZQex0Ceg== + +"@buffetjs/styles@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@buffetjs/styles/-/styles-3.0.0.tgz#0c453adf264cac62404829d363a8daf953f1b79f" + integrity sha512-HSaQkYhkWRKIZq9vHnXrG+oBe43xw73BJd5DfmUdkDXPMQe6x5tkBZf4OhHtUlgemjuamiuR5qw4OYl+mmEp9Q== + dependencies: + "@fortawesome/fontawesome-free" "^5.12.0" + "@fortawesome/fontawesome-svg-core" "^1.2.22" + "@fortawesome/free-regular-svg-icons" "^5.10.2" + "@fortawesome/free-solid-svg-icons" "^5.10.2" + "@fortawesome/react-fontawesome" "^0.1.4" + react-dates "^21.1.0" + +"@buffetjs/utils@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@buffetjs/utils/-/utils-3.0.0.tgz#ed78f60996c7486a745bd87669dd8f78add03901" + integrity sha512-xO/CQIRyYkWcMuHmGuullpJVUEUhXLq2pF46+x27XXxD3OzuDnoJQP6rKnqi4p2sZOeQSMTgo3yXBA+ZcSJLeA== + dependencies: + yup "^0.27.0" + +"@emotion/cache@^10.0.27", "@emotion/cache@^10.0.9": + version "10.0.29" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0" + integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ== + dependencies: + "@emotion/sheet" "0.9.4" + "@emotion/stylis" "0.8.5" + "@emotion/utils" "0.11.3" + "@emotion/weak-memoize" "0.2.5" + +"@emotion/core@^10.0.9": + version "10.0.28" + resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.28.tgz#bb65af7262a234593a9e952c041d0f1c9b9bef3d" + integrity sha512-pH8UueKYO5jgg0Iq+AmCLxBsvuGtvlmiDCOuv8fGNYn3cowFpLN98L8zO56U0H1PjDIyAlXymgL3Wu7u7v6hbA== + dependencies: + "@babel/runtime" "^7.5.5" + "@emotion/cache" "^10.0.27" + "@emotion/css" "^10.0.27" + "@emotion/serialize" "^0.11.15" + "@emotion/sheet" "0.9.4" + "@emotion/utils" "0.11.3" + +"@emotion/css@^10.0.27", "@emotion/css@^10.0.9": + version "10.0.27" + resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.27.tgz#3a7458198fbbebb53b01b2b87f64e5e21241e14c" + integrity sha512-6wZjsvYeBhyZQYNrGoR5yPMYbMBNEnanDrqmsqS1mzDm1cOTu12shvl2j4QHNS36UaTE0USIJawCH9C8oW34Zw== + dependencies: + "@emotion/serialize" "^0.11.15" + "@emotion/utils" "0.11.3" + babel-plugin-emotion "^10.0.27" + +"@emotion/hash@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" + integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== + +"@emotion/is-prop-valid@^0.8.3": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" + integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== + dependencies: + "@emotion/memoize" "0.7.4" + +"@emotion/memoize@0.7.4": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + +"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16": + version "0.11.16" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad" + integrity sha512-G3J4o8by0VRrO+PFeSc3js2myYNOXVJ3Ya+RGVxnshRYgsvErfAOglKAiy1Eo1vhzxqtUvjCyS5gtewzkmvSSg== + dependencies: + "@emotion/hash" "0.8.0" + "@emotion/memoize" "0.7.4" + "@emotion/unitless" "0.7.5" + "@emotion/utils" "0.11.3" + csstype "^2.5.7" + +"@emotion/sheet@0.9.4": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.4.tgz#894374bea39ec30f489bbfc3438192b9774d32e5" + integrity sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA== + +"@emotion/stylis@0.8.5", "@emotion/stylis@^0.8.4": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" + integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== + +"@emotion/unitless@0.7.5", "@emotion/unitless@^0.7.4": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" + integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== + +"@emotion/utils@0.11.3": + version "0.11.3" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924" + integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw== + +"@emotion/weak-memoize@0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" + integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== + +"@fortawesome/fontawesome-common-types@^0.2.28": + version "0.2.28" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.28.tgz#1091bdfe63b3f139441e9cba27aa022bff97d8b2" + integrity sha512-gtis2/5yLdfI6n0ia0jH7NJs5i/Z/8M/ZbQL6jXQhCthEOe5Cr5NcQPhgTvFxNOtURE03/ZqUcEskdn2M+QaBg== + +"@fortawesome/fontawesome-free@^5.11.2", "@fortawesome/fontawesome-free@^5.12.0": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.13.0.tgz#fcb113d1aca4b471b709e8c9c168674fbd6e06d9" + integrity sha512-xKOeQEl5O47GPZYIMToj6uuA2syyFlq9EMSl2ui0uytjY9xbe8XS0pexNWmxrdcCyNGyDmLyYw5FtKsalBUeOg== + +"@fortawesome/fontawesome-svg-core@^1.2.22", "@fortawesome/fontawesome-svg-core@^1.2.25": + version "1.2.28" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.28.tgz#e5b8c8814ef375f01f5d7c132d3c3a2f83a3abf9" + integrity sha512-4LeaNHWvrneoU0i8b5RTOJHKx7E+y7jYejplR7uSVB34+mp3Veg7cbKk7NBCLiI4TyoWS1wh9ZdoyLJR8wSAdg== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + +"@fortawesome/free-brands-svg-icons@^5.11.2": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.13.0.tgz#e79de73ba6555055204828dca9c0691e7ce5242b" + integrity sha512-/6xXiJFCMEQxqxXbL0FPJpwq5Cv6MRrjsbJEmH/t5vOvB4dILDpnY0f7zZSlA8+TG7jwlt12miF/yZpZkykucA== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + +"@fortawesome/free-regular-svg-icons@^5.10.2", "@fortawesome/free-regular-svg-icons@^5.11.2": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.13.0.tgz#925a13d8bdda0678f71551828cac80ab47b8150c" + integrity sha512-70FAyiS5j+ANYD4dh9NGowTorNDnyvQHHpCM7FpnF7GxtDjBUCKdrFqCPzesEIpNDFNd+La3vex+jDk4nnUfpA== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + +"@fortawesome/free-solid-svg-icons@^5.10.2", "@fortawesome/free-solid-svg-icons@^5.11.2": + version "5.13.0" + resolved "https://registry.yarnpkg.com/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.13.0.tgz#44d9118668ad96b4fd5c9434a43efc5903525739" + integrity sha512-IHUgDJdomv6YtG4p3zl1B5wWf9ffinHIvebqQOmV3U+3SLw4fC+LUCCgwfETkbTtjy5/Qws2VoVf6z/ETQpFpg== + dependencies: + "@fortawesome/fontawesome-common-types" "^0.2.28" + +"@fortawesome/react-fontawesome@^0.1.4", "@fortawesome/react-fontawesome@^0.1.7": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.9.tgz#c865b9286c707407effcec99958043711367cd02" + integrity sha512-49V3WNysLZU5fZ3sqSuys4nGRytsrxJktbv3vuaXkEoxv22C6T7TEG0TW6+nqVjMnkfCQd5xOnmJoZHMF78tOw== + dependencies: + prop-types "^15.7.2" + +"@koa/cors@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@koa/cors/-/cors-3.0.0.tgz#df021b4df2dadf1e2b04d7c8ddf93ba2d42519cb" + integrity sha512-hDp+cXj6vTYSwHRJfiSpnf5dTMv3FmqNKh1or9BPJk4SHOviHnK9GoL9dT0ypt/E+hlkRkZ9edHylcosW3Ghrw== + dependencies: + vary "^1.1.2" + +"@purest/config@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@purest/config/-/config-1.0.1.tgz#d7dc6a0629032fd98d4ae5f59bec26ba1465c8e0" + integrity sha512-cEG7U0X26a25SVrHsja5TohAfnkd0jjkjNu0bPX6cQdrSe16j/WeOuX1+TXbkDuZcirIDv7gjHSMe5vfCnW2og== + dependencies: + extend "^3.0.0" + +"@purest/providers@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@purest/providers/-/providers-1.0.1.tgz#9c144f0f64f0b01b7b912f5e84655b79db2b73b0" + integrity sha512-1ekKViRit0jo1IzDLSRSziU/OpX9ckoj8uWvSWzHLASyTqhKZL9Pdq628guq7yT3qFcJeeaeaA5T97a4w7fpqA== + +"@request/api@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@request/api/-/api-0.6.0.tgz#e46e4c32e21db9ca72639701cba1ebfee06c1666" + integrity sha1-5G5MMuIducpyY5cBy6Hr/uBsFmY= + dependencies: + "@request/interface" "^0.1.0" + deep-copy "^1.1.2" + extend "^3.0.0" + +"@request/interface@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@request/interface/-/interface-0.1.0.tgz#c913504d3dc2810afad555b599aeaec2cc4c6768" + integrity sha1-yRNQTT3CgQr61VW1ma6uwsxMZ2g= + +"@sailshq/lodash@^3.10.2", "@sailshq/lodash@^3.10.3": + version "3.10.4" + resolved "https://registry.yarnpkg.com/@sailshq/lodash/-/lodash-3.10.4.tgz#2299648a81a67f4c6ee222c6cf8e261bd9c3fa50" + integrity sha512-YXJqp9gdHcZKAmBY/WnwFpPtNQp2huD/ME2YMurH2YHJvxrVzYsmpKw/pb7yINArRpp8E++fwbQd3ajYXGA45Q== + +"@sentry/apm@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.15.4.tgz#59af766d2bb4c9d98eda5ddba7a32a79ecc807a2" + integrity sha512-gcW225Jls1ShyBXMWN6zZyuVJwBOIQ63sI+URI2NSFsdpBpdpZ8yennIm+oMlSfb25Nzt9SId7TRSjPhlSbTZQ== + dependencies: + "@sentry/browser" "5.15.4" + "@sentry/hub" "5.15.4" + "@sentry/minimal" "5.15.4" + "@sentry/types" "5.15.4" + "@sentry/utils" "5.15.4" + tslib "^1.9.3" + +"@sentry/browser@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.15.4.tgz#5a7e7bad088556665ed8e69bceb0e18784e4f6c7" + integrity sha512-l/auT1HtZM3KxjCGQHYO/K51ygnlcuOrM+7Ga8gUUbU9ZXDYw6jRi0+Af9aqXKmdDw1naNxr7OCSy6NBrLWVZw== + dependencies: + "@sentry/core" "5.15.4" + "@sentry/types" "5.15.4" + "@sentry/utils" "5.15.4" + tslib "^1.9.3" + +"@sentry/core@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.15.4.tgz#08b617e093a636168be5aebad141d1f744217085" + integrity sha512-9KP4NM4SqfV5NixpvAymC7Nvp36Zj4dU2fowmxiq7OIbzTxGXDhwuN/t0Uh8xiqlkpkQqSECZ1OjSFXrBldetQ== + dependencies: + "@sentry/hub" "5.15.4" + "@sentry/minimal" "5.15.4" + "@sentry/types" "5.15.4" + "@sentry/utils" "5.15.4" + tslib "^1.9.3" + +"@sentry/hub@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.15.4.tgz#cb64473725a60eec63b0be58ed1143eaaf894bee" + integrity sha512-1XJ1SVqadkbUT4zLS0TVIVl99si7oHizLmghR8LMFl5wOkGEgehHSoOydQkIAX2C7sJmaF5TZ47ORBHgkqclUg== + dependencies: + "@sentry/types" "5.15.4" + "@sentry/utils" "5.15.4" + tslib "^1.9.3" + +"@sentry/minimal@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.15.4.tgz#113f01fefb86b7830994c3dfa7ad4889ba7b2003" + integrity sha512-GL4GZ3drS9ge+wmxkHBAMEwulaE7DMvAEfKQPDAjg2p3MfcCMhAYfuY4jJByAC9rg9OwBGGehz7UmhWMFjE0tw== + dependencies: + "@sentry/hub" "5.15.4" + "@sentry/types" "5.15.4" + tslib "^1.9.3" + +"@sentry/node@^5.7.1": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.15.4.tgz#e7bc3962d321a12b633743200165ca5f1757cb68" + integrity sha512-OfdhNEvOJZ55ZkCUcVgctjaZkOw7rmLzO5VyDTSgevA4uLsPaTNXSAeK2GSQBXc5J0KdRpNz4sSIyuxOS4Z7Vg== + dependencies: + "@sentry/apm" "5.15.4" + "@sentry/core" "5.15.4" + "@sentry/hub" "5.15.4" + "@sentry/types" "5.15.4" + "@sentry/utils" "5.15.4" + cookie "^0.3.1" + https-proxy-agent "^4.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/types@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.15.4.tgz#37f30e35b06e8e12ad1101f1beec3e9b88ca1aab" + integrity sha512-quPHPpeAuwID48HLPmqBiyXE3xEiZLZ5D3CEbU3c3YuvvAg8qmfOOTI6z4Z3Eedi7flvYpnx3n7N3dXIEz30Eg== + +"@sentry/utils@5.15.4": + version "5.15.4" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.15.4.tgz#02865ab3c9b745656cea0ab183767ec26c96f6e6" + integrity sha512-lO8SLBjrUDGADl0LOkd55R5oL510d/1SaI08/IBHZCxCUwI4TiYo5EPECq8mrj3XGfgCyq9osw33bymRlIDuSQ== + dependencies: + "@sentry/types" "5.15.4" + tslib "^1.9.3" + +"@sindresorhus/slugify@0.9.1": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@sindresorhus/slugify/-/slugify-0.9.1.tgz#892ad24d70b442c0a14fe519cb4019d59bc5069f" + integrity sha512-b6heYM9dzZD13t2GOiEQTDE0qX+I1GyOotMwKh9VQqzuNiVdPVT8dM43fe9HNb/3ul+Qwd5oKSEDrDIfhq3bnQ== + dependencies: + escape-string-regexp "^1.0.5" + lodash.deburr "^4.1.0" + +"@sindresorhus/slugify@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/slugify/-/slugify-0.11.0.tgz#642acb99adefa4187285fd17de88745afc161de8" + integrity sha512-ECTZT6z1hYDsopRh8GECaQ5L6hoJHVd4uq5hPi8se9GB31tgtZfnlM8G64hZVhJNmtJ9eIK0SuNhtsaPQStXEQ== + dependencies: + "@sindresorhus/transliterate" "^0.1.0" + escape-string-regexp "^2.0.0" + +"@sindresorhus/transliterate@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/transliterate/-/transliterate-0.1.0.tgz#c063bfc4102783fb19c91c2f8c1efb3adfb754be" + integrity sha512-bO6v0M0EuJPjm5Ntfow4nk+r3EZQ41n0ahvAmh766FzPqlm6V/2uDc01vZI3gLeI/1lgV2BTMb6QvxOk9z73ng== + dependencies: + escape-string-regexp "^2.0.0" + lodash.deburr "^4.1.0" + +"@types/asap@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@types/asap/-/asap-2.0.0.tgz#d529e9608c83499a62ae08c871c5e62271aa2963" + integrity sha512-upIS0Gt9Mc8eEpCbYMZ1K8rhNosfKUtimNcINce+zLwJF5UpM3Vv7yz3S5l/1IX+DxTa8lTkUjqynvjRXyJzsg== + +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/formidable@^1.0.31": + version "1.0.31" + resolved "https://registry.yarnpkg.com/@types/formidable/-/formidable-1.0.31.tgz#274f9dc2d0a1a9ce1feef48c24ca0859e7ec947b" + integrity sha512-dIhM5t8lRP0oWe2HF8MuPvdd1TpPTjhDMAqemcq6oIZQCBQTovhBAdTQ5L5veJB4pdQChadmHuxtB0YzqvfU3Q== + dependencies: + "@types/events" "*" + "@types/node" "*" + +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/hoist-non-react-statics@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" + integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + +"@types/invariant@^2.2.30": + version "2.2.31" + resolved "https://registry.yarnpkg.com/@types/invariant/-/invariant-2.2.31.tgz#4444c03004f215289dbca3856538434317dd28b2" + integrity sha512-jMlgg9pIURvy9jgBHCjQp/CyBjYHUwj91etVcDdXkFl2CwTFiQlB+8tcsMeXpXf2PFE5X2pjk4Gm43hQSMHAdA== + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*": + version "13.9.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.8.tgz#09976420fc80a7a00bf40680c63815ed8c7616f4" + integrity sha512-1WgO8hsyHynlx7nhP1kr0OFzsgKz5XDQL+Lfc3b1Q3qIln/n8cKD4m09NJ0+P1Rq7Zgnc7N0+SsMnoD1rEb0kA== + +"@types/parse-json@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" + integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== + +"@types/prop-types@*": + version "15.7.3" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" + integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== + +"@types/react@*": + version "16.9.29" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.29.tgz#41c0353b5ea916cdb7a7e89b80b09b268c87a2f8" + integrity sha512-aE5sV9XVqKvIR8Lqa73hXvlqBzz5hBG0jtV9jZ1uuEWRmW8KN/mdQQmsYlPx6z/b2xa8zR3jtk7WoT+2/m4suA== + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + +"@types/shallowequal@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/shallowequal/-/shallowequal-1.1.1.tgz#aad262bb3f2b1257d94c71d545268d592575c9b1" + integrity sha512-Lhni3aX80zbpdxRuWhnuYPm8j8UQaa571lHP/xI4W+7BAFhSIhRReXnqjEgT/XzPoXZTJkCqstFMJ8CZTK6IlQ== + +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +accepts@^1.3.5, accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn@^6.2.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== + +add-dom-event-listener@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/add-dom-event-listener/-/add-dom-event-listener-1.1.0.tgz#6a92db3a0dd0abc254e095c0f1dc14acbbaae310" + integrity sha512-WCxx1ixHT0GQU9hb0KI/mhgRQhnU+U3GvwY6ZvVjYq8rsihIGoaIOUbY0yMPBxLH5MDtr0kz3fisWGNcbWW7Jw== + dependencies: + object-assign "4.x" + +addressparser@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/addressparser/-/addressparser-1.0.1.tgz#47afbe1a2a9262191db6838e4fd1d39b40821746" + integrity sha1-R6++GiqSYhkdtoOOT9HTm0CCF0Y= + +agent-base@5: + version "5.1.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" + integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== + +airbnb-prop-types@^2.10.0, airbnb-prop-types@^2.14.0, airbnb-prop-types@^2.15.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.15.0.tgz#5287820043af1eb469f5b0af0d6f70da6c52aaef" + integrity sha512-jUh2/hfKsRjNFC4XONQrxo/n/3GG4Tn6Hl0WlFQN5PY9OMC9loSCoAYKnZsWaP8wEfd5xcrPloK0Zg6iS1xwVA== + dependencies: + array.prototype.find "^2.1.0" + function.prototype.name "^1.1.1" + has "^1.0.3" + is-regex "^1.0.4" + object-is "^1.0.1" + object.assign "^4.1.0" + object.entries "^1.1.0" + prop-types "^15.7.2" + prop-types-exact "^1.2.0" + react-is "^16.9.0" + +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" + integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== + +ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: + version "6.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@^3.0.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.1.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + +ansi-html@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" + integrity sha1-gTWEAhliqenm/QOflA0S9WynhZ4= + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +any-promise@^1.0.0, any-promise@^1.1.0, any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +aproba@^1.0.3, aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-each@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" + integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-flatten@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099" + integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== + +array-slice@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" + integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +array.prototype.find@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.1.1.tgz#3baca26108ca7affb08db06bf0be6cb3115a969c" + integrity sha512-mi+MYNJYLTx2eNYy+Yh6raoQacCsNeeMUaspFPh9Y141lFSsWxxB8V9mM2ye+eqiRs917J6/pJ4M9ZPzenWckA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.4" + +array.prototype.flat@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz#0de82b426b0318dbfdb940089e38b043d37f6c7b" + integrity sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +asap@^2.0.6, asap@~2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= + +asn1.js@^4.0.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +ast-types@0.9.6: + version "0.9.6" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.6.tgz#102c9e9e9005d3e7e3829bf0c4fa24ee862ee9b9" + integrity sha1-ECyenpAF0+fjgpvwxPok7oYu6bk= + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@^2.1.2, async@^2.6.2: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +autoprefixer@^9.5.1: + version "9.7.5" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.5.tgz#8df10b9ff9b5814a8d411a5cfbab9c793c392376" + integrity sha512-URo6Zvt7VYifomeAfJlMFnYDhow1rk2bufwkbamPEAtQFcL11moLk4PnR7n9vlu7M+BkXAZkHFA0mIcY7tjQFg== + dependencies: + browserslist "^4.11.0" + caniuse-lite "^1.0.30001036" + chalk "^2.4.2" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^7.0.27" + postcss-value-parser "^4.0.3" + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" + integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== + +axios@^0.19.2: + version "0.19.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" + integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== + dependencies: + follow-redirects "1.5.10" + +babel-loader@^8.0.5: + version "8.1.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" + integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw== + dependencies: + find-cache-dir "^2.1.0" + loader-utils "^1.4.0" + mkdirp "^0.5.3" + pify "^4.0.1" + schema-utils "^2.6.5" + +babel-plugin-dynamic-import-node@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" + integrity sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-emotion@^10.0.27: + version "10.0.29" + resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-10.0.29.tgz#89d8e497091fcd3d10331f097f1471e4cc3f35b4" + integrity sha512-7Jpi1OCxjyz0k163lKtqP+LHMg5z3S6A7vMBfHnF06l2unmtsOmFDzZBpGf0CWo1G4m8UACfVcDJiSiRuu/cSw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@emotion/hash" "0.8.0" + "@emotion/memoize" "0.7.4" + "@emotion/serialize" "^0.11.16" + babel-plugin-macros "^2.0.0" + babel-plugin-syntax-jsx "^6.18.0" + convert-source-map "^1.5.0" + escape-string-regexp "^1.0.5" + find-root "^1.1.0" + source-map "^0.5.7" + +babel-plugin-macros@^2.0.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" + integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== + dependencies: + "@babel/runtime" "^7.7.2" + cosmiconfig "^6.0.0" + resolve "^1.12.0" + +"babel-plugin-styled-components@>= 1": + version "1.10.7" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.7.tgz#3494e77914e9989b33cc2d7b3b29527a949d635c" + integrity sha512-MBMHGcIA22996n9hZRf/UJLVVgkEOITuR2SvjHLb5dSTUyR4ZRGn+ngITapes36FI3WLxZHfRhkA1ffHxihOrg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.11" + +babel-plugin-syntax-jsx@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" + integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= + +babel-runtime@6.x, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +batch@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" + integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bcryptjs@^2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.3.tgz#9ab5627b93e60621ff7cdac5da9733027df1d0cb" + integrity sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms= + +big.js@^3.1.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" + integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +binary-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" + integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== + +bindings@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-2.2.0.tgz#e1a574cdf528e4053019bb800b041c0ac88da493" + integrity sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA== + dependencies: + readable-stream "^2.3.5" + safe-buffer "^5.1.1" + +bluebird@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== + +bluebird@^3.5.0, bluebird@^3.5.5, bluebird@^3.7.0, bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +bonjour@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5" + integrity sha1-jokKGD2O6aI5OzhExpGkK897yfU= + dependencies: + array-flatten "^2.1.0" + deep-equal "^1.0.1" + dns-equal "^1.0.0" + dns-txt "^2.0.2" + multicast-dns "^6.0.1" + multicast-dns-service-types "^1.1.0" + +bookshelf@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/bookshelf/-/bookshelf-1.1.1.tgz#afa1e15871438bdb1b2d7b3adb654dac4f641c90" + integrity sha512-swHlUoCSBv7lS5P6Sbc3zTo64L8Yal98H7v/d1pJLrQLZjiJYjzsdEwnBmnbIr2zDEAZhJW3OZSJFj8ps6o9pQ== + dependencies: + bluebird "^3.7.2" + create-error "~0.3.1" + inflection "^1.12.0" + lodash "^4.17.15" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + +boom@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/boom/-/boom-7.3.0.tgz#733a6d956d33b0b1999da3fe6c12996950d017b9" + integrity sha512-Swpoyi2t5+GhOEGw8rEsKvTxFLIDiiKoUc2gsoV6Lyr43LHBIzch3k2MvYUs8RTROrIkVJ3Al0TkaOGjnb+B6A== + dependencies: + hoek "6.x.x" + +bootstrap@^4.3.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.4.1.tgz#8582960eea0c5cd2bede84d8b0baf3789c3e8b01" + integrity sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brcast@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/brcast/-/brcast-2.0.2.tgz#2db16de44140e418dc37fab10beec0369e78dcef" + integrity sha512-Tfn5JSE7hrUlFcOoaLzVvkbgIemIorMIyoMr3TgvszWW7jFt2C9PdeMLtysYD9RU0MmU17b69+XJG1eRY2OBRg== + +brorand@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browserify-aes@^1.0.0, browserify-aes@^1.0.4: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" + integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= + dependencies: + bn.js "^4.1.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" + integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= + dependencies: + bn.js "^4.1.1" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.2" + elliptic "^6.0.0" + inherits "^2.0.1" + parse-asn1 "^5.0.0" + +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +browserslist@^4.11.0, browserslist@^4.8.3, browserslist@^4.9.1: + version "4.11.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" + integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== + dependencies: + caniuse-lite "^1.0.30001038" + electron-to-chromium "^1.3.390" + node-releases "^1.1.53" + pkg-up "^2.0.0" + +bson@^1.1.1, bson@~1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.4.tgz#f76870d799f15b854dffb7ee32f0a874797f7e89" + integrity sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q== + +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-indexof@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c" + integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +buffer@^5.1.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.5.0.tgz#9c3caa3d623c33dd1c7ef584b89b88bf9c9bc1ce" + integrity sha512-9FTEDjLjwoAkEwyMGDjYJQN2gfRgOKBKRfiglhvibGbpeeU/pQn1bJxQqm32OD/AIeEuHxU9roxXxg34Byp/Ww== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + +buildmail@3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/buildmail/-/buildmail-3.10.0.tgz#c6826d716e7945bb6f6b1434b53985e029a03159" + integrity sha1-xoJtcW55RbtvaxQ0tTmF4CmgMVk= + dependencies: + addressparser "1.0.1" + libbase64 "0.1.0" + libmime "2.1.0" + libqp "1.1.0" + nodemailer-fetch "1.6.0" + nodemailer-shared "1.1.0" + +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + +bytes@3.1.0, bytes@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cacache@^12.0.2: + version "12.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" + integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +cache-content-type@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-content-type/-/cache-content-type-1.0.1.tgz#035cde2b08ee2129f4a8315ea8f00a00dba1453c" + integrity sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA== + dependencies: + mime-types "^2.1.18" + ylru "^1.2.0" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camel-case@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M= + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^5.0.0, camelcase@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelize@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" + integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= + +caniuse-lite@^1.0.30001036, caniuse-lite@^1.0.30001038: + version "1.0.30001038" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001038.tgz#44da3cbca2ab6cb6aa83d1be5d324e17f141caff" + integrity sha512-zii9quPo96XfOiRD4TrfYGs+QsGZpb2cGiMAzPjtf/hpFgB6zCPZgJb7I1+EATeMw/o+lG8FyRAnI+CWStHcaQ== + +captains-log@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/captains-log/-/captains-log-2.0.3.tgz#4fa10b4f389a62299872826fc6736704e7483469" + integrity sha512-hKlNLw/4Qz1vPDhAbn3pRexi8fzY7d3SwX/BtI2lMG09UqK1W1mf2pYFslau3ZPWxdcwBBcsLLi9ngs+xhqD2Q== + dependencies: + "@sailshq/lodash" "^3.10.2" + chalk "1.1.3" + rc "1.2.8" + semver "5.4.1" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chalk@1.1.3, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chokidar@3.3.1, chokidar@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" + integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.3.0" + optionalDependencies: + fsevents "~2.1.2" + +chokidar@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chrome-trace-event@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== + dependencies: + tslib "^1.9.0" + +ci-info@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +classnames@^2.2.0, classnames@^2.2.3, classnames@^2.2.5, classnames@^2.2.6: + version "2.2.6" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" + integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== + +clean-css@4.2.x: + version "4.2.3" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.3.tgz#507b5de7d97b48ee53d84adb0160ff6216380f78" + integrity sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA== + dependencies: + source-map "~0.6.0" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-spinners@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77" + integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ== + +cli-table3@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + +cliui@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrap-ansi "^2.0.0" + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +cls-bluebird@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cls-bluebird/-/cls-bluebird-2.1.0.tgz#37ef1e080a8ffb55c2f4164f536f1919e7968aee" + integrity sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4= + dependencies: + is-bluebird "^1.0.2" + shimmer "^1.1.0" + +clsx@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.0.tgz#62937c6adfea771247c34b54d320fb99624f5702" + integrity sha512-3avwM37fSK5oP6M5rQ9CNe99lwxhXDOeSWVPAOYF6OazUTgZCMb0yWlJpmdD74REy1gkEaFiub2ULv4fq9GUhA== + +co-body@^5.1.1: + version "5.2.0" + resolved "https://registry.yarnpkg.com/co-body/-/co-body-5.2.0.tgz#5a0a658c46029131e0e3a306f67647302f71c124" + integrity sha512-sX/LQ7LqUhgyaxzbe7IqwPeTr2yfpfUIQ/dgpKo6ZI4y4lpQA0YxAomWIY+7I7rHWcG02PG+OuPREzMW/5tszQ== + dependencies: + inflation "^2.0.0" + qs "^6.4.0" + raw-body "^2.2.0" + type-is "^1.6.14" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +codemirror@^5.46.0: + version "5.52.2" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.52.2.tgz#c29e1f7179f85eb0dd17c0586fa810e4838ff584" + integrity sha512-WCGCixNUck2HGvY8/ZNI1jYfxPG5cRHv0VjmWuNzbtCLz8qYA5d+je4QhSSCtCaagyeOwMi/HmmPTjBgiTm2lQ== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +colorette@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.1.0.tgz#1f943e5a357fac10b4e0f5aaef3b14cdc1af6ec7" + integrity sha512-6S062WDQUXi6hOfkO/sBPVwE5ASXY4G2+b4atvhJfSsuUUhIaUKlkjLe9692Ipyt5/a+IPF5aVTu3V5gvXq5cg== + +colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@2.17.x: + version "2.17.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +commander@~2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +compressible@^2.0.0, compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect-history-api-fallback@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== + +consola@^2.6.0: + version "2.11.3" + resolved "https://registry.yarnpkg.com/consola/-/consola-2.11.3.tgz#f7315836224c143ac5094b47fd4c816c2cd1560e" + integrity sha512-aoW0YIIAmeftGR8GSpw6CGQluNdkWMWh3yEFjH/hmynTYnMtibXszii3lxCXmk8YxJtI3FAK5aTiquA5VH68Gw== + +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +"consolidated-events@^1.1.1 || ^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/consolidated-events/-/consolidated-events-2.0.2.tgz#da8d8f8c2b232831413d9e190dc11669c79f4a91" + integrity sha512-2/uRVMdRypf5z/TW/ncD/66l75P5hH2vM/GR8Jf8HLc2xnfJtmina6F6du8+v4Z2vTrMo7jC+W1tmEEuuELgkQ== + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +content-disposition@0.5.3, content-disposition@~0.5.2: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-type@^1.0.4, content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@^1.5.0, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookie@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= + +cookies@~0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.8.0.tgz#1293ce4b391740a8406e3c9870e828c4b54f3f90" + integrity sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow== + dependencies: + depd "~2.0.0" + keygrip "~1.1.0" + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +copy-to-clipboard@^3: + version "3.3.1" + resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae" + integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== + dependencies: + toggle-selection "^1.0.6" + +core-js-compat@^3.6.2: + version "3.6.4" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.4.tgz#938476569ebb6cda80d339bcf199fae4f16fff17" + integrity sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA== + dependencies: + browserslist "^4.8.3" + semver "7.0.0" + +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= + +core-js@^2.4.0, core-js@^2.6.5: + version "2.6.11" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" + integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== + +core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cosmiconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" + integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.7.2" + +crc@^3.4.4: + version "3.8.0" + resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" + integrity sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ== + dependencies: + buffer "^5.1.0" + +create-ecdh@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" + integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== + dependencies: + bn.js "^4.1.0" + elliptic "^6.0.0" + +create-error@~0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/create-error/-/create-error-0.3.1.tgz#69810245a629e654432bf04377360003a5351a23" + integrity sha1-aYECRaYp5lRDK/BDdzYAA6U1GiM= + +create-hash@^1.1.0, create-hash@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-react-class@^15.5.2: + version "15.6.3" + resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.3.tgz#2d73237fb3f970ae6ebe011a9e66f46dbca80036" + integrity sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg== + dependencies: + fbjs "^0.8.9" + loose-envify "^1.3.1" + object-assign "^4.1.1" + +create-react-context@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.3.0.tgz#546dede9dc422def0d3fc2fe03afe0bc0f4f7d8c" + integrity sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw== + dependencies: + gud "^1.0.0" + warning "^4.0.3" + +cron-parser@^2.7.3: + version "2.13.0" + resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-2.13.0.tgz#6f930bb6f2931790d2a9eec83b3ec276e27a6725" + integrity sha512-UWeIpnRb0eyoWPVk+pD3TDpNx3KCFQeezO224oJIkktBrcW6RoAPOx5zIKprZGfk6vcYSmA8yQXItejSaDBhbQ== + dependencies: + is-nan "^1.2.1" + moment-timezone "^0.5.25" + +cross-env@^5.0.5: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.2.1.tgz#b2c76c1ca7add66dc874d11798466094f551b34d" + integrity sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ== + dependencies: + cross-spawn "^6.0.5" + +cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +crypto-browserify@^3.11.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +css-color-keywords@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" + integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= + +css-loader@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea" + integrity sha512-OcKJU/lt232vl1P9EEDamhoO9iKY3tIjY5GU+XDLblAykTdgs6Ux9P1hTHve8nFKy5KPpOXOsVI/hIwi3841+w== + dependencies: + camelcase "^5.2.0" + icss-utils "^4.1.0" + loader-utils "^1.2.3" + normalize-path "^3.0.0" + postcss "^7.0.14" + postcss-modules-extract-imports "^2.0.0" + postcss-modules-local-by-default "^2.0.6" + postcss-modules-scope "^2.1.0" + postcss-modules-values "^2.0.0" + postcss-value-parser "^3.3.0" + schema-utils "^1.0.0" + +css-select@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-to-react-native@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" + integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^4.0.2" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +cssesc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" + integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== + +csstype@^2.2.0, csstype@^2.5.7, csstype@^2.6.7: + version "2.6.10" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" + integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== + +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +date-fns@^2.8.1: + version "2.11.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.11.1.tgz#197b8be1bbf5c5e6fe8bea817f0fe111820e7a12" + integrity sha512-3RdUoinZ43URd2MJcquzBbDQo+J87cSzB8NkXdZiN5ia1UNyep0oCyitfiL88+R7clGTeq/RniXAc16gWyAu1w== + +debug@*, debug@4, debug@4.1.1, debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.1.0, debug@=3.1.0, debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" + integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== + dependencies: + ms "^2.1.1" + +debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-copy@^1.1.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/deep-copy/-/deep-copy-1.4.2.tgz#0622719257e4bd60240e401ea96718211c5c4697" + integrity sha512-VxZwQ/1+WGQPl5nE67uLhh7OqdrmqI1OazrraO9Bbw/M8Bt6Mol/RxzDA6N6ZgRXpsG/W9PgUj8E1LHHBEq2GQ== + +deep-equal@^1.0.1, deep-equal@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" + integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== + dependencies: + is-arguments "^1.0.4" + is-date-object "^1.0.1" + is-regex "^1.0.4" + object-is "^1.0.1" + object-keys "^1.1.1" + regexp.prototype.flags "^1.2.0" + +deep-equal@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deepmerge@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" + integrity sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ== + +default-gateway@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" + integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== + dependencies: + execa "^1.0.0" + ip-regex "^2.1.0" + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +del@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" + integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== + dependencies: + "@types/glob" "^7.1.1" + globby "^6.1.0" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.3" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@1.0.0, delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +denque@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/denque/-/denque-1.4.1.tgz#6744ff7641c148c3f8a69c307e51235c1f4a37cf" + integrity sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ== + +depd@^1.1.2, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +depd@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@^1.0.4, destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +detect-node@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" + integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +direction@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/direction/-/direction-1.0.4.tgz#2b86fb686967e987088caf8b89059370d4837442" + integrity sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ== + +dkim-signer@0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dkim-signer/-/dkim-signer-0.2.2.tgz#aa81ec071eeed3622781baa922044d7800e5f308" + integrity sha1-qoHsBx7u02IngbqpIgRNeADl8wg= + dependencies: + libmime "^2.0.3" + +dnd-core@^9.5.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/dnd-core/-/dnd-core-9.5.1.tgz#e9ec02d33529b68fa528865704d40ac4b14f2baf" + integrity sha512-/yEWFF2jg51yyB8uA2UbvBr9Qis0Oo/4p9cqHLEKZdxzHHVSPfq0a/ool8NG6dIS6Q4uN+oKGObY0rNWiopJDA== + dependencies: + "@types/asap" "^2.0.0" + "@types/invariant" "^2.2.30" + asap "^2.0.6" + invariant "^2.2.4" + redux "^4.0.4" + +dns-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" + integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= + +dns-packet@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a" + integrity sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg== + dependencies: + ip "^1.1.0" + safe-buffer "^5.0.1" + +dns-txt@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6" + integrity sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY= + dependencies: + buffer-indexof "^1.0.0" + +document.contains@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/document.contains/-/document.contains-1.0.1.tgz#a18339ec8e74f407fa34709b65f45605b38a3e1f" + integrity sha512-A1KqlZq1w605bwiiLqVZehWE9S9UYlUXPoduFWi64pNVNQ9vy6wwH/7BS+iEfSlF1YyZgcg5PZw5HqDi7FCrUw== + dependencies: + define-properties "^1.1.3" + +dom-converter@^0.2: + version "0.2.0" + resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" + integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== + dependencies: + utila "~0.4" + +dom-helpers@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8" + integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA== + dependencies: + "@babel/runtime" "^7.1.2" + +dom-helpers@^5.0.0, dom-helpers@^5.0.1: + version "5.1.4" + resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.1.4.tgz#4609680ab5c79a45f2531441f1949b79d6587f4b" + integrity sha512-TjMyeVUvNEnOnhzs6uAn9Ya47GmMo3qq7m+Lr/3ON0Rs5kHvb8I+SQYjLUSYn7qhEm0QjW0yrBkvz9yOrwwz1A== + dependencies: + "@babel/runtime" "^7.8.7" + csstype "^2.6.7" + +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + +domelementtype@1, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.0.1.tgz#1f8bdfe91f5a78063274e803b4bdcedf6e94f94d" + integrity sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ== + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +dottie@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.2.tgz#cc91c0726ce3a054ebf11c55fbc92a7f266dd154" + integrity sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg== + +draft-js@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/draft-js/-/draft-js-0.10.5.tgz#bfa9beb018fe0533dbb08d6675c371a6b08fa742" + integrity sha512-LE6jSCV9nkPhfVX2ggcRLA4FKs6zWq9ceuO/88BpXdNCS7mjRTgs0NsV6piUCJX9YxMsB9An33wnkMmU2sD2Zg== + dependencies: + fbjs "^0.8.15" + immutable "~3.7.4" + object-assign "^4.1.0" + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +duplicate-package-checker-webpack-plugin@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/duplicate-package-checker-webpack-plugin/-/duplicate-package-checker-webpack-plugin-3.0.0.tgz#78bb89e625fa7cf8c2a59c53f62b495fda9ba287" + integrity sha512-aO50/qPC7X2ChjRFniRiscxBLT/K01bALqfcDaf8Ih5OqQ1N4iT/Abx9Ofu3/ms446vHTm46FACIuJUmgUQcDQ== + dependencies: + chalk "^2.3.0" + find-root "^1.0.0" + lodash "^4.17.4" + semver "^5.4.1" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.390: + version "1.3.391" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.391.tgz#9b7ee2f387814ad7d37addaafe41c8f4c4498d24" + integrity sha512-WOi6loSnDmfICOqGRrgeK7bZeWDAbGjCptDhI5eyJAqSzWfoeRuOOU1rOTZRL29/9AaxTndZB6Uh8YrxRfZJqw== + +elliptic@^6.0.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + dependencies: + bn.js "^4.4.0" + brorand "^1.0.1" + hash.js "^1.0.0" + hmac-drbg "^1.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.0" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encodeurl@^1.0.2, encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding@^0.1.11: + version "0.1.12" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= + dependencies: + iconv-lite "~0.4.13" + +end-of-stream@^1.0.0, end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enhanced-resolve@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + +enhanced-resolve@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" + integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +entities@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4" + integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw== + +enzyme-shallow-equal@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.1.tgz#7afe03db3801c9b76de8440694096412a8d9d49e" + integrity sha512-hGA3i1so8OrYOZSM9whlkNmVHOicJpsjgTzC+wn2JMJXhq1oO4kA4bJ5MsfzSIcC71aLDKzJ6gZpIxrqt3QTAQ== + dependencies: + has "^1.0.3" + object-is "^1.0.2" + +errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + dependencies: + prr "~1.0.1" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +error-inject@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37" + integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc= + +error-stack-parser@^2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.0.6.tgz#5a99a707bd7a4c58a797902d48d82803ede6aad8" + integrity sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ== + dependencies: + stackframe "^1.1.1" + +es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es6-templates@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/es6-templates/-/es6-templates-0.2.3.tgz#5cb9ac9fb1ded6eb1239342b81d792bbb4078ee4" + integrity sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ= + dependencies: + recast "~0.11.12" + through "~2.3.6" + +escape-html@^1.0.3, escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +esprima@~3.1.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eventemitter3@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.0.tgz#d65176163887ee59f386d64c82610b696a4a74eb" + integrity sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg== + +events@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" + integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== + +eventsource@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== + dependencies: + original "^1.0.0" + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= + dependencies: + homedir-polyfill "^1.0.1" + +express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@^3.0.0, extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== + +fast-json-parse@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/fast-json-parse/-/fast-json-parse-1.0.3.tgz#43e5c61ee4efa9265633046b770fb682a7577c4d" + integrity sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-safe-stringify@^1.0.8, fast-safe-stringify@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-1.2.3.tgz#9fe22c37fb2f7f86f06b8f004377dbf8f1ee7bc1" + integrity sha512-QJYT/i0QYoiZBQ71ivxdyTqkwKkQ0oxACXHYxH2zYHJEgzi2LsbjgvtzTbLi1SZcF190Db2YP7I7eTsU2egOlw== + +fastparse@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" + integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== + +faye-websocket@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" + integrity sha1-TkkvjQTftviQA1B/btvy1QHnxvQ= + dependencies: + websocket-driver ">=0.5.1" + +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== + dependencies: + websocket-driver ">=0.5.1" + +fbjs@^0.8.15, fbjs@^0.8.9: + version "0.8.17" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" + integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.18" + +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-loader@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-3.0.1.tgz#f8e0ba0b599918b51adfe45d66d1e771ad560faa" + integrity sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw== + dependencies: + loader-utils "^1.0.2" + schema-utils "^1.0.0" + +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-root@^1.0.0, find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +findup-sync@3.0.0, findup-sync@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +fined@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" + integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== + dependencies: + expand-tilde "^2.0.2" + is-plain-object "^2.0.3" + object.defaults "^1.1.0" + object.pick "^1.2.0" + parse-filepath "^1.0.1" + +flagged-respawn@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" + integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== + +flatstr@^1.0.5: + version "1.0.12" + resolved "https://registry.yarnpkg.com/flatstr/-/flatstr-1.0.12.tgz#c2ba6a08173edbb6c9640e3055b95e287ceb5931" + integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw== + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + +fn-name@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fn-name/-/fn-name-2.0.1.tgz#5214d7537a4d06a4a301c0cc262feb84188002e7" + integrity sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc= + +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== + dependencies: + debug "=3.1.0" + +follow-redirects@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.11.0.tgz#afa14f08ba12a52963140fe43212658897bc0ecb" + integrity sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA== + dependencies: + debug "^3.0.0" + +font-awesome@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133" + integrity sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM= + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" + integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +formidable@^1.1.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" + integrity sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q== + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2, fresh@~0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +friendly-errors-webpack-plugin@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.7.0.tgz#efc86cbb816224565861a1be7a9d84d0aafea136" + integrity sha512-K27M3VK30wVoOarP651zDmb93R9zF28usW4ocaK3mfQeIEI5BPht/EzZs5E8QLLwbLRJQMwscAjDxYPb1FuNiw== + dependencies: + chalk "^1.1.3" + error-stack-parser "^2.0.0" + string-width "^2.0.0" + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^8.0.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.2.7: + version "1.2.12" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" + integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + +fsevents@~2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" + integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +function.prototype.name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.2.tgz#5cdf79d7c05db401591dfde83e3b70c5123e9a45" + integrity sha512-C8A+LlHBJjB2AdcRPorc5JvJ5VUoWlXdEHLOJdCI7kjHEtGTpHQUiqMvCIKUwIsGwZX2jZJy761AXsn356bJQg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + functions-have-names "^1.2.0" + +functions-have-names@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.1.tgz#a981ac397fa0c9964551402cdc5533d7a4d52f91" + integrity sha512-j48B/ZI7VKs3sgeI2cZp7WXWmZXu7Iq5pl5/vptV5N2mq+DGFuS/ulaDjtaoLpYzuD6u8UgrUKHfgo7fDTSiBA== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +gensync@^1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" + integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getopts@2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" + integrity sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA== + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@^7.0.0, glob@^7.0.3, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global-cache@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/global-cache/-/global-cache-1.2.1.tgz#39ca020d3dd7b3f0934c52b75363f8d53312c16d" + integrity sha512-EOeUaup5DgWKlCMhA9YFqNRIlZwoxt731jCh47WBV9fQqHgXhr3Fa55hfgIUqilIcPsfdNKN7LHjrNY+Km40KA== + dependencies: + define-properties "^1.1.2" + is-symbol "^1.0.1" + +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +grant-koa@^4.6.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/grant-koa/-/grant-koa-4.7.0.tgz#4c7b2e23afe492988cd6a5874d5592f6a813ca50" + integrity sha512-dvu6FgtFOXncHM3faiJKehMN+4cRajb68E0FtmT5uMUUHZ4LZifv6ihANH9l0pvl0t+7UjEIosMrhnE73bhjpQ== + dependencies: + grant "4.7.0" + +grant@4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/grant/-/grant-4.7.0.tgz#ab879a38ced7860df668db6c66012aa02402f49b" + integrity sha512-QGPjCYDrBnb/OIiTRxbK3TnNOE6Ycgfc/GcgPzI4vyNIr+b7yisEexYp7VM74zj6bxr+mDTzfGONRLzzsVPJIA== + dependencies: + qs "^6.9.1" + request-compose "^1.2.1" + request-oauth "0.0.3" + +gud@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" + integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== + +handle-thing@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e" + integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +history@^4.9.0: + version "4.10.1" + resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3" + integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^3.0.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^1.0.1" + +hmac-drbg@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hoek@6.x.x: + version "6.1.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-6.1.3.tgz#73b7d33952e01fe27a38b0457294b79dd8da242c" + integrity sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ== + +hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.2.1, hoist-non-react-statics@^3.3.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +hpack.js@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2" + integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= + dependencies: + inherits "^2.0.1" + obuf "^1.0.0" + readable-stream "^2.0.1" + wbuf "^1.1.0" + +html-entities@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= + +html-loader@^0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-0.5.5.tgz#6356dbeb0c49756d8ebd5ca327f16ff06ab5faea" + integrity sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog== + dependencies: + es6-templates "^0.2.3" + fastparse "^1.1.1" + html-minifier "^3.5.8" + loader-utils "^1.1.0" + object-assign "^4.1.1" + +html-minifier@^3.2.3, html-minifier@^3.5.8: + version "3.5.21" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.21.tgz#d0040e054730e354db008463593194015212d20c" + integrity sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA== + dependencies: + camel-case "3.0.x" + clean-css "4.2.x" + commander "2.17.x" + he "1.2.x" + param-case "2.1.x" + relateurl "0.2.x" + uglify-js "3.4.x" + +html-webpack-plugin@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b" + integrity sha1-sBq71yOsqqeze2r0SS69oD2d03s= + dependencies: + html-minifier "^3.2.3" + loader-utils "^0.2.16" + lodash "^4.17.3" + pretty-error "^2.0.2" + tapable "^1.0.0" + toposort "^1.0.0" + util.promisify "1.0.0" + +htmlparser2@^3.3.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +http-assert@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.4.1.tgz#c5f725d677aa7e873ef736199b89686cceb37878" + integrity sha512-rdw7q6GTlibqVVbXr0CKelfV5iY8G2HqEUkhSk297BMbSpSL8crXC+9rjKoMcZZEsksX30le6f/4ul4E28gegw== + dependencies: + deep-equal "~1.0.1" + http-errors "~1.7.2" + +http-deceiver@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" + integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@1.7.3, http-errors@^1.3.1, http-errors@^1.6.3, http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +"http-parser-js@>=0.4.0 <0.4.11": + version "0.4.10" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.10.tgz#92c9c1374c35085f75db359ec56cc257cbb93fa4" + integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= + +http-proxy-middleware@0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" + integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== + dependencies: + http-proxy "^1.17.0" + is-glob "^4.0.0" + lodash "^4.17.11" + micromatch "^3.1.10" + +http-proxy@^1.17.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.18.0.tgz#dbe55f63e75a347db7f3d99974f2692a314a6a3a" + integrity sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ== + dependencies: + eventemitter3 "^4.0.0" + follow-redirects "^1.0.0" + requires-port "^1.0.0" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + +https-proxy-agent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" + integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg== + dependencies: + agent-base "5" + debug "4" + +i18n-2@*: + version "0.7.3" + resolved "https://registry.yarnpkg.com/i18n-2/-/i18n-2-0.7.3.tgz#c0dfd7793c7ae2c0d6ea00552dc6ee8651154d25" + integrity sha512-NiC0dd+VAVGq/hWsK19XCTwfx7Xr0KPtldQ11/9DHY8Ic4++bbgRhjCvRD1C/K09V7UZpwgVhQuzPPom9XVrOQ== + dependencies: + debug "^3.1.0" + sprintf-js "^1.1.1" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + integrity sha1-H4irpKsLFQjoMSrMOTRfNumS4vI= + +iconv-lite@0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" + integrity sha1-/iZaIYrGpXz+hUkn6dBMGYJe3es= + +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + integrity sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= + +icss-utils@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" + integrity sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA== + dependencies: + postcss "^7.0.14" + +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +ignore-walk@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" + integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== + dependencies: + minimatch "^3.0.4" + +immutable@^3.8.2: + version "3.8.2" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" + integrity sha1-wkOZUUVbs5kT2vKBN28VMOEErfM= + +immutable@~3.7.4: + version "3.7.6" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" + integrity sha1-E7TTyxK++hVIKib+Gy665kAHHks= + +import-fresh@^3.1.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +import-local@2.0.0, import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= + +infer-owner@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + +inflation@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/inflation/-/inflation-2.0.0.tgz#8b417e47c28f925a45133d914ca1fd389107f30f" + integrity sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8= + +inflection@1.12.0, inflection@^1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" + integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^6.2.1, inquirer@^6.3.1: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +internal-ip@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" + integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== + dependencies: + default-gateway "^4.2.0" + ipaddr.js "^1.9.0" + +interpret@1.2.0, interpret@^1.0.0, interpret@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== + +intl-format-cache@^2.0.5: + version "2.2.9" + resolved "https://registry.yarnpkg.com/intl-format-cache/-/intl-format-cache-2.2.9.tgz#fb560de20c549cda20b569cf1ffb6dc62b5b93b4" + integrity sha512-Zv/u8wRpekckv0cLkwpVdABYST4hZNTDaX7reFetrYTJwxExR2VyTqQm+l0WmL0Qo8Mjb9Tf33qnfj0T7pjxdQ== + +intl-messageformat-parser@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz#b43d45a97468cadbe44331d74bb1e8dea44fc075" + integrity sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU= + +intl-messageformat@^2.0.0, intl-messageformat@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-2.2.0.tgz#345bcd46de630b7683330c2e52177ff5eab484fc" + integrity sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw= + dependencies: + intl-messageformat-parser "1.4.0" + +intl-relativeformat@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/intl-relativeformat/-/intl-relativeformat-2.2.0.tgz#6aca95d019ec8d30b6c5653b6629f9983ea5b6c5" + integrity sha512-4bV/7kSKaPEmu6ArxXf9xjv1ny74Zkwuey8Pm01NH4zggPP7JHwg2STk8Y3JdspCKRDriwIyLRfEXnj2ZLr4Bw== + dependencies: + intl-messageformat "^2.0.0" + +intl@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde" + integrity sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94= + +invariant@^2.1.1, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== + dependencies: + loose-envify "^1.0.0" + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +ip-regex@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= + +ip@^1.1.0, ip@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= + +ipaddr.js@1.9.1, ipaddr.js@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-absolute-url@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" + integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== + +is-absolute@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" + integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== + dependencies: + is-relative "^1.0.0" + is-windows "^1.0.1" + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arguments@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3" + integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-bluebird@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-bluebird/-/is-bluebird-1.0.2.tgz#096439060f4aa411abee19143a84d6a55346d6e2" + integrity sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI= + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-class-hotfix@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz#a527d31fb23279281dde5f385c77b5de70a72435" + integrity sha512-0n+pzCC6ICtVr/WXnN2f03TK/3BfXY7me4cjCAqT8TYXEl0+JBRoqBo94JJHXcyDSLUeWbNX8Fvy5g5RJdAstQ== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-generator-function@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.7.tgz#d2132e529bb0000a7f80794d4bdf5cd5e5813522" + integrity sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-nan@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.0.tgz#85d1f5482f7051c2019f5673ccebdb06f3b0db03" + integrity sha512-z7bbREymOqt2CCaZVly8aC4ML3Xhfi0ekuOnjO2L8vKdl+CttdVoGZQhd4adMFAsxQ5VeRVwORs4tU8RH+HFtQ== + dependencies: + define-properties "^1.1.3" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-cwd@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + +is-path-in-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" + integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== + dependencies: + is-path-inside "^2.1.0" + +is-path-inside@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" + integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== + dependencies: + path-is-inside "^1.0.2" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + +is-regex@^1.0.4, is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-relative@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" + integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== + dependencies: + is-unc-path "^1.0.0" + +is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-symbol@^1.0.1, is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-touch-device@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-touch-device/-/is-touch-device-1.0.1.tgz#9a2fd59f689e9a9bf6ae9a86924c4ba805a42eab" + integrity sha512-LAYzo9kMT1b2p19L/1ATGt2XcSilnzNlyvq6c0pbPRVisLbAPpLqr53tIJS00kvrTkj0HtR8U7+u8X0yR8lPSw== + +is-type-of@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-type-of/-/is-type-of-1.2.1.tgz#e263ec3857aceb4f28c47130ec78db09a920f8c5" + integrity sha512-uK0kyX9LZYhSDS7H2sVJQJop1UnWPWmo5RvR3q2kFH6AUHYs7sOrVg0b4nyBHw29kRRNFofYN/JbHZDlHiItTA== + dependencies: + core-util-is "^1.0.2" + is-class-hotfix "~0.0.6" + isstream "~0.1.2" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-unc-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" + integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== + dependencies: + unc-path-regex "^0.1.2" + +is-windows@^1.0.1, is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + +is-wsl@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" + integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json3@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" + integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA== + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.2.tgz#43ef1f0af9835dd624751a6b7fa48874fb2d608e" + integrity sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ== + dependencies: + minimist "^1.2.5" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonwebtoken@^8.1.0: + version "8.5.1" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^5.6.0" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + +kareem@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.1.tgz#def12d9c941017fabfb00f873af95e9c99e1be87" + integrity sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw== + +keygrip@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.1.0.tgz#871b1681d5e159c62a445b0c74b615e0917e7226" + integrity sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ== + dependencies: + tsscmp "1.0.6" + +killable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" + integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +knex@<0.20.0: + version "0.19.5" + resolved "https://registry.yarnpkg.com/knex/-/knex-0.19.5.tgz#3597ebecf88a5942f18c3e6d91af53bda59eeb5d" + integrity sha512-Hy258avCVircQq+oj3WBqPzl8jDIte438Qlq+8pt1i/TyLYVA4zPh2uKc7Bx0t+qOpa6D42HJ2jjtl2vagzilw== + dependencies: + bluebird "^3.7.0" + colorette "1.1.0" + commander "^3.0.2" + debug "4.1.1" + getopts "2.2.5" + inherits "~2.0.4" + interpret "^1.2.0" + liftoff "3.1.0" + lodash "^4.17.15" + mkdirp "^0.5.1" + pg-connection-string "2.1.0" + tarn "^2.0.0" + tildify "2.0.0" + uuid "^3.3.3" + v8flags "^3.1.3" + +koa-body@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/koa-body/-/koa-body-4.1.1.tgz#50686d290891fc6f1acb986cf7cfcd605f855ef0" + integrity sha512-rLb/KVD8qplEcK8Qsu6F4Xw+uHkmx3MWogDVmMX07DpjXizhw3pOEp1ja1MqqAcl0ei75AsrbGVDlySmsUrreA== + dependencies: + "@types/formidable" "^1.0.31" + co-body "^5.1.1" + formidable "^1.1.1" + +koa-compose@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-3.2.1.tgz#a85ccb40b7d986d8e5a345b3a1ace8eabcf54de7" + integrity sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec= + dependencies: + any-promise "^1.1.0" + +koa-compose@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-4.1.0.tgz#507306b9371901db41121c812e923d0d67d3e877" + integrity sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw== + +koa-compose@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-2.3.0.tgz#4617fa832a16412a56967334304efd797d6ed35c" + integrity sha1-Rhf6gyoWQSpWlnM0ME79eX1u01w= + +koa-compress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/koa-compress/-/koa-compress-3.0.0.tgz#3194059c215cbc24e59bbc84c2c7453a4c88564f" + integrity sha512-xol+LkNB1mozKJkB5Kj6nYXbJXhkLkZlXl9BsGBPjujVfZ8MsIXwU4GHRTT7TlSfUcl2DU3JtC+j6wOWcovfuQ== + dependencies: + bytes "^3.0.0" + compressible "^2.0.0" + koa-is-json "^1.0.0" + statuses "^1.0.0" + +koa-convert@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/koa-convert/-/koa-convert-1.2.0.tgz#da40875df49de0539098d1700b50820cebcd21d0" + integrity sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA= + dependencies: + co "^4.6.0" + koa-compose "^3.0.0" + +koa-favicon@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/koa-favicon/-/koa-favicon-2.1.0.tgz#c430cc594614fb494adcb5ee1196a2f7f53ea442" + integrity sha512-LvukcooYjxKtnZq0RXdBup+JDhaHwLgnLlDHB/xvjwQEjbc4rbp/0WkmOzpOvaHujc+fIwPear0dpKX1V+dHVg== + dependencies: + mz "^2.7.0" + +koa-i18n@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/koa-i18n/-/koa-i18n-2.1.0.tgz#c5d399218a5307c11be54313a038b1937e529362" + integrity sha1-xdOZIYpTB8Eb5UMToDixk35Sk2I= + dependencies: + debug "*" + i18n-2 "*" + +koa-ip@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/koa-ip/-/koa-ip-2.0.0.tgz#6cafdc5c5678a15746e4676d2ebf8ae63e981c5c" + integrity sha512-igMBgeZ4o62KRbLYP2RvqjfaFnZLJT+NwJZQ8xywOpcJERM8mgsx+BPetmBHpp45lbWswNjofv7ed5OB3DqBeg== + dependencies: + debug "4.1.0" + lodash.isplainobject "4.0.6" + +koa-is-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/koa-is-json/-/koa-is-json-1.0.0.tgz#273c07edcdcb8df6a2c1ab7d59ee76491451ec14" + integrity sha1-JzwH7c3Ljfaiwat9We52SRRR7BQ= + +koa-locale@~1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/koa-locale/-/koa-locale-1.3.0.tgz#95289ae6fa4098804a1ee8aadd46b0af1c82cbcb" + integrity sha1-lSia5vpAmIBKHuiq3UawrxyCy8s= + dependencies: + delegates "1.0.0" + +koa-lusca@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/koa-lusca/-/koa-lusca-2.2.0.tgz#6eb96d3012458c697447f688200976bf49bb9bfc" + integrity sha1-brltMBJFjGl0R/aIIAl2v0m7m/w= + dependencies: + koa-compose "~2.3.0" + +koa-qs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/koa-qs/-/koa-qs-2.0.0.tgz#18d16b43508a541f092e514351dc09563a48819f" + integrity sha1-GNFrQ1CKVB8JLlFDUdwJVjpIgZ8= + dependencies: + merge-descriptors "~0.0.2" + qs "~2.3.3" + +koa-router@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/koa-router/-/koa-router-7.4.0.tgz#aee1f7adc02d5cb31d7d67465c9eacc825e8c5e0" + integrity sha512-IWhaDXeAnfDBEpWS6hkGdZ1ablgr6Q6pGdXCyK38RbzuH4LkUOpPqPw+3f8l8aTDrQmBQ7xJc0bs2yV4dzcO+g== + dependencies: + debug "^3.1.0" + http-errors "^1.3.1" + koa-compose "^3.0.0" + methods "^1.0.1" + path-to-regexp "^1.1.1" + urijs "^1.19.0" + +koa-send@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/koa-send/-/koa-send-5.0.0.tgz#5e8441e07ef55737734d7ced25b842e50646e7eb" + integrity sha512-90ZotV7t0p3uN9sRwW2D484rAaKIsD8tAVtypw/aBU+ryfV+fR2xrcAwhI8Wl6WRkojLUs/cB9SBSCuIb+IanQ== + dependencies: + debug "^3.1.0" + http-errors "^1.6.3" + mz "^2.7.0" + resolve-path "^1.4.0" + +koa-session@^5.12.0: + version "5.13.1" + resolved "https://registry.yarnpkg.com/koa-session/-/koa-session-5.13.1.tgz#a47e39015a4b464e21e3e1e2deeca48eb83916ee" + integrity sha512-TfYiun6xiFosyfIJKnEw0aoG5XmLIwM+K3OVWfkz84qY0NP2gbk0F/olRn0/Hrxq0f14s8amHVXeWyKYH3Cx3Q== + dependencies: + crc "^3.4.4" + debug "^3.1.0" + is-type-of "^1.0.0" + uuid "^3.3.2" + +koa-static@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/koa-static/-/koa-static-5.0.0.tgz#5e92fc96b537ad5219f425319c95b64772776943" + integrity sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ== + dependencies: + debug "^3.1.0" + koa-send "^5.0.0" + +koa2-ratelimit@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/koa2-ratelimit/-/koa2-ratelimit-0.9.0.tgz#94bb20f05edab3fba7f4cf99956c3be138554a5c" + integrity sha512-gCjHnjm5Xgc+Qzx3Xr8qb0Iatd9Xw4YC2ZemIpdbkFTpNjfJcoI1Df5lS/H0K+NeSxggxYN0K23ToPS/SPN/Gg== + dependencies: + mongoose "^5.5.13" + promise-redis "0.0.5" + sequelize "^5.8.7" + +koa@^2.8.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/koa/-/koa-2.11.0.tgz#fe5a51c46f566d27632dd5dc8fd5d7dd44f935a4" + integrity sha512-EpR9dElBTDlaDgyhDMiLkXrPwp6ZqgAIBvhhmxQ9XN4TFgW+gEz6tkcsNI6BnUbUftrKDjVFj4lW2/J2aNBMMA== + dependencies: + accepts "^1.3.5" + cache-content-type "^1.0.0" + content-disposition "~0.5.2" + content-type "^1.0.4" + cookies "~0.8.0" + debug "~3.1.0" + delegates "^1.0.0" + depd "^1.1.2" + destroy "^1.0.4" + encodeurl "^1.0.2" + error-inject "^1.0.0" + escape-html "^1.0.3" + fresh "~0.5.2" + http-assert "^1.3.0" + http-errors "^1.6.3" + is-generator-function "^1.0.7" + koa-compose "^4.1.0" + koa-convert "^1.2.0" + on-finished "^2.3.0" + only "~0.0.2" + parseurl "^1.3.2" + statuses "^1.5.0" + type-is "^1.6.16" + vary "^1.1.2" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + +levenary@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" + integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== + dependencies: + leven "^3.1.0" + +libbase64@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/libbase64/-/libbase64-0.1.0.tgz#62351a839563ac5ff5bd26f12f60e9830bb751e6" + integrity sha1-YjUag5VjrF/1vSbxL2Dpgwu3UeY= + +libmime@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/libmime/-/libmime-2.1.0.tgz#51bc76de2283161eb9051c4bc80aed713e4fd1cd" + integrity sha1-Ubx23iKDFh65BRxLyArtcT5P0c0= + dependencies: + iconv-lite "0.4.13" + libbase64 "0.1.0" + libqp "1.1.0" + +libmime@^2.0.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/libmime/-/libmime-2.1.3.tgz#25017ca5ab5a1e98aadbe2725017cf1d48a42a0c" + integrity sha1-JQF8pataHpiq2+JyUBfPHUikKgw= + dependencies: + iconv-lite "0.4.15" + libbase64 "0.1.0" + libqp "1.1.0" + +libqp@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/libqp/-/libqp-1.1.0.tgz#f5e6e06ad74b794fb5b5b66988bf728ef1dedbe8" + integrity sha1-9ebgatdLeU+1tbZpiL9yjvHe2+g= + +liftoff@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" + integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== + dependencies: + extend "^3.0.0" + findup-sync "^3.0.0" + fined "^1.0.1" + flagged-respawn "^1.0.0" + is-plain-object "^2.0.4" + object.map "^1.0.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + integrity sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g= + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash-es@^4.17.11: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" + integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ== + +lodash.deburr@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-4.1.0.tgz#ddb1bbb3ef07458c0177ba07de14422cb033ff9b" + integrity sha1-3bG7s+8HRYwBd7oH3hRCLLAz/5s= + +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= + +lodash.isfunction@^3.0.9: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" + integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= + +lodash.isobject@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" + integrity sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0= + +lodash.isplainobject@4.0.6, lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= + +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= + +lodash.throttle@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" + integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= + +lodash.tonumber@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/lodash.tonumber/-/lodash.tonumber-4.0.3.tgz#0b96b31b35672793eb7f5a63ee791f1b9e9025d9" + integrity sha1-C5azGzVnJ5Prf1pj7nkfG56QJdk= + +lodash@4.17.12: + version "4.17.12" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.12.tgz#a712c74fdc31f7ecb20fe44f157d802d208097ef" + integrity sha512-+CiwtLnsJhX03p20mwXuvhoebatoh5B3tt+VvYlrPgZC1g36y+RRbkufX95Xa+X4I59aWEacDFYwnJZiyBh9gA== + +lodash@^4.1.1, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== + dependencies: + chalk "^2.0.1" + +loglevel@^1.6.6: + version "1.6.7" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.7.tgz#b3e034233188c68b889f5b862415306f565e2c56" + integrity sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A== + +long-timeout@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/long-timeout/-/long-timeout-0.1.1.tgz#9721d788b47e0bcb5a24c2e2bee1a0da55dab514" + integrity sha1-lyHXiLR+C8taJMLivuGg2lXatRQ= + +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.0, loose-envify@^1.3.1, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw= + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + +mailcomposer@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/mailcomposer/-/mailcomposer-3.12.0.tgz#9c5e1188aa8e1c62ec8b86bd43468102b639e8f9" + integrity sha1-nF4RiKqOHGLsi4a9Q0aBArY56Pk= + dependencies: + buildmail "3.10.0" + libmime "2.1.0" + +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-iterator@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" + integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== + dependencies: + kind-of "^6.0.2" + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +map-cache@^0.2.0, map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +match-sorter@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/match-sorter/-/match-sorter-4.1.0.tgz#8ba63f4aaf438d7a844829f1a75aa3ab1b2587ba" + integrity sha512-DCzT9JVO2FWVOTfsKqIqVhu/skFa3bK0lQom70j6Co9yKX9bPn2gRtn9BFD9ykkM8F/USjTQeId+nlFfTVvz+w== + dependencies: + "@babel/runtime" "^7.9.2" + remove-accents "0.4.2" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memoize-one@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== + +memory-fs@^0.4.0, memory-fs@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-pager@^1.0.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" + integrity sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge-descriptors@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-0.0.2.tgz#c36a52a781437513c57275f39dd9d317514ac8c7" + integrity sha1-w2pSp4FDdRPFcnXzndnTF1FKyMc= + +methods@^1.0.1, methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": + version "1.43.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" + integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== + +mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.26" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" + integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + dependencies: + mime-db "1.43.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mime@^2.0.3, mime@^2.4.4: + version "2.4.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" + integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mini-create-react-context@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz#79fc598f283dd623da8e088b05db8cddab250189" + integrity sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw== + dependencies: + "@babel/runtime" "^7.4.0" + gud "^1.0.0" + tiny-warning "^1.0.2" + +mini-css-extract-plugin@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.6.0.tgz#a3f13372d6fcde912f3ee4cd039665704801e3b9" + integrity sha512-79q5P7YGI6rdnVyIAV4NXpBQJFWdkzJxCim3Kog4078fM0piAaFlwocqbejdWtLW1cEzCexPrh6EdyFsPgVdAw== + dependencies: + loader-utils "^1.1.0" + normalize-url "^2.0.1" + schema-utils "^1.0.0" + webpack-sources "^1.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: + version "0.5.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" + integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw== + dependencies: + minimist "^1.2.5" + +moment-timezone@^0.5.21, moment-timezone@^0.5.25: + version "0.5.28" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.28.tgz#f093d789d091ed7b055d82aa81a82467f72e4338" + integrity sha512-TDJkZvAyKIVWg5EtVqRzU97w0Rb0YVbfpqyjgu6GwXCAohVRqwZjf4fOzDE6p1Ch98Sro/8hQQi65WDXW5STPw== + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@>=1.6.0, moment@^2.16.0, moment@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + +mongodb@3.5.5: + version "3.5.5" + resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.5.5.tgz#1334c3e5a384469ac7ef0dea69d59acc829a496a" + integrity sha512-GCjDxR3UOltDq00Zcpzql6dQo1sVry60OXJY3TDmFc2SWFY6c8Gn1Ardidc5jDirvJrx2GC3knGOImKphbSL3A== + dependencies: + bl "^2.2.0" + bson "^1.1.1" + denque "^1.4.1" + require_optional "^1.0.1" + safe-buffer "^5.1.2" + optionalDependencies: + saslprep "^1.0.0" + +mongoose-legacy-pluralize@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4" + integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ== + +mongoose@^5.5.13: + version "5.9.7" + resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.9.7.tgz#03c581860d0e2f60f6008f9457ab0c2905609875" + integrity sha512-WJOBh9WMvivqBK8my9HFtSzSySKdUxJPNGAwswEakAasWUcPXJl3yHMtZ4ngGnKbwTT9KnAr75xamlt/PouR9w== + dependencies: + bson "~1.1.1" + kareem "2.3.1" + mongodb "3.5.5" + mongoose-legacy-pluralize "1.0.2" + mpath "0.6.0" + mquery "3.2.2" + ms "2.1.2" + regexp-clone "1.0.0" + safe-buffer "5.1.2" + sift "7.0.1" + sliced "1.0.1" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" + +mpath@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.6.0.tgz#aa922029fca4f0f641f360e74c5c1b6a4c47078e" + integrity sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw== + +mquery@3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.2.tgz#e1383a3951852ce23e37f619a9b350f1fb3664e7" + integrity sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q== + dependencies: + bluebird "3.5.1" + debug "3.1.0" + regexp-clone "^1.0.0" + safe-buffer "5.1.2" + sliced "1.0.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +multicast-dns-service-types@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" + integrity sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE= + +multicast-dns@^6.0.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229" + integrity sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g== + dependencies: + dns-packet "^1.3.1" + thunky "^1.0.2" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +mz@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +needle@^2.2.1: + version "2.3.3" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.3.tgz#a041ad1d04a871b0ebb666f40baaf1fb47867117" + integrity sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw== + dependencies: + debug "^3.2.6" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.5.0, neo-async@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" + +node-fetch@^1.0.1, node-fetch@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + +node-forge@0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579" + integrity sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ== + +node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + +node-machine-id@^1.1.10: + version "1.1.12" + resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267" + integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ== + +node-pre-gyp@*: + version "0.14.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83" + integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4.4.2" + +node-pre-gyp@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz#db1f33215272f692cd38f03238e3e9b47c5dd054" + integrity sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +node-releases@^1.1.53: + version "1.1.53" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" + integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== + +node-schedule@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/node-schedule/-/node-schedule-1.3.2.tgz#d774b383e2a6f6ade59eecc62254aea07cd758cb" + integrity sha512-GIND2pHMHiReSZSvS6dpZcDH7pGPGFfWBIEud6S00Q8zEIzAs9ommdyRK1ZbQt8y1LyZsJYZgPnyi7gpU2lcdw== + dependencies: + cron-parser "^2.7.3" + long-timeout "0.1.1" + sorted-array-functions "^1.0.0" + +nodemailer-fetch@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz#79c4908a1c0f5f375b73fe888da9828f6dc963a4" + integrity sha1-ecSQihwPXzdbc/6IjamCj23JY6Q= + +nodemailer-shared@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/nodemailer-shared/-/nodemailer-shared-1.1.0.tgz#cf5994e2fd268d00f5cf0fa767a08169edb07ec0" + integrity sha1-z1mU4v0mjQD1zw+nZ6CBae2wfsA= + dependencies: + nodemailer-fetch "1.6.0" + +nopt@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" + integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= + +normalize-url@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6" + integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw== + dependencies: + prepend-http "^2.0.0" + query-string "^5.0.1" + sort-keys "^2.0.0" + +npm-bundled@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" + integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-packlist@^1.1.6: + version "1.4.8" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e" + integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-normalize-package-bin "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +oauth-sign@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@4.x, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + integrity sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-is@^1.0.1, object-is@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" + integrity sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.defaults@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" + integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= + dependencies: + array-each "^1.0.1" + array-slice "^1.0.0" + for-own "^1.0.0" + isobject "^3.0.0" + +object.entries@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" + integrity sha512-ilqR7BgdyZetJutmDPfXCDffGa0/Yzl2ivVNpbx/g4UeWrCdRnFDUBrKJGLhGieRHDATnyZXWBeCb29k9CJysQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + +object.getownpropertydescriptors@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" + integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +object.map@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" + integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= + dependencies: + for-own "^1.0.0" + make-iterator "^1.0.0" + +object.pick@^1.2.0, object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +object.values@^1.0.4, object.values@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.1.tgz#68a99ecde356b7e9295a3c5e0ce31dc8c953de5e" + integrity sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + function-bind "^1.1.1" + has "^1.0.3" + +obuf@^1.0.0, obuf@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" + integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== + +on-finished@^2.3.0, on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +only@~0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" + integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q= + +opn@^5.3.0, opn@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" + integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== + dependencies: + is-wsl "^1.1.0" + +ora@^3.0.0, ora@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" + integrity sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== + dependencies: + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-spinners "^2.0.0" + log-symbols "^2.2.0" + strip-ansi "^5.2.0" + wcwidth "^1.0.1" + +original@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" + integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== + dependencies: + url-parse "^1.4.3" + +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^3.0.0, os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" + integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== + dependencies: + p-try "^2.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== + +p-retry@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" + integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== + dependencies: + retry "^0.12.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +param-case@2.1.x: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha1-35T9jPZTHs915r75oIWPvHK+Ikc= + dependencies: + no-case "^2.2.0" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0: + version "5.1.5" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" + integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== + dependencies: + asn1.js "^4.0.0" + browserify-aes "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-filepath@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" + integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= + dependencies: + is-absolute "^1.0.0" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + +parseurl@^1.3.2, parseurl@~1.3.2, parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@1.0.1, path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= + +path-root@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= + dependencies: + path-root-regex "^0.1.0" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-to-regexp@^1.1.1, path-to-regexp@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pbkdf2@^3.0.3: + version "3.0.17" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" + integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pg-connection-string@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.1.0.tgz#e07258f280476540b24818ebb5dca29e101ca502" + integrity sha512-bhlV7Eq09JrRIvo1eKngpwuqKtJnNhZdpdOlvrPrA4dxqXPjxSrbNrfnIDmTpwMyRszrcV4kU5ZA4mMsQUrjdg== + +picomatch@^2.0.4, picomatch@^2.0.7: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + +pino-std-serializers@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz#cb5e3e58c358b26f88969d7e619ae54bdfcc1ae1" + integrity sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ== + +pino@^4.7.1: + version "4.17.6" + resolved "https://registry.yarnpkg.com/pino/-/pino-4.17.6.tgz#8c237f3a29f4104f89321c25037deab6a7998fb4" + integrity sha512-LFDwmhyWLBnmwO/2UFbWu1jEGVDzaPupaVdx0XcZ3tIAx1EDEBauzxXf2S0UcFK7oe+X9MApjH0hx9U1XMgfCA== + dependencies: + chalk "^2.4.1" + fast-json-parse "^1.0.3" + fast-safe-stringify "^1.2.3" + flatstr "^1.0.5" + pino-std-serializers "^2.0.0" + pump "^3.0.0" + quick-format-unescaped "^1.1.2" + split2 "^2.2.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== + +popper.js@^1.12.9, popper.js@^1.14.4: + version "1.16.1" + resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" + integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== + +portfinder@^1.0.25: + version "1.0.25" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.25.tgz#254fd337ffba869f4b9d37edc298059cb4d35eca" + integrity sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg== + dependencies: + async "^2.6.2" + debug "^3.1.1" + mkdirp "^0.5.1" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss-modules-extract-imports@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz#818719a1ae1da325f9832446b01136eeb493cd7e" + integrity sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ== + dependencies: + postcss "^7.0.5" + +postcss-modules-local-by-default@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.6.tgz#dd9953f6dd476b5fd1ef2d8830c8929760b56e63" + integrity sha512-oLUV5YNkeIBa0yQl7EYnxMgy4N6noxmiwZStaEJUSe2xPMcdNc8WmBQuQCx18H5psYbVxz8zoHk0RAAYZXP9gA== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + postcss-value-parser "^3.3.1" + +postcss-modules-scope@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz#385cae013cc7743f5a7d7602d1073a89eaae62ee" + integrity sha512-YyEgsTMRpNd+HmyC7H/mh3y+MeFWevy7V1evVhJWewmMbjDHIbZbOXICC2y+m1xI1UVfIT1HMW/O04Hxyu9oXQ== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^6.0.0" + +postcss-modules-values@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-2.0.0.tgz#479b46dc0c5ca3dc7fa5270851836b9ec7152f64" + integrity sha512-Ki7JZa7ff1N3EIMlPnGTZfUMe69FFwiQPnVSXC9mnn3jozCRBYIxiZd44yJOV2AmabOo4qFf8s0dC/+lweG7+w== + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^7.0.6" + +postcss-selector-parser@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz#934cf799d016c83411859e09dcecade01286ec5c" + integrity sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== + dependencies: + cssesc "^3.0.0" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-value-parser@^3.3.0, postcss-value-parser@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281" + integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== + +postcss-value-parser@^4.0.2, postcss-value-parser@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz#651ff4593aa9eda8d5d0d66593a2417aeaeb325d" + integrity sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg== + +postcss@^7.0.14, postcss@^7.0.27, postcss@^7.0.5, postcss@^7.0.6: + version "7.0.27" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.27.tgz#cc67cdc6b0daa375105b7c424a85567345fc54d9" + integrity sha512-WuQETPMcW9Uf1/22HWUWP9lgsIC+KEHg2kozMflKjbeUtw9ujvFX6QmIfozaErDkmLWS9WEnEdEe6Uo9/BNTdQ== + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +pretty-error@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" + integrity sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM= + dependencies: + renderkid "^2.0.1" + utila "~0.4" + +pretty-time@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e" + integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== + +private@^0.1.8, private@~0.1.5: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + +promise-redis@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/promise-redis/-/promise-redis-0.0.5.tgz#3e3ce2aad912e927c96a6eced8d1b0f982666609" + integrity sha1-PjziqtkS6SfJam7O2NGw+YJmZgk= + dependencies: + redis "*" + redis-commands "*" + +promise@^7.1.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" + integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== + dependencies: + asap "~2.0.3" + +prop-types-exact@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/prop-types-exact/-/prop-types-exact-1.2.0.tgz#825d6be46094663848237e3925a98c6e944e9869" + integrity sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA== + dependencies: + has "^1.0.3" + object.assign "^4.1.0" + reflect.ownkeys "^0.2.0" + +prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +property-expr@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-1.5.1.tgz#22e8706894a0c8e28d58735804f6ba3a3673314f" + integrity sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g== + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +purest@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/purest/-/purest-3.1.0.tgz#cca72a8f4717d46053d677059f9b357b59ee5cb7" + integrity sha512-9slCC5je2UNERS/YNcrs1/7K5Bh7Uvl6OY1S+XZ6iDNMCwk8Fio6VBdrklo7eMzt5M/Wt2fQlwXRjn4puBccRQ== + dependencies: + "@purest/config" "^1.0.0" + "@request/api" "^0.6.0" + extend "^3.0.0" + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@^6.4.0, qs@^6.5.1, qs@^6.9.1: + version "6.9.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" + integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== + +qs@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-2.3.3.tgz#e9e85adbe75da0bbe4c8e0476a086290f863b404" + integrity sha1-6eha2+ddoLvkyOBHaghikPhjtAQ= + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +querystringify@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" + integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== + +quick-format-unescaped@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-1.1.2.tgz#0ca581de3174becef25ac3c2e8956342381db698" + integrity sha1-DKWB3jF0vs7yWsPC6JVjQjgdtpg= + dependencies: + fast-safe-stringify "^1.0.8" + +raf@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== + dependencies: + performance-now "^2.1.0" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@^1.2.1, range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + dependencies: + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc-input-number@^4.5.0: + version "4.5.6" + resolved "https://registry.yarnpkg.com/rc-input-number/-/rc-input-number-4.5.6.tgz#0d52762b0ac39432256e2c6c5c836102f9797c46" + integrity sha512-AXbL4gtQ1mSQnu6v/JtMv3UbGRCzLvQznmf0a7U/SAtZ8+dCEAqD4JpJhkjv73Wog53eRYhw4l7ApdXflc9ymg== + dependencies: + babel-runtime "6.x" + classnames "^2.2.0" + prop-types "^15.5.7" + rc-util "^4.5.1" + rmc-feedback "^2.0.0" + +rc-util@^4.5.1: + version "4.20.3" + resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-4.20.3.tgz#c4d4ee6171cf685dc75572752a764310325888d3" + integrity sha512-NBBc9Ad5yGAVTp4jV+pD7tXQGqHxGM2onPSZFyVoJ5fuvRF+ZgzSjZ6RXLPE0pVVISRJ07h+APgLJPBcAeZQlg== + dependencies: + add-dom-event-listener "^1.1.0" + prop-types "^15.5.10" + react-is "^16.12.0" + react-lifecycles-compat "^3.0.4" + shallowequal "^1.1.0" + +rc@1.2.8, rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-copy-to-clipboard@^5.0.1: + version "5.0.2" + resolved "https://registry.yarnpkg.com/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.2.tgz#d82a437e081e68dfca3761fbd57dbf2abdda1316" + integrity sha512-/2t5mLMMPuN5GmdXo6TebFa8IoFxZ+KTDDqYhcDm0PhkgEzSxVvIX26G20s1EB02A4h2UZgwtfymZ3lGJm0OLg== + dependencies: + copy-to-clipboard "^3" + prop-types "^15.5.8" + +react-dates@^21.1.0, react-dates@^21.5.1: + version "21.8.0" + resolved "https://registry.yarnpkg.com/react-dates/-/react-dates-21.8.0.tgz#355c3c7a243a7c29568fe00aca96231e171a5e94" + integrity sha512-PPriGqi30CtzZmoHiGdhlA++YPYPYGCZrhydYmXXQ6RAvAsaONcPtYgXRTLozIOrsQ5mSo40+DiA5eOFHnZ6xw== + dependencies: + airbnb-prop-types "^2.15.0" + consolidated-events "^1.1.1 || ^2.0.0" + enzyme-shallow-equal "^1.0.0" + is-touch-device "^1.0.1" + lodash "^4.1.1" + object.assign "^4.1.0" + object.values "^1.1.0" + prop-types "^15.7.2" + raf "^3.4.1" + react-moment-proptypes "^1.6.0" + react-outside-click-handler "^1.2.4" + react-portal "^4.2.0" + react-with-direction "^1.3.1" + react-with-styles "^4.1.0" + react-with-styles-interface-css "^6.0.0" + +react-datetime@^2.16.3: + version "2.16.3" + resolved "https://registry.yarnpkg.com/react-datetime/-/react-datetime-2.16.3.tgz#7f9ac7d4014a939c11c761d0c22d1fb506cb505e" + integrity sha512-amWfb5iGEiyqjLmqCLlPpu2oN415jK8wX1qoTq7qn6EYiU7qQgbNHglww014PT4O/3G5eo/3kbJu/M/IxxTyGw== + dependencies: + create-react-class "^15.5.2" + object-assign "^3.0.0" + prop-types "^15.5.7" + react-onclickoutside "^6.5.0" + +react-dnd-html5-backend@^9.0.0: + version "9.5.1" + resolved "https://registry.yarnpkg.com/react-dnd-html5-backend/-/react-dnd-html5-backend-9.5.1.tgz#e6a0aed3ece800c1abe004f9ed9991513e2e644c" + integrity sha512-wUdzjREwLqHxFkA6E+XDVL5IFjRDbBI3SHVKil9n3qrGT5dm2tA2oi1aIALdfMKsu00c+OXA9lz/LuKZCE9KXg== + dependencies: + dnd-core "^9.5.1" + +react-dnd@^9.0.1: + version "9.5.1" + resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-9.5.1.tgz#907e55c791d6c50cbed1a4021c14b989b86ac467" + integrity sha512-j2MvziPNLsxXkb3kIJzLvvOv/TQ4sysp6U4CmxAXd4C884dXm/9UGdB7K1wkTW3ZxVpI1K7XhKbX0JgNlPfLcA== + dependencies: + "@types/hoist-non-react-statics" "^3.3.1" + "@types/shallowequal" "^1.1.1" + dnd-core "^9.5.1" + hoist-non-react-statics "^3.3.0" + shallowequal "^1.1.0" + +react-dom@^16.9.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" + integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.19.1" + +react-fast-compare@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" + integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== + +react-helmet@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.2.1.tgz#16a7192fdd09951f8e0fe22ffccbf9bb3e591ffa" + integrity sha512-CnwD822LU8NDBnjCpZ4ySh8L6HYyngViTZLfBBb3NjtrpN8m49clH8hidHouq20I51Y6TpCTISCBbqiY5GamwA== + dependencies: + object-assign "^4.1.1" + prop-types "^15.5.4" + react-fast-compare "^2.0.2" + react-side-effect "^1.1.0" + +react-input-autosize@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/react-input-autosize/-/react-input-autosize-2.2.2.tgz#fcaa7020568ec206bc04be36f4eb68e647c4d8c2" + integrity sha512-jQJgYCA3S0j+cuOwzuCd1OjmBmnZLdqQdiLKRYrsMMzbjUrVDS5RvJUDwJqA7sKuksDuzFtm6hZGKFu7Mjk5aw== + dependencies: + prop-types "^15.5.8" + +react-intl@^2.8.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-2.9.0.tgz#c97c5d17d4718f1575fdbd5a769f96018a3b1843" + integrity sha512-27jnDlb/d2A7mSJwrbOBnUgD+rPep+abmoJE511Tf8BnoONIAUehy/U1zZCHGO17mnOwMWxqN4qC0nW11cD6rA== + dependencies: + hoist-non-react-statics "^3.3.0" + intl-format-cache "^2.0.5" + intl-messageformat "^2.1.0" + intl-relativeformat "^2.1.0" + invariant "^2.1.1" + +react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.6, react-is@^16.9.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-lifecycles-compat@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" + integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== + +react-loadable@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/react-loadable/-/react-loadable-5.5.0.tgz#582251679d3da86c32aae2c8e689c59f1196d8c4" + integrity sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg== + dependencies: + prop-types "^15.5.0" + +react-moment-proptypes@^1.6.0, react-moment-proptypes@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/react-moment-proptypes/-/react-moment-proptypes-1.7.0.tgz#89881479840a76c13574a86e3bb214c4ba564e7a" + integrity sha512-ZbOn/P4u469WEGAw5hgkS/E+g1YZqdves2BjYsLluJobzUZCtManhjHiZKjniBVT7MSHM6D/iKtRVzlXVv3ikA== + dependencies: + moment ">=1.6.0" + +react-onclickoutside@^6.5.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/react-onclickoutside/-/react-onclickoutside-6.9.0.tgz#a54bc317ae8cf6131a5d78acea55a11067f37a1f" + integrity sha512-8ltIY3bC7oGhj2nPAvWOGi+xGFybPNhJM0V1H8hY/whNcXgmDeaeoCMPPd8VatrpTsUWjb/vGzrmu6SrXVty3A== + +react-outside-click-handler@^1.2.4: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-outside-click-handler/-/react-outside-click-handler-1.3.0.tgz#3831d541ac059deecd38ec5423f81e80ad60e115" + integrity sha512-Te/7zFU0oHpAnctl//pP3hEAeobfeHMyygHB8MnjP6sX5OR8KHT1G3jmLsV3U9RnIYo+Yn+peJYWu+D5tUS8qQ== + dependencies: + airbnb-prop-types "^2.15.0" + consolidated-events "^1.1.1 || ^2.0.0" + document.contains "^1.0.1" + object.values "^1.1.0" + prop-types "^15.7.2" + +react-popper@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-0.8.3.tgz#0f73333137c9fb0af6ec4074d2d0585a0a0461e1" + integrity sha1-D3MzMTfJ+wr27EB00tBYWgoEYeE= + dependencies: + popper.js "^1.12.9" + prop-types "^15.6.0" + +react-popper@^1.3.6: + version "1.3.7" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-1.3.7.tgz#f6a3471362ef1f0d10a4963673789de1baca2324" + integrity sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww== + dependencies: + "@babel/runtime" "^7.1.2" + create-react-context "^0.3.0" + deep-equal "^1.1.1" + popper.js "^1.14.4" + prop-types "^15.6.1" + typed-styles "^0.0.7" + warning "^4.0.2" + +react-portal@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/react-portal/-/react-portal-4.2.1.tgz#12c1599238c06fb08a9800f3070bea2a3f78b1a6" + integrity sha512-fE9kOBagwmTXZ3YGRYb4gcMy+kSA+yLO0xnPankjRlfBv4uCpFXqKPfkpsGQQR15wkZ9EssnvTOl1yMzbkxhPQ== + dependencies: + prop-types "^15.5.8" + +react-redux@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.0.2.tgz#34b280a3482aaf60e7d4a504b1295165cbe6b86a" + integrity sha512-uKRuMgQt8dWbcz0U75oFK5tDo3boyAKrqvf/j94vpqRFFZfyDDy4kofUgloFIGyuKTq2Zz51zgK9RzOTFXk5ew== + dependencies: + "@babel/runtime" "^7.4.3" + hoist-non-react-statics "^3.3.0" + invariant "^2.2.4" + loose-envify "^1.4.0" + prop-types "^15.7.2" + react-is "^16.8.6" + +react-redux@^7.0.2: + version "7.2.0" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.0.tgz#f970f62192b3981642fec46fd0db18a074fe879d" + integrity sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA== + dependencies: + "@babel/runtime" "^7.5.5" + hoist-non-react-statics "^3.3.0" + loose-envify "^1.4.0" + prop-types "^15.7.2" + react-is "^16.9.0" + +react-router-dom@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.1.2.tgz#06701b834352f44d37fbb6311f870f84c76b9c18" + integrity sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + loose-envify "^1.3.1" + prop-types "^15.6.2" + react-router "5.1.2" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + +react-router@5.1.2, react-router@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz#6ea51d789cb36a6be1ba5f7c0d48dd9e817d3418" + integrity sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A== + dependencies: + "@babel/runtime" "^7.1.2" + history "^4.9.0" + hoist-non-react-statics "^3.1.0" + loose-envify "^1.3.1" + mini-create-react-context "^0.3.0" + path-to-regexp "^1.7.0" + prop-types "^15.6.2" + react-is "^16.6.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + +react-select@^3.0.4: + version "3.1.0" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz#ab098720b2e9fe275047c993f0d0caf5ded17c27" + integrity sha512-wBFVblBH1iuCBprtpyGtd1dGMadsG36W5/t2Aj8OE6WbByDg5jIFyT7X5gT+l0qmT5TqWhxX+VsKJvCEl2uL9g== + dependencies: + "@babel/runtime" "^7.4.4" + "@emotion/cache" "^10.0.9" + "@emotion/core" "^10.0.9" + "@emotion/css" "^10.0.9" + memoize-one "^5.0.0" + prop-types "^15.6.0" + react-input-autosize "^2.2.2" + react-transition-group "^4.3.0" + +react-side-effect@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.2.0.tgz#0e940c78faba0c73b9b0eba9cd3dda8dfb7e7dae" + integrity sha512-v1ht1aHg5k/thv56DRcjw+WtojuuDHFUgGfc+bFHOWsF4ZK6C2V57DO0Or0GPsg6+LSTE0M6Ry/gfzhzSwbc5w== + dependencies: + shallowequal "^1.0.1" + +react-transition-group@^2.2.1, react-transition-group@^2.3.1, react-transition-group@^2.5.0, react-transition-group@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.9.0.tgz#df9cdb025796211151a436c69a8f3b97b5b07c8d" + integrity sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg== + dependencies: + dom-helpers "^3.4.0" + loose-envify "^1.4.0" + prop-types "^15.6.2" + react-lifecycles-compat "^3.0.4" + +react-transition-group@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683" + integrity sha512-1qRV1ZuVSdxPlPf4O8t7inxUGpdyO5zG9IoNfJxSO0ImU2A1YWkEQvFPuIPZmMLkg5hYs7vv5mMOyfgSkvAwvw== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + +react-virtualized@^9.21.2: + version "9.21.2" + resolved "https://registry.yarnpkg.com/react-virtualized/-/react-virtualized-9.21.2.tgz#02e6df65c1e020c8dbf574ec4ce971652afca84e" + integrity sha512-oX7I7KYiUM7lVXQzmhtF4Xg/4UA5duSA+/ZcAvdWlTLFCoFYq1SbauJT5gZK9cZS/wdYR6TPGpX/dqzvTqQeBA== + dependencies: + babel-runtime "^6.26.0" + clsx "^1.0.1" + dom-helpers "^5.0.0" + loose-envify "^1.3.0" + prop-types "^15.6.0" + react-lifecycles-compat "^3.0.4" + +react-with-direction@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/react-with-direction/-/react-with-direction-1.3.1.tgz#9fd414564f0ffe6947e5ff176f6132dd83f8b8df" + integrity sha512-aGcM21ZzhqeXFvDCfPj0rVNYuaVXfTz5D3Rbn0QMz/unZe+CCiLHthrjQWO7s6qdfXORgYFtmS7OVsRgSk5LXQ== + dependencies: + airbnb-prop-types "^2.10.0" + brcast "^2.0.2" + deepmerge "^1.5.2" + direction "^1.0.2" + hoist-non-react-statics "^3.3.0" + object.assign "^4.1.0" + object.values "^1.0.4" + prop-types "^15.6.2" + +react-with-styles-interface-css@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/react-with-styles-interface-css/-/react-with-styles-interface-css-6.0.0.tgz#b53da7fa8359d452cb934cface8738acaef7b5fe" + integrity sha512-6khSG1Trf4L/uXOge/ZAlBnq2O2PEXlQEqAhCRbvzaQU4sksIkdwpCPEl6d+DtP3+IdhyffTWuHDO9lhe1iYvA== + dependencies: + array.prototype.flat "^1.2.1" + global-cache "^1.2.1" + +react-with-styles@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/react-with-styles/-/react-with-styles-4.1.0.tgz#4bfc2daa92dd72033fc19fd861b90225a682a640" + integrity sha512-zp05fyA6XFetqr07ox/a0bCFyEj//gUozI9cC1GW59zaGJ38STnxYvzotutgpzMyHOd7TFW9ZiZeBKjsYaS+RQ== + dependencies: + airbnb-prop-types "^2.14.0" + hoist-non-react-statics "^3.2.1" + object.assign "^4.1.0" + prop-types "^15.7.2" + react-with-direction "^1.3.1" + +react@^16.9.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" + integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + +reactstrap@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/reactstrap/-/reactstrap-5.0.0.tgz#d8948534df4816eddfb162a51643a499388e9228" + integrity sha512-y0eju/LAK7gbEaTFfq2iW92MF7/5Qh0tc1LgYr2mg92IX8NodGc03a+I+cp7bJ0VXHAiLy0bFL9UP89oSm4cBg== + dependencies: + classnames "^2.2.3" + lodash.isfunction "^3.0.9" + lodash.isobject "^3.0.2" + lodash.tonumber "^4.0.3" + prop-types "^15.5.8" + react-popper "^0.8.3" + react-transition-group "^2.2.1" + +reactstrap@^8.0.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/reactstrap/-/reactstrap-8.4.1.tgz#c7f63b9057f58b52833061711ebe235b9ec4e3e5" + integrity sha512-oAjp9PYYUGKl7SLXwrQ1oRIrYw0MqfO2mUqYgGapFKHG2uwjEtLip5rYxtMujkGx3COjH5FX1WtcfNU4oqpH0Q== + dependencies: + "@babel/runtime" "^7.2.0" + classnames "^2.2.3" + prop-types "^15.5.8" + react-lifecycles-compat "^3.0.4" + react-popper "^1.3.6" + react-transition-group "^2.3.1" + +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.6, readable-stream@^3.1.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" + integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== + dependencies: + picomatch "^2.0.7" + +recast@~0.11.12: + version "0.11.23" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3" + integrity sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM= + dependencies: + ast-types "0.9.6" + esprima "~3.1.0" + private "~0.1.5" + source-map "~0.5.0" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= + dependencies: + resolve "^1.1.6" + +redis-commands@*, redis-commands@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.5.0.tgz#80d2e20698fe688f227127ff9e5164a7dd17e785" + integrity sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg== + +redis-errors@^1.0.0, redis-errors@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad" + integrity sha1-62LSrbFeTq9GEMBK/hUpOEJQq60= + +redis-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4" + integrity sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ= + dependencies: + redis-errors "^1.0.0" + +redis@*: + version "3.0.2" + resolved "https://registry.yarnpkg.com/redis/-/redis-3.0.2.tgz#bd47067b8a4a3e6a2e556e57f71cc82c7360150a" + integrity sha512-PNhLCrjU6vKVuMOyFu7oSP296mwBkcE6lrAjruBYG5LgdSqtRBoVQIylrMyVZD/lkF24RSNNatzvYag6HRBHjQ== + dependencies: + denque "^1.4.1" + redis-commands "^1.5.0" + redis-errors "^1.2.0" + redis-parser "^3.0.0" + +redux-immutable@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/redux-immutable/-/redux-immutable-4.0.0.tgz#3a1a32df66366462b63691f0e1dc35e472bbc9f3" + integrity sha1-Ohoy32Y2ZGK2NpHw4dw15HK7yfM= + +redux-saga@^0.16.0: + version "0.16.2" + resolved "https://registry.yarnpkg.com/redux-saga/-/redux-saga-0.16.2.tgz#993662e86bc945d8509ac2b8daba3a8c615cc971" + integrity sha512-iIjKnRThI5sKPEASpUvySemjzwqwI13e3qP7oLub+FycCRDysLSAOwt958niZW6LhxfmS6Qm1BzbU70w/Koc4w== + +redux@^4.0.1, redux@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f" + integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w== + dependencies: + loose-envify "^1.4.0" + symbol-observable "^1.2.0" + +reflect.ownkeys@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" + integrity sha1-dJrO7H8/34tj+SegSAnpDFwLNGA= + +regenerate-unicode-properties@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" + integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== + +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + +regenerator-transform@^0.14.2: + version "0.14.4" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.4.tgz#5266857896518d1616a78a0479337a30ea974cc7" + integrity sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw== + dependencies: + "@babel/runtime" "^7.8.4" + private "^0.1.8" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexp-clone@1.0.0, regexp-clone@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63" + integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw== + +regexp.prototype.flags@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75" + integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +regexpu-core@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" + integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.2.0" + +regjsgen@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" + integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== + +regjsparser@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" + integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== + dependencies: + jsesc "~0.5.0" + +relateurl@0.2.x: + version "0.2.7" + resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" + integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= + +remove-accents@0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/remove-accents/-/remove-accents-0.4.2.tgz#0a43d3aaae1e80db919e07ae254b285d9e1c7bb5" + integrity sha1-CkPTqq4egNuRngeuJUsoXZ4ce7U= + +remove-markdown@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/remove-markdown/-/remove-markdown-0.2.2.tgz#66b0ceeba9fb77ca9636bb1b0307ce21a32a12a6" + integrity sha1-ZrDO66n7d8qWNrsbAwfOIaMqEqY= + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +renderkid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.3.tgz#380179c2ff5ae1365c522bf2fcfcff01c5b74149" + integrity sha512-z8CLQp7EZBPCwCnncgf9C4XAi3WR0dv+uWu/PjIyhhAb5d6IJ/QZqlHFprHeKT+59//V6BNUsLbvN8+2LarxGA== + dependencies: + css-select "^1.1.0" + dom-converter "^0.2" + htmlparser2 "^3.3.0" + strip-ansi "^3.0.0" + utila "^0.4.0" + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +reportback@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/reportback/-/reportback-2.0.2.tgz#8957ff5f6b1675e0284c1a14001a24463c0f9900" + integrity sha512-EOF6vRKfXjI7ydRoOdXXeRTK1zgWq7mep8/32patt0FOnBap32eTSw6yCea/o0025PHmVB8crx5OxzZJ+/P34g== + dependencies: + captains-log "^2.0.2" + switchback "^2.0.1" + +request-compose@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/request-compose/-/request-compose-1.2.3.tgz#b04110786cc25e3af6b1757553f5abcfefe0887b" + integrity sha512-i2m8y3kEveoaAVTsTqig2LmWI10bUdakqzIVHkTEAK8kcsr4a/+iL93tsujsLaMiCZmnB1Osdk3WEMsB//H66A== + +request-oauth@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/request-oauth/-/request-oauth-0.0.3.tgz#b3ea1ff857b9add3b0d49e42993a88e256d791ab" + integrity sha512-q7WdJlpIcPaIDac0FZSy/yH37FO3UkUuPDIsiLALiLjuC6vzvuKIU14YIC3Lm0wtQRXS9GqvSo/fCYj8n75xSw== + dependencies: + oauth-sign "^0.8.2" + qs "^6.5.1" + uuid "^3.2.1" + +request@^2.83.0, request@^2.87.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +require_optional@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e" + integrity sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g== + dependencies: + resolve-from "^2.0.0" + semver "^5.1.0" + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + +reselect@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-3.0.1.tgz#efdaa98ea7451324d092b2b2163a6a1d7a9a2147" + integrity sha1-79qpjqdFEyTQkrKyFjpqHXqaIUc= + +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + +resolve-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c= + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-path@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7" + integrity sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc= + dependencies: + http-errors "~1.6.2" + path-is-absolute "1.0.1" + +resolve-pathname@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-3.0.0.tgz#99d02224d3cf263689becbb393bc560313025dcd" + integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.1.6, resolve@^1.1.7, resolve@^1.12.0, resolve@^1.3.2, resolve@^1.8.1: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +retry-as-promised@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543" + integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== + dependencies: + any-promise "^1.3.0" + +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + +rimraf@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b" + integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg== + dependencies: + glob "^7.1.3" + +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rmc-feedback@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/rmc-feedback/-/rmc-feedback-2.0.0.tgz#cbc6cb3ae63c7a635eef0e25e4fbaf5ac366eeaa" + integrity sha512-5PWOGOW7VXks/l3JzlOU9NIxRpuaSS8d9zA3UULUCuTKnpwBHNvv1jSJzxgbbCQeYzROWUpgKI4za3X4C/mKmQ== + dependencies: + babel-runtime "6.x" + classnames "^2.2.5" + +run-async@^2.2.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== + dependencies: + is-promise "^2.1.0" + +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + +rxjs@^6.4.0: + version "6.5.4" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" + integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== + dependencies: + tslib "^1.9.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sanitize.css@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/sanitize.css/-/sanitize.css-4.1.0.tgz#0bafc3c513699f2fe8c7980c6d37edf21d3f5448" + integrity sha1-C6/DxRNpny/ox5gMbTft8h0/VEg= + +saslprep@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/saslprep/-/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226" + integrity sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag== + dependencies: + sparse-bitfield "^3.0.3" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +scheduler@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" + integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +schema-utils@^2.6.5: + version "2.6.5" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" + integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== + dependencies: + ajv "^6.12.0" + ajv-keywords "^3.4.1" + +select-hose@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" + integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= + +selfsigned@^1.10.7: + version "1.10.7" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.7.tgz#da5819fd049d5574f28e88a9bcc6dbc6e6f3906b" + integrity sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA== + dependencies: + node-forge "0.9.0" + +semver@5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +sendmail@^1.2.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/sendmail/-/sendmail-1.6.1.tgz#6be92fb4be70d1d9ad102030aeb1e737bd512159" + integrity sha512-lIhvnjSi5e5jL8wA1GPP6j2QVlx6JOEfmdn0QIfmuJdmXYGmJ375kcOU0NSm/34J+nypm4sa1AXrYE5w3uNIIA== + dependencies: + dkim-signer "0.2.2" + mailcomposer "3.12.0" + +sequelize-pool@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-2.3.0.tgz#64f1fe8744228172c474f530604b6133be64993d" + integrity sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA== + +sequelize@^5.8.7: + version "5.21.5" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-5.21.5.tgz#44056f3ab8862ccbfeebd5e03ce041c570477ea2" + integrity sha512-n9hR5K4uQGmBGK/Y/iqewCeSFmKVsd0TRnh0tfoLoAkmXbKC4tpeK96RhKs7d+TTMtrJlgt2TNLVBaAxEwC4iw== + dependencies: + bluebird "^3.5.0" + cls-bluebird "^2.1.0" + debug "^4.1.1" + dottie "^2.0.0" + inflection "1.12.0" + lodash "^4.17.15" + moment "^2.24.0" + moment-timezone "^0.5.21" + retry-as-promised "^3.2.0" + semver "^6.3.0" + sequelize-pool "^2.3.0" + toposort-class "^1.0.1" + uuid "^3.3.3" + validator "^10.11.0" + wkx "^0.4.8" + +serialize-javascript@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" + integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== + +serve-index@^1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" + integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= + dependencies: + accepts "~1.3.4" + batch "0.6.1" + debug "2.6.9" + escape-html "~1.0.3" + http-errors "~1.6.2" + mime-types "~2.1.17" + parseurl "~1.3.2" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setimmediate@^1.0.4, setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallowequal@^1.0.1, shallowequal@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shelljs@^0.7.8: + version "0.7.8" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" + integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM= + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shelljs@^0.8.3: + version "0.8.3" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" + integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shimmer@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" + integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== + +showdown@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/showdown/-/showdown-1.9.1.tgz#134e148e75cd4623e09c21b0511977d79b5ad0ef" + integrity sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA== + dependencies: + yargs "^14.2" + +sift@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/sift/-/sift-7.0.1.tgz#47d62c50b159d316f1372f8b53f9c10cd21a4b08" + integrity sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g== + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +sliced@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41" + integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +sockjs-client@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.4.0.tgz#c9f2568e19c8fd8173b4997ea3420e0bb306c7d5" + integrity sha512-5zaLyO8/nri5cua0VtOrFXBPK1jbL4+1cebT/mmKA1E1ZXOvJrII75bPu0l0k843G/+iAbhEqzyKr0w/eCCj7g== + dependencies: + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" + json3 "^3.3.2" + url-parse "^1.4.3" + +sockjs@0.3.19: + version "0.3.19" + resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d" + integrity sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw== + dependencies: + faye-websocket "^0.10.0" + uuid "^3.0.1" + +sort-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" + integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg= + dependencies: + is-plain-obj "^1.0.0" + +sorted-array-functions@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/sorted-array-functions/-/sorted-array-functions-1.2.0.tgz#43265b21d6e985b7df31621b1c11cc68d8efc7c3" + integrity sha512-sWpjPhIZJtqO77GN+LD8dDsDKcWZ9GCOJNqKzi1tvtjGIzwfoyuRH8S0psunmc6Z5P+qfDqztSbwYR5X/e1UTg== + +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@~0.5.12: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.0: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sparse-bitfield@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11" + integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE= + dependencies: + memory-pager "^1.0.2" + +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== + dependencies: + debug "^4.1.0" + detect-node "^2.0.4" + hpack.js "^2.1.6" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" + +spdy@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.1.tgz#6f12ed1c5db7ea4f24ebb8b89ba58c87c08257f2" + integrity sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA== + dependencies: + debug "^4.1.0" + handle-thing "^2.0.0" + http-deceiver "^1.2.7" + select-hose "^2.0.0" + spdy-transport "^3.0.0" + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +split2@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" + integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== + dependencies: + through2 "^2.0.2" + +sprintf-js@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== + +sqlite3@latest: + version "4.1.1" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-4.1.1.tgz#539a42e476640796578e22d589b3283c28055242" + integrity sha512-CvT5XY+MWnn0HkbwVKJAyWEMfzpAPwnTiB3TobA5Mri44SrTovmmh499NPQP+gatkeOipqPlBLel7rn4E/PCQg== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.11.0" + request "^2.87.0" + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +ssri@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + dependencies: + figgy-pudding "^3.5.1" + +stackframe@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.1.1.tgz#ffef0a3318b1b60c3b58564989aca5660729ec71" + integrity sha512-0PlYhdKh6AfFxRyK/v+6/k+/mMfyiEBbTM5L94D0ZytQnJ166wuwoTYLHFWGbs2dpA8Rgq763KGWmN1EQEYHRQ== + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@^1.0.0, statuses@^1.5.0, statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +std-env@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-2.2.1.tgz#2ffa0fdc9e2263e0004c1211966e960948a40f6b" + integrity sha512-IjYQUinA3lg5re/YMlwlfhqNRTzMZMqE+pezevdcTaHceqx8ngEi1alX9nNCk9Sc81fy1fLDeQoaCzeiW1yBOQ== + dependencies: + ci-info "^1.6.0" + +strapi-admin@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-admin/-/strapi-admin-3.0.0-beta.19.4.tgz#598a3a7e2a182e22b782030d21d830c0f7c5f6ca" + integrity sha512-02o0N46o7YY4tRLj4NDGzrOTmE3zm5D8ds4z/9BkV8b9m6leMX7Jkds6N1SH5KWAiH9B/cUVeX8qpa4LXZxQiQ== + dependencies: + "@babel/core" "^7.4.3" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-class-properties" "^7.4.0" + "@babel/plugin-syntax-dynamic-import" "^7.2.0" + "@babel/plugin-transform-modules-commonjs" "^7.6.0" + "@babel/plugin-transform-runtime" "^7.4.3" + "@babel/polyfill" "^7.4.3" + "@babel/preset-env" "^7.4.3" + "@babel/preset-react" "^7.0.0" + "@babel/runtime" "^7.4.3" + "@buffetjs/core" "3.0.1" + "@buffetjs/custom" "3.0.1" + "@buffetjs/hooks" "3.0.0" + "@buffetjs/icons" "3.0.0" + "@buffetjs/styles" "3.0.0" + "@buffetjs/utils" "3.0.0" + "@fortawesome/fontawesome-free" "^5.11.2" + "@fortawesome/fontawesome-svg-core" "^1.2.25" + "@fortawesome/free-brands-svg-icons" "^5.11.2" + "@fortawesome/free-solid-svg-icons" "^5.11.2" + "@fortawesome/react-fontawesome" "^0.1.7" + autoprefixer "^9.5.1" + axios "^0.19.2" + babel-loader "^8.0.5" + bcryptjs "^2.4.3" + bootstrap "^4.3.1" + chalk "^2.4.2" + chokidar "^3.2.1" + classnames "^2.2.6" + cross-env "^5.0.5" + css-loader "^2.1.1" + duplicate-package-checker-webpack-plugin "^3.0.0" + execa "^1.0.0" + file-loader "^3.0.1" + font-awesome "^4.7.0" + friendly-errors-webpack-plugin "^1.7.0" + fs-extra "^7.0.1" + history "^4.9.0" + hoist-non-react-statics "^3.3.0" + html-loader "^0.5.5" + html-webpack-plugin "^3.2.0" + immutable "^3.8.2" + intl "^1.2.5" + invariant "^2.2.4" + is-wsl "^2.0.0" + lodash "^4.17.11" + match-sorter "^4.0.2" + mini-css-extract-plugin "^0.6.0" + moment "^2.24.0" + prop-types "^15.7.2" + react "^16.9.0" + react-copy-to-clipboard "^5.0.1" + react-datetime "^2.16.3" + react-dnd "^9.0.1" + react-dnd-html5-backend "^9.0.0" + react-dom "^16.9.0" + react-helmet "^5.2.0" + react-intl "^2.8.0" + react-is "^16.12.0" + react-loadable "^5.5.0" + react-redux "7.0.2" + react-router "^5.0.0" + react-router-dom "^5.0.0" + react-transition-group "^2.9.0" + react-virtualized "^9.21.2" + reactstrap "^5.0.0" + redux "^4.0.1" + redux-immutable "^4.0.0" + redux-saga "^0.16.0" + remove-markdown "^0.2.2" + reselect "^3.0.1" + sanitize.css "^4.1.0" + shelljs "^0.7.8" + strapi-helper-plugin "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + style-loader "^0.23.1" + styled-components "^5.0.0" + terser-webpack-plugin "^1.2.3" + url-loader "^1.1.2" + video-react "^0.13.2" + webpack "^4.40.1" + webpack-cli "^3.3.2" + webpack-dev-server "^3.4.1" + webpackbar "^3.2.0" + yup "^0.27.0" + +strapi-connector-bookshelf@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-connector-bookshelf/-/strapi-connector-bookshelf-3.0.0-beta.19.4.tgz#1d15a436edb2e53549cb671f1d9b1ceae24e1ba0" + integrity sha512-A7Z8AWm7O6kfPpsqbHBNsSO89kdMBqAkCw6D8Uq5yC7if7kHWpeoYmKUkSHIghl4+kdlHLN84Ad/xm6gcw8xsA== + dependencies: + bookshelf "^1.0.1" + date-fns "^2.8.1" + inquirer "^6.3.1" + lodash "^4.17.11" + pluralize "^7.0.0" + rimraf "3.0.0" + strapi-utils "3.0.0-beta.19.4" + +strapi-database@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-database/-/strapi-database-3.0.0-beta.19.4.tgz#7fbc5de5db79242fb7b0191d206e1ba7710f501d" + integrity sha512-rL5Q/5DaDW5cf2lfWIGb00Yi888pRmuGvHiuJReqzYAaQ0rO4Nh6q8gz8Jpt55sUPBqxhOCuI/SQuq1sG7hkxA== + dependencies: + lodash "^4.17.11" + verror "^1.10.0" + +strapi-generate-api@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-api/-/strapi-generate-api-3.0.0-beta.19.4.tgz#396275ff27bb665d3163db179288012ad03a3ef4" + integrity sha512-CKEoxvU2e9zh0IMS6cRxDCXf4OHYl+b3drbKIsImO2Wt9v8llxvzmrv2Ik3IYgDJhN17iEczqZqykuJ8ji9o6w== + dependencies: + lodash "^4.17.11" + pluralize "^7.0.0" + strapi-utils "3.0.0-beta.19.4" + +strapi-generate-controller@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-controller/-/strapi-generate-controller-3.0.0-beta.19.4.tgz#7e2e918fc42e0045512c8b1190d5c43b18c99a90" + integrity sha512-MKudDjg0z1ijdI2+5p92SyfpPJ/3MSIiHHJJoaW1tojZb2VTuD8mDkOvLq9OV8ccCZtZKkY2qo3YLGbXstNYJQ== + dependencies: + lodash "^4.17.11" + strapi-utils "3.0.0-beta.19.4" + +strapi-generate-model@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-model/-/strapi-generate-model-3.0.0-beta.19.4.tgz#a713935aa109322cd92909ac01d503cb397f9cd5" + integrity sha512-kvykmG/NaUgxMMNtj9QJjxSe/jd60NIYzlexcMMIfgJXYvxTVkmpfj2BiGXP+1c21t606ZNDMDAZZG9l3ghTtQ== + dependencies: + lodash "^4.17.11" + pluralize "^7.0.0" + strapi-utils "3.0.0-beta.19.4" + +strapi-generate-new@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-new/-/strapi-generate-new-3.0.0-beta.19.4.tgz#cf69f294da37228139bf37b561c6a2f2299ecbb2" + integrity sha512-Fc97ush3yJ6Nh7P6KiuObOzCCzvMwMWXKnkcHTQ5mQF8uss4CGLGboZMT2yty+t9Ak68B+47c6Aw02omjPaMfA== + dependencies: + "@sentry/node" "^5.7.1" + chalk "^2.4.2" + execa "^1.0.0" + fs-extra "^8.0.1" + inquirer "^6.3.1" + lodash "^4.17.11" + node-fetch "^1.7.3" + node-machine-id "^1.1.10" + ora "^3.4.0" + uuid "^3.3.2" + +strapi-generate-plugin@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-plugin/-/strapi-generate-plugin-3.0.0-beta.19.4.tgz#cd642fba6bccbbf7f844162954297728788bb940" + integrity sha512-7IPxUpRqhUOJqmSFL0HEb+KLswhN0R8IRlIeX5xGqa5jc3VgDFcMFI3zhORRS6lCa3yPMymT98L6UcTipuuDrQ== + dependencies: + fs-extra "^8.0.1" + lodash "^4.17.11" + strapi-utils "3.0.0-beta.19.4" + +strapi-generate-policy@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-policy/-/strapi-generate-policy-3.0.0-beta.19.4.tgz#c53e825a3623599da1509d6dfd725c2da361e738" + integrity sha512-DNulX/A+2r/Cpeg29Yo7fPZZrgu2skRe25Yb5PTfrzXXUhiFipJ7iQNK0OtHmd49r9cRcn8oEgSYrLQHg4S95w== + dependencies: + lodash "^4.17.11" + strapi-utils "3.0.0-beta.19.4" + +strapi-generate-service@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate-service/-/strapi-generate-service-3.0.0-beta.19.4.tgz#b55c0d6a73e76cdb87185ba122b67312e8ebf14b" + integrity sha512-/H2js1o7XGaSl9b3An8nJ24arbfAxJkAnzlBrgD+UNOsrssGwjBt5MnHd/MOoW53ZprJQbb1mBkeOEcE0DJ2XQ== + dependencies: + lodash "^4.17.11" + strapi-utils "3.0.0-beta.19.4" + +strapi-generate@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-generate/-/strapi-generate-3.0.0-beta.19.4.tgz#53f9d7a50c7e6f5b1e96751777179a0fd6bedb9a" + integrity sha512-5Pjp/wMuyZYwWDkc1WO6V5fcNx6G4jNi100t2Mxi5CaN1tK065nzMKj95LMIfya6prrzuvEE05XQMVLvlA84+Q== + dependencies: + async "^2.6.2" + fs-extra "^8.0.1" + lodash "^4.17.11" + reportback "^2.0.2" + strapi-utils "3.0.0-beta.19.4" + +strapi-helper-plugin@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-helper-plugin/-/strapi-helper-plugin-3.0.0-beta.19.4.tgz#fb7e876599d119c002fa1d4d257670a86f45a387" + integrity sha512-RWLscmZJc3uLw+RPuvbFm20O6Qbgu9O980FUKjuqkqzktNID7uxLuxd5jVWMvPLqj0UEqlZsfafwcr3mLTz8Dw== + dependencies: + bootstrap "^4.3.1" + classnames "^2.2.5" + immutable "^3.8.2" + invariant "^2.2.1" + lodash "^4.17.5" + moment "^2.16.0" + react "^16.9.0" + react-datetime "^2.16.3" + react-dom "^16.9.0" + react-intl "^2.8.0" + react-router "^5.0.0" + react-router-dom "^5.0.0" + reactstrap "^8.0.1" + styled-components "^5.0.0" + whatwg-fetch "^2.0.3" + +strapi-plugin-content-manager@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-plugin-content-manager/-/strapi-plugin-content-manager-3.0.0-beta.19.4.tgz#9b4dd15bd7fa3b5366c52d195fa4a54669e8e9a5" + integrity sha512-M/19qYIPa5BiE5xGJTr4HCPHgZeESWnJwPTzc9GRQ/2dfsR5OGQdc0aH5YaUy34ok+5OB+ZoeWKuXvfHrv6gxA== + dependencies: + "@sindresorhus/slugify" "0.9.1" + classnames "^2.2.6" + codemirror "^5.46.0" + draft-js "^0.10.5" + immutable "^3.8.2" + invariant "^2.2.1" + lodash "^4.17.11" + pluralize "^7.0.0" + react "^16.9.0" + react-dom "^16.9.0" + react-intl "^2.8.0" + react-redux "^7.0.2" + react-router "^5.0.0" + react-router-dom "^5.0.0" + react-select "^3.0.4" + react-transition-group "^2.5.0" + reactstrap "^5.0.0" + redux "^4.0.1" + redux-immutable "^4.0.0" + reselect "^3.0.1" + showdown "^1.9.0" + strapi-helper-plugin "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + yup "^0.27.0" + +strapi-plugin-content-type-builder@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-plugin-content-type-builder/-/strapi-plugin-content-type-builder-3.0.0-beta.19.4.tgz#f84dc011ede6ea98b7908303913d3dd5615dcdaa" + integrity sha512-fab9+HkvGc276EuEzT3N8zuPKSM5/bZ55qwhBH+5m7O9wgZlNBWO8lhmKyDpdzd3qnjEUAko2A+qJkWdTLQAow== + dependencies: + "@sindresorhus/slugify" "0.9.1" + classnames "^2.2.6" + fs-extra "^7.0.0" + immutable "^3.8.2" + invariant "^2.2.1" + lodash "^4.17.11" + pluralize "^7.0.0" + react "^16.9.0" + react-dom "^16.9.0" + react-intl "^2.8.0" + react-redux "7.0.2" + react-router "^5.0.0" + react-router-dom "^5.0.0" + react-transition-group "^2.5.0" + reactstrap "^5.0.0" + redux "^4.0.1" + redux-immutable "^4.0.0" + reselect "^3.0.1" + strapi-generate "3.0.0-beta.19.4" + strapi-generate-api "3.0.0-beta.19.4" + strapi-helper-plugin "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + yup "^0.27.0" + +strapi-plugin-email@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-plugin-email/-/strapi-plugin-email-3.0.0-beta.19.4.tgz#36141b1832bfbc7d2ebd691b3eec7ea143986265" + integrity sha512-kZR2Jz598gwnG8y9lXkAReTOi32onfbhRdYkpXbiRdkPnyEk5BrzRcgPQyLe9+Qz8j/QHAjbryMdYAHwdR/Nsg== + dependencies: + lodash "^4.17.11" + strapi-provider-email-sendmail "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + +strapi-plugin-upload@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-plugin-upload/-/strapi-plugin-upload-3.0.0-beta.19.4.tgz#6985f77baa85c69be8f604f7d8fe596a32286470" + integrity sha512-45+8hIobU5HaIneguxLpheQmS3kmaJs3PB5cSNW6srYr42W0InNwCwZssAEHm2OgsrE1TJ89fzLd3obB+oNmMw== + dependencies: + immutable "^3.8.2" + invariant "^2.2.1" + lodash "^4.17.11" + react "^16.9.0" + react-copy-to-clipboard "^5.0.1" + react-dom "^16.9.0" + react-intl "^2.8.0" + react-redux "^7.0.2" + react-router "^5.0.0" + react-router-dom "^5.0.0" + react-transition-group "^2.5.0" + reactstrap "^5.0.0" + strapi-helper-plugin "3.0.0-beta.19.4" + strapi-provider-upload-local "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + stream-to-array "^2.3.0" + uuid "^3.2.1" + +strapi-plugin-users-permissions@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-plugin-users-permissions/-/strapi-plugin-users-permissions-3.0.0-beta.19.4.tgz#8277f13ecb8493659ead4ab3fb32faff21bdfda3" + integrity sha512-LXAqlcP/Xh1sSAf6XsUNmC69Ozrw5d3pwIf4yJarPLaoxc2Cy6OyMFVG027qbPjwqHkALHJdfT39fG6X9xtNjw== + dependencies: + "@purest/providers" "^1.0.1" + bcryptjs "^2.4.3" + classnames "^2.2.6" + grant-koa "^4.6.0" + immutable "^3.8.2" + invariant "^2.2.1" + jsonwebtoken "^8.1.0" + koa2-ratelimit "^0.9.0" + lodash "^4.17.11" + purest "3.1.0" + react "^16.9.0" + react-dom "^16.9.0" + react-intl "^2.8.0" + react-redux "^7.0.2" + react-router "^5.0.0" + react-router-dom "^5.0.0" + react-transition-group "^2.5.0" + reactstrap "^5.0.0" + redux-saga "^0.16.0" + request "^2.83.0" + strapi-helper-plugin "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + uuid "^3.1.0" + +strapi-provider-email-sendmail@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-provider-email-sendmail/-/strapi-provider-email-sendmail-3.0.0-beta.19.4.tgz#3c69d0537e67a80ce6b3acac2955bebf30216e77" + integrity sha512-YA0zOgBN4tzPKdBqbrC70FPWbVKi1ejlPFtGR7OP92r89N2nbpXpDvs/qLP5oJbHz2RLS+nEqjGXJfwr0hm9CQ== + dependencies: + lodash "^4.17.11" + sendmail "^1.2.0" + +strapi-provider-upload-local@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-provider-upload-local/-/strapi-provider-upload-local-3.0.0-beta.19.4.tgz#65085512d67acc995c2ea8354a462e43e428a422" + integrity sha512-mKZc+2mXIfM+yDHvM9TtRx/RUKKOeg9qN22Y2btJ3H+IVlzQpBc/FsnTmntaziKVXAUvWPiitm/7HFZXmGLhKA== + +strapi-utils@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi-utils/-/strapi-utils-3.0.0-beta.19.4.tgz#bad8bcb661c6486fb42bb7c7ee630e1034d717a3" + integrity sha512-pzITqqrlAXSRupv/rtWvDsjL5btBsmU2XAZhlwuHjHDCe9kmgWloBSIX0K7pbvDsX7BialGqAQlNwc9aRkpWsA== + dependencies: + "@sindresorhus/slugify" "^0.11.0" + date-fns "^2.8.1" + lodash "4.17.12" + pino "^4.7.1" + pluralize "^7.0.0" + shelljs "^0.8.3" + yup "0.28.1" + +strapi@3.0.0-beta.19.4: + version "3.0.0-beta.19.4" + resolved "https://registry.yarnpkg.com/strapi/-/strapi-3.0.0-beta.19.4.tgz#9216ca5fde0a2aeeac8e8b47cc8007238da48c20" + integrity sha512-nGdXg04VchwuFw4+Zn0UXu5hAyoRY0CzrhRdZchL37g6SNmGu5GaoFt72jwdxDqGJi6LRK97mHwjfKLF1zBouQ== + dependencies: + "@koa/cors" "^3.0.0" + async "^2.1.2" + boom "^7.3.0" + chalk "^2.4.1" + chokidar "3.3.1" + cli-table3 "^0.5.1" + commander "^2.20.0" + cross-spawn "^6.0.5" + debug "^4.1.1" + delegates "^1.0.0" + execa "^1.0.0" + fs-extra "^7.0.0" + glob "^7.1.2" + inquirer "^6.2.1" + koa "^2.8.0" + koa-body "^4.1.0" + koa-compose "^4.1.0" + koa-compress "^3.0.0" + koa-convert "^1.2.0" + koa-favicon "^2.0.0" + koa-i18n "^2.1.0" + koa-ip "^2.0.0" + koa-locale "~1.3.0" + koa-lusca "~2.2.0" + koa-qs "^2.0.0" + koa-router "^7.4.0" + koa-session "^5.12.0" + koa-static "^5.0.0" + lodash "^4.17.5" + minimatch "^3.0.4" + node-fetch "^1.7.3" + node-machine-id "^1.1.10" + node-schedule "^1.2.0" + opn "^5.3.0" + ora "^3.0.0" + resolve-cwd "^3.0.0" + rimraf "^2.6.2" + shelljs "^0.8.3" + strapi-database "3.0.0-beta.19.4" + strapi-generate "3.0.0-beta.19.4" + strapi-generate-api "3.0.0-beta.19.4" + strapi-generate-controller "3.0.0-beta.19.4" + strapi-generate-model "3.0.0-beta.19.4" + strapi-generate-new "3.0.0-beta.19.4" + strapi-generate-plugin "3.0.0-beta.19.4" + strapi-generate-policy "3.0.0-beta.19.4" + strapi-generate-service "3.0.0-beta.19.4" + strapi-utils "3.0.0-beta.19.4" + +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +stream-to-array@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/stream-to-array/-/stream-to-array-2.3.0.tgz#bbf6b39f5f43ec30bc71babcb37557acecf34353" + integrity sha1-u/azn19D7DC8cbq8s3VXrOzzQ1M= + dependencies: + any-promise "^1.1.0" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string.prototype.trimend@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz#ee497fd29768646d84be2c9b819e292439614373" + integrity sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimleft@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" + +string.prototype.trimright@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz#afe596a7ce9de905496919406c9734845f01a2f2" + integrity sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string_decoder@^1.0.0, string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +style-loader@^0.23.1: + version "0.23.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" + integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg== + dependencies: + loader-utils "^1.1.0" + schema-utils "^1.0.0" + +styled-components@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.0.1.tgz#57782a6471031abefb2db5820a1876ae853bc619" + integrity sha512-E0xKTRIjTs4DyvC1MHu/EcCXIj6+ENCP8hP01koyoADF++WdBUOrSGwU1scJRw7/YaYOhDvvoad6VlMG+0j53A== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/traverse" "^7.4.5" + "@emotion/is-prop-valid" "^0.8.3" + "@emotion/stylis" "^0.8.4" + "@emotion/unitless" "^0.7.4" + babel-plugin-styled-components ">= 1" + css-to-react-native "^3.0.0" + hoist-non-react-statics "^3.0.0" + shallowequal "^1.1.0" + supports-color "^5.5.0" + +supports-color@6.1.0, supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0, supports-color@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +switchback@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/switchback/-/switchback-2.0.5.tgz#2f50c91118f659c42e03c0f2bdb094f868c45336" + integrity sha512-w9gnsTxR5geOKt45QUryhDP9KTLcOAqje9usR2VQ2ng8DfhaF+mkIcArxioMP/p6Z/ecKE58i2/B0DDlMJK1jw== + dependencies: + "@sailshq/lodash" "^3.10.3" + +symbol-observable@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== + +synchronous-promise@^2.0.6: + version "2.0.10" + resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.10.tgz#e64c6fd3afd25f423963353043f4a68ebd397fd8" + integrity sha512-6PC+JRGmNjiG3kJ56ZMNWDPL8hjyghF5cMXIFOKg+NiwwEZZIvxTWd0pinWKyD227odg9ygF8xVhhz7gb8Uq7A== + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + +tar@^4, tar@^4.4.2: + version "4.4.13" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" + integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +tarn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tarn/-/tarn-2.0.0.tgz#c68499f69881f99ae955b4317ca7d212d942fdee" + integrity sha512-7rNMCZd3s9bhQh47ksAQd92ADFcJUjjbyOvyFjNLwTPpGieFHMC84S+LOzw0fx1uh6hnDz/19r8CPMnIjJlMMA== + +terser-webpack-plugin@^1.2.3, terser-webpack-plugin@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" + integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^2.1.2" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser@^4.1.2: + version "4.6.9" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.9.tgz#deec3d8c4536461f46392e4d457bcd1ba2ab1212" + integrity sha512-9UuZOApK4oiTpX4AjnWhTCY3fCqntS3ggPQOku9M3Rvr70VETYsuHjSGuRy0D7X/Z994hfnzMy6TQ/H0WQSmXQ== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.0" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839" + integrity sha1-5p44obq+lpsBCCB5eLn2K4hgSDk= + dependencies: + any-promise "^1.0.0" + +through2@^2.0.0, through2@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through@^2.3.6, through@~2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +thunky@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.1.0.tgz#5abaf714a9405db0504732bbccd2cedd9ef9537d" + integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== + +tildify@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-2.0.0.tgz#f205f3674d677ce698b7067a99e949ce03b4754a" + integrity sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw== + +timers-browserify@^2.0.4: + version "2.0.11" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== + dependencies: + setimmediate "^1.0.4" + +tiny-invariant@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875" + integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw== + +tiny-warning@^1.0.0, tiny-warning@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" + integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toggle-selection@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32" + integrity sha1-bkWxJj8gF/oKzH2J14sVuL932jI= + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +toposort-class@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toposort-class/-/toposort-class-1.0.1.tgz#7ffd1f78c8be28c3ba45cd4e1a3f5ee193bd9988" + integrity sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg= + +toposort@^1.0.0: + version "1.0.7" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" + integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= + +toposort@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" + integrity sha1-riF2gXXRVZ1IvvNUILL0li8JwzA= + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tslib@^1.9.0, tslib@^1.9.3: + version "1.11.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" + integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + +tsscmp@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" + integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA== + +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + +type-is@^1.6.14, type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typed-styles@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/typed-styles/-/typed-styles-0.0.7.tgz#93392a008794c4595119ff62dde6809dbc40a3d9" + integrity sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q== + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +ua-parser-js@^0.7.18: + version "0.7.21" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777" + integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== + +uglify-js@3.4.x: + version "3.4.10" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f" + integrity sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw== + dependencies: + commander "~2.19.0" + source-map "~0.6.1" + +unc-path-regex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" + integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" + integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg= + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urijs@^1.19.0: + version "1.19.2" + resolved "https://registry.yarnpkg.com/urijs/-/urijs-1.19.2.tgz#f9be09f00c4c5134b7cb3cf475c1dd394526265a" + integrity sha512-s/UIq9ap4JPZ7H1EB5ULo/aOUbWqfDi7FKzMC2Nz+0Si8GiT1rIEaprt8hy3Vy2Ex2aJPpOQv4P4DuOZ+K1c6w== + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +url-loader@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8" + integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg== + dependencies: + loader-utils "^1.1.0" + mime "^2.0.3" + schema-utils "^1.0.0" + +url-parse@^1.4.3: + version "1.4.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.7.tgz#a8a83535e8c00a316e403a5db4ac1b9b853ae278" + integrity sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== + dependencies: + define-properties "^1.1.2" + object.getownpropertydescriptors "^2.0.3" + +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= + dependencies: + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +utila@^0.4.0, utila@~0.4: + version "0.4.0" + resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c" + integrity sha1-ihagXURWV6Oupe7MWxKk+lN5dyw= + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.0.1, uuid@^3.1.0, uuid@^3.2.1, uuid@^3.3.2, uuid@^3.3.3: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-compile-cache@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== + +v8flags@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" + integrity sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w== + dependencies: + homedir-polyfill "^1.0.1" + +validator@^10.11.0: + version "10.11.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" + integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== + +value-equal@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-1.0.1.tgz#1e0b794c734c5c0cade179c437d356d931a34d6c" + integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== + +vary@^1.1.2, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0, verror@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +video-react@^0.13.2: + version "0.13.9" + resolved "https://registry.yarnpkg.com/video-react/-/video-react-0.13.9.tgz#be397fc5dd7a50908368f0a47124904b87ee3307" + integrity sha512-nT8WjOGr3va7zJDR+OfpyqFpMrpMX3LfY3PuVyrt9ZdKDzlHgv9gQc/saAFb/pvImatzOs3+XA2GWrb5hXbTkg== + dependencies: + "@babel/runtime" "^7.4.5" + classnames "^2.2.6" + lodash.throttle "^4.1.1" + prop-types "^15.7.2" + redux "^4.0.1" + +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + +warning@^4.0.2, warning@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + +watchpack@^1.6.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" + integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== + dependencies: + chokidar "^2.1.8" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + +wbuf@^1.1.0, wbuf@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" + integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== + dependencies: + minimalistic-assert "^1.0.0" + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +webpack-cli@^3.3.2: + version "3.3.11" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.11.tgz#3bf21889bf597b5d82c38f215135a411edfdc631" + integrity sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g== + dependencies: + chalk "2.4.2" + cross-spawn "6.0.5" + enhanced-resolve "4.1.0" + findup-sync "3.0.0" + global-modules "2.0.0" + import-local "2.0.0" + interpret "1.2.0" + loader-utils "1.2.3" + supports-color "6.1.0" + v8-compile-cache "2.0.3" + yargs "13.2.4" + +webpack-dev-middleware@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz#0019c3db716e3fa5cecbf64f2ab88a74bab331f3" + integrity sha512-1xC42LxbYoqLNAhV6YzTYacicgMZQTqRd27Sim9wn5hJrX3I5nxYy1SxSd4+gjUFsz1dQFj+yEe6zEVmSkeJjw== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.4" + mkdirp "^0.5.1" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-server@^3.4.1: + version "3.10.3" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz#f35945036813e57ef582c2420ef7b470e14d3af0" + integrity sha512-e4nWev8YzEVNdOMcNzNeCN947sWJNd43E5XvsJzbAL08kGc2frm1tQ32hTJslRS+H65LCb/AaUCYU7fjHCpDeQ== + dependencies: + ansi-html "0.0.7" + bonjour "^3.5.0" + chokidar "^2.1.8" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.2.1" + http-proxy-middleware "0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" + ip "^1.1.5" + is-absolute-url "^3.0.3" + killable "^1.0.1" + loglevel "^1.6.6" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.25" + schema-utils "^1.0.0" + selfsigned "^1.10.7" + semver "^6.3.0" + serve-index "^1.9.1" + sockjs "0.3.19" + sockjs-client "1.4.0" + spdy "^4.0.1" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.2" + webpack-log "^2.0.0" + ws "^6.2.1" + yargs "12.0.5" + +webpack-log@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f" + integrity sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== + dependencies: + ansi-colors "^3.0.0" + uuid "^3.3.2" + +webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^4.40.1: + version "4.42.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" + integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.2.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.6.0" + webpack-sources "^1.4.1" + +webpackbar@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/webpackbar/-/webpackbar-3.2.0.tgz#bdaad103fad11a4e612500e72aaae98b08ba493f" + integrity sha512-PC4o+1c8gWWileUfwabe0gqptlXUDJd5E0zbpr2xHP1VSOVlZVPBZ8j6NCR8zM5zbKdxPhctHXahgpNK1qFDPw== + dependencies: + ansi-escapes "^4.1.0" + chalk "^2.4.1" + consola "^2.6.0" + figures "^3.0.0" + pretty-time "^1.1.0" + std-env "^2.2.1" + text-table "^0.2.0" + wrap-ansi "^5.1.0" + +websocket-driver@>=0.5.1: + version "0.7.3" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" + integrity sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg== + dependencies: + http-parser-js ">=0.4.0 <0.4.11" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" + integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== + +whatwg-fetch@>=0.10.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" + integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== + +whatwg-fetch@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.14, which@^1.2.9, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wkx@^0.4.8: + version "0.4.8" + resolved "https://registry.yarnpkg.com/wkx/-/wkx-0.4.8.tgz#a092cf088d112683fdc7182fd31493b2c5820003" + integrity sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ== + dependencies: + "@types/node" "*" + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== + dependencies: + errno "~0.1.7" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +ws@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yaml@^1.7.2: + version "1.8.3" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.8.3.tgz#2f420fca58b68ce3a332d0ca64be1d191dd3f87a" + integrity sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw== + dependencies: + "@babel/runtime" "^7.8.7" + +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^13.1.0: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^15.0.1: + version "15.0.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" + integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs@12.0.5: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== + dependencies: + cliui "^4.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^1.0.1" + os-locale "^3.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1 || ^4.0.0" + yargs-parser "^11.1.1" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@^14.2: + version "14.2.3" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" + integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== + dependencies: + cliui "^5.0.0" + decamelize "^1.2.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^15.0.1" + +ylru@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.2.1.tgz#f576b63341547989c1de7ba288760923b27fe84f" + integrity sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ== + +yup@0.28.1: + version "0.28.1" + resolved "https://registry.yarnpkg.com/yup/-/yup-0.28.1.tgz#60c0725be7057ed7a9ae61561333809332a63d47" + integrity sha512-xSHMZA7UyecSG/CCTDCtnYZMjBrYDR/C7hu0fMsZ6UcS/ngko4qCVFbw+CAmNtHlbItKkvQ3YXITODeTj/dUkw== + dependencies: + "@babel/runtime" "^7.0.0" + fn-name "~2.0.1" + lodash "^4.17.11" + lodash-es "^4.17.11" + property-expr "^1.5.0" + synchronous-promise "^2.0.6" + toposort "^2.0.2" + +yup@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/yup/-/yup-0.27.0.tgz#f8cb198c8e7dd2124beddc2457571329096b06e7" + integrity sha512-v1yFnE4+u9za42gG/b/081E7uNW9mUj3qtkmelLbW5YPROZzSH/KUUyJu9Wt8vxFJcT9otL/eZopS0YK1L5yPQ== + dependencies: + "@babel/runtime" "^7.0.0" + fn-name "~2.0.1" + lodash "^4.17.11" + property-expr "^1.5.0" + synchronous-promise "^2.0.6" + toposort "^2.0.2"