[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> components.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["components"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 259);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ([
  89  /* 0 */
  90  /***/ (function(module, exports) {
  91  
  92  (function() { module.exports = this["wp"]["element"]; }());
  93  
  94  /***/ }),
  95  /* 1 */
  96  /***/ (function(module, exports) {
  97  
  98  (function() { module.exports = this["wp"]["i18n"]; }());
  99  
 100  /***/ }),
 101  /* 2 */
 102  /***/ (function(module, exports) {
 103  
 104  (function() { module.exports = this["lodash"]; }());
 105  
 106  /***/ }),
 107  /* 3 */,
 108  /* 4 */,
 109  /* 5 */
 110  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 111  
 112  "use strict";
 113  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 114  function _defineProperty(obj, key, value) {
 115    if (key in obj) {
 116      Object.defineProperty(obj, key, {
 117        value: value,
 118        enumerable: true,
 119        configurable: true,
 120        writable: true
 121      });
 122    } else {
 123      obj[key] = value;
 124    }
 125  
 126    return obj;
 127  }
 128  
 129  /***/ }),
 130  /* 6 */
 131  /***/ (function(module, exports) {
 132  
 133  (function() { module.exports = this["wp"]["primitives"]; }());
 134  
 135  /***/ }),
 136  /* 7 */,
 137  /* 8 */
 138  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 139  
 140  "use strict";
 141  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 142  function _extends() {
 143    _extends = Object.assign || function (target) {
 144      for (var i = 1; i < arguments.length; i++) {
 145        var source = arguments[i];
 146  
 147        for (var key in source) {
 148          if (Object.prototype.hasOwnProperty.call(source, key)) {
 149            target[key] = source[key];
 150          }
 151        }
 152      }
 153  
 154      return target;
 155    };
 156  
 157    return _extends.apply(this, arguments);
 158  }
 159  
 160  /***/ }),
 161  /* 9 */
 162  /***/ (function(module, exports) {
 163  
 164  (function() { module.exports = this["wp"]["compose"]; }());
 165  
 166  /***/ }),
 167  /* 10 */,
 168  /* 11 */
 169  /***/ (function(module, exports, __webpack_require__) {
 170  
 171  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 172    Copyright (c) 2017 Jed Watson.
 173    Licensed under the MIT License (MIT), see
 174    http://jedwatson.github.io/classnames
 175  */
 176  /* global define */
 177  
 178  (function () {
 179      'use strict';
 180  
 181      var hasOwn = {}.hasOwnProperty;
 182  
 183  	function classNames () {
 184          var classes = [];
 185  
 186          for (var i = 0; i < arguments.length; i++) {
 187              var arg = arguments[i];
 188              if (!arg) continue;
 189  
 190              var argType = typeof arg;
 191  
 192              if (argType === 'string' || argType === 'number') {
 193                  classes.push(arg);
 194              } else if (Array.isArray(arg) && arg.length) {
 195                  var inner = classNames.apply(null, arg);
 196                  if (inner) {
 197                      classes.push(inner);
 198                  }
 199              } else if (argType === 'object') {
 200                  for (var key in arg) {
 201                      if (hasOwn.call(arg, key) && arg[key]) {
 202                          classes.push(key);
 203                      }
 204                  }
 205              }
 206          }
 207  
 208          return classes.join(' ');
 209      }
 210  
 211      if ( true && module.exports) {
 212          classNames.default = classNames;
 213          module.exports = classNames;
 214      } else if (true) {
 215          // register as 'classnames', consistent with npm package name
 216          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 217              return classNames;
 218          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 219                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 220      } else {}
 221  }());
 222  
 223  
 224  /***/ }),
 225  /* 12 */
 226  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 227  
 228  "use strict";
 229  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 230  function _assertThisInitialized(self) {
 231    if (self === void 0) {
 232      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 233    }
 234  
 235    return self;
 236  }
 237  
 238  /***/ }),
 239  /* 13 */
 240  /***/ (function(module, exports) {
 241  
 242  (function() { module.exports = this["React"]; }());
 243  
 244  /***/ }),
 245  /* 14 */
 246  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 247  
 248  "use strict";
 249  
 250  // EXPORTS
 251  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 252  
 253  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 254  var arrayWithHoles = __webpack_require__(38);
 255  
 256  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 257  function _iterableToArrayLimit(arr, i) {
 258    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 259    var _arr = [];
 260    var _n = true;
 261    var _d = false;
 262    var _e = undefined;
 263  
 264    try {
 265      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 266        _arr.push(_s.value);
 267  
 268        if (i && _arr.length === i) break;
 269      }
 270    } catch (err) {
 271      _d = true;
 272      _e = err;
 273    } finally {
 274      try {
 275        if (!_n && _i["return"] != null) _i["return"]();
 276      } finally {
 277        if (_d) throw _e;
 278      }
 279    }
 280  
 281    return _arr;
 282  }
 283  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 284  var unsupportedIterableToArray = __webpack_require__(29);
 285  
 286  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 287  var nonIterableRest = __webpack_require__(39);
 288  
 289  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 290  
 291  
 292  
 293  
 294  function _slicedToArray(arr, i) {
 295    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 296  }
 297  
 298  /***/ }),
 299  /* 15 */
 300  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 301  
 302  "use strict";
 303  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 304  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
 305  
 306  function _objectWithoutProperties(source, excluded) {
 307    if (source == null) return {};
 308    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 309    var key, i;
 310  
 311    if (Object.getOwnPropertySymbols) {
 312      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 313  
 314      for (i = 0; i < sourceSymbolKeys.length; i++) {
 315        key = sourceSymbolKeys[i];
 316        if (excluded.indexOf(key) >= 0) continue;
 317        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 318        target[key] = source[key];
 319      }
 320    }
 321  
 322    return target;
 323  }
 324  
 325  /***/ }),
 326  /* 16 */
 327  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 328  
 329  "use strict";
 330  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 331  function _getPrototypeOf(o) {
 332    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 333      return o.__proto__ || Object.getPrototypeOf(o);
 334    };
 335    return _getPrototypeOf(o);
 336  }
 337  
 338  /***/ }),
 339  /* 17 */
 340  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 341  
 342  "use strict";
 343  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 344  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectSpread2; });
 345  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
 346  function _defineProperty(obj, key, value) {
 347    if (key in obj) {
 348      Object.defineProperty(obj, key, {
 349        value: value,
 350        enumerable: true,
 351        configurable: true,
 352        writable: true
 353      });
 354    } else {
 355      obj[key] = value;
 356    }
 357  
 358    return obj;
 359  }
 360  
 361  function ownKeys(object, enumerableOnly) {
 362    var keys = Object.keys(object);
 363  
 364    if (Object.getOwnPropertySymbols) {
 365      var symbols = Object.getOwnPropertySymbols(object);
 366      if (enumerableOnly) symbols = symbols.filter(function (sym) {
 367        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
 368      });
 369      keys.push.apply(keys, symbols);
 370    }
 371  
 372    return keys;
 373  }
 374  
 375  function _objectSpread2(target) {
 376    for (var i = 1; i < arguments.length; i++) {
 377      var source = arguments[i] != null ? arguments[i] : {};
 378  
 379      if (i % 2) {
 380        ownKeys(Object(source), true).forEach(function (key) {
 381          _defineProperty(target, key, source[key]);
 382        });
 383      } else if (Object.getOwnPropertyDescriptors) {
 384        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
 385      } else {
 386        ownKeys(Object(source)).forEach(function (key) {
 387          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
 388        });
 389      }
 390    }
 391  
 392    return target;
 393  }
 394  
 395  function _objectWithoutPropertiesLoose(source, excluded) {
 396    if (source == null) return {};
 397    var target = {};
 398    var sourceKeys = Object.keys(source);
 399    var key, i;
 400  
 401    for (i = 0; i < sourceKeys.length; i++) {
 402      key = sourceKeys[i];
 403      if (excluded.indexOf(key) >= 0) continue;
 404      target[key] = source[key];
 405    }
 406  
 407    return target;
 408  }
 409  
 410  function _unsupportedIterableToArray(o, minLen) {
 411    if (!o) return;
 412    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
 413    var n = Object.prototype.toString.call(o).slice(8, -1);
 414    if (n === "Object" && o.constructor) n = o.constructor.name;
 415    if (n === "Map" || n === "Set") return Array.from(o);
 416    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
 417  }
 418  
 419  function _arrayLikeToArray(arr, len) {
 420    if (len == null || len > arr.length) len = arr.length;
 421  
 422    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
 423  
 424    return arr2;
 425  }
 426  
 427  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
 428    var it;
 429  
 430    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
 431      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
 432        if (it) o = it;
 433        var i = 0;
 434        return function () {
 435          if (i >= o.length) return {
 436            done: true
 437          };
 438          return {
 439            done: false,
 440            value: o[i++]
 441          };
 442        };
 443      }
 444  
 445      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 446    }
 447  
 448    it = o[Symbol.iterator]();
 449    return it.next.bind(it);
 450  }
 451  
 452  
 453  
 454  
 455  /***/ }),
 456  /* 18 */
 457  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 458  
 459  "use strict";
 460  
 461  // EXPORTS
 462  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 463  
 464  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 465  var arrayLikeToArray = __webpack_require__(26);
 466  
 467  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 468  
 469  function _arrayWithoutHoles(arr) {
 470    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 471  }
 472  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 473  var iterableToArray = __webpack_require__(35);
 474  
 475  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 476  var unsupportedIterableToArray = __webpack_require__(29);
 477  
 478  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 479  function _nonIterableSpread() {
 480    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 481  }
 482  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 483  
 484  
 485  
 486  
 487  function _toConsumableArray(arr) {
 488    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 489  }
 490  
 491  /***/ }),
 492  /* 19 */
 493  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 494  
 495  "use strict";
 496  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 497  function _defineProperties(target, props) {
 498    for (var i = 0; i < props.length; i++) {
 499      var descriptor = props[i];
 500      descriptor.enumerable = descriptor.enumerable || false;
 501      descriptor.configurable = true;
 502      if ("value" in descriptor) descriptor.writable = true;
 503      Object.defineProperty(target, descriptor.key, descriptor);
 504    }
 505  }
 506  
 507  function _createClass(Constructor, protoProps, staticProps) {
 508    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 509    if (staticProps) _defineProperties(Constructor, staticProps);
 510    return Constructor;
 511  }
 512  
 513  /***/ }),
 514  /* 20 */
 515  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 516  
 517  "use strict";
 518  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 519  function _classCallCheck(instance, Constructor) {
 520    if (!(instance instanceof Constructor)) {
 521      throw new TypeError("Cannot call a class as a function");
 522    }
 523  }
 524  
 525  /***/ }),
 526  /* 21 */
 527  /***/ (function(module, exports) {
 528  
 529  (function() { module.exports = this["wp"]["keycodes"]; }());
 530  
 531  /***/ }),
 532  /* 22 */
 533  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 534  
 535  "use strict";
 536  
 537  // EXPORTS
 538  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 539  
 540  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 541  function _setPrototypeOf(o, p) {
 542    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 543      o.__proto__ = p;
 544      return o;
 545    };
 546  
 547    return _setPrototypeOf(o, p);
 548  }
 549  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 550  
 551  function _inherits(subClass, superClass) {
 552    if (typeof superClass !== "function" && superClass !== null) {
 553      throw new TypeError("Super expression must either be null or a function");
 554    }
 555  
 556    subClass.prototype = Object.create(superClass && superClass.prototype, {
 557      constructor: {
 558        value: subClass,
 559        writable: true,
 560        configurable: true
 561      }
 562    });
 563    if (superClass) _setPrototypeOf(subClass, superClass);
 564  }
 565  
 566  /***/ }),
 567  /* 23 */
 568  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 569  
 570  "use strict";
 571  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 572  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
 573  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
 574  
 575  
 576  function _possibleConstructorReturn(self, call) {
 577    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 578      return call;
 579    }
 580  
 581    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 582  }
 583  
 584  /***/ }),
 585  /* 24 */
 586  /***/ (function(module, exports) {
 587  
 588  (function() { module.exports = this["regeneratorRuntime"]; }());
 589  
 590  /***/ }),
 591  /* 25 */
 592  /***/ (function(module, exports) {
 593  
 594  (function() { module.exports = this["wp"]["richText"]; }());
 595  
 596  /***/ }),
 597  /* 26 */
 598  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 599  
 600  "use strict";
 601  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 602  function _arrayLikeToArray(arr, len) {
 603    if (len == null || len > arr.length) len = arr.length;
 604  
 605    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 606      arr2[i] = arr[i];
 607    }
 608  
 609    return arr2;
 610  }
 611  
 612  /***/ }),
 613  /* 27 */,
 614  /* 28 */
 615  /***/ (function(module, exports, __webpack_require__) {
 616  
 617  /**
 618   * Copyright (c) 2013-present, Facebook, Inc.
 619   *
 620   * This source code is licensed under the MIT license found in the
 621   * LICENSE file in the root directory of this source tree.
 622   */
 623  
 624  if (false) { var throwOnDirectAccess, ReactIs; } else {
 625    // By explicitly using `prop-types` you are opting into new production behavior.
 626    // http://fb.me/prop-types-in-prod
 627    module.exports = __webpack_require__(138)();
 628  }
 629  
 630  
 631  /***/ }),
 632  /* 29 */
 633  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 634  
 635  "use strict";
 636  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
 637  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
 638  
 639  function _unsupportedIterableToArray(o, minLen) {
 640    if (!o) return;
 641    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 642    var n = Object.prototype.toString.call(o).slice(8, -1);
 643    if (n === "Object" && o.constructor) n = o.constructor.name;
 644    if (n === "Map" || n === "Set") return Array.from(o);
 645    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 646  }
 647  
 648  /***/ }),
 649  /* 30 */
 650  /***/ (function(module, exports) {
 651  
 652  (function() { module.exports = this["wp"]["dom"]; }());
 653  
 654  /***/ }),
 655  /* 31 */,
 656  /* 32 */
 657  /***/ (function(module, exports) {
 658  
 659  (function() { module.exports = this["wp"]["hooks"]; }());
 660  
 661  /***/ }),
 662  /* 33 */,
 663  /* 34 */
 664  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 665  
 666  "use strict";
 667  /* unused harmony export Button */
 668  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
 669  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
 670  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
 671  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
 672  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
 673  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
 674  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
 675  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
 676  /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(37);
 677  /* harmony import */ var _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5__);
 678  /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(86);
 679  /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88);
 680  
 681  
 682  
 683  
 684  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; } } }; }
 685  
 686  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); }
 687  
 688  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; }
 689  
 690  /**
 691   * External dependencies
 692   */
 693  
 694  
 695  /**
 696   * WordPress dependencies
 697   */
 698  
 699  
 700  
 701  /**
 702   * Internal dependencies
 703   */
 704  
 705  
 706  
 707  var disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];
 708  function Button(props, ref) {
 709    var href = props.href,
 710        target = props.target,
 711        isPrimary = props.isPrimary,
 712        isSmall = props.isSmall,
 713        isTertiary = props.isTertiary,
 714        isPressed = props.isPressed,
 715        isBusy = props.isBusy,
 716        isDefault = props.isDefault,
 717        isSecondary = props.isSecondary,
 718        isLink = props.isLink,
 719        isDestructive = props.isDestructive,
 720        className = props.className,
 721        disabled = props.disabled,
 722        icon = props.icon,
 723        iconSize = props.iconSize,
 724        showTooltip = props.showTooltip,
 725        tooltipPosition = props.tooltipPosition,
 726        shortcut = props.shortcut,
 727        label = props.label,
 728        children = props.children,
 729        isFocusable = props.__experimentalIsFocusable,
 730        additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(props, ["href", "target", "isPrimary", "isSmall", "isTertiary", "isPressed", "isBusy", "isDefault", "isSecondary", "isLink", "isDestructive", "className", "disabled", "icon", "iconSize", "showTooltip", "tooltipPosition", "shortcut", "label", "children", "__experimentalIsFocusable"]);
 731  
 732    if (isDefault) {
 733      _wordpress_deprecated__WEBPACK_IMPORTED_MODULE_5___default()('Button isDefault prop', {
 734        alternative: 'isSecondary'
 735      });
 736    }
 737  
 738    var classes = classnames__WEBPACK_IMPORTED_MODULE_3___default()('components-button', className, {
 739      'is-secondary': isDefault || isSecondary,
 740      'is-primary': isPrimary,
 741      'is-small': isSmall,
 742      'is-tertiary': isTertiary,
 743      'is-pressed': isPressed,
 744      'is-busy': isBusy,
 745      'is-link': isLink,
 746      'is-destructive': isDestructive,
 747      'has-text': !!icon && !!children,
 748      'has-icon': !!icon
 749    });
 750    var trulyDisabled = disabled && !isFocusable;
 751    var Tag = href !== undefined && !trulyDisabled ? 'a' : 'button';
 752    var tagProps = Tag === 'a' ? {
 753      href: href,
 754      target: target
 755    } : {
 756      type: 'button',
 757      disabled: trulyDisabled,
 758      'aria-pressed': isPressed
 759    };
 760  
 761    if (disabled && isFocusable) {
 762      // In this case, the button will be disabled, but still focusable and
 763      // perceivable by screen reader users.
 764      tagProps['aria-disabled'] = true;
 765  
 766      var _iterator = _createForOfIteratorHelper(disabledEventsOnDisabledButton),
 767          _step;
 768  
 769      try {
 770        for (_iterator.s(); !(_step = _iterator.n()).done;) {
 771          var disabledEvent = _step.value;
 772  
 773          additionalProps[disabledEvent] = function (event) {
 774            event.stopPropagation();
 775            event.preventDefault();
 776          };
 777        }
 778      } catch (err) {
 779        _iterator.e(err);
 780      } finally {
 781        _iterator.f();
 782      }
 783    } // Should show the tooltip if...
 784  
 785  
 786    var shouldShowTooltip = !trulyDisabled && ( // an explicit tooltip is passed or...
 787    showTooltip && label || // there's a shortcut or...
 788    shortcut || // there's a label and...
 789    !!label && ( // the children are empty and...
 790    !children || Object(lodash__WEBPACK_IMPORTED_MODULE_4__["isArray"])(children) && !children.length) && // the tooltip is not explicitly disabled.
 791    false !== showTooltip);
 792    var element = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(Tag, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, tagProps, additionalProps, {
 793      className: classes,
 794      "aria-label": additionalProps['aria-label'] || label,
 795      ref: ref
 796    }), icon && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_icon__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
 797      icon: icon,
 798      size: iconSize
 799    }), children);
 800  
 801    if (!shouldShowTooltip) {
 802      return element;
 803    }
 804  
 805    return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_tooltip__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
 806      text: label,
 807      shortcut: shortcut,
 808      position: tooltipPosition
 809    }, element);
 810  }
 811  /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["forwardRef"])(Button));
 812  
 813  
 814  /***/ }),
 815  /* 35 */
 816  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 817  
 818  "use strict";
 819  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 820  function _iterableToArray(iter) {
 821    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
 822  }
 823  
 824  /***/ }),
 825  /* 36 */,
 826  /* 37 */
 827  /***/ (function(module, exports) {
 828  
 829  (function() { module.exports = this["wp"]["deprecated"]; }());
 830  
 831  /***/ }),
 832  /* 38 */
 833  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 834  
 835  "use strict";
 836  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 837  function _arrayWithHoles(arr) {
 838    if (Array.isArray(arr)) return arr;
 839  }
 840  
 841  /***/ }),
 842  /* 39 */
 843  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 844  
 845  "use strict";
 846  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 847  function _nonIterableRest() {
 848    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 849  }
 850  
 851  /***/ }),
 852  /* 40 */
 853  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 854  
 855  "use strict";
 856  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 857  function _typeof(obj) {
 858    "@babel/helpers - typeof";
 859  
 860    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
 861      _typeof = function _typeof(obj) {
 862        return typeof obj;
 863      };
 864    } else {
 865      _typeof = function _typeof(obj) {
 866        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
 867      };
 868    }
 869  
 870    return _typeof(obj);
 871  }
 872  
 873  /***/ }),
 874  /* 41 */
 875  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 876  
 877  "use strict";
 878  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 879  function _objectWithoutPropertiesLoose(source, excluded) {
 880    if (source == null) return {};
 881    var target = {};
 882    var sourceKeys = Object.keys(source);
 883    var key, i;
 884  
 885    for (i = 0; i < sourceKeys.length; i++) {
 886      key = sourceKeys[i];
 887      if (excluded.indexOf(key) >= 0) continue;
 888      target[key] = source[key];
 889    }
 890  
 891    return target;
 892  }
 893  
 894  /***/ }),
 895  /* 42 */,
 896  /* 43 */
 897  /***/ (function(module, exports) {
 898  
 899  (function() { module.exports = this["moment"]; }());
 900  
 901  /***/ }),
 902  /* 44 */,
 903  /* 45 */,
 904  /* 46 */
 905  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 906  
 907  "use strict";
 908  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useLiveRef; });
 909  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
 910  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
 911  /* harmony import */ var _useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59);
 912  
 913  
 914  
 915  /**
 916   * A `React.Ref` that keeps track of the passed `value`.
 917   */
 918  
 919  function useLiveRef(value) {
 920    var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(value);
 921    Object(_useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__[/* useIsomorphicEffect */ "a"])(function () {
 922      ref.current = value;
 923    });
 924    return ref;
 925  }
 926  
 927  
 928  
 929  
 930  /***/ }),
 931  /* 47 */
 932  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 933  
 934  "use strict";
 935  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
 936  /**
 937   * Returns `element.ownerDocument || window.document`.
 938   */
 939  function getDocument(element) {
 940    return element ? element.ownerDocument || element : window.document;
 941  }
 942  
 943  
 944  
 945  
 946  /***/ }),
 947  /* 48 */
 948  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 949  
 950  "use strict";
 951  
 952  // EXPORTS
 953  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createHook; });
 954  
 955  // EXTERNAL MODULE: external {"this":"React"}
 956  var external_this_React_ = __webpack_require__(13);
 957  
 958  // EXTERNAL MODULE: ./node_modules/reakit-system/es/SystemContext.js
 959  var SystemContext = __webpack_require__(74);
 960  
 961  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js
 962  
 963  
 964  
 965  /**
 966   * React custom hook that returns the value of any token defined in the
 967   * SystemContext. It's mainly used internally in [`useOptions`](#useoptions)
 968   * and [`useProps`](#useprops).
 969   *
 970   * @example
 971   * import { SystemProvider, useToken } from "reakit-system";
 972   *
 973   * const system = {
 974   *   token: "value",
 975   * };
 976   *
 977   * function Component(props) {
 978   *   const token = useToken("token", "default value");
 979   *   return <div {...props}>{token}</div>;
 980   * }
 981   *
 982   * function App() {
 983   *   return (
 984   *     <SystemProvider unstable_system={system}>
 985   *       <Component />
 986   *     </SystemProvider>
 987   *   );
 988   * }
 989   */
 990  
 991  function useToken(token, defaultValue) {
 992    Object(external_this_React_["useDebugValue"])(token);
 993    var context = Object(external_this_React_["useContext"])(SystemContext["a" /* SystemContext */]);
 994    return context[token] != null ? context[token] : defaultValue;
 995  }
 996  
 997  
 998  
 999  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js
1000  
1001  
1002  
1003  
1004  /**
1005   * React custom hook that returns the props returned by a given
1006   * `use${name}Props` in the SystemContext.
1007   *
1008   * @example
1009   * import { SystemProvider, useProps } from "reakit-system";
1010   *
1011   * const system = {
1012   *   useAProps(options, htmlProps) {
1013   *     return {
1014   *       ...htmlProps,
1015   *       href: options.url,
1016   *     };
1017   *   },
1018   * };
1019   *
1020   * function A({ url, ...htmlProps }) {
1021   *   const props = useProps("A", { url }, htmlProps);
1022   *   return <a {...props} />;
1023   * }
1024   *
1025   * function App() {
1026   *   return (
1027   *     <SystemProvider unstable_system={system}>
1028   *       <A url="url">It will convert url into href in useAProps</A>
1029   *     </SystemProvider>
1030   *   );
1031   * }
1032   */
1033  
1034  function useProps(name, options, htmlProps) {
1035    if (options === void 0) {
1036      options = {};
1037    }
1038  
1039    if (htmlProps === void 0) {
1040      htmlProps = {};
1041    }
1042  
1043    var hookName = "use" + name + "Props";
1044    Object(external_this_React_["useDebugValue"])(hookName);
1045    var useHook = useToken(hookName);
1046  
1047    if (useHook) {
1048      return useHook(options, htmlProps);
1049    }
1050  
1051    return htmlProps;
1052  }
1053  
1054  
1055  
1056  // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
1057  var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(55);
1058  
1059  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js
1060  
1061  
1062  
1063  
1064  
1065  /**
1066   * React custom hook that returns the options returned by a given
1067   * `use${name}Options` in the SystemContext.
1068   *
1069   * @example
1070   * import React from "react";
1071   * import { SystemProvider, useOptions } from "reakit-system";
1072   *
1073   * const system = {
1074   *   useAOptions(options, htmlProps) {
1075   *     return {
1076   *       ...options,
1077   *       url: htmlProps.href,
1078   *     };
1079   *   },
1080   * };
1081   *
1082   * function A({ url, ...htmlProps }) {
1083   *   const options = useOptions("A", { url }, htmlProps);
1084   *   return <a href={options.url} {...htmlProps} />;
1085   * }
1086   *
1087   * function App() {
1088   *   return (
1089   *     <SystemProvider unstable_system={system}>
1090   *       <A href="url">
1091   *         It will convert href into url in useAOptions and then url into href in A
1092   *       </A>
1093   *     </SystemProvider>
1094   *   );
1095   * }
1096   */
1097  
1098  function useOptions(name, options, htmlProps) {
1099    if (options === void 0) {
1100      options = {};
1101    }
1102  
1103    if (htmlProps === void 0) {
1104      htmlProps = {};
1105    }
1106  
1107    var hookName = "use" + name + "Options";
1108    Object(external_this_React_["useDebugValue"])(hookName);
1109    var useHook = useToken(hookName);
1110  
1111    if (useHook) {
1112      return Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, options), useHook(options, htmlProps));
1113    }
1114  
1115    return options;
1116  }
1117  
1118  
1119  
1120  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
1121  var shallowEqual = __webpack_require__(56);
1122  
1123  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js
1124  /**
1125   * Transforms `arg` into an array if it's not already.
1126   *
1127   * @example
1128   * import { toArray } from "reakit-utils";
1129   *
1130   * toArray("a"); // ["a"]
1131   * toArray(["a"]); // ["a"]
1132   */
1133  function toArray(arg) {
1134    if (Array.isArray(arg)) {
1135      return arg;
1136    }
1137  
1138    return typeof arg !== "undefined" ? [arg] : [];
1139  }
1140  
1141  
1142  
1143  // CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js
1144  
1145  
1146  
1147  
1148  
1149  
1150  
1151  
1152  
1153  /**
1154   * Creates a React custom hook that will return component props.
1155   *
1156   * @example
1157   * import { createHook } from "reakit-system";
1158   *
1159   * const useA = createHook({
1160   *   name: "A",
1161   *   keys: ["url"], // custom props/options keys
1162   *   useProps(options, htmlProps) {
1163   *     return {
1164   *       ...htmlProps,
1165   *       href: options.url,
1166   *     };
1167   *   },
1168   * });
1169   *
1170   * function A({ url, ...htmlProps }) {
1171   *   const props = useA({ url }, htmlProps);
1172   *   return <a {...props} />;
1173   * }
1174   *
1175   * @param options
1176   */
1177  function createHook(options) {
1178    var _options$useState, _composedHooks$;
1179  
1180    var composedHooks = toArray(options.compose);
1181  
1182    var __useOptions = function __useOptions(hookOptions, htmlProps) {
1183      // Call the current hook's useOptions first
1184      if (options.useOptions) {
1185        hookOptions = options.useOptions(hookOptions, htmlProps);
1186      } // If there's name, call useOptions from the system context
1187  
1188  
1189      if (options.name) {
1190        hookOptions = useOptions(options.name, hookOptions, htmlProps);
1191      } // Run composed hooks useOptions
1192  
1193  
1194      if (options.compose) {
1195        for (var _iterator = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step; !(_step = _iterator()).done;) {
1196          var hook = _step.value;
1197          hookOptions = hook.__useOptions(hookOptions, htmlProps);
1198        }
1199      }
1200  
1201      return hookOptions;
1202    };
1203  
1204    var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) {
1205      if (hookOptions === void 0) {
1206        hookOptions = {};
1207      }
1208  
1209      if (htmlProps === void 0) {
1210        htmlProps = {};
1211      }
1212  
1213      if (unstable_ignoreUseOptions === void 0) {
1214        unstable_ignoreUseOptions = false;
1215      }
1216  
1217      // This won't execute when useHook was called from within another useHook
1218      if (!unstable_ignoreUseOptions) {
1219        hookOptions = __useOptions(hookOptions, htmlProps);
1220      } // Call the current hook's useProps
1221  
1222  
1223      if (options.useProps) {
1224        htmlProps = options.useProps(hookOptions, htmlProps);
1225      } // If there's name, call useProps from the system context
1226  
1227  
1228      if (options.name) {
1229        htmlProps = useProps(options.name, hookOptions, htmlProps);
1230      }
1231  
1232      if (options.compose) {
1233        if (options.useComposeOptions) {
1234          hookOptions = options.useComposeOptions(hookOptions, htmlProps);
1235        }
1236  
1237        if (options.useComposeProps) {
1238          htmlProps = options.useComposeProps(hookOptions, htmlProps);
1239        } else {
1240          for (var _iterator2 = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step2; !(_step2 = _iterator2()).done;) {
1241            var hook = _step2.value;
1242            htmlProps = hook(hookOptions, htmlProps, true);
1243          }
1244        }
1245      } // Remove undefined values from htmlProps
1246  
1247  
1248      var finalHTMLProps = {};
1249      var definedHTMLProps = htmlProps || {};
1250  
1251      for (var prop in definedHTMLProps) {
1252        if (definedHTMLProps[prop] !== undefined) {
1253          finalHTMLProps[prop] = definedHTMLProps[prop];
1254        }
1255      }
1256  
1257      return finalHTMLProps;
1258    };
1259  
1260    useHook.__useOptions = __useOptions;
1261    var composedKeys = composedHooks.reduce(function (keys, hook) {
1262      keys.push.apply(keys, hook.__keys || []);
1263      return keys;
1264    }, []); // It's used by createComponent to split option props (keys) and html props
1265  
1266    useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []);
1267    useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual["a" /* shallowEqual */];
1268  
1269    if (false) {}
1270  
1271    return useHook;
1272  }
1273  
1274  
1275  
1276  
1277  /***/ }),
1278  /* 49 */
1279  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1280  
1281  "use strict";
1282  
1283  // EXPORTS
1284  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createComponent; });
1285  
1286  // EXTERNAL MODULE: external {"this":"React"}
1287  var external_this_React_ = __webpack_require__(13);
1288  
1289  // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
1290  var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(55);
1291  
1292  // EXTERNAL MODULE: ./node_modules/reakit-system/es/useCreateElement.js
1293  var useCreateElement = __webpack_require__(78);
1294  
1295  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js
1296  /**
1297   * Splits an object (`props`) into a tuple where the first item is an object
1298   * with the passed `keys`, and the second item is an object with these keys
1299   * omitted.
1300   *
1301   * @example
1302   * import { splitProps } from "reakit-utils";
1303   *
1304   * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
1305   */
1306  function splitProps(props, keys) {
1307    var propsKeys = Object.keys(props);
1308    var picked = {};
1309    var omitted = {};
1310  
1311    for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) {
1312      var key = _propsKeys[_i];
1313  
1314      if (keys.indexOf(key) >= 0) {
1315        picked[key] = props[key];
1316      } else {
1317        omitted[key] = props[key];
1318      }
1319    }
1320  
1321    return [picked, omitted];
1322  }
1323  
1324  
1325  
1326  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
1327  var shallowEqual = __webpack_require__(56);
1328  
1329  // CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js
1330  
1331  
1332  
1333  
1334  
1335  
1336  
1337  function forwardRef(component) {
1338    return /*#__PURE__*/Object(external_this_React_["forwardRef"])(component);
1339  }
1340  
1341  function memo(component, propsAreEqual) {
1342    return /*#__PURE__*/Object(external_this_React_["memo"])(component, propsAreEqual);
1343  }
1344  
1345  /**
1346   * Creates a React component.
1347   *
1348   * @example
1349   * import { createComponent } from "reakit-system";
1350   *
1351   * const A = createComponent({ as: "a" });
1352   *
1353   * @param options
1354   */
1355  function createComponent(_ref) {
1356    var type = _ref.as,
1357        useHook = _ref.useHook,
1358        shouldMemo = _ref.memo,
1359        _ref$propsAreEqual = _ref.propsAreEqual,
1360        propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual,
1361        _ref$keys = _ref.keys,
1362        keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys,
1363        _ref$useCreateElement = _ref.useCreateElement,
1364        useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement["a" /* useCreateElement */] : _ref$useCreateElement;
1365  
1366    var Comp = function Comp(_ref2, ref) {
1367      var _ref2$as = _ref2.as,
1368          as = _ref2$as === void 0 ? type : _ref2$as,
1369          props = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_ref2, ["as"]);
1370  
1371      if (useHook) {
1372        var _as$render;
1373  
1374        var _splitProps = splitProps(props, keys),
1375            _options = _splitProps[0],
1376            htmlProps = _splitProps[1];
1377  
1378        var _useHook = useHook(_options, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
1379          ref: ref
1380        }, htmlProps)),
1381            wrapElement = _useHook.wrapElement,
1382            elementProps = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_useHook, ["wrapElement"]); // @ts-ignore
1383  
1384  
1385        var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys;
1386        var asOptions = asKeys && splitProps(props, asKeys)[0];
1387        var allProps = asOptions ? Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, elementProps), asOptions) : elementProps;
1388  
1389        var _element = useCreateElement$1(as, allProps);
1390  
1391        if (wrapElement) {
1392          return wrapElement(_element);
1393        }
1394  
1395        return _element;
1396      }
1397  
1398      return useCreateElement$1(as, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
1399        ref: ref
1400      }, props));
1401    };
1402  
1403    if (false) {}
1404  
1405    Comp = forwardRef(Comp);
1406  
1407    if (shouldMemo) {
1408      Comp = memo(Comp, propsAreEqual);
1409    }
1410  
1411    Comp.__keys = keys;
1412    Comp.unstable_propsAreEqual = propsAreEqual || shallowEqual["a" /* shallowEqual */];
1413    return Comp;
1414  }
1415  
1416  
1417  
1418  
1419  /***/ }),
1420  /* 50 */
1421  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1422  
1423  "use strict";
1424  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
1425  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1426    try {
1427      var info = gen[key](arg);
1428      var value = info.value;
1429    } catch (error) {
1430      reject(error);
1431      return;
1432    }
1433  
1434    if (info.done) {
1435      resolve(value);
1436    } else {
1437      Promise.resolve(value).then(_next, _throw);
1438    }
1439  }
1440  
1441  function _asyncToGenerator(fn) {
1442    return function () {
1443      var self = this,
1444          args = arguments;
1445      return new Promise(function (resolve, reject) {
1446        var gen = fn.apply(self, args);
1447  
1448        function _next(value) {
1449          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1450        }
1451  
1452        function _throw(err) {
1453          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1454        }
1455  
1456        _next(undefined);
1457      });
1458    };
1459  }
1460  
1461  /***/ }),
1462  /* 51 */
1463  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1464  
1465  "use strict";
1466  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findFirstEnabledItem; });
1467  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return flatten; });
1468  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return groupItems; });
1469  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return findEnabledItemById; });
1470  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getCurrentId; });
1471  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return reverse; });
1472  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return useCompositeState; });
1473  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
1474  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
1475  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1476  /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59);
1477  /* harmony import */ var reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62);
1478  /* harmony import */ var reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61);
1479  /* harmony import */ var _Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
1480  
1481  
1482  
1483  
1484  
1485  
1486  
1487  function reverse(array) {
1488    return array.slice().reverse();
1489  }
1490  
1491  function isElementPreceding(element1, element2) {
1492    return Boolean(element2.compareDocumentPosition(element1) & Node.DOCUMENT_POSITION_PRECEDING);
1493  }
1494  
1495  function findDOMIndex(items, item) {
1496    return items.findIndex(function (currentItem) {
1497      if (!currentItem.ref.current || !item.ref.current) {
1498        return false;
1499      }
1500  
1501      return isElementPreceding(item.ref.current, currentItem.ref.current);
1502    });
1503  }
1504  
1505  function findFirstEnabledItem(items, excludeId) {
1506    if (excludeId) {
1507      return items.find(function (item) {
1508        return !item.disabled && item.id !== excludeId;
1509      });
1510    }
1511  
1512    return items.find(function (item) {
1513      return !item.disabled;
1514    });
1515  }
1516  
1517  function findEnabledItemById(items, id) {
1518    if (!id) return undefined;
1519    return items === null || items === void 0 ? void 0 : items.find(function (item) {
1520      return item.id === id && !item.disabled;
1521    });
1522  }
1523  
1524  function groupItems(items) {
1525    var groups = [[]];
1526  
1527    var _loop = function _loop() {
1528      var item = _step.value;
1529      var group = groups.find(function (g) {
1530        return !g[0] || g[0].groupId === item.groupId;
1531      });
1532  
1533      if (group) {
1534        group.push(item);
1535      } else {
1536        groups.push([item]);
1537      }
1538    };
1539  
1540    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(items), _step; !(_step = _iterator()).done;) {
1541      _loop();
1542    }
1543  
1544    return groups;
1545  }
1546  
1547  function getMaxLength(rows) {
1548    var maxLength = 0;
1549  
1550    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(rows), _step; !(_step = _iterator()).done;) {
1551      var length = _step.value.length;
1552  
1553      if (length > maxLength) {
1554        maxLength = length;
1555      }
1556    }
1557  
1558    return maxLength;
1559  }
1560  
1561  /**
1562   * Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]
1563   */
1564  
1565  function verticalizeItems(items) {
1566    var groups = groupItems(items);
1567    var maxLength = getMaxLength(groups);
1568    var verticalized = [];
1569  
1570    for (var i = 0; i < maxLength; i += 1) {
1571      for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(groups), _step; !(_step = _iterator()).done;) {
1572        var group = _step.value;
1573  
1574        if (group[i]) {
1575          verticalized.push(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, group[i]), {}, {
1576            // If there's no groupId, it means that it's not a grid composite,
1577            // but a single row instead. So, instead of verticalizing it, that
1578            // is, assigning a different groupId based on the column index, we
1579            // keep it undefined so they will be part of the same group.
1580            // It's useful when using up/down on one-dimensional composites.
1581            groupId: group[i].groupId ? "" + i : undefined
1582          }));
1583        }
1584      }
1585    }
1586  
1587    return verticalized;
1588  }
1589  
1590  function flatten(grid) {
1591    var flattened = [];
1592  
1593    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(grid), _step; !(_step = _iterator()).done;) {
1594      var row = _step.value;
1595      flattened.push.apply(flattened, row);
1596    }
1597  
1598    return flattened;
1599  }
1600  
1601  /**
1602   * Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]
1603   */
1604  
1605  function fillGroups(groups) {
1606    var maxLength = getMaxLength(groups);
1607  
1608    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(groups), _step; !(_step = _iterator()).done;) {
1609      var group = _step.value;
1610  
1611      if (group.length < maxLength) {
1612        for (var i = 0; i < maxLength; i += 1) {
1613          if (!group[i]) {
1614            group[i] = {
1615              id: "__EMPTY_ITEM__",
1616              disabled: true,
1617              ref: {
1618                current: null
1619              },
1620              groupId: group[i - 1].groupId
1621            };
1622          }
1623        }
1624      }
1625    }
1626  
1627    return groups;
1628  }
1629  
1630  function getCurrentId(options, passedId) {
1631    var _findFirstEnabledItem;
1632  
1633    if (passedId || passedId === null) {
1634      return passedId;
1635    }
1636  
1637    if (options.currentId || options.currentId === null) {
1638      return options.currentId;
1639    }
1640  
1641    return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id;
1642  }
1643  
1644  var nullItem = {
1645    id: null,
1646    ref: {
1647      current: null
1648    }
1649  };
1650  function placeItemsAfter(items, id, shouldInsertNullItem) {
1651    var index = items.findIndex(function (item) {
1652      return item.id === id;
1653    });
1654    return [].concat(items.slice(index + 1), shouldInsertNullItem ? [nullItem] : [], items.slice(0, index));
1655  }
1656  
1657  function getItemsInGroup(items, groupId) {
1658    return items.filter(function (item) {
1659      return item.groupId === groupId;
1660    });
1661  }
1662  
1663  var map = {
1664    horizontal: "vertical",
1665    vertical: "horizontal"
1666  };
1667  function getOppositeOrientation(orientation) {
1668    return orientation && map[orientation];
1669  }
1670  
1671  function addItemAtIndex(array, item, index) {
1672    if (!(index in array)) {
1673      return [].concat(array, [item]);
1674    }
1675  
1676    return [].concat(array.slice(0, index), [item], array.slice(index));
1677  }
1678  
1679  function sortBasedOnDOMPosition(items) {
1680    var copy = items.slice();
1681    var isOrderDifferent = false;
1682    copy.sort(function (a, b) {
1683      var elementA = a.ref.current;
1684      var elementB = b.ref.current;
1685  
1686      if (elementA && elementB && isElementPreceding(elementA, elementB)) {
1687        isOrderDifferent = true;
1688        return -1;
1689      }
1690  
1691      return 0;
1692    });
1693  
1694    if (isOrderDifferent) {
1695      return copy;
1696    }
1697  
1698    return items;
1699  }
1700  
1701  function reducer(state, action) {
1702    var virtual = state.unstable_virtual,
1703        rtl = state.rtl,
1704        orientation = state.orientation,
1705        items = state.items,
1706        groups = state.groups,
1707        currentId = state.currentId,
1708        loop = state.loop,
1709        wrap = state.wrap,
1710        pastIds = state.pastIds,
1711        moves = state.unstable_moves,
1712        initialVirtual = state.initialVirtual,
1713        initialRTL = state.initialRTL,
1714        initialOrientation = state.initialOrientation,
1715        initialCurrentId = state.initialCurrentId,
1716        initialLoop = state.initialLoop,
1717        initialWrap = state.initialWrap,
1718        hasSetCurrentId = state.hasSetCurrentId;
1719  
1720    switch (action.type) {
1721      case "registerGroup":
1722        {
1723          var _group = action.group; // If there are no groups yet, just add it as the first one
1724  
1725          if (groups.length === 0) {
1726            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1727              groups: [_group]
1728            });
1729          } // Finds the group index based on DOM position
1730  
1731  
1732          var index = findDOMIndex(groups, _group);
1733          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1734            groups: addItemAtIndex(groups, _group, index)
1735          });
1736        }
1737  
1738      case "unregisterGroup":
1739        {
1740          var _id = action.id;
1741          var nextGroups = groups.filter(function (group) {
1742            return group.id !== _id;
1743          }); // The group isn't registered, so do nothing
1744  
1745          if (nextGroups.length === groups.length) {
1746            return state;
1747          }
1748  
1749          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1750            groups: nextGroups
1751          });
1752        }
1753  
1754      case "registerItem":
1755        {
1756          var _item = action.item; // Finds the item group based on the DOM hierarchy
1757  
1758          var _group2 = groups.find(function (r) {
1759            var _r$ref$current;
1760  
1761            return (_r$ref$current = r.ref.current) === null || _r$ref$current === void 0 ? void 0 : _r$ref$current.contains(_item.ref.current);
1762          }); // Group will be null if it's a one-dimensional composite
1763  
1764  
1765          var nextItem = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
1766            groupId: _group2 === null || _group2 === void 0 ? void 0 : _group2.id
1767          }, _item);
1768  
1769          var _index = findDOMIndex(items, nextItem);
1770  
1771          var nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1772            items: addItemAtIndex(items, nextItem, _index)
1773          });
1774  
1775          if (!hasSetCurrentId && !moves && initialCurrentId === undefined) {
1776            var _findFirstEnabledItem;
1777  
1778            // Sets currentId to the first enabled item. This runs whenever an item
1779            // is registered because the first enabled item may be registered
1780            // asynchronously.
1781            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, nextState), {}, {
1782              currentId: (_findFirstEnabledItem = findFirstEnabledItem(nextState.items)) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id
1783            });
1784          }
1785  
1786          return nextState;
1787        }
1788  
1789      case "unregisterItem":
1790        {
1791          var _id2 = action.id;
1792          var nextItems = items.filter(function (item) {
1793            return item.id !== _id2;
1794          }); // The item isn't registered, so do nothing
1795  
1796          if (nextItems.length === items.length) {
1797            return state;
1798          } // Filters out the item that is being removed from the pastIds list
1799  
1800  
1801          var nextPastIds = pastIds.filter(function (pastId) {
1802            return pastId !== _id2;
1803          });
1804  
1805          var _nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1806            pastIds: nextPastIds,
1807            items: nextItems
1808          }); // If the current item is the item that is being removed, focus pastId
1809  
1810  
1811          if (currentId && currentId === _id2) {
1812            var nextId = getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState), {}, {
1813              currentId: nextPastIds[0]
1814            }));
1815            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState), {}, {
1816              currentId: nextId
1817            });
1818          }
1819  
1820          return _nextState;
1821        }
1822  
1823      case "move":
1824        {
1825          var _id3 = action.id; // move() does nothing
1826  
1827          if (_id3 === undefined) {
1828            return state;
1829          } // Removes the current item and the item that is receiving focus from the
1830          // pastIds list
1831  
1832  
1833          var filteredPastIds = pastIds.filter(function (pastId) {
1834            return pastId !== currentId && pastId !== _id3;
1835          }); // If there's a currentId, add it to the pastIds list so it can be focused
1836          // if the new item gets removed or disabled
1837  
1838          var _nextPastIds = currentId ? [currentId].concat(filteredPastIds) : filteredPastIds;
1839  
1840          var _nextState2 = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1841            pastIds: _nextPastIds
1842          }); // move(null) will focus the composite element itself, not an item
1843  
1844  
1845          if (_id3 === null) {
1846            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState2), {}, {
1847              unstable_moves: moves + 1,
1848              currentId: getCurrentId(_nextState2, _id3)
1849            });
1850          }
1851  
1852          var _item2 = findEnabledItemById(items, _id3);
1853  
1854          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState2), {}, {
1855            unstable_moves: _item2 ? moves + 1 : moves,
1856            currentId: getCurrentId(_nextState2, _item2 === null || _item2 === void 0 ? void 0 : _item2.id)
1857          });
1858        }
1859  
1860      case "next":
1861        {
1862          // If there's no item focused, we just move the first one
1863          if (currentId == null) {
1864            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1865              type: "first"
1866            }));
1867          } // RTL doesn't make sense on vertical navigation
1868  
1869  
1870          var isHorizontal = orientation !== "vertical";
1871          var isRTL = rtl && isHorizontal;
1872          var allItems = isRTL ? reverse(items) : items;
1873          var currentItem = allItems.find(function (item) {
1874            return item.id === currentId;
1875          }); // If there's no item focused, we just move the first one
1876  
1877          if (!currentItem) {
1878            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1879              type: "first"
1880            }));
1881          }
1882  
1883          var isGrid = !!currentItem.groupId;
1884          var currentIndex = allItems.indexOf(currentItem);
1885  
1886          var _nextItems = allItems.slice(currentIndex + 1);
1887  
1888          var nextItemsInGroup = getItemsInGroup(_nextItems, currentItem.groupId); // Home, End
1889  
1890          if (action.allTheWay) {
1891            // We reverse so we can get the last enabled item in the group. If it's
1892            // RTL, nextItems and nextItemsInGroup are already reversed and don't
1893            // have the items before the current one anymore. So we have to get
1894            // items in group again with allItems.
1895            var _nextItem2 = findFirstEnabledItem(isRTL ? getItemsInGroup(allItems, currentItem.groupId) : reverse(nextItemsInGroup));
1896  
1897            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1898              type: "move",
1899              id: _nextItem2 === null || _nextItem2 === void 0 ? void 0 : _nextItem2.id
1900            }));
1901          }
1902  
1903          var oppositeOrientation = getOppositeOrientation( // If it's a grid and orientation is not set, it's a next/previous
1904          // call, which is inherently horizontal. up/down will call next with
1905          // orientation set to vertical by default (see below on up/down cases).
1906          isGrid ? orientation || "horizontal" : orientation);
1907          var canLoop = loop && loop !== oppositeOrientation;
1908          var canWrap = isGrid && wrap && wrap !== oppositeOrientation;
1909          var hasNullItem = // `previous` and `up` will set action.hasNullItem, but when calling
1910          // next directly, hasNullItem will only be true if it's not a grid and
1911          // loop is set to true, which means that pressing right or down keys on
1912          // grids will never focus the composite element. On one-dimensional
1913          // composites that don't loop, pressing right or down keys also doesn't
1914          // focus the composite element.
1915          action.hasNullItem || !isGrid && canLoop && initialCurrentId === null;
1916  
1917          if (canLoop) {
1918            var loopItems = canWrap && !hasNullItem ? allItems : getItemsInGroup(allItems, currentItem.groupId); // Turns [0, 1, current, 3, 4] into [3, 4, 0, 1]
1919  
1920            var sortedItems = placeItemsAfter(loopItems, currentId, hasNullItem);
1921  
1922            var _nextItem3 = findFirstEnabledItem(sortedItems, currentId);
1923  
1924            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1925              type: "move",
1926              id: _nextItem3 === null || _nextItem3 === void 0 ? void 0 : _nextItem3.id
1927            }));
1928          }
1929  
1930          if (canWrap) {
1931            var _nextItem4 = findFirstEnabledItem( // We can use nextItems, which contains all the next items, including
1932            // items from other groups, to wrap between groups. However, if there
1933            // is a null item (the composite element), we'll only use the next
1934            // items in the group. So moving next from the last item will focus
1935            // the composite element (null). On grid composites, horizontal
1936            // navigation never focuses the composite element, only vertical.
1937            hasNullItem ? nextItemsInGroup : _nextItems, currentId);
1938  
1939            var _nextId = hasNullItem ? (_nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id) || null : _nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id;
1940  
1941            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1942              type: "move",
1943              id: _nextId
1944            }));
1945          }
1946  
1947          var _nextItem = findFirstEnabledItem(nextItemsInGroup, currentId);
1948  
1949          if (!_nextItem && hasNullItem) {
1950            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1951              type: "move",
1952              id: null
1953            }));
1954          }
1955  
1956          return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1957            type: "move",
1958            id: _nextItem === null || _nextItem === void 0 ? void 0 : _nextItem.id
1959          }));
1960        }
1961  
1962      case "previous":
1963        {
1964          // If currentId is initially set to null, the composite element will be
1965          // focusable while navigating with arrow keys. But, if it's a grid, we
1966          // don't want to focus the composite element with horizontal navigation.
1967          var _isGrid = !!groups.length;
1968  
1969          var _hasNullItem = !_isGrid && initialCurrentId === null;
1970  
1971          var _nextState3 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1972            items: reverse(items)
1973          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
1974            type: "next",
1975            hasNullItem: _hasNullItem
1976          }));
1977  
1978          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState3), {}, {
1979            items: items
1980          });
1981        }
1982  
1983      case "down":
1984        {
1985          // First, we make sure groups have the same number of items by filling it
1986          // with disabled fake items. Then, we reorganize the items list so
1987          // [1-1, 1-2, 2-1, 2-2] becomes [1-1, 2-1, 1-2, 2-2].
1988          var verticalItems = verticalizeItems(flatten(fillGroups(groupItems(items))));
1989  
1990          var _canLoop = loop && loop !== "horizontal"; // Pressing down arrow key will only focus the composite element if loop
1991          // is true or vertical.
1992  
1993  
1994          var _hasNullItem2 = _canLoop && initialCurrentId === null;
1995  
1996          var _nextState4 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1997            orientation: "vertical",
1998            items: verticalItems
1999          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2000            type: "next",
2001            hasNullItem: _hasNullItem2
2002          }));
2003  
2004          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState4), {}, {
2005            orientation: orientation,
2006            items: items
2007          });
2008        }
2009  
2010      case "up":
2011        {
2012          var _verticalItems = verticalizeItems(reverse(flatten(fillGroups(groupItems(items))))); // If currentId is initially set to null, we'll always focus the
2013          // composite element when the up arrow key is pressed in the first row.
2014  
2015  
2016          var _hasNullItem3 = initialCurrentId === null;
2017  
2018          var _nextState5 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2019            orientation: "vertical",
2020            items: _verticalItems
2021          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2022            type: "next",
2023            hasNullItem: _hasNullItem3
2024          }));
2025  
2026          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState5), {}, {
2027            orientation: orientation,
2028            items: items
2029          });
2030        }
2031  
2032      case "first":
2033        {
2034          var firstItem = findFirstEnabledItem(items);
2035          return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2036            type: "move",
2037            id: firstItem === null || firstItem === void 0 ? void 0 : firstItem.id
2038          }));
2039        }
2040  
2041      case "last":
2042        {
2043          var _nextState6 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2044            items: reverse(items)
2045          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2046            type: "first"
2047          }));
2048  
2049          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState6), {}, {
2050            items: items
2051          });
2052        }
2053  
2054      case "sort":
2055        {
2056          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2057            items: sortBasedOnDOMPosition(items),
2058            groups: sortBasedOnDOMPosition(groups)
2059          });
2060        }
2061  
2062      case "setVirtual":
2063        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2064          unstable_virtual: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.virtual, virtual)
2065        });
2066  
2067      case "setRTL":
2068        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2069          rtl: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.rtl, rtl)
2070        });
2071  
2072      case "setOrientation":
2073        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2074          orientation: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.orientation, orientation)
2075        });
2076  
2077      case "setCurrentId":
2078        {
2079          var nextCurrentId = getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2080            currentId: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.currentId, currentId)
2081          }));
2082          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2083            currentId: nextCurrentId,
2084            hasSetCurrentId: true
2085          });
2086        }
2087  
2088      case "setLoop":
2089        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2090          loop: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.loop, loop)
2091        });
2092  
2093      case "setWrap":
2094        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2095          wrap: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.wrap, wrap)
2096        });
2097  
2098      case "reset":
2099        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2100          unstable_virtual: initialVirtual,
2101          rtl: initialRTL,
2102          orientation: initialOrientation,
2103          currentId: getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2104            currentId: initialCurrentId
2105          })),
2106          loop: initialLoop,
2107          wrap: initialWrap,
2108          unstable_moves: 0,
2109          pastIds: []
2110        });
2111  
2112      default:
2113        throw new Error();
2114    }
2115  }
2116  
2117  function useAction(fn) {
2118    return Object(react__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(fn, []);
2119  }
2120  
2121  function useIsUnmountedRef() {
2122    var isUnmountedRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(false);
2123    Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_2__[/* useIsomorphicEffect */ "a"])(function () {
2124      return function () {
2125        isUnmountedRef.current = true;
2126      };
2127    }, []);
2128    return isUnmountedRef;
2129  }
2130  
2131  function useCompositeState(initialState) {
2132    if (initialState === void 0) {
2133      initialState = {};
2134    }
2135  
2136    var _useSealedState = Object(reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_3__[/* useSealedState */ "a"])(initialState),
2137        _useSealedState$unsta = _useSealedState.unstable_virtual,
2138        virtual = _useSealedState$unsta === void 0 ? false : _useSealedState$unsta,
2139        _useSealedState$rtl = _useSealedState.rtl,
2140        rtl = _useSealedState$rtl === void 0 ? false : _useSealedState$rtl,
2141        orientation = _useSealedState.orientation,
2142        currentId = _useSealedState.currentId,
2143        _useSealedState$loop = _useSealedState.loop,
2144        loop = _useSealedState$loop === void 0 ? false : _useSealedState$loop,
2145        _useSealedState$wrap = _useSealedState.wrap,
2146        wrap = _useSealedState$wrap === void 0 ? false : _useSealedState$wrap,
2147        sealed = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_useSealedState, ["unstable_virtual", "rtl", "orientation", "currentId", "loop", "wrap"]);
2148  
2149    var _React$useReducer = Object(react__WEBPACK_IMPORTED_MODULE_1__["useReducer"])(reducer, {
2150      unstable_virtual: virtual,
2151      rtl: rtl,
2152      orientation: orientation,
2153      items: [],
2154      groups: [],
2155      currentId: currentId,
2156      loop: loop,
2157      wrap: wrap,
2158      unstable_moves: 0,
2159      pastIds: [],
2160      initialVirtual: virtual,
2161      initialRTL: rtl,
2162      initialOrientation: orientation,
2163      initialCurrentId: currentId,
2164      initialLoop: loop,
2165      initialWrap: wrap
2166    }),
2167        _React$useReducer$ = _React$useReducer[0],
2168        pastIds = _React$useReducer$.pastIds,
2169        initialVirtual = _React$useReducer$.initialVirtual,
2170        initialRTL = _React$useReducer$.initialRTL,
2171        initialOrientation = _React$useReducer$.initialOrientation,
2172        initialCurrentId = _React$useReducer$.initialCurrentId,
2173        initialLoop = _React$useReducer$.initialLoop,
2174        initialWrap = _React$useReducer$.initialWrap,
2175        hasSetCurrentId = _React$useReducer$.hasSetCurrentId,
2176        state = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_React$useReducer$, ["pastIds", "initialVirtual", "initialRTL", "initialOrientation", "initialCurrentId", "initialLoop", "initialWrap", "hasSetCurrentId"]),
2177        dispatch = _React$useReducer[1];
2178  
2179    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
2180        hasActiveWidget = _React$useState[0],
2181        setHasActiveWidget = _React$useState[1];
2182  
2183    var idState = Object(_Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"])(sealed); // register/unregister may be called when this component is unmounted. We
2184    // store the unmounted state here so we don't update the state if it's true.
2185    // This only happens in a very specific situation.
2186    // See https://github.com/reakit/reakit/issues/650
2187  
2188    var isUnmountedRef = useIsUnmountedRef();
2189    return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, idState), state), {}, {
2190      unstable_hasActiveWidget: hasActiveWidget,
2191      unstable_setHasActiveWidget: setHasActiveWidget,
2192      registerItem: useAction(function (item) {
2193        if (isUnmountedRef.current) return;
2194        dispatch({
2195          type: "registerItem",
2196          item: item
2197        });
2198      }),
2199      unregisterItem: useAction(function (id) {
2200        if (isUnmountedRef.current) return;
2201        dispatch({
2202          type: "unregisterItem",
2203          id: id
2204        });
2205      }),
2206      registerGroup: useAction(function (group) {
2207        if (isUnmountedRef.current) return;
2208        dispatch({
2209          type: "registerGroup",
2210          group: group
2211        });
2212      }),
2213      unregisterGroup: useAction(function (id) {
2214        if (isUnmountedRef.current) return;
2215        dispatch({
2216          type: "unregisterGroup",
2217          id: id
2218        });
2219      }),
2220      move: useAction(function (id) {
2221        return dispatch({
2222          type: "move",
2223          id: id
2224        });
2225      }),
2226      next: useAction(function (allTheWay) {
2227        return dispatch({
2228          type: "next",
2229          allTheWay: allTheWay
2230        });
2231      }),
2232      previous: useAction(function (allTheWay) {
2233        return dispatch({
2234          type: "previous",
2235          allTheWay: allTheWay
2236        });
2237      }),
2238      up: useAction(function (allTheWay) {
2239        return dispatch({
2240          type: "up",
2241          allTheWay: allTheWay
2242        });
2243      }),
2244      down: useAction(function (allTheWay) {
2245        return dispatch({
2246          type: "down",
2247          allTheWay: allTheWay
2248        });
2249      }),
2250      first: useAction(function () {
2251        return dispatch({
2252          type: "first"
2253        });
2254      }),
2255      last: useAction(function () {
2256        return dispatch({
2257          type: "last"
2258        });
2259      }),
2260      unstable_sort: useAction(function () {
2261        return dispatch({
2262          type: "sort"
2263        });
2264      }),
2265      unstable_setVirtual: useAction(function (value) {
2266        return dispatch({
2267          type: "setVirtual",
2268          virtual: value
2269        });
2270      }),
2271      setRTL: useAction(function (value) {
2272        return dispatch({
2273          type: "setRTL",
2274          rtl: value
2275        });
2276      }),
2277      setOrientation: useAction(function (value) {
2278        return dispatch({
2279          type: "setOrientation",
2280          orientation: value
2281        });
2282      }),
2283      setCurrentId: useAction(function (value) {
2284        return dispatch({
2285          type: "setCurrentId",
2286          currentId: value
2287        });
2288      }),
2289      setLoop: useAction(function (value) {
2290        return dispatch({
2291          type: "setLoop",
2292          loop: value
2293        });
2294      }),
2295      setWrap: useAction(function (value) {
2296        return dispatch({
2297          type: "setWrap",
2298          wrap: value
2299        });
2300      }),
2301      reset: useAction(function () {
2302        return dispatch({
2303          type: "reset"
2304        });
2305      })
2306    });
2307  }
2308  var keys = [].concat(_Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"].__keys, ["unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "unstable_moves", "unstable_hasActiveWidget", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "unstable_sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "reset", "unstable_setHasActiveWidget"]);
2309  useCompositeState.__keys = keys;
2310  
2311  
2312  
2313  
2314  /***/ }),
2315  /* 52 */,
2316  /* 53 */
2317  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2318  
2319  "use strict";
2320  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isSelfTarget; });
2321  /**
2322   * Returns `true` if `event.target` and `event.currentTarget` are the same.
2323   */
2324  function isSelfTarget(event) {
2325    return event.target === event.currentTarget;
2326  }
2327  
2328  
2329  
2330  
2331  /***/ }),
2332  /* 54 */
2333  /***/ (function(module, exports) {
2334  
2335  (function() { module.exports = this["wp"]["a11y"]; }());
2336  
2337  /***/ }),
2338  /* 55 */
2339  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2340  
2341  "use strict";
2342  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
2343  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectWithoutPropertiesLoose; });
2344  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
2345  function _defineProperty(obj, key, value) {
2346    if (key in obj) {
2347      Object.defineProperty(obj, key, {
2348        value: value,
2349        enumerable: true,
2350        configurable: true,
2351        writable: true
2352      });
2353    } else {
2354      obj[key] = value;
2355    }
2356  
2357    return obj;
2358  }
2359  
2360  function ownKeys(object, enumerableOnly) {
2361    var keys = Object.keys(object);
2362  
2363    if (Object.getOwnPropertySymbols) {
2364      var symbols = Object.getOwnPropertySymbols(object);
2365      if (enumerableOnly) symbols = symbols.filter(function (sym) {
2366        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2367      });
2368      keys.push.apply(keys, symbols);
2369    }
2370  
2371    return keys;
2372  }
2373  
2374  function _objectSpread2(target) {
2375    for (var i = 1; i < arguments.length; i++) {
2376      var source = arguments[i] != null ? arguments[i] : {};
2377  
2378      if (i % 2) {
2379        ownKeys(Object(source), true).forEach(function (key) {
2380          _defineProperty(target, key, source[key]);
2381        });
2382      } else if (Object.getOwnPropertyDescriptors) {
2383        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2384      } else {
2385        ownKeys(Object(source)).forEach(function (key) {
2386          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2387        });
2388      }
2389    }
2390  
2391    return target;
2392  }
2393  
2394  function _objectWithoutPropertiesLoose(source, excluded) {
2395    if (source == null) return {};
2396    var target = {};
2397    var sourceKeys = Object.keys(source);
2398    var key, i;
2399  
2400    for (i = 0; i < sourceKeys.length; i++) {
2401      key = sourceKeys[i];
2402      if (excluded.indexOf(key) >= 0) continue;
2403      target[key] = source[key];
2404    }
2405  
2406    return target;
2407  }
2408  
2409  function _unsupportedIterableToArray(o, minLen) {
2410    if (!o) return;
2411    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2412    var n = Object.prototype.toString.call(o).slice(8, -1);
2413    if (n === "Object" && o.constructor) n = o.constructor.name;
2414    if (n === "Map" || n === "Set") return Array.from(o);
2415    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2416  }
2417  
2418  function _arrayLikeToArray(arr, len) {
2419    if (len == null || len > arr.length) len = arr.length;
2420  
2421    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2422  
2423    return arr2;
2424  }
2425  
2426  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
2427    var it;
2428  
2429    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
2430      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
2431        if (it) o = it;
2432        var i = 0;
2433        return function () {
2434          if (i >= o.length) return {
2435            done: true
2436          };
2437          return {
2438            done: false,
2439            value: o[i++]
2440          };
2441        };
2442      }
2443  
2444      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2445    }
2446  
2447    it = o[Symbol.iterator]();
2448    return it.next.bind(it);
2449  }
2450  
2451  
2452  
2453  
2454  /***/ }),
2455  /* 56 */
2456  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2457  
2458  "use strict";
2459  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return shallowEqual; });
2460  /**
2461   * Compares two objects.
2462   *
2463   * @example
2464   * import { shallowEqual } from "reakit-utils";
2465   *
2466   * shallowEqual({ a: "a" }, {}); // false
2467   * shallowEqual({ a: "a" }, { b: "b" }); // false
2468   * shallowEqual({ a: "a" }, { a: "a" }); // true
2469   * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false
2470   */
2471  function shallowEqual(objA, objB) {
2472    if (objA === objB) return true;
2473    if (!objA) return false;
2474    if (!objB) return false;
2475    if (typeof objA !== "object") return false;
2476    if (typeof objB !== "object") return false;
2477    var aKeys = Object.keys(objA);
2478    var bKeys = Object.keys(objB);
2479    var length = aKeys.length;
2480    if (bKeys.length !== length) return false;
2481  
2482    for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {
2483      var key = _aKeys[_i];
2484  
2485      if (objA[key] !== objB[key]) {
2486        return false;
2487      }
2488    }
2489  
2490    return true;
2491  }
2492  
2493  
2494  
2495  
2496  /***/ }),
2497  /* 57 */
2498  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2499  
2500  "use strict";
2501  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getActiveElement; });
2502  /* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
2503  
2504  
2505  /**
2506   * Returns `element.ownerDocument.activeElement`.
2507   */
2508  
2509  function getActiveElement(element) {
2510    return Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element).activeElement;
2511  }
2512  
2513  
2514  
2515  
2516  /***/ }),
2517  /* 58 */
2518  /***/ (function(module, exports, __webpack_require__) {
2519  
2520  "use strict";
2521  
2522  
2523  /* globals
2524      Atomics,
2525      SharedArrayBuffer,
2526  */
2527  
2528  var undefined;
2529  
2530  var $TypeError = TypeError;
2531  
2532  var $gOPD = Object.getOwnPropertyDescriptor;
2533  if ($gOPD) {
2534      try {
2535          $gOPD({}, '');
2536      } catch (e) {
2537          $gOPD = null; // this is IE 8, which has a broken gOPD
2538      }
2539  }
2540  
2541  var throwTypeError = function () { throw new $TypeError(); };
2542  var ThrowTypeError = $gOPD
2543      ? (function () {
2544          try {
2545              // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
2546              arguments.callee; // IE 8 does not throw here
2547              return throwTypeError;
2548          } catch (calleeThrows) {
2549              try {
2550                  // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
2551                  return $gOPD(arguments, 'callee').get;
2552              } catch (gOPDthrows) {
2553                  return throwTypeError;
2554              }
2555          }
2556      }())
2557      : throwTypeError;
2558  
2559  var hasSymbols = __webpack_require__(206)();
2560  
2561  var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
2562  
2563  var generator; // = function * () {};
2564  var generatorFunction = generator ? getProto(generator) : undefined;
2565  var asyncFn; // async function() {};
2566  var asyncFunction = asyncFn ? asyncFn.constructor : undefined;
2567  var asyncGen; // async function * () {};
2568  var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;
2569  var asyncGenIterator = asyncGen ? asyncGen() : undefined;
2570  
2571  var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
2572  
2573  var INTRINSICS = {
2574      '%Array%': Array,
2575      '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
2576      '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,
2577      '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
2578      '%ArrayPrototype%': Array.prototype,
2579      '%ArrayProto_entries%': Array.prototype.entries,
2580      '%ArrayProto_forEach%': Array.prototype.forEach,
2581      '%ArrayProto_keys%': Array.prototype.keys,
2582      '%ArrayProto_values%': Array.prototype.values,
2583      '%AsyncFromSyncIteratorPrototype%': undefined,
2584      '%AsyncFunction%': asyncFunction,
2585      '%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,
2586      '%AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,
2587      '%AsyncGeneratorFunction%': asyncGenFunction,
2588      '%AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,
2589      '%AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,
2590      '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
2591      '%Boolean%': Boolean,
2592      '%BooleanPrototype%': Boolean.prototype,
2593      '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
2594      '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,
2595      '%Date%': Date,
2596      '%DatePrototype%': Date.prototype,
2597      '%decodeURI%': decodeURI,
2598      '%decodeURIComponent%': decodeURIComponent,
2599      '%encodeURI%': encodeURI,
2600      '%encodeURIComponent%': encodeURIComponent,
2601      '%Error%': Error,
2602      '%ErrorPrototype%': Error.prototype,
2603      '%eval%': eval, // eslint-disable-line no-eval
2604      '%EvalError%': EvalError,
2605      '%EvalErrorPrototype%': EvalError.prototype,
2606      '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
2607      '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,
2608      '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
2609      '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,
2610      '%Function%': Function,
2611      '%FunctionPrototype%': Function.prototype,
2612      '%Generator%': generator ? getProto(generator()) : undefined,
2613      '%GeneratorFunction%': generatorFunction,
2614      '%GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,
2615      '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
2616      '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,
2617      '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
2618      '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,
2619      '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
2620      '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,
2621      '%isFinite%': isFinite,
2622      '%isNaN%': isNaN,
2623      '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
2624      '%JSON%': typeof JSON === 'object' ? JSON : undefined,
2625      '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined,
2626      '%Map%': typeof Map === 'undefined' ? undefined : Map,
2627      '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
2628      '%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,
2629      '%Math%': Math,
2630      '%Number%': Number,
2631      '%NumberPrototype%': Number.prototype,
2632      '%Object%': Object,
2633      '%ObjectPrototype%': Object.prototype,
2634      '%ObjProto_toString%': Object.prototype.toString,
2635      '%ObjProto_valueOf%': Object.prototype.valueOf,
2636      '%parseFloat%': parseFloat,
2637      '%parseInt%': parseInt,
2638      '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
2639      '%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,
2640      '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,
2641      '%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,
2642      '%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,
2643      '%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,
2644      '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
2645      '%RangeError%': RangeError,
2646      '%RangeErrorPrototype%': RangeError.prototype,
2647      '%ReferenceError%': ReferenceError,
2648      '%ReferenceErrorPrototype%': ReferenceError.prototype,
2649      '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
2650      '%RegExp%': RegExp,
2651      '%RegExpPrototype%': RegExp.prototype,
2652      '%Set%': typeof Set === 'undefined' ? undefined : Set,
2653      '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
2654      '%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,
2655      '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
2656      '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,
2657      '%String%': String,
2658      '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
2659      '%StringPrototype%': String.prototype,
2660      '%Symbol%': hasSymbols ? Symbol : undefined,
2661      '%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,
2662      '%SyntaxError%': SyntaxError,
2663      '%SyntaxErrorPrototype%': SyntaxError.prototype,
2664      '%ThrowTypeError%': ThrowTypeError,
2665      '%TypedArray%': TypedArray,
2666      '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,
2667      '%TypeError%': $TypeError,
2668      '%TypeErrorPrototype%': $TypeError.prototype,
2669      '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
2670      '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,
2671      '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
2672      '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,
2673      '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
2674      '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,
2675      '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
2676      '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,
2677      '%URIError%': URIError,
2678      '%URIErrorPrototype%': URIError.prototype,
2679      '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
2680      '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,
2681      '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
2682      '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype
2683  };
2684  
2685  var bind = __webpack_require__(118);
2686  var $replace = bind.call(Function.call, String.prototype.replace);
2687  
2688  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
2689  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
2690  var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
2691  var stringToPath = function stringToPath(string) {
2692      var result = [];
2693      $replace(string, rePropName, function (match, number, quote, subString) {
2694          result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
2695      });
2696      return result;
2697  };
2698  /* end adaptation */
2699  
2700  var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
2701      if (!(name in INTRINSICS)) {
2702          throw new SyntaxError('intrinsic ' + name + ' does not exist!');
2703      }
2704  
2705      // istanbul ignore if // hopefully this is impossible to test :-)
2706      if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {
2707          throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
2708      }
2709  
2710      return INTRINSICS[name];
2711  };
2712  
2713  module.exports = function GetIntrinsic(name, allowMissing) {
2714      if (typeof name !== 'string' || name.length === 0) {
2715          throw new TypeError('intrinsic name must be a non-empty string');
2716      }
2717      if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
2718          throw new TypeError('"allowMissing" argument must be a boolean');
2719      }
2720  
2721      var parts = stringToPath(name);
2722  
2723      var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
2724      for (var i = 1; i < parts.length; i += 1) {
2725          if (value != null) {
2726              if ($gOPD && (i + 1) >= parts.length) {
2727                  var desc = $gOPD(value, parts[i]);
2728                  if (!allowMissing && !(parts[i] in value)) {
2729                      throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
2730                  }
2731                  value = desc ? (desc.get || desc.value) : value[parts[i]];
2732              } else {
2733                  value = value[parts[i]];
2734              }
2735          }
2736      }
2737      return value;
2738  };
2739  
2740  
2741  /***/ }),
2742  /* 59 */
2743  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2744  
2745  "use strict";
2746  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useIsomorphicEffect; });
2747  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2748  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2749  
2750  
2751  /**
2752   * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side
2753   * rendering.
2754   */
2755  
2756  var useIsomorphicEffect = typeof window === "undefined" ? react__WEBPACK_IMPORTED_MODULE_0__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"];
2757  
2758  
2759  
2760  
2761  /***/ }),
2762  /* 60 */,
2763  /* 61 */
2764  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2765  
2766  "use strict";
2767  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyState; });
2768  function isUpdater(argument) {
2769    return typeof argument === "function";
2770  }
2771  /**
2772   * Receives a `setState` argument and calls it with `currentValue` if it's a
2773   * function. Otherwise return the argument as the new value.
2774   *
2775   * @example
2776   * import { applyState } from "reakit-utils";
2777   *
2778   * applyState((value) => value + 1, 1); // 2
2779   * applyState(2, 1); // 2
2780   */
2781  
2782  
2783  function applyState(argument, currentValue) {
2784    if (isUpdater(argument)) {
2785      return argument(currentValue);
2786    }
2787  
2788    return argument;
2789  }
2790  
2791  
2792  
2793  
2794  /***/ }),
2795  /* 62 */
2796  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2797  
2798  "use strict";
2799  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSealedState; });
2800  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2801  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2802  
2803  
2804  /**
2805   * React custom hook that returns the very first value passed to `initialState`,
2806   * even if it changes between re-renders.
2807   */
2808  function useSealedState(initialState) {
2809    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(initialState),
2810        sealed = _React$useState[0];
2811  
2812    return sealed;
2813  }
2814  
2815  
2816  
2817  
2818  /***/ }),
2819  /* 63 */
2820  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2821  
2822  "use strict";
2823  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForkRef; });
2824  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2825  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2826  
2827  
2828  // https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js
2829  
2830  function setRef(ref, value) {
2831    if (value === void 0) {
2832      value = null;
2833    }
2834  
2835    if (!ref) return;
2836  
2837    if (typeof ref === "function") {
2838      ref(value);
2839    } else {
2840      ref.current = value;
2841    }
2842  }
2843  /**
2844   * Merges up to two React Refs into a single memoized function React Ref so you
2845   * can pass it to an element.
2846   *
2847   * @example
2848   * import React from "react";
2849   * import { useForkRef } from "reakit-utils";
2850   *
2851   * const Component = React.forwardRef((props, ref) => {
2852   *   const internalRef = React.useRef();
2853   *   return <div {...props} ref={useForkRef(internalRef, ref)} />;
2854   * });
2855   */
2856  
2857  
2858  function useForkRef(refA, refB) {
2859    return Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () {
2860      if (refA == null && refB == null) {
2861        return null;
2862      }
2863  
2864      return function (value) {
2865        setRef(refA, value);
2866        setRef(refB, value);
2867      };
2868    }, [refA, refB]);
2869  }
2870  
2871  
2872  
2873  
2874  /***/ }),
2875  /* 64 */
2876  /***/ (function(module, exports) {
2877  
2878  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
2879  
2880  /***/ }),
2881  /* 65 */
2882  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2883  
2884  "use strict";
2885  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useIdState; });
2886  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2887  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2888  /* harmony import */ var reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62);
2889  /* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68);
2890  
2891  
2892  
2893  
2894  function unstable_useIdState(initialState) {
2895    if (initialState === void 0) {
2896      initialState = {};
2897    }
2898  
2899    var _useSealedState = Object(reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_1__[/* useSealedState */ "a"])(initialState),
2900        initialBaseId = _useSealedState.baseId;
2901  
2902    var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_2__[/* unstable_IdContext */ "a"]);
2903    var idCountRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
2904  
2905    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(function () {
2906      return initialBaseId || generateId();
2907    }),
2908        baseId = _React$useState[0],
2909        setBaseId = _React$useState[1];
2910  
2911    return {
2912      baseId: baseId,
2913      unstable_setBaseId: setBaseId,
2914      unstable_idCountRef: idCountRef
2915    };
2916  }
2917  var keys = ["baseId", "unstable_setBaseId", "unstable_idCountRef"];
2918  unstable_useIdState.__keys = keys;
2919  
2920  
2921  
2922  
2923  /***/ }),
2924  /* 66 */
2925  /***/ (function(module, exports, __webpack_require__) {
2926  
2927  var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
2928  // https://github.com/bgrins/TinyColor
2929  // Brian Grinstead, MIT License
2930  
2931  (function(Math) {
2932  
2933  var trimLeft = /^\s+/,
2934      trimRight = /\s+$/,
2935      tinyCounter = 0,
2936      mathRound = Math.round,
2937      mathMin = Math.min,
2938      mathMax = Math.max,
2939      mathRandom = Math.random;
2940  
2941  function tinycolor (color, opts) {
2942  
2943      color = (color) ? color : '';
2944      opts = opts || { };
2945  
2946      // If input is already a tinycolor, return itself
2947      if (color instanceof tinycolor) {
2948         return color;
2949      }
2950      // If we are called as a function, call using new instead
2951      if (!(this instanceof tinycolor)) {
2952          return new tinycolor(color, opts);
2953      }
2954  
2955      var rgb = inputToRGB(color);
2956      this._originalInput = color,
2957      this._r = rgb.r,
2958      this._g = rgb.g,
2959      this._b = rgb.b,
2960      this._a = rgb.a,
2961      this._roundA = mathRound(100*this._a) / 100,
2962      this._format = opts.format || rgb.format;
2963      this._gradientType = opts.gradientType;
2964  
2965      // Don't let the range of [0,255] come back in [0,1].
2966      // Potentially lose a little bit of precision here, but will fix issues where
2967      // .5 gets interpreted as half of the total, instead of half of 1
2968      // If it was supposed to be 128, this was already taken care of by `inputToRgb`
2969      if (this._r < 1) { this._r = mathRound(this._r); }
2970      if (this._g < 1) { this._g = mathRound(this._g); }
2971      if (this._b < 1) { this._b = mathRound(this._b); }
2972  
2973      this._ok = rgb.ok;
2974      this._tc_id = tinyCounter++;
2975  }
2976  
2977  tinycolor.prototype = {
2978      isDark: function() {
2979          return this.getBrightness() < 128;
2980      },
2981      isLight: function() {
2982          return !this.isDark();
2983      },
2984      isValid: function() {
2985          return this._ok;
2986      },
2987      getOriginalInput: function() {
2988        return this._originalInput;
2989      },
2990      getFormat: function() {
2991          return this._format;
2992      },
2993      getAlpha: function() {
2994          return this._a;
2995      },
2996      getBrightness: function() {
2997          //http://www.w3.org/TR/AERT#color-contrast
2998          var rgb = this.toRgb();
2999          return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
3000      },
3001      getLuminance: function() {
3002          //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
3003          var rgb = this.toRgb();
3004          var RsRGB, GsRGB, BsRGB, R, G, B;
3005          RsRGB = rgb.r/255;
3006          GsRGB = rgb.g/255;
3007          BsRGB = rgb.b/255;
3008  
3009          if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
3010          if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
3011          if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
3012          return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
3013      },
3014      setAlpha: function(value) {
3015          this._a = boundAlpha(value);
3016          this._roundA = mathRound(100*this._a) / 100;
3017          return this;
3018      },
3019      toHsv: function() {
3020          var hsv = rgbToHsv(this._r, this._g, this._b);
3021          return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
3022      },
3023      toHsvString: function() {
3024          var hsv = rgbToHsv(this._r, this._g, this._b);
3025          var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
3026          return (this._a == 1) ?
3027            "hsv("  + h + ", " + s + "%, " + v + "%)" :
3028            "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
3029      },
3030      toHsl: function() {
3031          var hsl = rgbToHsl(this._r, this._g, this._b);
3032          return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
3033      },
3034      toHslString: function() {
3035          var hsl = rgbToHsl(this._r, this._g, this._b);
3036          var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
3037          return (this._a == 1) ?
3038            "hsl("  + h + ", " + s + "%, " + l + "%)" :
3039            "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
3040      },
3041      toHex: function(allow3Char) {
3042          return rgbToHex(this._r, this._g, this._b, allow3Char);
3043      },
3044      toHexString: function(allow3Char) {
3045          return '#' + this.toHex(allow3Char);
3046      },
3047      toHex8: function(allow4Char) {
3048          return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
3049      },
3050      toHex8String: function(allow4Char) {
3051          return '#' + this.toHex8(allow4Char);
3052      },
3053      toRgb: function() {
3054          return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
3055      },
3056      toRgbString: function() {
3057          return (this._a == 1) ?
3058            "rgb("  + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
3059            "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
3060      },
3061      toPercentageRgb: function() {
3062          return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
3063      },
3064      toPercentageRgbString: function() {
3065          return (this._a == 1) ?
3066            "rgb("  + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
3067            "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
3068      },
3069      toName: function() {
3070          if (this._a === 0) {
3071              return "transparent";
3072          }
3073  
3074          if (this._a < 1) {
3075              return false;
3076          }
3077  
3078          return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
3079      },
3080      toFilter: function(secondColor) {
3081          var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
3082          var secondHex8String = hex8String;
3083          var gradientType = this._gradientType ? "GradientType = 1, " : "";
3084  
3085          if (secondColor) {
3086              var s = tinycolor(secondColor);
3087              secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
3088          }
3089  
3090          return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
3091      },
3092      toString: function(format) {
3093          var formatSet = !!format;
3094          format = format || this._format;
3095  
3096          var formattedString = false;
3097          var hasAlpha = this._a < 1 && this._a >= 0;
3098          var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
3099  
3100          if (needsAlphaFormat) {
3101              // Special case for "transparent", all other non-alpha formats
3102              // will return rgba when there is transparency.
3103              if (format === "name" && this._a === 0) {
3104                  return this.toName();
3105              }
3106              return this.toRgbString();
3107          }
3108          if (format === "rgb") {
3109              formattedString = this.toRgbString();
3110          }
3111          if (format === "prgb") {
3112              formattedString = this.toPercentageRgbString();
3113          }
3114          if (format === "hex" || format === "hex6") {
3115              formattedString = this.toHexString();
3116          }
3117          if (format === "hex3") {
3118              formattedString = this.toHexString(true);
3119          }
3120          if (format === "hex4") {
3121              formattedString = this.toHex8String(true);
3122          }
3123          if (format === "hex8") {
3124              formattedString = this.toHex8String();
3125          }
3126          if (format === "name") {
3127              formattedString = this.toName();
3128          }
3129          if (format === "hsl") {
3130              formattedString = this.toHslString();
3131          }
3132          if (format === "hsv") {
3133              formattedString = this.toHsvString();
3134          }
3135  
3136          return formattedString || this.toHexString();
3137      },
3138      clone: function() {
3139          return tinycolor(this.toString());
3140      },
3141  
3142      _applyModification: function(fn, args) {
3143          var color = fn.apply(null, [this].concat([].slice.call(args)));
3144          this._r = color._r;
3145          this._g = color._g;
3146          this._b = color._b;
3147          this.setAlpha(color._a);
3148          return this;
3149      },
3150      lighten: function() {
3151          return this._applyModification(lighten, arguments);
3152      },
3153      brighten: function() {
3154          return this._applyModification(brighten, arguments);
3155      },
3156      darken: function() {
3157          return this._applyModification(darken, arguments);
3158      },
3159      desaturate: function() {
3160          return this._applyModification(desaturate, arguments);
3161      },
3162      saturate: function() {
3163          return this._applyModification(saturate, arguments);
3164      },
3165      greyscale: function() {
3166          return this._applyModification(greyscale, arguments);
3167      },
3168      spin: function() {
3169          return this._applyModification(spin, arguments);
3170      },
3171  
3172      _applyCombination: function(fn, args) {
3173          return fn.apply(null, [this].concat([].slice.call(args)));
3174      },
3175      analogous: function() {
3176          return this._applyCombination(analogous, arguments);
3177      },
3178      complement: function() {
3179          return this._applyCombination(complement, arguments);
3180      },
3181      monochromatic: function() {
3182          return this._applyCombination(monochromatic, arguments);
3183      },
3184      splitcomplement: function() {
3185          return this._applyCombination(splitcomplement, arguments);
3186      },
3187      triad: function() {
3188          return this._applyCombination(triad, arguments);
3189      },
3190      tetrad: function() {
3191          return this._applyCombination(tetrad, arguments);
3192      }
3193  };
3194  
3195  // If input is an object, force 1 into "1.0" to handle ratios properly
3196  // String input requires "1.0" as input, so 1 will be treated as 1
3197  tinycolor.fromRatio = function(color, opts) {
3198      if (typeof color == "object") {
3199          var newColor = {};
3200          for (var i in color) {
3201              if (color.hasOwnProperty(i)) {
3202                  if (i === "a") {
3203                      newColor[i] = color[i];
3204                  }
3205                  else {
3206                      newColor[i] = convertToPercentage(color[i]);
3207                  }
3208              }
3209          }
3210          color = newColor;
3211      }
3212  
3213      return tinycolor(color, opts);
3214  };
3215  
3216  // Given a string or object, convert that input to RGB
3217  // Possible string inputs:
3218  //
3219  //     "red"
3220  //     "#f00" or "f00"
3221  //     "#ff0000" or "ff0000"
3222  //     "#ff000000" or "ff000000"
3223  //     "rgb 255 0 0" or "rgb (255, 0, 0)"
3224  //     "rgb 1.0 0 0" or "rgb (1, 0, 0)"
3225  //     "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
3226  //     "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
3227  //     "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
3228  //     "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
3229  //     "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
3230  //
3231  function inputToRGB(color) {
3232  
3233      var rgb = { r: 0, g: 0, b: 0 };
3234      var a = 1;
3235      var s = null;
3236      var v = null;
3237      var l = null;
3238      var ok = false;
3239      var format = false;
3240  
3241      if (typeof color == "string") {
3242          color = stringInputToObject(color);
3243      }
3244  
3245      if (typeof color == "object") {
3246          if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
3247              rgb = rgbToRgb(color.r, color.g, color.b);
3248              ok = true;
3249              format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
3250          }
3251          else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
3252              s = convertToPercentage(color.s);
3253              v = convertToPercentage(color.v);
3254              rgb = hsvToRgb(color.h, s, v);
3255              ok = true;
3256              format = "hsv";
3257          }
3258          else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
3259              s = convertToPercentage(color.s);
3260              l = convertToPercentage(color.l);
3261              rgb = hslToRgb(color.h, s, l);
3262              ok = true;
3263              format = "hsl";
3264          }
3265  
3266          if (color.hasOwnProperty("a")) {
3267              a = color.a;
3268          }
3269      }
3270  
3271      a = boundAlpha(a);
3272  
3273      return {
3274          ok: ok,
3275          format: color.format || format,
3276          r: mathMin(255, mathMax(rgb.r, 0)),
3277          g: mathMin(255, mathMax(rgb.g, 0)),
3278          b: mathMin(255, mathMax(rgb.b, 0)),
3279          a: a
3280      };
3281  }
3282  
3283  
3284  // Conversion Functions
3285  // --------------------
3286  
3287  // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
3288  // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
3289  
3290  // `rgbToRgb`
3291  // Handle bounds / percentage checking to conform to CSS color spec
3292  // <http://www.w3.org/TR/css3-color/>
3293  // *Assumes:* r, g, b in [0, 255] or [0, 1]
3294  // *Returns:* { r, g, b } in [0, 255]
3295  function rgbToRgb(r, g, b){
3296      return {
3297          r: bound01(r, 255) * 255,
3298          g: bound01(g, 255) * 255,
3299          b: bound01(b, 255) * 255
3300      };
3301  }
3302  
3303  // `rgbToHsl`
3304  // Converts an RGB color value to HSL.
3305  // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
3306  // *Returns:* { h, s, l } in [0,1]
3307  function rgbToHsl(r, g, b) {
3308  
3309      r = bound01(r, 255);
3310      g = bound01(g, 255);
3311      b = bound01(b, 255);
3312  
3313      var max = mathMax(r, g, b), min = mathMin(r, g, b);
3314      var h, s, l = (max + min) / 2;
3315  
3316      if(max == min) {
3317          h = s = 0; // achromatic
3318      }
3319      else {
3320          var d = max - min;
3321          s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
3322          switch(max) {
3323              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
3324              case g: h = (b - r) / d + 2; break;
3325              case b: h = (r - g) / d + 4; break;
3326          }
3327  
3328          h /= 6;
3329      }
3330  
3331      return { h: h, s: s, l: l };
3332  }
3333  
3334  // `hslToRgb`
3335  // Converts an HSL color value to RGB.
3336  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
3337  // *Returns:* { r, g, b } in the set [0, 255]
3338  function hslToRgb(h, s, l) {
3339      var r, g, b;
3340  
3341      h = bound01(h, 360);
3342      s = bound01(s, 100);
3343      l = bound01(l, 100);
3344  
3345      function hue2rgb(p, q, t) {
3346          if(t < 0) t += 1;
3347          if(t > 1) t -= 1;
3348          if(t < 1/6) return p + (q - p) * 6 * t;
3349          if(t < 1/2) return q;
3350          if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
3351          return p;
3352      }
3353  
3354      if(s === 0) {
3355          r = g = b = l; // achromatic
3356      }
3357      else {
3358          var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
3359          var p = 2 * l - q;
3360          r = hue2rgb(p, q, h + 1/3);
3361          g = hue2rgb(p, q, h);
3362          b = hue2rgb(p, q, h - 1/3);
3363      }
3364  
3365      return { r: r * 255, g: g * 255, b: b * 255 };
3366  }
3367  
3368  // `rgbToHsv`
3369  // Converts an RGB color value to HSV
3370  // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
3371  // *Returns:* { h, s, v } in [0,1]
3372  function rgbToHsv(r, g, b) {
3373  
3374      r = bound01(r, 255);
3375      g = bound01(g, 255);
3376      b = bound01(b, 255);
3377  
3378      var max = mathMax(r, g, b), min = mathMin(r, g, b);
3379      var h, s, v = max;
3380  
3381      var d = max - min;
3382      s = max === 0 ? 0 : d / max;
3383  
3384      if(max == min) {
3385          h = 0; // achromatic
3386      }
3387      else {
3388          switch(max) {
3389              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
3390              case g: h = (b - r) / d + 2; break;
3391              case b: h = (r - g) / d + 4; break;
3392          }
3393          h /= 6;
3394      }
3395      return { h: h, s: s, v: v };
3396  }
3397  
3398  // `hsvToRgb`
3399  // Converts an HSV color value to RGB.
3400  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
3401  // *Returns:* { r, g, b } in the set [0, 255]
3402   function hsvToRgb(h, s, v) {
3403  
3404      h = bound01(h, 360) * 6;
3405      s = bound01(s, 100);
3406      v = bound01(v, 100);
3407  
3408      var i = Math.floor(h),
3409          f = h - i,
3410          p = v * (1 - s),
3411          q = v * (1 - f * s),
3412          t = v * (1 - (1 - f) * s),
3413          mod = i % 6,
3414          r = [v, q, p, p, t, v][mod],
3415          g = [t, v, v, q, p, p][mod],
3416          b = [p, p, t, v, v, q][mod];
3417  
3418      return { r: r * 255, g: g * 255, b: b * 255 };
3419  }
3420  
3421  // `rgbToHex`
3422  // Converts an RGB color to hex
3423  // Assumes r, g, and b are contained in the set [0, 255]
3424  // Returns a 3 or 6 character hex
3425  function rgbToHex(r, g, b, allow3Char) {
3426  
3427      var hex = [
3428          pad2(mathRound(r).toString(16)),
3429          pad2(mathRound(g).toString(16)),
3430          pad2(mathRound(b).toString(16))
3431      ];
3432  
3433      // Return a 3 character hex if possible
3434      if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
3435          return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
3436      }
3437  
3438      return hex.join("");
3439  }
3440  
3441  // `rgbaToHex`
3442  // Converts an RGBA color plus alpha transparency to hex
3443  // Assumes r, g, b are contained in the set [0, 255] and
3444  // a in [0, 1]. Returns a 4 or 8 character rgba hex
3445  function rgbaToHex(r, g, b, a, allow4Char) {
3446  
3447      var hex = [
3448          pad2(mathRound(r).toString(16)),
3449          pad2(mathRound(g).toString(16)),
3450          pad2(mathRound(b).toString(16)),
3451          pad2(convertDecimalToHex(a))
3452      ];
3453  
3454      // Return a 4 character hex if possible
3455      if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
3456          return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
3457      }
3458  
3459      return hex.join("");
3460  }
3461  
3462  // `rgbaToArgbHex`
3463  // Converts an RGBA color to an ARGB Hex8 string
3464  // Rarely used, but required for "toFilter()"
3465  function rgbaToArgbHex(r, g, b, a) {
3466  
3467      var hex = [
3468          pad2(convertDecimalToHex(a)),
3469          pad2(mathRound(r).toString(16)),
3470          pad2(mathRound(g).toString(16)),
3471          pad2(mathRound(b).toString(16))
3472      ];
3473  
3474      return hex.join("");
3475  }
3476  
3477  // `equals`
3478  // Can be called with any tinycolor input
3479  tinycolor.equals = function (color1, color2) {
3480      if (!color1 || !color2) { return false; }
3481      return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
3482  };
3483  
3484  tinycolor.random = function() {
3485      return tinycolor.fromRatio({
3486          r: mathRandom(),
3487          g: mathRandom(),
3488          b: mathRandom()
3489      });
3490  };
3491  
3492  
3493  // Modification Functions
3494  // ----------------------
3495  // Thanks to less.js for some of the basics here
3496  // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
3497  
3498  function desaturate(color, amount) {
3499      amount = (amount === 0) ? 0 : (amount || 10);
3500      var hsl = tinycolor(color).toHsl();
3501      hsl.s -= amount / 100;
3502      hsl.s = clamp01(hsl.s);
3503      return tinycolor(hsl);
3504  }
3505  
3506  function saturate(color, amount) {
3507      amount = (amount === 0) ? 0 : (amount || 10);
3508      var hsl = tinycolor(color).toHsl();
3509      hsl.s += amount / 100;
3510      hsl.s = clamp01(hsl.s);
3511      return tinycolor(hsl);
3512  }
3513  
3514  function greyscale(color) {
3515      return tinycolor(color).desaturate(100);
3516  }
3517  
3518  function lighten (color, amount) {
3519      amount = (amount === 0) ? 0 : (amount || 10);
3520      var hsl = tinycolor(color).toHsl();
3521      hsl.l += amount / 100;
3522      hsl.l = clamp01(hsl.l);
3523      return tinycolor(hsl);
3524  }
3525  
3526  function brighten(color, amount) {
3527      amount = (amount === 0) ? 0 : (amount || 10);
3528      var rgb = tinycolor(color).toRgb();
3529      rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
3530      rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
3531      rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
3532      return tinycolor(rgb);
3533  }
3534  
3535  function darken (color, amount) {
3536      amount = (amount === 0) ? 0 : (amount || 10);
3537      var hsl = tinycolor(color).toHsl();
3538      hsl.l -= amount / 100;
3539      hsl.l = clamp01(hsl.l);
3540      return tinycolor(hsl);
3541  }
3542  
3543  // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
3544  // Values outside of this range will be wrapped into this range.
3545  function spin(color, amount) {
3546      var hsl = tinycolor(color).toHsl();
3547      var hue = (hsl.h + amount) % 360;
3548      hsl.h = hue < 0 ? 360 + hue : hue;
3549      return tinycolor(hsl);
3550  }
3551  
3552  // Combination Functions
3553  // ---------------------
3554  // Thanks to jQuery xColor for some of the ideas behind these
3555  // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
3556  
3557  function complement(color) {
3558      var hsl = tinycolor(color).toHsl();
3559      hsl.h = (hsl.h + 180) % 360;
3560      return tinycolor(hsl);
3561  }
3562  
3563  function triad(color) {
3564      var hsl = tinycolor(color).toHsl();
3565      var h = hsl.h;
3566      return [
3567          tinycolor(color),
3568          tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
3569          tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
3570      ];
3571  }
3572  
3573  function tetrad(color) {
3574      var hsl = tinycolor(color).toHsl();
3575      var h = hsl.h;
3576      return [
3577          tinycolor(color),
3578          tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
3579          tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
3580          tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
3581      ];
3582  }
3583  
3584  function splitcomplement(color) {
3585      var hsl = tinycolor(color).toHsl();
3586      var h = hsl.h;
3587      return [
3588          tinycolor(color),
3589          tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
3590          tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
3591      ];
3592  }
3593  
3594  function analogous(color, results, slices) {
3595      results = results || 6;
3596      slices = slices || 30;
3597  
3598      var hsl = tinycolor(color).toHsl();
3599      var part = 360 / slices;
3600      var ret = [tinycolor(color)];
3601  
3602      for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
3603          hsl.h = (hsl.h + part) % 360;
3604          ret.push(tinycolor(hsl));
3605      }
3606      return ret;
3607  }
3608  
3609  function monochromatic(color, results) {
3610      results = results || 6;
3611      var hsv = tinycolor(color).toHsv();
3612      var h = hsv.h, s = hsv.s, v = hsv.v;
3613      var ret = [];
3614      var modification = 1 / results;
3615  
3616      while (results--) {
3617          ret.push(tinycolor({ h: h, s: s, v: v}));
3618          v = (v + modification) % 1;
3619      }
3620  
3621      return ret;
3622  }
3623  
3624  // Utility Functions
3625  // ---------------------
3626  
3627  tinycolor.mix = function(color1, color2, amount) {
3628      amount = (amount === 0) ? 0 : (amount || 50);
3629  
3630      var rgb1 = tinycolor(color1).toRgb();
3631      var rgb2 = tinycolor(color2).toRgb();
3632  
3633      var p = amount / 100;
3634  
3635      var rgba = {
3636          r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
3637          g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
3638          b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
3639          a: ((rgb2.a - rgb1.a) * p) + rgb1.a
3640      };
3641  
3642      return tinycolor(rgba);
3643  };
3644  
3645  
3646  // Readability Functions
3647  // ---------------------
3648  // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
3649  
3650  // `contrast`
3651  // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
3652  tinycolor.readability = function(color1, color2) {
3653      var c1 = tinycolor(color1);
3654      var c2 = tinycolor(color2);
3655      return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
3656  };
3657  
3658  // `isReadable`
3659  // Ensure that foreground and background color combinations meet WCAG2 guidelines.
3660  // The third argument is an optional Object.
3661  //      the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
3662  //      the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
3663  // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
3664  
3665  // *Example*
3666  //    tinycolor.isReadable("#000", "#111") => false
3667  //    tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
3668  tinycolor.isReadable = function(color1, color2, wcag2) {
3669      var readability = tinycolor.readability(color1, color2);
3670      var wcag2Parms, out;
3671  
3672      out = false;
3673  
3674      wcag2Parms = validateWCAG2Parms(wcag2);
3675      switch (wcag2Parms.level + wcag2Parms.size) {
3676          case "AAsmall":
3677          case "AAAlarge":
3678              out = readability >= 4.5;
3679              break;
3680          case "AAlarge":
3681              out = readability >= 3;
3682              break;
3683          case "AAAsmall":
3684              out = readability >= 7;
3685              break;
3686      }
3687      return out;
3688  
3689  };
3690  
3691  // `mostReadable`
3692  // Given a base color and a list of possible foreground or background
3693  // colors for that base, returns the most readable color.
3694  // Optionally returns Black or White if the most readable color is unreadable.
3695  // *Example*
3696  //    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
3697  //    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString();  // "#ffffff"
3698  //    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
3699  //    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
3700  tinycolor.mostReadable = function(baseColor, colorList, args) {
3701      var bestColor = null;
3702      var bestScore = 0;
3703      var readability;
3704      var includeFallbackColors, level, size ;
3705      args = args || {};
3706      includeFallbackColors = args.includeFallbackColors ;
3707      level = args.level;
3708      size = args.size;
3709  
3710      for (var i= 0; i < colorList.length ; i++) {
3711          readability = tinycolor.readability(baseColor, colorList[i]);
3712          if (readability > bestScore) {
3713              bestScore = readability;
3714              bestColor = tinycolor(colorList[i]);
3715          }
3716      }
3717  
3718      if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
3719          return bestColor;
3720      }
3721      else {
3722          args.includeFallbackColors=false;
3723          return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
3724      }
3725  };
3726  
3727  
3728  // Big List of Colors
3729  // ------------------
3730  // <http://www.w3.org/TR/css3-color/#svg-color>
3731  var names = tinycolor.names = {
3732      aliceblue: "f0f8ff",
3733      antiquewhite: "faebd7",
3734      aqua: "0ff",
3735      aquamarine: "7fffd4",
3736      azure: "f0ffff",
3737      beige: "f5f5dc",
3738      bisque: "ffe4c4",
3739      black: "000",
3740      blanchedalmond: "ffebcd",
3741      blue: "00f",
3742      blueviolet: "8a2be2",
3743      brown: "a52a2a",
3744      burlywood: "deb887",
3745      burntsienna: "ea7e5d",
3746      cadetblue: "5f9ea0",
3747      chartreuse: "7fff00",
3748      chocolate: "d2691e",
3749      coral: "ff7f50",
3750      cornflowerblue: "6495ed",
3751      cornsilk: "fff8dc",
3752      crimson: "dc143c",
3753      cyan: "0ff",
3754      darkblue: "00008b",
3755      darkcyan: "008b8b",
3756      darkgoldenrod: "b8860b",
3757      darkgray: "a9a9a9",
3758      darkgreen: "006400",
3759      darkgrey: "a9a9a9",
3760      darkkhaki: "bdb76b",
3761      darkmagenta: "8b008b",
3762      darkolivegreen: "556b2f",
3763      darkorange: "ff8c00",
3764      darkorchid: "9932cc",
3765      darkred: "8b0000",
3766      darksalmon: "e9967a",
3767      darkseagreen: "8fbc8f",
3768      darkslateblue: "483d8b",
3769      darkslategray: "2f4f4f",
3770      darkslategrey: "2f4f4f",
3771      darkturquoise: "00ced1",
3772      darkviolet: "9400d3",
3773      deeppink: "ff1493",
3774      deepskyblue: "00bfff",
3775      dimgray: "696969",
3776      dimgrey: "696969",
3777      dodgerblue: "1e90ff",
3778      firebrick: "b22222",
3779      floralwhite: "fffaf0",
3780      forestgreen: "228b22",
3781      fuchsia: "f0f",
3782      gainsboro: "dcdcdc",
3783      ghostwhite: "f8f8ff",
3784      gold: "ffd700",
3785      goldenrod: "daa520",
3786      gray: "808080",
3787      green: "008000",
3788      greenyellow: "adff2f",
3789      grey: "808080",
3790      honeydew: "f0fff0",
3791      hotpink: "ff69b4",
3792      indianred: "cd5c5c",
3793      indigo: "4b0082",
3794      ivory: "fffff0",
3795      khaki: "f0e68c",
3796      lavender: "e6e6fa",
3797      lavenderblush: "fff0f5",
3798      lawngreen: "7cfc00",
3799      lemonchiffon: "fffacd",
3800      lightblue: "add8e6",
3801      lightcoral: "f08080",
3802      lightcyan: "e0ffff",
3803      lightgoldenrodyellow: "fafad2",
3804      lightgray: "d3d3d3",
3805      lightgreen: "90ee90",
3806      lightgrey: "d3d3d3",
3807      lightpink: "ffb6c1",
3808      lightsalmon: "ffa07a",
3809      lightseagreen: "20b2aa",
3810      lightskyblue: "87cefa",
3811      lightslategray: "789",
3812      lightslategrey: "789",
3813      lightsteelblue: "b0c4de",
3814      lightyellow: "ffffe0",
3815      lime: "0f0",
3816      limegreen: "32cd32",
3817      linen: "faf0e6",
3818      magenta: "f0f",
3819      maroon: "800000",
3820      mediumaquamarine: "66cdaa",
3821      mediumblue: "0000cd",
3822      mediumorchid: "ba55d3",
3823      mediumpurple: "9370db",
3824      mediumseagreen: "3cb371",
3825      mediumslateblue: "7b68ee",
3826      mediumspringgreen: "00fa9a",
3827      mediumturquoise: "48d1cc",
3828      mediumvioletred: "c71585",
3829      midnightblue: "191970",
3830      mintcream: "f5fffa",
3831      mistyrose: "ffe4e1",
3832      moccasin: "ffe4b5",
3833      navajowhite: "ffdead",
3834      navy: "000080",
3835      oldlace: "fdf5e6",
3836      olive: "808000",
3837      olivedrab: "6b8e23",
3838      orange: "ffa500",
3839      orangered: "ff4500",
3840      orchid: "da70d6",
3841      palegoldenrod: "eee8aa",
3842      palegreen: "98fb98",
3843      paleturquoise: "afeeee",
3844      palevioletred: "db7093",
3845      papayawhip: "ffefd5",
3846      peachpuff: "ffdab9",
3847      peru: "cd853f",
3848      pink: "ffc0cb",
3849      plum: "dda0dd",
3850      powderblue: "b0e0e6",
3851      purple: "800080",
3852      rebeccapurple: "663399",
3853      red: "f00",
3854      rosybrown: "bc8f8f",
3855      royalblue: "4169e1",
3856      saddlebrown: "8b4513",
3857      salmon: "fa8072",
3858      sandybrown: "f4a460",
3859      seagreen: "2e8b57",
3860      seashell: "fff5ee",
3861      sienna: "a0522d",
3862      silver: "c0c0c0",
3863      skyblue: "87ceeb",
3864      slateblue: "6a5acd",
3865      slategray: "708090",
3866      slategrey: "708090",
3867      snow: "fffafa",
3868      springgreen: "00ff7f",
3869      steelblue: "4682b4",
3870      tan: "d2b48c",
3871      teal: "008080",
3872      thistle: "d8bfd8",
3873      tomato: "ff6347",
3874      turquoise: "40e0d0",
3875      violet: "ee82ee",
3876      wheat: "f5deb3",
3877      white: "fff",
3878      whitesmoke: "f5f5f5",
3879      yellow: "ff0",
3880      yellowgreen: "9acd32"
3881  };
3882  
3883  // Make it easy to access colors via `hexNames[hex]`
3884  var hexNames = tinycolor.hexNames = flip(names);
3885  
3886  
3887  // Utilities
3888  // ---------
3889  
3890  // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
3891  function flip(o) {
3892      var flipped = { };
3893      for (var i in o) {
3894          if (o.hasOwnProperty(i)) {
3895              flipped[o[i]] = i;
3896          }
3897      }
3898      return flipped;
3899  }
3900  
3901  // Return a valid alpha value [0,1] with all invalid values being set to 1
3902  function boundAlpha(a) {
3903      a = parseFloat(a);
3904  
3905      if (isNaN(a) || a < 0 || a > 1) {
3906          a = 1;
3907      }
3908  
3909      return a;
3910  }
3911  
3912  // Take input from [0, n] and return it as [0, 1]
3913  function bound01(n, max) {
3914      if (isOnePointZero(n)) { n = "100%"; }
3915  
3916      var processPercent = isPercentage(n);
3917      n = mathMin(max, mathMax(0, parseFloat(n)));
3918  
3919      // Automatically convert percentage into number
3920      if (processPercent) {
3921          n = parseInt(n * max, 10) / 100;
3922      }
3923  
3924      // Handle floating point rounding errors
3925      if ((Math.abs(n - max) < 0.000001)) {
3926          return 1;
3927      }
3928  
3929      // Convert into [0, 1] range if it isn't already
3930      return (n % max) / parseFloat(max);
3931  }
3932  
3933  // Force a number between 0 and 1
3934  function clamp01(val) {
3935      return mathMin(1, mathMax(0, val));
3936  }
3937  
3938  // Parse a base-16 hex value into a base-10 integer
3939  function parseIntFromHex(val) {
3940      return parseInt(val, 16);
3941  }
3942  
3943  // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
3944  // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
3945  function isOnePointZero(n) {
3946      return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
3947  }
3948  
3949  // Check to see if string passed in is a percentage
3950  function isPercentage(n) {
3951      return typeof n === "string" && n.indexOf('%') != -1;
3952  }
3953  
3954  // Force a hex value to have 2 characters
3955  function pad2(c) {
3956      return c.length == 1 ? '0' + c : '' + c;
3957  }
3958  
3959  // Replace a decimal with it's percentage value
3960  function convertToPercentage(n) {
3961      if (n <= 1) {
3962          n = (n * 100) + "%";
3963      }
3964  
3965      return n;
3966  }
3967  
3968  // Converts a decimal to a hex value
3969  function convertDecimalToHex(d) {
3970      return Math.round(parseFloat(d) * 255).toString(16);
3971  }
3972  // Converts a hex value to a decimal
3973  function convertHexToDecimal(h) {
3974      return (parseIntFromHex(h) / 255);
3975  }
3976  
3977  var matchers = (function() {
3978  
3979      // <http://www.w3.org/TR/css3-values/#integers>
3980      var CSS_INTEGER = "[-\\+]?\\d+%?";
3981  
3982      // <http://www.w3.org/TR/css3-values/#number-value>
3983      var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
3984  
3985      // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.
3986      var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
3987  
3988      // Actual matching.
3989      // Parentheses and commas are optional, but not required.
3990      // Whitespace can take the place of commas or opening paren
3991      var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
3992      var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
3993  
3994      return {
3995          CSS_UNIT: new RegExp(CSS_UNIT),
3996          rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
3997          rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
3998          hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
3999          hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
4000          hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
4001          hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
4002          hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
4003          hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
4004          hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
4005          hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
4006      };
4007  })();
4008  
4009  // `isValidCSSUnit`
4010  // Take in a single string / number and check to see if it looks like a CSS unit
4011  // (see `matchers` above for definition).
4012  function isValidCSSUnit(color) {
4013      return !!matchers.CSS_UNIT.exec(color);
4014  }
4015  
4016  // `stringInputToObject`
4017  // Permissive string parsing.  Take in a number of formats, and output an object
4018  // based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
4019  function stringInputToObject(color) {
4020  
4021      color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
4022      var named = false;
4023      if (names[color]) {
4024          color = names[color];
4025          named = true;
4026      }
4027      else if (color == 'transparent') {
4028          return { r: 0, g: 0, b: 0, a: 0, format: "name" };
4029      }
4030  
4031      // Try to match string input using regular expressions.
4032      // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
4033      // Just return an object and let the conversion functions handle that.
4034      // This way the result will be the same whether the tinycolor is initialized with string or object.
4035      var match;
4036      if ((match = matchers.rgb.exec(color))) {
4037          return { r: match[1], g: match[2], b: match[3] };
4038      }
4039      if ((match = matchers.rgba.exec(color))) {
4040          return { r: match[1], g: match[2], b: match[3], a: match[4] };
4041      }
4042      if ((match = matchers.hsl.exec(color))) {
4043          return { h: match[1], s: match[2], l: match[3] };
4044      }
4045      if ((match = matchers.hsla.exec(color))) {
4046          return { h: match[1], s: match[2], l: match[3], a: match[4] };
4047      }
4048      if ((match = matchers.hsv.exec(color))) {
4049          return { h: match[1], s: match[2], v: match[3] };
4050      }
4051      if ((match = matchers.hsva.exec(color))) {
4052          return { h: match[1], s: match[2], v: match[3], a: match[4] };
4053      }
4054      if ((match = matchers.hex8.exec(color))) {
4055          return {
4056              r: parseIntFromHex(match[1]),
4057              g: parseIntFromHex(match[2]),
4058              b: parseIntFromHex(match[3]),
4059              a: convertHexToDecimal(match[4]),
4060              format: named ? "name" : "hex8"
4061          };
4062      }
4063      if ((match = matchers.hex6.exec(color))) {
4064          return {
4065              r: parseIntFromHex(match[1]),
4066              g: parseIntFromHex(match[2]),
4067              b: parseIntFromHex(match[3]),
4068              format: named ? "name" : "hex"
4069          };
4070      }
4071      if ((match = matchers.hex4.exec(color))) {
4072          return {
4073              r: parseIntFromHex(match[1] + '' + match[1]),
4074              g: parseIntFromHex(match[2] + '' + match[2]),
4075              b: parseIntFromHex(match[3] + '' + match[3]),
4076              a: convertHexToDecimal(match[4] + '' + match[4]),
4077              format: named ? "name" : "hex8"
4078          };
4079      }
4080      if ((match = matchers.hex3.exec(color))) {
4081          return {
4082              r: parseIntFromHex(match[1] + '' + match[1]),
4083              g: parseIntFromHex(match[2] + '' + match[2]),
4084              b: parseIntFromHex(match[3] + '' + match[3]),
4085              format: named ? "name" : "hex"
4086          };
4087      }
4088  
4089      return false;
4090  }
4091  
4092  function validateWCAG2Parms(parms) {
4093      // return valid WCAG2 parms for isReadable.
4094      // If input parms are invalid, return {"level":"AA", "size":"small"}
4095      var level, size;
4096      parms = parms || {"level":"AA", "size":"small"};
4097      level = (parms.level || "AA").toUpperCase();
4098      size = (parms.size || "small").toLowerCase();
4099      if (level !== "AA" && level !== "AAA") {
4100          level = "AA";
4101      }
4102      if (size !== "small" && size !== "large") {
4103          size = "small";
4104      }
4105      return {"level":level, "size":size};
4106  }
4107  
4108  // Node: Export function
4109  if ( true && module.exports) {
4110      module.exports = tinycolor;
4111  }
4112  // AMD/requirejs: Define the module
4113  else if (true) {
4114      !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
4115                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
4116  }
4117  // Browser: Expose to window
4118  else {}
4119  
4120  })(Math);
4121  
4122  
4123  /***/ }),
4124  /* 67 */
4125  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4126  
4127  "use strict";
4128  /* unused harmony export Box */
4129  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useBox; });
4130  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
4131  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
4132  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
4133  /* harmony import */ var reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56);
4134  
4135  
4136  
4137  
4138  
4139  var useBox = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
4140    name: "Box",
4141    keys: ["unstable_system"],
4142    propsAreEqual: function propsAreEqual(prev, next) {
4143      var prevSystem = prev.unstable_system,
4144          prevProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(prev, ["unstable_system"]);
4145  
4146      var nextSystem = next.unstable_system,
4147          nextProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(next, ["unstable_system"]);
4148  
4149      if (prevSystem !== nextSystem && !Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevSystem, nextSystem)) {
4150        return false;
4151      }
4152  
4153      return Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevProps, nextProps);
4154    }
4155  });
4156  var Box = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
4157    as: "div",
4158    useHook: useBox
4159  });
4160  
4161  
4162  
4163  
4164  /***/ }),
4165  /* 68 */
4166  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4167  
4168  "use strict";
4169  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_IdContext; });
4170  /* unused harmony export unstable_IdProvider */
4171  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4172  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4173  
4174  
4175  var defaultPrefix = "id";
4176  function generateRandomString(prefix) {
4177    if (prefix === void 0) {
4178      prefix = defaultPrefix;
4179    }
4180  
4181    return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6);
4182  }
4183  
4184  var unstable_IdContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(generateRandomString);
4185  function unstable_IdProvider(_ref) {
4186    var children = _ref.children,
4187        _ref$prefix = _ref.prefix,
4188        prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix;
4189    var count = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
4190    var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useCallback"])(function (localPrefix) {
4191      if (localPrefix === void 0) {
4192        localPrefix = prefix;
4193      }
4194  
4195      return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current;
4196    }, [prefix]);
4197    return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(unstable_IdContext.Provider, {
4198      value: generateId
4199    }, children);
4200  }
4201  
4202  
4203  
4204  
4205  /***/ }),
4206  /* 69 */
4207  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4208  
4209  "use strict";
4210  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasFocusWithin; });
4211  /* harmony import */ var _getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
4212  
4213  
4214  
4215  /**
4216   * Checks if `element` has focus.
4217   *
4218   * @example
4219   * import { hasFocusWithin } from "reakit-utils";
4220   *
4221   * hasFocusWithin(document.getElementById("id"));
4222   */
4223  
4224  function hasFocusWithin(element) {
4225    var activeElement = Object(_getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__[/* getActiveElement */ "a"])(element);
4226    if (!activeElement) return false;
4227    if (element.contains(activeElement)) return true;
4228    var activeDescendant = activeElement.getAttribute("aria-activedescendant");
4229    if (!activeDescendant) return false;
4230    return activeDescendant === element.id || !!element.querySelector("#" + activeDescendant);
4231  }
4232  
4233  
4234  
4235  
4236  /***/ }),
4237  /* 70 */
4238  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4239  
4240  "use strict";
4241  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isButton; });
4242  var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"];
4243  /**
4244   * Checks whether `element` is a native HTML button element or not.
4245   *
4246   * @example
4247   * import { isButton } from "reakit-utils";
4248   *
4249   * isButton(document.querySelector("button")); // true
4250   * isButton(document.querySelector("input[type='button']")); // true
4251   * isButton(document.querySelector("div")); // false
4252   * isButton(document.querySelector("input[type='text']")); // false
4253   *
4254   * @returns {boolean}
4255   */
4256  
4257  function isButton(element) {
4258    if (element.tagName === "BUTTON") return true;
4259  
4260    if (element.tagName === "INPUT") {
4261      var input = element;
4262      return buttonInputTypes.indexOf(input.type) !== -1;
4263    }
4264  
4265    return false;
4266  }
4267  
4268  
4269  
4270  
4271  /***/ }),
4272  /* 71 */
4273  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4274  
4275  "use strict";
4276  
4277  // EXPORTS
4278  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ensureFocus; });
4279  __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getClosestFocusable; });
4280  
4281  // UNUSED EXPORTS: getAllFocusableIn, getAllTabbableIn, getFirstFocusableIn, getFirstTabbableIn, getLastTabbableIn, getNextTabbableIn, getPreviousTabbableIn, isFocusable, isTabbable
4282  
4283  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js
4284  /**
4285   * Ponyfill for `Element.prototype.matches`
4286   *
4287   * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
4288   */
4289  function matches(element, selectors) {
4290    if ("matches" in element) return element.matches(selectors);
4291    if ("msMatchesSelector" in element) return element.msMatchesSelector(selectors);
4292    return element.webkitMatchesSelector(selectors);
4293  }
4294  
4295  
4296  
4297  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/closest.js
4298  
4299  
4300  /**
4301   * Ponyfill for `Element.prototype.closest`
4302   *
4303   * @example
4304   * import { closest } from "reakit-utils";
4305   *
4306   * closest(document.getElementById("id"), "div");
4307   * // same as
4308   * document.getElementById("id").closest("div");
4309   */
4310  function closest(element, selectors) {
4311    if ("closest" in element) return element.closest(selectors);
4312  
4313    do {
4314      if (matches(element, selectors)) return element;
4315      element = element.parentElement || element.parentNode;
4316    } while (element !== null && element.nodeType === 1);
4317  
4318    return null;
4319  }
4320  
4321  
4322  
4323  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getActiveElement.js
4324  var getActiveElement = __webpack_require__(57);
4325  
4326  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js
4327  
4328  
4329  
4330  
4331  
4332  /** @module tabbable */
4333  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), " + "textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], " + "iframe, object, embed, area[href], audio[controls], video[controls], " + "[contenteditable]:not([contenteditable='false'])";
4334  
4335  function isVisible(element) {
4336    return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
4337  }
4338  
4339  function hasNegativeTabIndex(element) {
4340    var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
4341    return tabIndex < 0;
4342  }
4343  /**
4344   * Checks whether `element` is focusable or not.
4345   *
4346   * @memberof tabbable
4347   *
4348   * @example
4349   * import { isFocusable } from "reakit-utils";
4350   *
4351   * isFocusable(document.querySelector("input")); // true
4352   * isFocusable(document.querySelector("input[tabindex='-1']")); // true
4353   * isFocusable(document.querySelector("input[hidden]")); // false
4354   * isFocusable(document.querySelector("input:disabled")); // false
4355   */
4356  
4357  
4358  function isFocusable(element) {
4359    return matches(element, selector) && isVisible(element);
4360  }
4361  /**
4362   * Checks whether `element` is tabbable or not.
4363   *
4364   * @memberof tabbable
4365   *
4366   * @example
4367   * import { isTabbable } from "reakit-utils";
4368   *
4369   * isTabbable(document.querySelector("input")); // true
4370   * isTabbable(document.querySelector("input[tabindex='-1']")); // false
4371   * isTabbable(document.querySelector("input[hidden]")); // false
4372   * isTabbable(document.querySelector("input:disabled")); // false
4373   */
4374  
4375  function isTabbable(element) {
4376    return isFocusable(element) && !hasNegativeTabIndex(element);
4377  }
4378  /**
4379   * Returns all the focusable elements in `container`.
4380   *
4381   * @memberof tabbable
4382   *
4383   * @param {Element} container
4384   *
4385   * @returns {Element[]}
4386   */
4387  
4388  function getAllFocusableIn(container) {
4389    var allFocusable = Array.from(container.querySelectorAll(selector));
4390    allFocusable.unshift(container);
4391    return allFocusable.filter(isFocusable);
4392  }
4393  /**
4394   * Returns the first focusable element in `container`.
4395   *
4396   * @memberof tabbable
4397   *
4398   * @param {Element} container
4399   *
4400   * @returns {Element|null}
4401   */
4402  
4403  function getFirstFocusableIn(container) {
4404    var allFocusable = getAllFocusableIn(container);
4405    return allFocusable.length ? allFocusable[0] : null;
4406  }
4407  /**
4408   * Returns all the tabbable elements in `container`, including the container
4409   * itself.
4410   *
4411   * @memberof tabbable
4412   *
4413   * @param {Element} container
4414   * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones.
4415   *
4416   * @returns {Element[]}
4417   */
4418  
4419  function getAllTabbableIn(container, fallbackToFocusable) {
4420    var allFocusable = Array.from(container.querySelectorAll(selector));
4421    var allTabbable = allFocusable.filter(isTabbable);
4422  
4423    if (isTabbable(container)) {
4424      allTabbable.unshift(container);
4425    }
4426  
4427    if (!allTabbable.length && fallbackToFocusable) {
4428      return allFocusable;
4429    }
4430  
4431    return allTabbable;
4432  }
4433  /**
4434   * Returns the first tabbable element in `container`, including the container
4435   * itself if it's tabbable.
4436   *
4437   * @memberof tabbable
4438   *
4439   * @param {Element} container
4440   * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones.
4441   *
4442   * @returns {Element|null}
4443   */
4444  
4445  function getFirstTabbableIn(container, fallbackToFocusable) {
4446    var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable),
4447        first = _getAllTabbableIn[0];
4448  
4449    return first || null;
4450  }
4451  /**
4452   * Returns the last tabbable element in `container`, including the container
4453   * itself if it's tabbable.
4454   *
4455   * @memberof tabbable
4456   *
4457   * @param {Element} container
4458   * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones.
4459   *
4460   * @returns {Element|null}
4461   */
4462  
4463  function getLastTabbableIn(container, fallbackToFocusable) {
4464    var allTabbable = getAllTabbableIn(container, fallbackToFocusable);
4465    return allTabbable[allTabbable.length - 1] || null;
4466  }
4467  /**
4468   * Returns the next tabbable element in `container`.
4469   *
4470   * @memberof tabbable
4471   *
4472   * @param {Element} container
4473   * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones.
4474   *
4475   * @returns {Element|null}
4476   */
4477  
4478  function getNextTabbableIn(container, fallbackToFocusable) {
4479    var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
4480    var allFocusable = getAllFocusableIn(container);
4481    var index = allFocusable.indexOf(activeElement);
4482    var slice = allFocusable.slice(index + 1);
4483    return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
4484  }
4485  /**
4486   * Returns the previous tabbable element in `container`.
4487   *
4488   * @memberof tabbable
4489   *
4490   * @param {Element} container
4491   * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones.
4492   *
4493   * @returns {Element|null}
4494   */
4495  
4496  function getPreviousTabbableIn(container, fallbackToFocusable) {
4497    var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
4498    var allFocusable = getAllFocusableIn(container).reverse();
4499    var index = allFocusable.indexOf(activeElement);
4500    var slice = allFocusable.slice(index + 1);
4501    return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
4502  }
4503  /**
4504   * Returns the closest focusable element.
4505   *
4506   * @memberof tabbable
4507   *
4508   * @param {Element} container
4509   *
4510   * @returns {Element|null}
4511   */
4512  
4513  function getClosestFocusable(element) {
4514    while (element && !isFocusable(element)) {
4515      element = closest(element, selector);
4516    }
4517  
4518    return element;
4519  }
4520  
4521  function defaultIsActive(element) {
4522    return Object(getActiveElement["a" /* getActiveElement */])(element) === element;
4523  }
4524  
4525  /**
4526   * Ensures `element` will receive focus if it's not already.
4527   *
4528   * @memberof tabbable
4529   *
4530   * @example
4531   * import { ensureFocus } from "reakit-utils";
4532   *
4533   * ensureFocus(document.activeElement); // does nothing
4534   *
4535   * const element = document.querySelector("input");
4536   *
4537   * ensureFocus(element); // focuses element
4538   * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump
4539   *
4540   * function isActive(el) {
4541   *   return el.dataset.active === "true";
4542   * }
4543   *
4544   * ensureFocus(document.querySelector("[data-active='true']"), { isActive }); // does nothing
4545   *
4546   * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed.
4547   */
4548  function ensureFocus(element, _temp) {
4549    var _ref = _temp === void 0 ? {} : _temp,
4550        _ref$isActive = _ref.isActive,
4551        isActive = _ref$isActive === void 0 ? defaultIsActive : _ref$isActive,
4552        preventScroll = _ref.preventScroll;
4553  
4554    if (isActive(element)) return -1;
4555    element.focus({
4556      preventScroll: preventScroll
4557    });
4558    if (isActive(element)) return -1;
4559    return requestAnimationFrame(function () {
4560      element.focus({
4561        preventScroll: preventScroll
4562      });
4563    });
4564  }
4565  
4566  
4567  
4568  
4569  /***/ }),
4570  /* 72 */
4571  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4572  
4573  "use strict";
4574  
4575  // EXPORTS
4576  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ isPortalEvent; });
4577  
4578  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/contains.js
4579  /**
4580   * Similar to `Element.prototype.contains`.
4581   */
4582  function contains(parent, child) {
4583    return parent === child || parent.contains(child);
4584  }
4585  
4586  
4587  
4588  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPortalEvent.js
4589  
4590  
4591  /**
4592   * Returns `true` if `event` has been fired within a React Portal element.
4593   */
4594  
4595  function isPortalEvent(event) {
4596    return !contains(event.currentTarget, event.target);
4597  }
4598  
4599  
4600  
4601  
4602  /***/ }),
4603  /* 73 */
4604  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4605  
4606  "use strict";
4607  /* unused harmony export Tabbable */
4608  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useTabbable; });
4609  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
4610  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
4611  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
4612  /* harmony import */ var _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67);
4613  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
4614  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
4615  /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63);
4616  /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70);
4617  /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80);
4618  /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46);
4619  /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59);
4620  /* harmony import */ var reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(69);
4621  /* harmony import */ var reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(72);
4622  /* harmony import */ var reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(57);
4623  /* harmony import */ var reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(71);
4624  
4625  
4626  
4627  
4628  
4629  
4630  
4631  
4632  
4633  
4634  
4635  
4636  
4637  
4638  
4639  
4640  function isUA(string) {
4641    if (typeof window === "undefined") return false;
4642    return window.navigator.userAgent.indexOf(string) !== -1;
4643  }
4644  
4645  var isSafariOrFirefoxOnMac = isUA("Mac") && !isUA("Chrome") && (isUA("Safari") || isUA("Firefox"));
4646  
4647  function focusIfNeeded(element) {
4648    if (!Object(reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_10__[/* hasFocusWithin */ "a"])(element)) {
4649      element.focus();
4650    }
4651  } // Safari and Firefox on MacOS don't focus on buttons on mouse down like other
4652  // browsers/platforms. Instead, they focus on the closest focusable ancestor
4653  // element, which is ultimately the body element. So we make sure to give focus
4654  // to the tabbable element on mouse down so it works consistently across
4655  // browsers.
4656  // istanbul ignore next
4657  
4658  
4659  function useFocusOnMouseDown() {
4660    if (!isSafariOrFirefoxOnMac) return undefined;
4661  
4662    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(null),
4663        tabbable = _React$useState[0],
4664        scheduleFocus = _React$useState[1];
4665  
4666    Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
4667      if (!tabbable) return;
4668      focusIfNeeded(tabbable);
4669      scheduleFocus(null);
4670    }, [tabbable]);
4671    var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
4672      var element = event.currentTarget;
4673      if (Object(reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_11__[/* isPortalEvent */ "a"])(event)) return;
4674      if (!Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_6__[/* isButton */ "a"])(element)) return;
4675      var activeElement = Object(reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_12__[/* getActiveElement */ "a"])(element);
4676      if (!activeElement) return;
4677      var activeElementIsBody = activeElement.tagName === "BODY";
4678      var focusableAncestor = Object(reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__[/* getClosestFocusable */ "b"])(element.parentElement);
4679  
4680      if (activeElement === focusableAncestor || activeElementIsBody && !focusableAncestor) {
4681        // When the active element is the focusable ancestor, it'll not emit
4682        // focus/blur events. After all, it's already focused. So we can't
4683        // listen to those events to focus this tabbable element.
4684        // When the active element is body and there's no focusable ancestor,
4685        // we also don't have any other event to listen to since body never
4686        // emits focus/blur events on itself.
4687        // In both of these cases, we have to schedule focus on this tabbable
4688        // element.
4689        scheduleFocus(element);
4690      } else if (focusableAncestor) {
4691        // Clicking (mouse down) on the tabbable element on Safari and Firefox
4692        // on MacOS will fire focus on the focusable ancestor element if
4693        // there's any and if it's not the current active element. So we wait
4694        // for this event to happen before moving focus to this element.
4695        // Instead of moving focus right away, we have to schedule it,
4696        // otherwise it's gonna prevent drag events from happening.
4697        var onFocus = function onFocus() {
4698          return scheduleFocus(element);
4699        };
4700  
4701        focusableAncestor.addEventListener("focusin", onFocus, {
4702          once: true
4703        });
4704      } else {
4705        // Finally, if there's no focsuable ancestor and there's another
4706        // element with focus, we wait for that element to get blurred before
4707        // focusing this one.
4708        var onBlur = function onBlur() {
4709          return focusIfNeeded(element);
4710        };
4711  
4712        activeElement.addEventListener("blur", onBlur, {
4713          once: true
4714        });
4715      }
4716    }, []);
4717    return onMouseDown;
4718  }
4719  
4720  function isNativeTabbable(element) {
4721    return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "AUDIO" || element.tagName === "VIDEO";
4722  }
4723  
4724  var useTabbable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
4725    name: "Tabbable",
4726    compose: _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__[/* useBox */ "a"],
4727    keys: ["disabled", "focusable"],
4728    useOptions: function useOptions(options, _ref) {
4729      var disabled = _ref.disabled;
4730      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4731        disabled: disabled
4732      }, options);
4733    },
4734    useProps: function useProps(options, _ref2) {
4735      var htmlRef = _ref2.ref,
4736          htmlTabIndex = _ref2.tabIndex,
4737          htmlOnClick = _ref2.onClick,
4738          htmlOnMouseDown = _ref2.onMouseDown,
4739          htmlStyle = _ref2.style,
4740          htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["ref", "tabIndex", "onClick", "onMouseDown", "style"]);
4741  
4742      var ref = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
4743      var onClickRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__[/* useLiveRef */ "a"])(htmlOnClick);
4744      var onMouseDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__[/* useLiveRef */ "a"])(htmlOnMouseDown);
4745      var trulyDisabled = options.disabled && !options.focusable;
4746  
4747      var _React$useState2 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(true),
4748          nativeTabbable = _React$useState2[0],
4749          setNativeTabbable = _React$useState2[1];
4750  
4751      var tabIndex = nativeTabbable ? htmlTabIndex : htmlTabIndex || 0;
4752      var style = options.disabled ? Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4753        pointerEvents: "none"
4754      }, htmlStyle) : htmlStyle;
4755      var focusOnMouseDown = useFocusOnMouseDown();
4756      Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_9__[/* useIsomorphicEffect */ "a"])(function () {
4757        var tabbable = ref.current;
4758  
4759        if (!tabbable) {
4760           false ? undefined : void 0;
4761          return;
4762        }
4763  
4764        if (!isNativeTabbable(tabbable)) {
4765          setNativeTabbable(false);
4766        }
4767      }, []);
4768      var onClick = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
4769        var _onClickRef$current;
4770  
4771        if (options.disabled) {
4772          event.stopPropagation();
4773          event.preventDefault();
4774          return;
4775        }
4776  
4777        (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);
4778      }, [options.disabled]);
4779      var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
4780        var _onMouseDownRef$curre;
4781  
4782        if (options.disabled) {
4783          event.stopPropagation();
4784          event.preventDefault();
4785          return;
4786        }
4787  
4788        (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event);
4789        if (event.defaultPrevented) return;
4790        focusOnMouseDown === null || focusOnMouseDown === void 0 ? void 0 : focusOnMouseDown(event);
4791      }, [options.disabled, focusOnMouseDown]);
4792      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4793        ref: Object(reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__[/* useForkRef */ "a"])(ref, htmlRef),
4794        style: style,
4795        tabIndex: !trulyDisabled ? tabIndex : undefined,
4796        disabled: trulyDisabled && nativeTabbable ? true : undefined,
4797        "aria-disabled": options.disabled ? true : undefined,
4798        onClick: onClick,
4799        onMouseDown: onMouseDown
4800      }, htmlProps);
4801    }
4802  });
4803  var Tabbable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
4804    as: "div",
4805    useHook: useTabbable
4806  });
4807  
4808  
4809  
4810  
4811  /***/ }),
4812  /* 74 */
4813  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4814  
4815  "use strict";
4816  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SystemContext; });
4817  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4818  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4819  
4820  
4821  var SystemContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
4822  
4823  
4824  
4825  
4826  /***/ }),
4827  /* 75 */,
4828  /* 76 */,
4829  /* 77 */
4830  /***/ (function(module, exports, __webpack_require__) {
4831  
4832  "use strict";
4833  
4834  
4835  Object.defineProperty(exports, "__esModule", {
4836    value: true
4837  });
4838  var DISPLAY_FORMAT = exports.DISPLAY_FORMAT = 'L';
4839  var ISO_FORMAT = exports.ISO_FORMAT = 'YYYY-MM-DD';
4840  var ISO_MONTH_FORMAT = exports.ISO_MONTH_FORMAT = 'YYYY-MM';
4841  
4842  var START_DATE = exports.START_DATE = 'startDate';
4843  var END_DATE = exports.END_DATE = 'endDate';
4844  
4845  var HORIZONTAL_ORIENTATION = exports.HORIZONTAL_ORIENTATION = 'horizontal';
4846  var VERTICAL_ORIENTATION = exports.VERTICAL_ORIENTATION = 'vertical';
4847  var VERTICAL_SCROLLABLE = exports.VERTICAL_SCROLLABLE = 'verticalScrollable';
4848  
4849  var ICON_BEFORE_POSITION = exports.ICON_BEFORE_POSITION = 'before';
4850  var ICON_AFTER_POSITION = exports.ICON_AFTER_POSITION = 'after';
4851  
4852  var INFO_POSITION_TOP = exports.INFO_POSITION_TOP = 'top';
4853  var INFO_POSITION_BOTTOM = exports.INFO_POSITION_BOTTOM = 'bottom';
4854  var INFO_POSITION_BEFORE = exports.INFO_POSITION_BEFORE = 'before';
4855  var INFO_POSITION_AFTER = exports.INFO_POSITION_AFTER = 'after';
4856  
4857  var ANCHOR_LEFT = exports.ANCHOR_LEFT = 'left';
4858  var ANCHOR_RIGHT = exports.ANCHOR_RIGHT = 'right';
4859  
4860  var OPEN_DOWN = exports.OPEN_DOWN = 'down';
4861  var OPEN_UP = exports.OPEN_UP = 'up';
4862  
4863  var DAY_SIZE = exports.DAY_SIZE = 39;
4864  var BLOCKED_MODIFIER = exports.BLOCKED_MODIFIER = 'blocked';
4865  var WEEKDAYS = exports.WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];
4866  
4867  var FANG_WIDTH_PX = exports.FANG_WIDTH_PX = 20;
4868  var FANG_HEIGHT_PX = exports.FANG_HEIGHT_PX = 10;
4869  var DEFAULT_VERTICAL_SPACING = exports.DEFAULT_VERTICAL_SPACING = 22;
4870  
4871  var MODIFIER_KEY_NAMES = exports.MODIFIER_KEY_NAMES = new Set(['Shift', 'Control', 'Alt', 'Meta']);
4872  
4873  /***/ }),
4874  /* 78 */
4875  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4876  
4877  "use strict";
4878  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useCreateElement; });
4879  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4880  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4881  /* harmony import */ var _SystemContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
4882  /* harmony import */ var _rollupPluginBabelHelpers_0c84a174_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55);
4883  
4884  
4885  
4886  
4887  function isRenderProp(children) {
4888    return typeof children === "function";
4889  }
4890  
4891  /**
4892   * Custom hook that will call `children` if it's a function. If
4893   * `useCreateElement` has been passed to the context, it'll be used instead.
4894   *
4895   * @example
4896   * import React from "react";
4897   * import { SystemProvider, useCreateElement } from "reakit-system";
4898   *
4899   * const system = {
4900   *   useCreateElement(type, props, children = props.children) {
4901   *     // very similar to what `useCreateElement` does already
4902   *     if (typeof children === "function") {
4903   *       const { children: _, ...rest } = props;
4904   *       return children(rest);
4905   *     }
4906   *     return React.createElement(type, props, children);
4907   *   },
4908   * };
4909   *
4910   * function Component(props) {
4911   *   return useCreateElement("div", props);
4912   * }
4913   *
4914   * function App() {
4915   *   return (
4916   *     <SystemProvider unstable_system={system}>
4917   *       <Component url="url">{({ url }) => <a href={url}>link</a>}</Component>
4918   *     </SystemProvider>
4919   *   );
4920   * }
4921   */
4922  
4923  var useCreateElement = function useCreateElement(type, props, children) {
4924    if (children === void 0) {
4925      children = props.children;
4926    }
4927  
4928    var context = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_SystemContext_js__WEBPACK_IMPORTED_MODULE_1__[/* SystemContext */ "a"]);
4929  
4930    if (context.useCreateElement) {
4931      return context.useCreateElement(type, props, children);
4932    }
4933  
4934    if (typeof type === "string" && isRenderProp(children)) {
4935      var _ = props.children,
4936          rest = Object(_rollupPluginBabelHelpers_0c84a174_js__WEBPACK_IMPORTED_MODULE_2__[/* a */ "b"])(props, ["children"]);
4937  
4938      return children(rest);
4939    }
4940  
4941    return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(type, props, children);
4942  };
4943  
4944  
4945  
4946  
4947  /***/ }),
4948  /* 79 */,
4949  /* 80 */
4950  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4951  
4952  "use strict";
4953  
4954  // UNUSED EXPORTS: warning, useWarning
4955  
4956  // EXTERNAL MODULE: ./node_modules/reakit-warning/es/warning.js
4957  var warning = __webpack_require__(106);
4958  
4959  // EXTERNAL MODULE: external {"this":"React"}
4960  var external_this_React_ = __webpack_require__(13);
4961  
4962  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isObject.js
4963  /**
4964   * Checks whether `arg` is an object or not.
4965   *
4966   * @returns {boolean}
4967   */
4968  function isObject(arg) {
4969    return typeof arg === "object" && arg != null;
4970  }
4971  
4972  
4973  
4974  // CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js
4975  
4976  
4977  
4978  
4979  
4980  function isRefObject(ref) {
4981    return isObject(ref) && "current" in ref;
4982  }
4983  /**
4984   * Logs `messages` to the console using `console.warn` based on a `condition`.
4985   * This should be used inside components.
4986   */
4987  
4988  
4989  function useWarning(condition) {
4990    for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
4991      messages[_key - 1] = arguments[_key];
4992    }
4993  
4994    if (false) {}
4995  }
4996  
4997  
4998  
4999  // CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js
5000  
5001  
5002  
5003  
5004  
5005  
5006  
5007  /***/ }),
5008  /* 81 */,
5009  /* 82 */
5010  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5011  
5012  "use strict";
5013  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createOnKeyDown; });
5014  /**
5015   * Returns an `onKeyDown` handler to be passed to a component.
5016   *
5017   * @param options
5018   */
5019  function createOnKeyDown(_temp) {
5020    var _ref = _temp === void 0 ? {} : _temp,
5021        keyMap = _ref.keyMap,
5022        onKey = _ref.onKey,
5023        stopPropagation = _ref.stopPropagation,
5024        onKeyDown = _ref.onKeyDown,
5025        _ref$shouldKeyDown = _ref.shouldKeyDown,
5026        shouldKeyDown = _ref$shouldKeyDown === void 0 ? function () {
5027      return true;
5028    } : _ref$shouldKeyDown,
5029        _ref$preventDefault = _ref.preventDefault,
5030        preventDefault = _ref$preventDefault === void 0 ? true : _ref$preventDefault;
5031  
5032    return function (event) {
5033      if (!keyMap) return;
5034      var finalKeyMap = typeof keyMap === "function" ? keyMap(event) : keyMap;
5035      var shouldPreventDefault = typeof preventDefault === "function" ? preventDefault(event) : preventDefault;
5036      var shouldStopPropagation = typeof stopPropagation === "function" ? stopPropagation(event) : stopPropagation;
5037  
5038      if (event.key in finalKeyMap) {
5039        var action = finalKeyMap[event.key];
5040  
5041        if (typeof action === "function" && shouldKeyDown(event)) {
5042          if (shouldPreventDefault) event.preventDefault();
5043          if (shouldStopPropagation) event.stopPropagation();
5044          if (onKey) onKey(event);
5045          action(event); // Prevent onKeyDown from being called twice for the same keys
5046  
5047          return;
5048        }
5049      }
5050  
5051      if (onKeyDown && "current" in onKeyDown) {
5052        var _onKeyDown$current;
5053  
5054        (_onKeyDown$current = onKeyDown.current) === null || _onKeyDown$current === void 0 ? void 0 : _onKeyDown$current.call(onKeyDown, event);
5055      } else {
5056        onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
5057      }
5058    };
5059  }
5060  
5061  
5062  
5063  
5064  /***/ }),
5065  /* 83 */,
5066  /* 84 */
5067  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5068  
5069  "use strict";
5070  /* unused harmony export Clickable */
5071  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useClickable; });
5072  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
5073  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
5074  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
5075  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
5076  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
5077  /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70);
5078  /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80);
5079  /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
5080  /* harmony import */ var reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(53);
5081  /* harmony import */ var _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(73);
5082  
5083  
5084  
5085  
5086  
5087  
5088  
5089  
5090  
5091  
5092  
5093  
5094  
5095  
5096  
5097  
5098  
5099  
5100  function isNativeClick(event) {
5101    var element = event.currentTarget;
5102    if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet
5103  
5104    return Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_4__[/* isButton */ "a"])(element) || element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "SELECT";
5105  }
5106  
5107  var useClickable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
5108    name: "Clickable",
5109    compose: _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_8__[/* useTabbable */ "a"],
5110    keys: ["unstable_clickOnEnter", "unstable_clickOnSpace"],
5111    useOptions: function useOptions(_ref) {
5112      var _ref$unstable_clickOn = _ref.unstable_clickOnEnter,
5113          unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn,
5114          _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace,
5115          unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2,
5116          options = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref, ["unstable_clickOnEnter", "unstable_clickOnSpace"]);
5117  
5118      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
5119        unstable_clickOnEnter: unstable_clickOnEnter,
5120        unstable_clickOnSpace: unstable_clickOnSpace
5121      }, options);
5122    },
5123    useProps: function useProps(options, _ref2) {
5124      var htmlOnKeyDown = _ref2.onKeyDown,
5125          htmlOnKeyUp = _ref2.onKeyUp,
5126          htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["onKeyDown", "onKeyUp"]);
5127  
5128      var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false),
5129          active = _React$useState[0],
5130          setActive = _React$useState[1];
5131  
5132      var onKeyDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyDown);
5133      var onKeyUpRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyUp);
5134      var onKeyDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
5135        var _onKeyDownRef$current;
5136  
5137        (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);
5138        if (event.defaultPrevented) return;
5139        if (options.disabled) return;
5140        if (event.metaKey) return;
5141        if (!Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"])(event)) return;
5142        var isEnter = options.unstable_clickOnEnter && event.key === "Enter";
5143        var isSpace = options.unstable_clickOnSpace && event.key === " ";
5144  
5145        if (isEnter || isSpace) {
5146          if (isNativeClick(event)) return;
5147          event.preventDefault();
5148  
5149          if (isEnter) {
5150            event.currentTarget.click();
5151          } else if (isSpace) {
5152            setActive(true);
5153          }
5154        }
5155      }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]);
5156      var onKeyUp = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
5157        var _onKeyUpRef$current;
5158  
5159        (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event);
5160        if (event.defaultPrevented) return;
5161        if (options.disabled) return;
5162        if (event.metaKey) return;
5163        var isSpace = options.unstable_clickOnSpace && event.key === " ";
5164  
5165        if (active && isSpace) {
5166          setActive(false);
5167          event.currentTarget.click();
5168        }
5169      }, [options.disabled, options.unstable_clickOnSpace, active]);
5170      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
5171        "data-active": active || undefined,
5172        onKeyDown: onKeyDown,
5173        onKeyUp: onKeyUp
5174      }, htmlProps);
5175    }
5176  });
5177  var Clickable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
5178    as: "button",
5179    memo: true,
5180    useHook: useClickable
5181  });
5182  
5183  
5184  
5185  
5186  /***/ }),
5187  /* 85 */
5188  /***/ (function(module, exports, __webpack_require__) {
5189  
5190  module.exports =  true ? __webpack_require__(357) : undefined;
5191  
5192  
5193  
5194  /***/ }),
5195  /* 86 */
5196  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5197  
5198  "use strict";
5199  /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20);
5200  /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
5201  /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
5202  /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
5203  /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22);
5204  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(0);
5205  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__);
5206  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
5207  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);
5208  /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(112);
5209  /* harmony import */ var _shortcut__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(165);
5210  
5211  
5212  
5213  
5214  
5215  
5216  
5217  function _createSuper(Derived) { return function () { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, result); }; }
5218  
5219  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; } }
5220  
5221  /**
5222   * External dependencies
5223   */
5224  
5225  /**
5226   * WordPress dependencies
5227   */
5228  
5229  
5230  /**
5231   * Internal dependencies
5232   */
5233  
5234  
5235  
5236  /**
5237   * Time over children to wait before showing tooltip
5238   *
5239   * @type {number}
5240   */
5241  
5242  var TOOLTIP_DELAY = 700;
5243  
5244  var Tooltip = /*#__PURE__*/function (_Component) {
5245    Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Tooltip, _Component);
5246  
5247    var _super = _createSuper(Tooltip);
5248  
5249    function Tooltip() {
5250      var _this;
5251  
5252      Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(this, Tooltip);
5253  
5254      _this = _super.apply(this, arguments);
5255      _this.delayedSetIsOver = Object(lodash__WEBPACK_IMPORTED_MODULE_6__["debounce"])(function (isOver) {
5256        return _this.setState({
5257          isOver: isOver
5258        });
5259      }, TOOLTIP_DELAY);
5260      /**
5261       * Prebound `isInMouseDown` handler, created as a constant reference to
5262       * assure ability to remove in component unmount.
5263       *
5264       * @type {Function}
5265       */
5266  
5267      _this.cancelIsMouseDown = _this.createSetIsMouseDown(false);
5268      /**
5269       * Whether a the mouse is currently pressed, used in determining whether
5270       * to handle a focus event as displaying the tooltip immediately.
5271       *
5272       * @type {boolean}
5273       */
5274  
5275      _this.isInMouseDown = false;
5276      _this.state = {
5277        isOver: false
5278      };
5279      return _this;
5280    }
5281  
5282    Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Tooltip, [{
5283      key: "componentWillUnmount",
5284      value: function componentWillUnmount() {
5285        this.delayedSetIsOver.cancel();
5286        document.removeEventListener('mouseup', this.cancelIsMouseDown);
5287      }
5288    }, {
5289      key: "emitToChild",
5290      value: function emitToChild(eventName, event) {
5291        var children = this.props.children;
5292  
5293        if (_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].count(children) !== 1) {
5294          return;
5295        }
5296  
5297        var child = _wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].only(children);
5298  
5299        if (typeof child.props[eventName] === 'function') {
5300          child.props[eventName](event);
5301        }
5302      }
5303    }, {
5304      key: "createToggleIsOver",
5305      value: function createToggleIsOver(eventName, isDelayed) {
5306        var _this2 = this;
5307  
5308        return function (event) {
5309          // Preserve original child callback behavior
5310          _this2.emitToChild(eventName, event); // Mouse events behave unreliably in React for disabled elements,
5311          // firing on mouseenter but not mouseleave.  Further, the default
5312          // behavior for disabled elements in some browsers is to ignore
5313          // mouse events. Don't bother trying to to handle them.
5314          //
5315          // See: https://github.com/facebook/react/issues/4251
5316  
5317  
5318          if (event.currentTarget.disabled) {
5319            return;
5320          } // A focus event will occur as a result of a mouse click, but it
5321          // should be disambiguated between interacting with the button and
5322          // using an explicit focus shift as a cue to display the tooltip.
5323  
5324  
5325          if ('focus' === event.type && _this2.isInMouseDown) {
5326            return;
5327          } // Needed in case unsetting is over while delayed set pending, i.e.
5328          // quickly blur/mouseleave before delayedSetIsOver is called
5329  
5330  
5331          _this2.delayedSetIsOver.cancel();
5332  
5333          var isOver = Object(lodash__WEBPACK_IMPORTED_MODULE_6__["includes"])(['focus', 'mouseenter'], event.type);
5334  
5335          if (isOver === _this2.state.isOver) {
5336            return;
5337          }
5338  
5339          if (isDelayed) {
5340            _this2.delayedSetIsOver(isOver);
5341          } else {
5342            _this2.setState({
5343              isOver: isOver
5344            });
5345          }
5346        };
5347      }
5348      /**
5349       * Creates an event callback to handle assignment of the `isInMouseDown`
5350       * instance property in response to a `mousedown` or `mouseup` event.
5351       *
5352       * @param {boolean} isMouseDown Whether handler is to be created for the
5353       *                              `mousedown` event, as opposed to `mouseup`.
5354       *
5355       * @return {Function} Event callback handler.
5356       */
5357  
5358    }, {
5359      key: "createSetIsMouseDown",
5360      value: function createSetIsMouseDown(isMouseDown) {
5361        var _this3 = this;
5362  
5363        return function (event) {
5364          // Preserve original child callback behavior
5365          _this3.emitToChild(isMouseDown ? 'onMouseDown' : 'onMouseUp', event); // On mouse down, the next `mouseup` should revert the value of the
5366          // instance property and remove its own event handler. The bind is
5367          // made on the document since the `mouseup` might not occur within
5368          // the bounds of the element.
5369  
5370  
5371          document[isMouseDown ? 'addEventListener' : 'removeEventListener']('mouseup', _this3.cancelIsMouseDown);
5372          _this3.isInMouseDown = isMouseDown;
5373        };
5374      }
5375    }, {
5376      key: "render",
5377      value: function render() {
5378        var _this$props = this.props,
5379            children = _this$props.children,
5380            position = _this$props.position,
5381            text = _this$props.text,
5382            shortcut = _this$props.shortcut;
5383  
5384        if (_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].count(children) !== 1) {
5385          if (false) {}
5386  
5387          return children;
5388        }
5389  
5390        var child = _wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Children"].only(children);
5391        var isOver = this.state.isOver;
5392        return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["cloneElement"])(child, {
5393          onMouseEnter: this.createToggleIsOver('onMouseEnter', true),
5394          onMouseLeave: this.createToggleIsOver('onMouseLeave'),
5395          onClick: this.createToggleIsOver('onClick'),
5396          onFocus: this.createToggleIsOver('onFocus'),
5397          onBlur: this.createToggleIsOver('onBlur'),
5398          onMouseDown: this.createSetIsMouseDown(true),
5399          children: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["concatChildren"])(child.props.children, isOver && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_popover__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], {
5400            focusOnMount: false,
5401            position: position,
5402            className: "components-tooltip",
5403            "aria-hidden": "true",
5404            animate: false,
5405            noArrow: true
5406          }, text, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_shortcut__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], {
5407            className: "components-tooltip__shortcut",
5408            shortcut: shortcut
5409          })))
5410        });
5411      }
5412    }]);
5413  
5414    return Tooltip;
5415  }(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["Component"]);
5416  
5417  /* harmony default export */ __webpack_exports__["a"] = (Tooltip);
5418  
5419  
5420  /***/ }),
5421  /* 87 */
5422  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5423  
5424  "use strict";
5425  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
5426  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
5427  /**
5428   * WordPress dependencies
5429   */
5430  
5431  var ToolbarContext = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createContext"])();
5432  /* harmony default export */ __webpack_exports__["a"] = (ToolbarContext);
5433  
5434  
5435  /***/ }),
5436  /* 88 */
5437  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5438  
5439  "use strict";
5440  /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
5441  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
5442  /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
5443  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
5444  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
5445  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
5446  /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__);
5447  /* harmony import */ var _dashicon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(148);
5448  
5449  
5450  
5451  
5452  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; }
5453  
5454  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) { Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(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; }
5455  
5456  /**
5457   * WordPress dependencies
5458   */
5459  
5460  
5461  /**
5462   * Internal dependencies
5463   */
5464  
5465  
5466  
5467  function Icon(_ref) {
5468    var _ref$icon = _ref.icon,
5469        icon = _ref$icon === void 0 ? null : _ref$icon,
5470        size = _ref.size,
5471        additionalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_ref, ["icon", "size"]);
5472  
5473    // Dashicons should be 20x20 by default.
5474    var dashiconSize = size || 20;
5475  
5476    if ('string' === typeof icon) {
5477      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({
5478        icon: icon,
5479        size: dashiconSize
5480      }, additionalProps));
5481    }
5482  
5483    if (icon && _dashicon__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"] === icon.type) {
5484      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, _objectSpread({
5485        size: dashiconSize
5486      }, additionalProps));
5487    } // Icons should be 24x24 by default.
5488  
5489  
5490    var iconSize = size || 24;
5491  
5492    if ('function' === typeof icon) {
5493      if (icon.prototype instanceof _wordpress_element__WEBPACK_IMPORTED_MODULE_3__["Component"]) {
5494        return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(icon, _objectSpread({
5495          size: iconSize
5496        }, additionalProps));
5497      }
5498  
5499      return icon(_objectSpread({
5500        size: iconSize
5501      }, additionalProps));
5502    }
5503  
5504    if (icon && (icon.type === 'svg' || icon.type === _wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__["SVG"])) {
5505      var appliedProps = _objectSpread({
5506        width: iconSize,
5507        height: iconSize
5508      }, icon.props, {}, additionalProps);
5509  
5510      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_4__["SVG"], appliedProps);
5511    }
5512  
5513    if (Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["isValidElement"])(icon)) {
5514      return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__["cloneElement"])(icon, _objectSpread({
5515        size: iconSize
5516      }, additionalProps));
5517    }
5518  
5519    return icon;
5520  }
5521  
5522  /* harmony default export */ __webpack_exports__["a"] = (Icon);
5523  
5524  
5525  /***/ }),
5526  /* 89 */,
5527  /* 90 */
5528  /***/ (function(module, exports, __webpack_require__) {
5529  
5530  "use strict";
5531  
5532  
5533  var ES5Type = __webpack_require__(318);
5534  
5535  // https://ecma-international.org/ecma-262/6.0/#sec-ecmascript-data-types-and-values
5536  
5537  module.exports = function Type(x) {
5538      if (typeof x === 'symbol') {
5539          return 'Symbol';
5540      }
5541      return ES5Type(x);
5542  };
5543  
5544  
5545  /***/ }),
5546  /* 91 */
5547  /***/ (function(module, exports, __webpack_require__) {
5548  
5549  "use strict";
5550  
5551  
5552  var bind = __webpack_require__(118);
5553  
5554  module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
5555  
5556  
5557  /***/ }),
5558  /* 92 */
5559  /***/ (function(module, exports, __webpack_require__) {
5560  
5561  "use strict";
5562  
5563  
5564  var defineProperties = __webpack_require__(101);
5565  
5566  var implementation = __webpack_require__(225);
5567  var getPolyfill = __webpack_require__(226);
5568  var shim = __webpack_require__(354);
5569  
5570  var polyfill = getPolyfill();
5571  
5572  defineProperties(polyfill, {
5573      getPolyfill: getPolyfill,
5574      implementation: implementation,
5575      shim: shim
5576  });
5577  
5578  module.exports = polyfill;
5579  
5580  
5581  /***/ }),
5582  /* 93 */
5583  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5584  
5585  "use strict";
5586  /* unused harmony export unstable_Id */
5587  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useId; });
5588  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
5589  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
5590  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
5591  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
5592  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
5593  /* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68);
5594  /* harmony import */ var _IdState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
5595  
5596  
5597  
5598  
5599  
5600  
5601  
5602  
5603  var unstable_useId = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
5604    useState: _IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"],
5605    keys: ["id"],
5606    useOptions: function useOptions(options, htmlProps) {
5607      var generateId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_4__[/* unstable_IdContext */ "a"]);
5608  
5609      var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(function () {
5610        // This comes from useIdState
5611        if (options.unstable_idCountRef) {
5612          options.unstable_idCountRef.current += 1;
5613          return "-" + options.unstable_idCountRef.current;
5614        } // If there's no useIdState, we check if `baseId` was passed (as a prop,
5615        // not from useIdState).
5616  
5617  
5618        if (options.baseId) {
5619          return "-" + generateId("");
5620        }
5621  
5622        return "";
5623      }),
5624          suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState.
5625      // If there's neither, then it'll fallback to Context's generateId.
5626      // This generateId can result in a sequential ID (if there's a Provider)
5627      // or a random string (without Provider).
5628  
5629  
5630      var baseId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () {
5631        return options.baseId || generateId();
5632      }, [options.baseId, generateId]);
5633      var id = htmlProps.id || options.id || "" + baseId + suffix;
5634      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
5635        id: id
5636      });
5637    },
5638    useProps: function useProps(options, htmlProps) {
5639      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
5640        id: options.id
5641      }, htmlProps);
5642    }
5643  });
5644  var unstable_Id = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
5645    as: "div",
5646    useHook: unstable_useId
5647  });
5648  
5649  
5650  
5651  
5652  /***/ }),
5653  /* 94 */
5654  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5655  
5656  "use strict";
5657  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fireEvent; });
5658  /* harmony import */ var _createEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(122);
5659  
5660  
5661  
5662  /**
5663   * Creates and dispatches `Event` in a way that also works on IE 11.
5664   *
5665   * @example
5666   * import { fireEvent } from "reakit-utils";
5667   *
5668   * fireEvent(document.getElementById("id"), "blur", {
5669   *   bubbles: true,
5670   *   cancelable: true,
5671   * });
5672   */
5673  
5674  function fireEvent(element, type, eventInit) {
5675    return element.dispatchEvent(Object(_createEvent_js__WEBPACK_IMPORTED_MODULE_0__[/* createEvent */ "a"])(element, type, eventInit));
5676  }
5677  
5678  
5679  
5680  
5681  /***/ }),
5682  /* 95 */
5683  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5684  
5685  "use strict";
5686  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isTextField; });
5687  /**
5688   * Check whether the given element is a text field, where text field is defined
5689   * by the ability to select within the input, or that it is contenteditable.
5690   */
5691  function isTextField(element) {
5692    try {
5693      var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
5694      var isTextArea = element.tagName === "TEXTAREA";
5695      var isContentEditable = element.contentEditable === "true";
5696      return isTextInput || isTextArea || isContentEditable || false;
5697    } catch (error) {
5698      // Safari throws an exception when trying to get `selectionStart`
5699      // on non-text <input> elements (which, understandably, don't
5700      // have the text selection API). We catch this via a try/catch
5701      // block, as opposed to a more explicit check of the element's
5702      // input types, because of Safari's non-standard behavior. This
5703      // also means we don't have to worry about the list of input
5704      // types that support `selectionStart` changing as the HTML spec
5705      // evolves over time.
5706      return false;
5707    }
5708  }
5709  
5710  
5711  
5712  
5713  /***/ }),
5714  /* 96 */
5715  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5716  
5717  "use strict";
5718  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setTextFieldValue; });
5719  function setTextFieldValue(element, value) {
5720    element.value = value;
5721  }
5722  
5723  
5724  
5725  
5726  /***/ }),
5727  /* 97 */,
5728  /* 98 */,
5729  /* 99 */,
5730  /* 100 */,
5731  /* 101 */
5732  /***/ (function(module, exports, __webpack_require__) {
5733  
5734  "use strict";
5735  
5736  
5737  var keys = __webpack_require__(180);
5738  var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
5739  
5740  var toStr = Object.prototype.toString;
5741  var concat = Array.prototype.concat;
5742  var origDefineProperty = Object.defineProperty;
5743  
5744  var isFunction = function (fn) {
5745      return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
5746  };
5747  
5748  var arePropertyDescriptorsSupported = function () {
5749      var obj = {};
5750      try {
5751          origDefineProperty(obj, 'x', { enumerable: false, value: obj });
5752          // eslint-disable-next-line no-unused-vars, no-restricted-syntax
5753          for (var _ in obj) { // jscs:ignore disallowUnusedVariables
5754              return false;
5755          }
5756          return obj.x === obj;
5757      } catch (e) { /* this is IE 8. */
5758          return false;
5759      }
5760  };
5761  var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
5762  
5763  var defineProperty = function (object, name, value, predicate) {
5764      if (name in object && (!isFunction(predicate) || !predicate())) {
5765          return;
5766      }
5767      if (supportsDescriptors) {
5768          origDefineProperty(object, name, {
5769              configurable: true,
5770              enumerable: false,
5771              value: value,
5772              writable: true
5773          });
5774      } else {
5775          object[name] = value;
5776      }
5777  };
5778  
5779  var defineProperties = function (object, map) {
5780      var predicates = arguments.length > 2 ? arguments[2] : {};
5781      var props = keys(map);
5782      if (hasSymbols) {
5783          props = concat.call(props, Object.getOwnPropertySymbols(map));
5784      }
5785      for (var i = 0; i < props.length; i += 1) {
5786          defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
5787      }
5788  };
5789  
5790  defineProperties.supportsDescriptors = !!supportsDescriptors;
5791  
5792  module.exports = defineProperties;
5793  
5794  
5795  /***/ }),
5796  /* 102 */
5797  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5798  
5799  "use strict";
5800  
5801  // EXPORTS
5802  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ fireKeyboardEvent; });
5803  
5804  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getDocument.js
5805  var getDocument = __webpack_require__(47);
5806  
5807  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/getDefaultView.js
5808  
5809  
5810  /**
5811   * Returns `element.ownerDocument.defaultView || window`.
5812   */
5813  
5814  function getDefaultView(element) {
5815    return Object(getDocument["a" /* getDocument */])(element).defaultView || window;
5816  }
5817  
5818  
5819  
5820  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/createKeyboardEvent.js
5821  
5822  
5823  
5824  /**
5825   * Creates a `KeyboardEvent` in a way that also works on IE 11.
5826   *
5827   * @example
5828   * import { createKeyboardEvent } from "reakit-utils";
5829   *
5830   * const el = document.getElementById("id");
5831   * el.dispatchEvent(createKeyboardEvent(el, "keydown", { key: "ArrowDown" }));
5832   */
5833  
5834  function createKeyboardEvent(element, type, eventInit) {
5835    if (eventInit === void 0) {
5836      eventInit = {};
5837    }
5838  
5839    if (typeof KeyboardEvent === "function") {
5840      return new KeyboardEvent(type, eventInit);
5841    } // IE 11 doesn't support Event constructors
5842  
5843  
5844    var event = Object(getDocument["a" /* getDocument */])(element).createEvent("KeyboardEvent");
5845    event.initKeyboardEvent(type, eventInit.bubbles, eventInit.cancelable, getDefaultView(element), eventInit.key, eventInit.location, eventInit.ctrlKey, eventInit.altKey, eventInit.shiftKey, eventInit.metaKey);
5846    return event;
5847  }
5848  
5849  
5850  
5851  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireKeyboardEvent.js
5852  
5853  
5854  
5855  
5856  /**
5857   * Creates and dispatches `KeyboardEvent` in a way that also works on IE 11.
5858   *
5859   * @example
5860   * import { fireKeyboardEvent } from "reakit-utils";
5861   *
5862   * fireKeyboardEvent(document.getElementById("id"), "keydown", {
5863   *   key: "ArrowDown",
5864   *   shiftKey: true,
5865   * });
5866   */
5867  
5868  function fireKeyboardEvent(element, type, eventInit) {
5869    return element.dispatchEvent(createKeyboardEvent(element, type, eventInit));
5870  }
5871  
5872  
5873  
5874  
5875  /***/ }),
5876  /* 103 */,
5877  /* 104 */
5878  /***/ (function(module, exports) {
5879  
5880  (function() { module.exports = this["wp"]["warning"]; }());
5881  
5882  /***/ }),
5883  /* 105 */,
5884  /* 106 */
5885  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5886  
5887  "use strict";
5888  /* unused harmony export warning */
5889  
5890  
5891  /**
5892   * Logs `messages` to the console using `console.warn` based on a `condition`.
5893   *
5894   * @example
5895   * import { warning } from "reakit-warning";
5896   *
5897   * warning(true, "a", "b"); // console.warn("a", "\n", "b")
5898   * warning(false, "a", "b"); // does nothing
5899   */
5900  
5901  function warning(condition) {
5902    if (false) { var warns, _len, messages, _key, _console; }
5903  }
5904  
5905  
5906  
5907  
5908  /***/ }),
5909  /* 107 */
5910  /***/ (function(module, exports, __webpack_require__) {
5911  
5912  "use strict";
5913  
5914  
5915  Object.defineProperty(exports, "__esModule", {
5916    value: true
5917  });
5918  var calendarLabel = 'Calendar';
5919  var closeDatePicker = 'Close';
5920  var focusStartDate = 'Interact with the calendar and add the check-in date for your trip.';
5921  var clearDate = 'Clear Date';
5922  var clearDates = 'Clear Dates';
5923  var jumpToPrevMonth = 'Move backward to switch to the previous month.';
5924  var jumpToNextMonth = 'Move forward to switch to the next month.';
5925  var keyboardShortcuts = 'Keyboard Shortcuts';
5926  var showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.';
5927  var hideKeyboardShortcutsPanel = 'Close the shortcuts panel.';
5928  var openThisPanel = 'Open this panel.';
5929  var enterKey = 'Enter key';
5930  var leftArrowRightArrow = 'Right and left arrow keys';
5931  var upArrowDownArrow = 'up and down arrow keys';
5932  var pageUpPageDown = 'page up and page down keys';
5933  var homeEnd = 'Home and end keys';
5934  var escape = 'Escape key';
5935  var questionMark = 'Question mark';
5936  var selectFocusedDate = 'Select the date in focus.';
5937  var moveFocusByOneDay = 'Move backward (left) and forward (right) by one day.';
5938  var moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.';
5939  var moveFocusByOneMonth = 'Switch months.';
5940  var moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.';
5941  var returnFocusToInput = 'Return to the date input field.';
5942  var keyboardNavigationInstructions = 'Press the down arrow key to interact with the calendar and\n  select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';
5943  
5944  var chooseAvailableStartDate = function chooseAvailableStartDate(_ref) {
5945    var date = _ref.date;
5946    return 'Choose ' + String(date) + ' as your check-in date. It\u2019s available.';
5947  };
5948  var chooseAvailableEndDate = function chooseAvailableEndDate(_ref2) {
5949    var date = _ref2.date;
5950    return 'Choose ' + String(date) + ' as your check-out date. It\u2019s available.';
5951  };
5952  var chooseAvailableDate = function chooseAvailableDate(_ref3) {
5953    var date = _ref3.date;
5954    return date;
5955  };
5956  var dateIsUnavailable = function dateIsUnavailable(_ref4) {
5957    var date = _ref4.date;
5958    return 'Not available. ' + String(date);
5959  };
5960  var dateIsSelected = function dateIsSelected(_ref5) {
5961    var date = _ref5.date;
5962    return 'Selected. ' + String(date);
5963  };
5964  
5965  exports['default'] = {
5966    calendarLabel: calendarLabel,
5967    closeDatePicker: closeDatePicker,
5968    focusStartDate: focusStartDate,
5969    clearDate: clearDate,
5970    clearDates: clearDates,
5971    jumpToPrevMonth: jumpToPrevMonth,
5972    jumpToNextMonth: jumpToNextMonth,
5973    keyboardShortcuts: keyboardShortcuts,
5974    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
5975    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
5976    openThisPanel: openThisPanel,
5977    enterKey: enterKey,
5978    leftArrowRightArrow: leftArrowRightArrow,
5979    upArrowDownArrow: upArrowDownArrow,
5980    pageUpPageDown: pageUpPageDown,
5981    homeEnd: homeEnd,
5982    escape: escape,
5983    questionMark: questionMark,
5984    selectFocusedDate: selectFocusedDate,
5985    moveFocusByOneDay: moveFocusByOneDay,
5986    moveFocusByOneWeek: moveFocusByOneWeek,
5987    moveFocusByOneMonth: moveFocusByOneMonth,
5988    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
5989    returnFocusToInput: returnFocusToInput,
5990    keyboardNavigationInstructions: keyboardNavigationInstructions,
5991  
5992    chooseAvailableStartDate: chooseAvailableStartDate,
5993    chooseAvailableEndDate: chooseAvailableEndDate,
5994    dateIsUnavailable: dateIsUnavailable,
5995    dateIsSelected: dateIsSelected
5996  };
5997  var DateRangePickerPhrases = exports.DateRangePickerPhrases = {
5998    calendarLabel: calendarLabel,
5999    closeDatePicker: closeDatePicker,
6000    clearDates: clearDates,
6001    focusStartDate: focusStartDate,
6002    jumpToPrevMonth: jumpToPrevMonth,
6003    jumpToNextMonth: jumpToNextMonth,
6004    keyboardShortcuts: keyboardShortcuts,
6005    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
6006    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
6007    openThisPanel: openThisPanel,
6008    enterKey: enterKey,
6009    leftArrowRightArrow: leftArrowRightArrow,
6010    upArrowDownArrow: upArrowDownArrow,
6011    pageUpPageDown: pageUpPageDown,
6012    homeEnd: homeEnd,
6013    escape: escape,
6014    questionMark: questionMark,
6015    selectFocusedDate: selectFocusedDate,
6016    moveFocusByOneDay: moveFocusByOneDay,
6017    moveFocusByOneWeek: moveFocusByOneWeek,
6018    moveFocusByOneMonth: moveFocusByOneMonth,
6019    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
6020    returnFocusToInput: returnFocusToInput,
6021    keyboardNavigationInstructions: keyboardNavigationInstructions,
6022    chooseAvailableStartDate: chooseAvailableStartDate,
6023    chooseAvailableEndDate: chooseAvailableEndDate,
6024    dateIsUnavailable: dateIsUnavailable,
6025    dateIsSelected: dateIsSelected
6026  };
6027  
6028  var DateRangePickerInputPhrases = exports.DateRangePickerInputPhrases = {
6029    focusStartDate: focusStartDate,
6030    clearDates: clearDates,
6031    keyboardNavigationInstructions: keyboardNavigationInstructions
6032  };
6033  
6034  var SingleDatePickerPhrases = exports.SingleDatePickerPhrases = {
6035    calendarLabel: calendarLabel,
6036    closeDatePicker: closeDatePicker,
6037    clearDate: clearDate,
6038    jumpToPrevMonth: jumpToPrevMonth,
6039    jumpToNextMonth: jumpToNextMonth,
6040    keyboardShortcuts: keyboardShortcuts,
6041    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
6042    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
6043    openThisPanel: openThisPanel,
6044    enterKey: enterKey,
6045    leftArrowRightArrow: leftArrowRightArrow,
6046    upArrowDownArrow: upArrowDownArrow,
6047    pageUpPageDown: pageUpPageDown,
6048    homeEnd: homeEnd,
6049    escape: escape,
6050    questionMark: questionMark,
6051    selectFocusedDate: selectFocusedDate,
6052    moveFocusByOneDay: moveFocusByOneDay,
6053    moveFocusByOneWeek: moveFocusByOneWeek,
6054    moveFocusByOneMonth: moveFocusByOneMonth,
6055    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
6056    returnFocusToInput: returnFocusToInput,
6057    keyboardNavigationInstructions: keyboardNavigationInstructions,
6058    chooseAvailableDate: chooseAvailableDate,
6059    dateIsUnavailable: dateIsUnavailable,
6060    dateIsSelected: dateIsSelected
6061  };
6062  
6063  var SingleDatePickerInputPhrases = exports.SingleDatePickerInputPhrases = {
6064    clearDate: clearDate,
6065    keyboardNavigationInstructions: keyboardNavigationInstructions
6066  };
6067  
6068  var DayPickerPhrases = exports.DayPickerPhrases = {
6069    calendarLabel: calendarLabel,
6070    jumpToPrevMonth: jumpToPrevMonth,
6071    jumpToNextMonth: jumpToNextMonth,
6072    keyboardShortcuts: keyboardShortcuts,
6073    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
6074    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
6075    openThisPanel: openThisPanel,
6076    enterKey: enterKey,
6077    leftArrowRightArrow: leftArrowRightArrow,
6078    upArrowDownArrow: upArrowDownArrow,
6079    pageUpPageDown: pageUpPageDown,
6080    homeEnd: homeEnd,
6081    escape: escape,
6082    questionMark: questionMark,
6083    selectFocusedDate: selectFocusedDate,
6084    moveFocusByOneDay: moveFocusByOneDay,
6085    moveFocusByOneWeek: moveFocusByOneWeek,
6086    moveFocusByOneMonth: moveFocusByOneMonth,
6087    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
6088    returnFocusToInput: returnFocusToInput,
6089    chooseAvailableStartDate: chooseAvailableStartDate,
6090    chooseAvailableEndDate: chooseAvailableEndDate,
6091    chooseAvailableDate: chooseAvailableDate,
6092    dateIsUnavailable: dateIsUnavailable,
6093    dateIsSelected: dateIsSelected
6094  };
6095  
6096  var DayPickerKeyboardShortcutsPhrases = exports.DayPickerKeyboardShortcutsPhrases = {
6097    keyboardShortcuts: keyboardShortcuts,
6098    showKeyboardShortcutsPanel: showKeyboardShortcutsPanel,
6099    hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel,
6100    openThisPanel: openThisPanel,
6101    enterKey: enterKey,
6102    leftArrowRightArrow: leftArrowRightArrow,
6103    upArrowDownArrow: upArrowDownArrow,
6104    pageUpPageDown: pageUpPageDown,
6105    homeEnd: homeEnd,
6106    escape: escape,
6107    questionMark: questionMark,
6108    selectFocusedDate: selectFocusedDate,
6109    moveFocusByOneDay: moveFocusByOneDay,
6110    moveFocusByOneWeek: moveFocusByOneWeek,
6111    moveFocusByOneMonth: moveFocusByOneMonth,
6112    moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek,
6113    returnFocusToInput: returnFocusToInput
6114  };
6115  
6116  var DayPickerNavigationPhrases = exports.DayPickerNavigationPhrases = {
6117    jumpToPrevMonth: jumpToPrevMonth,
6118    jumpToNextMonth: jumpToNextMonth
6119  };
6120  
6121  var CalendarDayPhrases = exports.CalendarDayPhrases = {
6122    chooseAvailableDate: chooseAvailableDate,
6123    dateIsUnavailable: dateIsUnavailable,
6124    dateIsSelected: dateIsSelected
6125  };
6126  
6127  /***/ }),
6128  /* 108 */
6129  /***/ (function(module, exports, __webpack_require__) {
6130  
6131  "use strict";
6132  
6133  
6134  Object.defineProperty(exports, "__esModule", {
6135    value: true
6136  });
6137  exports['default'] = getPhrasePropTypes;
6138  
6139  var _object = __webpack_require__(92);
6140  
6141  var _object2 = _interopRequireDefault(_object);
6142  
6143  var _propTypes = __webpack_require__(28);
6144  
6145  var _propTypes2 = _interopRequireDefault(_propTypes);
6146  
6147  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
6148  
6149  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; }
6150  
6151  function getPhrasePropTypes(defaultPhrases) {
6152    return Object.keys(defaultPhrases).reduce(function (phrases, key) {
6153      return (0, _object2['default'])({}, phrases, _defineProperty({}, key, _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].func, _propTypes2['default'].node])));
6154    }, {});
6155  }
6156  
6157  /***/ }),
6158  /* 109 */
6159  /***/ (function(module, exports, __webpack_require__) {
6160  
6161  "use strict";
6162  
6163  
6164  Object.defineProperty(exports, "__esModule", {
6165    value: true
6166  });
6167  exports.withStylesPropTypes = exports.css = undefined;
6168  
6169  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; };
6170  
6171  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; }; }();
6172  
6173  exports.withStyles = withStyles;
6174  
6175  var _object = __webpack_require__(92);
6176  
6177  var _object2 = _interopRequireDefault(_object);
6178  
6179  var _react = __webpack_require__(13);
6180  
6181  var _react2 = _interopRequireDefault(_react);
6182  
6183  var _propTypes = __webpack_require__(28);
6184  
6185  var _propTypes2 = _interopRequireDefault(_propTypes);
6186  
6187  var _hoistNonReactStatics = __webpack_require__(371);
6188  
6189  var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
6190  
6191  var _constants = __webpack_require__(374);
6192  
6193  var _brcast = __webpack_require__(375);
6194  
6195  var _brcast2 = _interopRequireDefault(_brcast);
6196  
6197  var _ThemedStyleSheet = __webpack_require__(223);
6198  
6199  var _ThemedStyleSheet2 = _interopRequireDefault(_ThemedStyleSheet);
6200  
6201  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
6202  
6203  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6204  
6205  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; }
6206  
6207  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; }
6208  
6209  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; } /* eslint react/forbid-foreign-prop-types: off */
6210  
6211  // Add some named exports to assist in upgrading and for convenience
6212  var css = exports.css = _ThemedStyleSheet2['default'].resolveLTR;
6213  var withStylesPropTypes = exports.withStylesPropTypes = {
6214    styles: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
6215    theme: _propTypes2['default'].object.isRequired, // eslint-disable-line react/forbid-prop-types
6216    css: _propTypes2['default'].func.isRequired
6217  };
6218  
6219  var EMPTY_STYLES = {};
6220  var EMPTY_STYLES_FN = function EMPTY_STYLES_FN() {
6221    return EMPTY_STYLES;
6222  };
6223  
6224  var START_MARK = 'react-with-styles.createStyles.start';
6225  var END_MARK = 'react-with-styles.createStyles.end';
6226  
6227  function baseClass(pureComponent) {
6228    if (pureComponent) {
6229      if (!_react2['default'].PureComponent) {
6230        throw new ReferenceError('withStyles() pureComponent option requires React 15.3.0 or later');
6231      }
6232  
6233      return _react2['default'].PureComponent;
6234    }
6235  
6236    return _react2['default'].Component;
6237  }
6238  
6239  var contextTypes = _defineProperty({}, _constants.CHANNEL, _brcast2['default']);
6240  
6241  var defaultDirection = _constants.DIRECTIONS.LTR;
6242  
6243  function withStyles(styleFn) {
6244    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
6245        _ref$stylesPropName = _ref.stylesPropName,
6246        stylesPropName = _ref$stylesPropName === undefined ? 'styles' : _ref$stylesPropName,
6247        _ref$themePropName = _ref.themePropName,
6248        themePropName = _ref$themePropName === undefined ? 'theme' : _ref$themePropName,
6249        _ref$cssPropName = _ref.cssPropName,
6250        cssPropName = _ref$cssPropName === undefined ? 'css' : _ref$cssPropName,
6251        _ref$flushBefore = _ref.flushBefore,
6252        flushBefore = _ref$flushBefore === undefined ? false : _ref$flushBefore,
6253        _ref$pureComponent = _ref.pureComponent,
6254        pureComponent = _ref$pureComponent === undefined ? false : _ref$pureComponent;
6255  
6256    var styleDefLTR = void 0;
6257    var styleDefRTL = void 0;
6258    var currentThemeLTR = void 0;
6259    var currentThemeRTL = void 0;
6260    var BaseClass = baseClass(pureComponent);
6261  
6262    function getResolveMethod(direction) {
6263      return direction === _constants.DIRECTIONS.LTR ? _ThemedStyleSheet2['default'].resolveLTR : _ThemedStyleSheet2['default'].resolveRTL;
6264    }
6265  
6266    function getCurrentTheme(direction) {
6267      return direction === _constants.DIRECTIONS.LTR ? currentThemeLTR : currentThemeRTL;
6268    }
6269  
6270    function getStyleDef(direction, wrappedComponentName) {
6271      var currentTheme = getCurrentTheme(direction);
6272      var styleDef = direction === _constants.DIRECTIONS.LTR ? styleDefLTR : styleDefRTL;
6273  
6274      var registeredTheme = _ThemedStyleSheet2['default'].get();
6275  
6276      // Return the existing styles if they've already been defined
6277      // and if the theme used to create them corresponds to the theme
6278      // registered with ThemedStyleSheet
6279      if (styleDef && currentTheme === registeredTheme) {
6280        return styleDef;
6281      }
6282  
6283      if (false) {}
6284  
6285      var isRTL = direction === _constants.DIRECTIONS.RTL;
6286  
6287      if (isRTL) {
6288        styleDefRTL = styleFn ? _ThemedStyleSheet2['default'].createRTL(styleFn) : EMPTY_STYLES_FN;
6289  
6290        currentThemeRTL = registeredTheme;
6291        styleDef = styleDefRTL;
6292      } else {
6293        styleDefLTR = styleFn ? _ThemedStyleSheet2['default'].createLTR(styleFn) : EMPTY_STYLES_FN;
6294  
6295        currentThemeLTR = registeredTheme;
6296        styleDef = styleDefLTR;
6297      }
6298  
6299      if (false) { var measureName; }
6300  
6301      return styleDef;
6302    }
6303  
6304    function getState(direction, wrappedComponentName) {
6305      return {
6306        resolveMethod: getResolveMethod(direction),
6307        styleDef: getStyleDef(direction, wrappedComponentName)
6308      };
6309    }
6310  
6311    return function () {
6312      function withStylesHOC(WrappedComponent) {
6313        var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
6314  
6315        // NOTE: Use a class here so components are ref-able if need be:
6316        // eslint-disable-next-line react/prefer-stateless-function
6317  
6318        var WithStyles = function (_BaseClass) {
6319          _inherits(WithStyles, _BaseClass);
6320  
6321          function WithStyles(props, context) {
6322            _classCallCheck(this, WithStyles);
6323  
6324            var _this = _possibleConstructorReturn(this, (WithStyles.__proto__ || Object.getPrototypeOf(WithStyles)).call(this, props, context));
6325  
6326            var direction = _this.context[_constants.CHANNEL] ? _this.context[_constants.CHANNEL].getState() : defaultDirection;
6327  
6328            _this.state = getState(direction, wrappedComponentName);
6329            return _this;
6330          }
6331  
6332          _createClass(WithStyles, [{
6333            key: 'componentDidMount',
6334            value: function () {
6335              function componentDidMount() {
6336                var _this2 = this;
6337  
6338                if (this.context[_constants.CHANNEL]) {
6339                  // subscribe to future direction changes
6340                  this.channelUnsubscribe = this.context[_constants.CHANNEL].subscribe(function (direction) {
6341                    _this2.setState(getState(direction, wrappedComponentName));
6342                  });
6343                }
6344              }
6345  
6346              return componentDidMount;
6347            }()
6348          }, {
6349            key: 'componentWillUnmount',
6350            value: function () {
6351              function componentWillUnmount() {
6352                if (this.channelUnsubscribe) {
6353                  this.channelUnsubscribe();
6354                }
6355              }
6356  
6357              return componentWillUnmount;
6358            }()
6359          }, {
6360            key: 'render',
6361            value: function () {
6362              function render() {
6363                var _ref2;
6364  
6365                // As some components will depend on previous styles in
6366                // the component tree, we provide the option of flushing the
6367                // buffered styles (i.e. to a style tag) **before** the rendering
6368                // cycle begins.
6369                //
6370                // The interfaces provide the optional "flush" method which
6371                // is run in turn by ThemedStyleSheet.flush.
6372                if (flushBefore) {
6373                  _ThemedStyleSheet2['default'].flush();
6374                }
6375  
6376                var _state = this.state,
6377                    resolveMethod = _state.resolveMethod,
6378                    styleDef = _state.styleDef;
6379  
6380  
6381                return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, (_ref2 = {}, _defineProperty(_ref2, themePropName, _ThemedStyleSheet2['default'].get()), _defineProperty(_ref2, stylesPropName, styleDef()), _defineProperty(_ref2, cssPropName, resolveMethod), _ref2)));
6382              }
6383  
6384              return render;
6385            }()
6386          }]);
6387  
6388          return WithStyles;
6389        }(BaseClass);
6390  
6391        WithStyles.WrappedComponent = WrappedComponent;
6392        WithStyles.displayName = 'withStyles(' + String(wrappedComponentName) + ')';
6393        WithStyles.contextTypes = contextTypes;
6394        if (WrappedComponent.propTypes) {
6395          WithStyles.propTypes = (0, _object2['default'])({}, WrappedComponent.propTypes);
6396          delete WithStyles.propTypes[stylesPropName];
6397          delete WithStyles.propTypes[themePropName];
6398          delete WithStyles.propTypes[cssPropName];
6399        }
6400        if (WrappedComponent.defaultProps) {
6401          WithStyles.defaultProps = (0, _object2['default'])({}, WrappedComponent.defaultProps);
6402        }
6403  
6404        return (0, _hoistNonReactStatics2['default'])(WithStyles, WrappedComponent);
6405      }
6406  
6407      return withStylesHOC;
6408    }();
6409  }
6410  
6411  /***/ }),
6412  /* 110 */,
6413  /* 111 */
6414  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6415  
6416  "use strict";
6417  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
6418  /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
6419  /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
6420  /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12);
6421  /* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(23);
6422  /* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16);
6423  /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(22);
6424  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(0);
6425  /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__);
6426  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
6427  /* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);
6428  /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9);
6429  /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__);
6430  
6431  
6432  
6433  
6434  
6435  
6436  
6437  
6438  
6439  function _createSuper(Derived) { return function () { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this, result); }; }
6440  
6441  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; } }
6442  
6443  /**
6444   * External dependencies
6445   */
6446  
6447  /**
6448   * WordPress dependencies
6449   */
6450  
6451  
6452  
6453  /**
6454   * Input types which are classified as button types, for use in considering
6455   * whether element is a (focus-normalized) button.
6456   *
6457   * @type {string[]}
6458   */
6459  
6460  var INPUT_BUTTON_TYPES = ['button', 'submit'];
6461  /**
6462   * Returns true if the given element is a button element subject to focus
6463   * normalization, or false otherwise.
6464   *
6465   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
6466   *
6467   * @param {Element} element Element to test.
6468   *
6469   * @return {boolean} Whether element is a button.
6470   */
6471  
6472  function isFocusNormalizedButton(element) {
6473    switch (element.nodeName) {
6474      case 'A':
6475      case 'BUTTON':
6476        return true;
6477  
6478      case 'INPUT':
6479        return Object(lodash__WEBPACK_IMPORTED_MODULE_8__["includes"])(INPUT_BUTTON_TYPES, element.type);
6480    }
6481  
6482    return false;
6483  }
6484  
6485  /* harmony default export */ __webpack_exports__["a"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_9__["createHigherOrderComponent"])(function (WrappedComponent) {
6486    return /*#__PURE__*/function (_Component) {
6487      Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_class, _Component);
6488  
6489      var _super = _createSuper(_class);
6490  
6491      function _class() {
6492        var _this;
6493  
6494        Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, _class);
6495  
6496        _this = _super.apply(this, arguments);
6497        _this.bindNode = _this.bindNode.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this));
6498        _this.cancelBlurCheck = _this.cancelBlurCheck.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this));
6499        _this.queueBlurCheck = _this.queueBlurCheck.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this));
6500        _this.normalizeButtonFocus = _this.normalizeButtonFocus.bind(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this));
6501        return _this;
6502      }
6503  
6504      Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_class, [{
6505        key: "componentWillUnmount",
6506        value: function componentWillUnmount() {
6507          this.cancelBlurCheck();
6508        }
6509      }, {
6510        key: "bindNode",
6511        value: function bindNode(node) {
6512          if (node) {
6513            this.node = node;
6514          } else {
6515            delete this.node;
6516            this.cancelBlurCheck();
6517          }
6518        }
6519      }, {
6520        key: "queueBlurCheck",
6521        value: function queueBlurCheck(event) {
6522          var _this2 = this;
6523  
6524          // React does not allow using an event reference asynchronously
6525          // due to recycling behavior, except when explicitly persisted.
6526          event.persist(); // Skip blur check if clicking button. See `normalizeButtonFocus`.
6527  
6528          if (this.preventBlurCheck) {
6529            return;
6530          }
6531  
6532          this.blurCheckTimeout = setTimeout(function () {
6533            // If document is not focused then focus should remain
6534            // inside the wrapped component and therefore we cancel
6535            // this blur event thereby leaving focus in place.
6536            // https://developer.mozilla.org/en-US/docs/Web/API/Document/hasFocus.
6537            if (!document.hasFocus()) {
6538              event.preventDefault();
6539              return;
6540            }
6541  
6542            if ('function' === typeof _this2.node.handleFocusOutside) {
6543              _this2.node.handleFocusOutside(event);
6544            }
6545          }, 0);
6546        }
6547      }, {
6548        key: "cancelBlurCheck",
6549        value: function cancelBlurCheck() {
6550          clearTimeout(this.blurCheckTimeout);
6551        }
6552        /**
6553         * Handles a mousedown or mouseup event to respectively assign and
6554         * unassign a flag for preventing blur check on button elements. Some
6555         * browsers, namely Firefox and Safari, do not emit a focus event on
6556         * button elements when clicked, while others do. The logic here
6557         * intends to normalize this as treating click on buttons as focus.
6558         *
6559         * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
6560         *
6561         * @param {MouseEvent} event Event for mousedown or mouseup.
6562         */
6563  
6564      }, {
6565        key: "normalizeButtonFocus",
6566        value: function normalizeButtonFocus(event) {
6567          var type = event.type,
6568              target = event.target;
6569          var isInteractionEnd = Object(lodash__WEBPACK_IMPORTED_MODULE_8__["includes"])(['mouseup', 'touchend'], type);
6570  
6571          if (isInteractionEnd) {
6572            this.preventBlurCheck = false;
6573          } else if (isFocusNormalizedButton(target)) {
6574            this.preventBlurCheck = true;
6575          }
6576        }
6577      }, {
6578        key: "render",
6579        value: function render() {
6580          // Disable reason: See `normalizeButtonFocus` for browser-specific
6581          // focus event normalization.
6582  
6583          /* eslint-disable jsx-a11y/no-static-element-interactions */
6584          return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])("div", {
6585            onFocus: this.cancelBlurCheck,
6586            onMouseDown: this.normalizeButtonFocus,
6587            onMouseUp: this.normalizeButtonFocus,
6588            onTouchStart: this.normalizeButtonFocus,
6589            onTouchEnd: this.normalizeButtonFocus,
6590            onBlur: this.queueBlurCheck
6591          }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["createElement"])(WrappedComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
6592            ref: this.bindNode
6593          }, this.props)));
6594          /* eslint-enable jsx-a11y/no-static-element-interactions */
6595        }
6596      }]);
6597  
6598      return _class;
6599    }(_wordpress_element__WEBPACK_IMPORTED_MODULE_7__["Component"]);
6600  }, 'withFocusOutside'));
6601  
6602  
6603  /***/ }),
6604  /* 112 */
6605  /***/ (function(module, __webpack_exports__, __webpack_require__) {
6606  
6607  "use strict";
6608  
6609  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
6610  var esm_extends = __webpack_require__(8);
6611  
6612  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
6613  var slicedToArray = __webpack_require__(14);
6614  
6615  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
6616  var objectWithoutProperties = __webpack_require__(15);
6617  
6618  // EXTERNAL MODULE: external {"this":["wp","element"]}
6619  var external_this_wp_element_ = __webpack_require__(0);
6620  
6621  // EXTERNAL MODULE: ./node_modules/classnames/index.js
6622  var classnames = __webpack_require__(11);
6623  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
6624  
6625  // EXTERNAL MODULE: external {"this":["wp","dom"]}
6626  var external_this_wp_dom_ = __webpack_require__(30);
6627  
6628  // EXTERNAL MODULE: external {"this":["wp","keycodes"]}
6629  var external_this_wp_keycodes_ = __webpack_require__(21);
6630  
6631  // EXTERNAL MODULE: external {"this":["wp","deprecated"]}
6632  var external_this_wp_deprecated_ = __webpack_require__(37);
6633  var external_this_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_deprecated_);
6634  
6635  // EXTERNAL MODULE: external {"this":["wp","compose"]}
6636  var external_this_wp_compose_ = __webpack_require__(9);
6637  
6638  // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
6639  var library_close = __webpack_require__(153);
6640  
6641  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
6642  var defineProperty = __webpack_require__(5);
6643  
6644  // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/utils.js
6645  
6646  
6647  
6648  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; }
6649  
6650  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) { Object(defineProperty["a" /* 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; }
6651  
6652  /**
6653   * WordPress dependencies
6654   */
6655  
6656  /**
6657   * Module constants
6658   */
6659  
6660  var HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space
6661  
6662  /**
6663   * Utility used to compute the popover position over the xAxis
6664   *
6665   * @param {Object}  anchorRect      Anchor Rect.
6666   * @param {Object}  contentSize     Content Size.
6667   * @param {string}  xAxis           Desired xAxis.
6668   * @param {string}  corner          Desired corner.
6669   * @param {boolean} sticky          Whether or not to stick the popover to the
6670   *                                  scroll container edge when part of the anchor
6671   *                                  leaves view.
6672   * @param {string}  chosenYAxis     yAxis to be used.
6673   * @param {Element} boundaryElement Boundary element.
6674   *
6675   * @return {Object} Popover xAxis position and constraints.
6676   */
6677  
6678  function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, sticky, chosenYAxis, boundaryElement) {
6679    var width = contentSize.width;
6680    var isRTL = document.documentElement.dir === 'rtl'; // Correct xAxis for RTL support
6681  
6682    if (xAxis === 'left' && isRTL) {
6683      xAxis = 'right';
6684    } else if (xAxis === 'right' && isRTL) {
6685      xAxis = 'left';
6686    }
6687  
6688    if (corner === 'left' && isRTL) {
6689      corner = 'right';
6690    } else if (corner === 'right' && isRTL) {
6691      corner = 'left';
6692    } // x axis alignment choices
6693  
6694  
6695    var anchorMidPoint = Math.round(anchorRect.left + anchorRect.width / 2);
6696    var centerAlignment = {
6697      popoverLeft: anchorMidPoint,
6698      contentWidth: (anchorMidPoint - width / 2 > 0 ? width / 2 : anchorMidPoint) + (anchorMidPoint + width / 2 > window.innerWidth ? window.innerWidth - anchorMidPoint : width / 2)
6699    };
6700    var leftAlignmentX = anchorRect.left;
6701  
6702    if (corner === 'right') {
6703      leftAlignmentX = anchorRect.right;
6704    } else if (chosenYAxis !== 'middle') {
6705      leftAlignmentX = anchorMidPoint;
6706    }
6707  
6708    var rightAlignmentX = anchorRect.right;
6709  
6710    if (corner === 'left') {
6711      rightAlignmentX = anchorRect.left;
6712    } else if (chosenYAxis !== 'middle') {
6713      rightAlignmentX = anchorMidPoint;
6714    }
6715  
6716    var leftAlignment = {
6717      popoverLeft: leftAlignmentX,
6718      contentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX
6719    };
6720    var rightAlignment = {
6721      popoverLeft: rightAlignmentX,
6722      contentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width
6723    }; // Choosing the x axis
6724  
6725    var chosenXAxis = xAxis;
6726    var contentWidth = null;
6727  
6728    if (!sticky) {
6729      if (xAxis === 'center' && centerAlignment.contentWidth === width) {
6730        chosenXAxis = 'center';
6731      } else if (xAxis === 'left' && leftAlignment.contentWidth === width) {
6732        chosenXAxis = 'left';
6733      } else if (xAxis === 'right' && rightAlignment.contentWidth === width) {
6734        chosenXAxis = 'right';
6735      } else {
6736        chosenXAxis = leftAlignment.contentWidth > rightAlignment.contentWidth ? 'left' : 'right';
6737        var chosenWidth = chosenXAxis === 'left' ? leftAlignment.contentWidth : rightAlignment.contentWidth;
6738        contentWidth = chosenWidth !== width ? chosenWidth : null;
6739      }
6740    }
6741  
6742    var popoverLeft;
6743  
6744    if (chosenXAxis === 'center') {
6745      popoverLeft = centerAlignment.popoverLeft;
6746    } else if (chosenXAxis === 'left') {
6747      popoverLeft = leftAlignment.popoverLeft;
6748    } else {
6749      popoverLeft = rightAlignment.popoverLeft;
6750    }
6751  
6752    if (boundaryElement) {
6753      var boundaryRect = boundaryElement.getBoundingClientRect();
6754      popoverLeft = Math.min(popoverLeft, boundaryRect.right - width);
6755    }
6756  
6757    return {
6758      xAxis: chosenXAxis,
6759      popoverLeft: popoverLeft,
6760      contentWidth: contentWidth
6761    };
6762  }
6763  /**
6764   * Utility used to compute the popover position over the yAxis
6765   *
6766   * @param {Object}  anchorRect        Anchor Rect.
6767   * @param {Object}  contentSize       Content Size.
6768   * @param {string}  yAxis             Desired yAxis.
6769   * @param {string}  corner            Desired corner.
6770   * @param {boolean} sticky            Whether or not to stick the popover to the
6771   *                                    scroll container edge when part of the
6772   *                                    anchor leaves view.
6773   * @param {Element} anchorRef         The anchor element.
6774   * @param {Element} relativeOffsetTop If applicable, top offset of the relative
6775   *                                    positioned parent container.
6776   *
6777   * @return {Object} Popover xAxis position and constraints.
6778   */
6779  
6780  function computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, sticky, anchorRef, relativeOffsetTop) {
6781    var height = contentSize.height;
6782  
6783    if (sticky) {
6784      var scrollContainerEl = Object(external_this_wp_dom_["getScrollContainer"])(anchorRef) || document.body;
6785      var scrollRect = scrollContainerEl.getBoundingClientRect();
6786      var stickyPosition = scrollRect.top + height - relativeOffsetTop;
6787  
6788      if (anchorRect.top <= stickyPosition) {
6789        return {
6790          yAxis: yAxis,
6791          popoverTop: Math.min(anchorRect.bottom, stickyPosition)
6792        };
6793      }
6794    } // y axis alignment choices
6795  
6796  
6797    var anchorMidPoint = anchorRect.top + anchorRect.height / 2;
6798  
6799    if (corner === 'bottom') {
6800      anchorMidPoint = anchorRect.bottom;
6801    } else if (corner === 'top') {
6802      anchorMidPoint = anchorRect.top;
6803    }
6804  
6805    var middleAlignment = {
6806      popoverTop: anchorMidPoint,
6807      contentHeight: (anchorMidPoint - height / 2 > 0 ? height / 2 : anchorMidPoint) + (anchorMidPoint + height / 2 > window.innerHeight ? window.innerHeight - anchorMidPoint : height / 2)
6808    };
6809    var topAlignment = {
6810      popoverTop: anchorRect.top,
6811      contentHeight: anchorRect.top - HEIGHT_OFFSET - height > 0 ? height : anchorRect.top - HEIGHT_OFFSET
6812    };
6813    var bottomAlignment = {
6814      popoverTop: anchorRect.bottom,
6815      contentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height
6816    }; // Choosing the y axis
6817  
6818    var chosenYAxis = yAxis;
6819    var contentHeight = null;
6820  
6821    if (!sticky) {
6822      if (yAxis === 'middle' && middleAlignment.contentHeight === height) {
6823        chosenYAxis = 'middle';
6824      } else if (yAxis === 'top' && topAlignment.contentHeight === height) {
6825        chosenYAxis = 'top';
6826      } else if (yAxis === 'bottom' && bottomAlignment.contentHeight === height) {
6827        chosenYAxis = 'bottom';
6828      } else {
6829        chosenYAxis = topAlignment.contentHeight > bottomAlignment.contentHeight ? 'top' : 'bottom';
6830        var chosenHeight = chosenYAxis === 'top' ? topAlignment.contentHeight : bottomAlignment.contentHeight;
6831        contentHeight = chosenHeight !== height ? chosenHeight : null;
6832      }
6833    }
6834  
6835    var popoverTop;
6836  
6837    if (chosenYAxis === 'middle') {
6838      popoverTop = middleAlignment.popoverTop;
6839    } else if (chosenYAxis === 'top') {
6840      popoverTop = topAlignment.popoverTop;
6841    } else {
6842      popoverTop = bottomAlignment.popoverTop;
6843    }
6844  
6845    return {
6846      yAxis: chosenYAxis,
6847      popoverTop: popoverTop,
6848      contentHeight: contentHeight
6849    };
6850  }
6851  /**
6852   * Utility used to compute the popover position and the content max width/height
6853   * for a popover given its anchor rect and its content size.
6854   *
6855   * @param {Object}  anchorRect        Anchor Rect.
6856   * @param {Object}  contentSize       Content Size.
6857   * @param {string}  position          Position.
6858   * @param {boolean} sticky            Whether or not to stick the popover to the
6859   *                                    scroll container edge when part of the
6860   *                                    anchor leaves view.
6861   * @param {Element} anchorRef         The anchor element.
6862   * @param {number}  relativeOffsetTop If applicable, top offset of the relative
6863   *                                    positioned parent container.
6864   * @param {Element} boundaryElement   Boundary element.
6865   *
6866   * @return {Object} Popover position and constraints.
6867   */
6868  
6869  function computePopoverPosition(anchorRect, contentSize) {
6870    var position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'top';
6871    var sticky = arguments.length > 3 ? arguments[3] : undefined;
6872    var anchorRef = arguments.length > 4 ? arguments[4] : undefined;
6873    var relativeOffsetTop = arguments.length > 5 ? arguments[5] : undefined;
6874    var boundaryElement = arguments.length > 6 ? arguments[6] : undefined;
6875  
6876    var _position$split = position.split(' '),
6877        _position$split2 = Object(slicedToArray["a" /* default */])(_position$split, 3),
6878        yAxis = _position$split2[0],
6879        _position$split2$ = _position$split2[1],
6880        xAxis = _position$split2$ === void 0 ? 'center' : _position$split2$,
6881        corner = _position$split2[2];
6882  
6883    var yAxisPosition = computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, sticky, anchorRef, relativeOffsetTop);
6884    var xAxisPosition = computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, sticky, yAxisPosition.yAxis, boundaryElement);
6885    return _objectSpread({}, xAxisPosition, {}, yAxisPosition);
6886  }
6887  
6888  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-return/index.js
6889  var with_focus_return = __webpack_require__(130);
6890  
6891  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-constrained-tabbing/index.js
6892  var with_constrained_tabbing = __webpack_require__(129);
6893  
6894  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
6895  var classCallCheck = __webpack_require__(20);
6896  
6897  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
6898  var createClass = __webpack_require__(19);
6899  
6900  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
6901  var possibleConstructorReturn = __webpack_require__(23);
6902  
6903  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
6904  var getPrototypeOf = __webpack_require__(16);
6905  
6906  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
6907  var inherits = __webpack_require__(22);
6908  
6909  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-focus-outside/index.js
6910  var with_focus_outside = __webpack_require__(111);
6911  
6912  // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/detect-outside.js
6913  
6914  
6915  
6916  
6917  
6918  
6919  function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
6920  
6921  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; } }
6922  
6923  /**
6924   * WordPress dependencies
6925   */
6926  
6927  /**
6928   * Internal dependencies
6929   */
6930  
6931  
6932  
6933  var detect_outside_PopoverDetectOutside = /*#__PURE__*/function (_Component) {
6934    Object(inherits["a" /* default */])(PopoverDetectOutside, _Component);
6935  
6936    var _super = _createSuper(PopoverDetectOutside);
6937  
6938    function PopoverDetectOutside() {
6939      Object(classCallCheck["a" /* default */])(this, PopoverDetectOutside);
6940  
6941      return _super.apply(this, arguments);
6942    }
6943  
6944    Object(createClass["a" /* default */])(PopoverDetectOutside, [{
6945      key: "handleFocusOutside",
6946      value: function handleFocusOutside(event) {
6947        this.props.onFocusOutside(event);
6948      }
6949    }, {
6950      key: "render",
6951      value: function render() {
6952        return this.props.children;
6953      }
6954    }]);
6955  
6956    return PopoverDetectOutside;
6957  }(external_this_wp_element_["Component"]);
6958  
6959  /* harmony default export */ var detect_outside = (Object(with_focus_outside["a" /* default */])(detect_outside_PopoverDetectOutside));
6960  
6961  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/button/index.js
6962  var build_module_button = __webpack_require__(34);
6963  
6964  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/scroll-lock/index.js
6965  var scroll_lock = __webpack_require__(160);
6966  
6967  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/isolated-event-container/index.js
6968  var isolated_event_container = __webpack_require__(131);
6969  
6970  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/bubbles-virtually/use-slot.js
6971  var use_slot = __webpack_require__(158);
6972  
6973  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/slot-fill/index.js + 6 modules
6974  var slot_fill = __webpack_require__(121);
6975  
6976  // EXTERNAL MODULE: ./node_modules/@wordpress/components/build-module/animate/index.js
6977  var build_module_animate = __webpack_require__(159);
6978  
6979  // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/popover/index.js
6980  
6981  
6982  
6983  
6984  
6985  /**
6986   * External dependencies
6987   */
6988  
6989  /**
6990   * WordPress dependencies
6991   */
6992  
6993  
6994  
6995  
6996  
6997  
6998  
6999  /**
7000   * Internal dependencies
7001   */
7002  
7003  
7004  
7005  
7006  
7007  
7008  
7009  
7010  
7011  
7012  var FocusManaged = Object(with_constrained_tabbing["a" /* default */])(Object(with_focus_return["a" /* default */])(function (_ref) {
7013    var children = _ref.children;
7014    return children;
7015  }));
7016  /**
7017   * Name of slot in which popover should fill.
7018   *
7019   * @type {string}
7020   */
7021  
7022  var SLOT_NAME = 'Popover';
7023  
7024  function computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect) {
7025    var anchorRef = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
7026    var shouldAnchorIncludePadding = arguments.length > 4 ? arguments[4] : undefined;
7027  
7028    if (anchorRect) {
7029      return anchorRect;
7030    }
7031  
7032    if (getAnchorRect) {
7033      if (!anchorRefFallback.current) {
7034        return;
7035      }
7036  
7037      return getAnchorRect(anchorRefFallback.current);
7038    }
7039  
7040    if (anchorRef !== false) {
7041      if (!anchorRef || !window.Range || !window.Element || !window.DOMRect) {
7042        return;
7043      }
7044  
7045      if (anchorRef instanceof window.Range) {
7046        return Object(external_this_wp_dom_["getRectangleFromRange"])(anchorRef);
7047      }
7048  
7049      if (anchorRef instanceof window.Element) {
7050        var _rect2 = anchorRef.getBoundingClientRect();
7051  
7052        if (shouldAnchorIncludePadding) {
7053          return _rect2;
7054        }
7055  
7056        return withoutPadding(_rect2, anchorRef);
7057      }
7058  
7059      var top = anchorRef.top,
7060          bottom = anchorRef.bottom;
7061      var topRect = top.getBoundingClientRect();
7062      var bottomRect = bottom.getBoundingClientRect();
7063  
7064      var _rect = new window.DOMRect(topRect.left, topRect.top, topRect.width, bottomRect.bottom - topRect.top);
7065  
7066      if (shouldAnchorIncludePadding) {
7067        return _rect;
7068      }
7069  
7070      return withoutPadding(_rect, anchorRef);
7071    }
7072  
7073    if (!anchorRefFallback.current) {
7074      return;
7075    }
7076  
7077    var parentNode = anchorRefFallback.current.parentNode;
7078    var rect = parentNode.getBoundingClientRect();
7079  
7080    if (shouldAnchorIncludePadding) {
7081      return rect;
7082    }
7083  
7084    return withoutPadding(rect, parentNode);
7085  }
7086  
7087  function withoutPadding(rect, element) {
7088    var _window$getComputedSt = window.getComputedStyle(element),
7089        paddingTop = _window$getComputedSt.paddingTop,
7090        paddingBottom = _window$getComputedSt.paddingBottom,
7091        paddingLeft = _window$getComputedSt.paddingLeft,
7092        paddingRight = _window$getComputedSt.paddingRight;
7093  
7094    var top = paddingTop ? parseInt(paddingTop, 10) : 0;
7095    var bottom = paddingBottom ? parseInt(paddingBottom, 10) : 0;
7096    var left = paddingLeft ? parseInt(paddingLeft, 10) : 0;
7097    var right = paddingRight ? parseInt(paddingRight, 10) : 0;
7098    return {
7099      x: rect.left + left,
7100      y: rect.top + top,
7101      width: rect.width - left - right,
7102      height: rect.height - top - bottom,
7103      left: rect.left + left,
7104      right: rect.right - right,
7105      top: rect.top + top,
7106      bottom: rect.bottom - bottom
7107    };
7108  }
7109  /**
7110   * Hook used to focus the first tabbable element on mount.
7111   *
7112   * @param {boolean|string} focusOnMount Focus on mount mode.
7113   * @param {Object}         contentRef   Reference to the popover content element.
7114   */
7115  
7116  
7117  function useFocusContentOnMount(focusOnMount, contentRef) {
7118    // Focus handling
7119    Object(external_this_wp_element_["useEffect"])(function () {
7120      /*
7121       * Without the setTimeout, the dom node is not being focused. Related:
7122       * https://stackoverflow.com/questions/35522220/react-ref-with-focus-doesnt-work-without-settimeout-my-example
7123       *
7124       * TODO: Treat the cause, not the symptom.
7125       */
7126      var focusTimeout = setTimeout(function () {
7127        if (!focusOnMount || !contentRef.current) {
7128          return;
7129        }
7130  
7131        if (focusOnMount === 'firstElement') {
7132          // Find first tabbable node within content and shift focus, falling
7133          // back to the popover panel itself.
7134          var firstTabbable = external_this_wp_dom_["focus"].tabbable.find(contentRef.current)[0];
7135  
7136          if (firstTabbable) {
7137            firstTabbable.focus();
7138          } else {
7139            contentRef.current.focus();
7140          }
7141  
7142          return;
7143        }
7144  
7145        if (focusOnMount === 'container') {
7146          // Focus the popover panel itself so items in the popover are easily
7147          // accessed via keyboard navigation.
7148          contentRef.current.focus();
7149        }
7150      }, 0);
7151      return function () {
7152        return clearTimeout(focusTimeout);
7153      };
7154    }, []);
7155  }
7156  /**
7157   * Sets or removes an element attribute.
7158   *
7159   * @param {Element} element The element to modify.
7160   * @param {string}  name    The attribute name to set or remove.
7161   * @param {?string} value   The value to set. A falsy value will remove the
7162   *                          attribute.
7163   */
7164  
7165  
7166  function setAttribute(element, name, value) {
7167    if (!value) {
7168      if (element.hasAttribute(name)) {
7169        element.removeAttribute(name);
7170      }
7171    } else if (element.getAttribute(name) !== value) {
7172      element.setAttribute(name, value);
7173    }
7174  }
7175  /**
7176   * Sets or removes an element style property.
7177   *
7178   * @param {Element} element  The element to modify.
7179   * @param {string}  property The property to set or remove.
7180   * @param {?string} value    The value to set. A falsy value will remove the
7181   *                           property.
7182   */
7183  
7184  
7185  function setStyle(element, property) {
7186    var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
7187  
7188    if (element.style[property] !== value) {
7189      element.style[property] = value;
7190    }
7191  }
7192  /**
7193   * Sets or removes an element class.
7194   *
7195   * @param {Element} element The element to modify.
7196   * @param {string}  name    The class to set or remove.
7197   * @param {boolean} toggle  True to set the class, false to remove.
7198   */
7199  
7200  
7201  function setClass(element, name, toggle) {
7202    if (toggle) {
7203      if (!element.classList.contains(name)) {
7204        element.classList.add(name);
7205      }
7206    } else if (element.classList.contains(name)) {
7207      element.classList.remove(name);
7208    }
7209  }
7210  
7211  var popover_Popover = function Popover(_ref2) {
7212    var headerTitle = _ref2.headerTitle,
7213        onClose = _ref2.onClose,
7214        onKeyDown = _ref2.onKeyDown,
7215        children = _ref2.children,
7216        className = _ref2.className,
7217        _ref2$noArrow = _ref2.noArrow,
7218        noArrow = _ref2$noArrow === void 0 ? true : _ref2$noArrow,
7219        isAlternate = _ref2.isAlternate,
7220        _ref2$position = _ref2.position,
7221        position = _ref2$position === void 0 ? 'bottom right' : _ref2$position,
7222        range = _ref2.range,
7223        _ref2$focusOnMount = _ref2.focusOnMount,
7224        focusOnMount = _ref2$focusOnMount === void 0 ? 'firstElement' : _ref2$focusOnMount,
7225        anchorRef = _ref2.anchorRef,
7226        shouldAnchorIncludePadding = _ref2.shouldAnchorIncludePadding,
7227        anchorRect = _ref2.anchorRect,
7228        getAnchorRect = _ref2.getAnchorRect,
7229        expandOnMobile = _ref2.expandOnMobile,
7230        _ref2$animate = _ref2.animate,
7231        animate = _ref2$animate === void 0 ? true : _ref2$animate,
7232        onClickOutside = _ref2.onClickOutside,
7233        onFocusOutside = _ref2.onFocusOutside,
7234        __unstableSticky = _ref2.__unstableSticky,
7235        _ref2$__unstableSlotN = _ref2.__unstableSlotName,
7236        __unstableSlotName = _ref2$__unstableSlotN === void 0 ? SLOT_NAME : _ref2$__unstableSlotN,
7237        __unstableObserveElement = _ref2.__unstableObserveElement,
7238        __unstableBoundaryParent = _ref2.__unstableBoundaryParent,
7239        contentProps = Object(objectWithoutProperties["a" /* default */])(_ref2, ["headerTitle", "onClose", "onKeyDown", "children", "className", "noArrow", "isAlternate", "position", "range", "focusOnMount", "anchorRef", "shouldAnchorIncludePadding", "anchorRect", "getAnchorRect", "expandOnMobile", "animate", "onClickOutside", "onFocusOutside", "__unstableSticky", "__unstableSlotName", "__unstableObserveElement", "__unstableBoundaryParent"]);
7240  
7241    var anchorRefFallback = Object(external_this_wp_element_["useRef"])(null);
7242    var contentRef = Object(external_this_wp_element_["useRef"])(null);
7243    var containerRef = Object(external_this_wp_element_["useRef"])();
7244    var isMobileViewport = Object(external_this_wp_compose_["useViewportMatch"])('medium', '<');
7245  
7246    var _useState = Object(external_this_wp_element_["useState"])(),
7247        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
7248        animateOrigin = _useState2[0],
7249        setAnimateOrigin = _useState2[1];
7250  
7251    var slot = Object(use_slot["a" /* default */])(__unstableSlotName);
7252    var isExpanded = expandOnMobile && isMobileViewport;
7253  
7254    var _useResizeObserver = Object(external_this_wp_compose_["useResizeObserver"])(),
7255        _useResizeObserver2 = Object(slicedToArray["a" /* default */])(_useResizeObserver, 2),
7256        containerResizeListener = _useResizeObserver2[0],
7257        contentSize = _useResizeObserver2[1];
7258  
7259    noArrow = isExpanded || noArrow;
7260    Object(external_this_wp_element_["useLayoutEffect"])(function () {
7261      if (isExpanded) {
7262        setClass(containerRef.current, 'is-without-arrow', noArrow);
7263        setClass(containerRef.current, 'is-alternate', isAlternate);
7264        setAttribute(containerRef.current, 'data-x-axis');
7265        setAttribute(containerRef.current, 'data-y-axis');
7266        setStyle(containerRef.current, 'top');
7267        setStyle(containerRef.current, 'left');
7268        setStyle(contentRef.current, 'maxHeight');
7269        setStyle(contentRef.current, 'maxWidth');
7270        return;
7271      }
7272  
7273      var refresh = function refresh() {
7274        if (!containerRef.current || !contentRef.current) {
7275          return;
7276        }
7277  
7278        var anchor = computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect, anchorRef, shouldAnchorIncludePadding);
7279  
7280        if (!anchor) {
7281          return;
7282        }
7283  
7284        var _containerRef$current = containerRef.current,
7285            offsetParent = _containerRef$current.offsetParent,
7286            ownerDocument = _containerRef$current.ownerDocument;
7287        var relativeOffsetTop = 0; // If there is a positioned ancestor element that is not the body,
7288        // subtract the position from the anchor rect. If the position of
7289        // the popover is fixed, the offset parent is null or the body
7290        // element, in which case the position is relative to the viewport.
7291        // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
7292  
7293        if (offsetParent && offsetParent !== ownerDocument.body) {
7294          var offsetParentRect = offsetParent.getBoundingClientRect();
7295          relativeOffsetTop = offsetParentRect.top;
7296          anchor = new window.DOMRect(anchor.left - offsetParentRect.left, anchor.top - offsetParentRect.top, anchor.width, anchor.height);
7297        }
7298  
7299        var boundaryElement;
7300  
7301        if (__unstableBoundaryParent) {
7302          var _containerRef$current2;
7303  
7304          boundaryElement = (_containerRef$current2 = containerRef.current.closest('.popover-slot')) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.parentNode;
7305        }
7306  
7307        var usedContentSize = !contentSize.height ? contentRef.current.getBoundingClientRect() : contentSize;
7308  
7309        var _computePopoverPositi = computePopoverPosition(anchor, usedContentSize, position, __unstableSticky, containerRef.current, relativeOffsetTop, boundaryElement),
7310            popoverTop = _computePopoverPositi.popoverTop,
7311            popoverLeft = _computePopoverPositi.popoverLeft,
7312            xAxis = _computePopoverPositi.xAxis,
7313            yAxis = _computePopoverPositi.yAxis,
7314            contentHeight = _computePopoverPositi.contentHeight,
7315            contentWidth = _computePopoverPositi.contentWidth;
7316  
7317        if (typeof popoverTop === 'number' && typeof popoverLeft === 'number') {
7318          setStyle(containerRef.current, 'top', popoverTop + 'px');
7319          setStyle(containerRef.current, 'left', popoverLeft + 'px');
7320        }
7321  
7322        setClass(containerRef.current, 'is-without-arrow', noArrow || xAxis === 'center' && yAxis === 'middle');
7323        setClass(containerRef.current, 'is-alternate', isAlternate);
7324        setAttribute(containerRef.current, 'data-x-axis', xAxis);
7325        setAttribute(containerRef.current, 'data-y-axis', yAxis);
7326        setStyle(contentRef.current, 'maxHeight', typeof contentHeight === 'number' ? contentHeight + 'px' : '');
7327        setStyle(contentRef.current, 'maxWidth', typeof contentWidth === 'number' ? contentWidth + 'px' : ''); // Compute the animation position
7328  
7329        var yAxisMapping = {
7330          top: 'bottom',
7331          bottom: 'top'
7332        };
7333        var xAxisMapping = {
7334          left: 'right',
7335          right: 'left'
7336        };
7337        var animateYAxis = yAxisMapping[yAxis] || 'middle';
7338        var animateXAxis = xAxisMapping[xAxis] || 'center';
7339        setAnimateOrigin(animateXAxis + ' ' + animateYAxis);
7340      };
7341  
7342      refresh();
7343      /*
7344       * There are sometimes we need to reposition or resize the popover that
7345       * are not handled by the resize/scroll window events (i.e. CSS changes
7346       * in the layout that changes the position of the anchor).
7347       *
7348       * For these situations, we refresh the popover every 0.5s
7349       */
7350  
7351      var intervalHandle = window.setInterval(refresh, 500);
7352      var rafId;
7353  
7354      var refreshOnAnimationFrame = function refreshOnAnimationFrame() {
7355        window.cancelAnimationFrame(rafId);
7356        rafId = window.requestAnimationFrame(refresh);
7357      }; // Sometimes a click trigger a layout change that affects the popover
7358      // position. This is an opportunity to immediately refresh rather than
7359      // at the interval.
7360  
7361  
7362      window.addEventListener('click', refreshOnAnimationFrame);
7363      window.addEventListener('resize', refresh);
7364      window.addEventListener('scroll', refresh, true);
7365      var observer;
7366  
7367      if (__unstableObserveElement) {
7368        observer = new window.MutationObserver(refresh);
7369        observer.observe(__unstableObserveElement, {
7370          attributes: true
7371        });
7372      }
7373  
7374      return function () {
7375        window.clearInterval(intervalHandle);
7376        window.removeEventListener('resize', refresh);
7377        window.removeEventListener('scroll', refresh, true);
7378        window.removeEventListener('click', refreshOnAnimationFrame);
7379        window.cancelAnimationFrame(rafId);
7380  
7381        if (observer) {
7382          observer.disconnect();
7383        }
7384      };
7385    }, [isExpanded, anchorRect, getAnchorRect, anchorRef, shouldAnchorIncludePadding, position, contentSize, __unstableSticky, __unstableObserveElement, __unstableBoundaryParent]);
7386    useFocusContentOnMount(focusOnMount, contentRef); // Event handlers
7387  
7388    var maybeClose = function maybeClose(event) {
7389      // Close on escape
7390      if (event.keyCode === external_this_wp_keycodes_["ESCAPE"] && onClose) {
7391        event.stopPropagation();
7392        onClose();
7393      } // Preserve original content prop behavior
7394  
7395  
7396      if (onKeyDown) {
7397        onKeyDown(event);
7398      }
7399    };
7400    /**
7401     * Shims an onFocusOutside callback to be compatible with a deprecated
7402     * onClickOutside prop function, if provided.
7403     *
7404     * @param {FocusEvent} event Focus event from onFocusOutside.
7405     */
7406  
7407  
7408    function handleOnFocusOutside(event) {
7409      // Defer to given `onFocusOutside` if specified. Call `onClose` only if
7410      // both `onFocusOutside` and `onClickOutside` are unspecified. Doing so
7411      // assures backwards-compatibility for prior `onClickOutside` default.
7412      if (onFocusOutside) {
7413        onFocusOutside(event);
7414        return;
7415      } else if (!onClickOutside) {
7416        if (onClose) {
7417          onClose();
7418        }
7419  
7420        return;
7421      } // Simulate MouseEvent using FocusEvent#relatedTarget as emulated click
7422      // target. MouseEvent constructor is unsupported in Internet Explorer.
7423  
7424  
7425      var clickEvent;
7426  
7427      try {
7428        clickEvent = new window.MouseEvent('click');
7429      } catch (error) {
7430        clickEvent = document.createEvent('MouseEvent');
7431        clickEvent.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
7432      }
7433  
7434      Object.defineProperty(clickEvent, 'target', {
7435        get: function get() {
7436          return event.relatedTarget;
7437        }
7438      });
7439      external_this_wp_deprecated_default()('Popover onClickOutside prop', {
7440        alternative: 'onFocusOutside'
7441      });
7442      onClickOutside(clickEvent);
7443    } // Disable reason: We care to capture the _bubbled_ events from inputs
7444    // within popover as inferring close intent.
7445  
7446  
7447    var content = Object(external_this_wp_element_["createElement"])(detect_outside, {
7448      onFocusOutside: handleOnFocusOutside
7449    }, Object(external_this_wp_element_["createElement"])(build_module_animate["a" /* default */], {
7450      type: animate && animateOrigin ? 'appear' : null,
7451      options: {
7452        origin: animateOrigin
7453      }
7454    }, function (_ref3) {
7455      var animateClassName = _ref3.className;
7456      return Object(external_this_wp_element_["createElement"])(isolated_event_container["a" /* default */], Object(esm_extends["a" /* default */])({
7457        className: classnames_default()('components-popover', className, animateClassName, {
7458          'is-expanded': isExpanded,
7459          'is-without-arrow': noArrow,
7460          'is-alternate': isAlternate
7461        })
7462      }, contentProps, {
7463        onKeyDown: maybeClose,
7464        ref: containerRef
7465      }), isExpanded && Object(external_this_wp_element_["createElement"])(scroll_lock["a" /* default */], null), isExpanded && Object(external_this_wp_element_["createElement"])("div", {
7466        className: "components-popover__header"
7467      }, Object(external_this_wp_element_["createElement"])("span", {
7468        className: "components-popover__header-title"
7469      }, headerTitle), Object(external_this_wp_element_["createElement"])(build_module_button["a" /* default */], {
7470        className: "components-popover__close",
7471        icon: library_close["a" /* default */],
7472        onClick: onClose
7473      })), Object(external_this_wp_element_["createElement"])("div", {
7474        ref: contentRef,
7475        className: "components-popover__content",
7476        tabIndex: "-1"
7477      }, Object(external_this_wp_element_["createElement"])("div", {
7478        style: {
7479          position: 'relative'
7480        }
7481      }, containerResizeListener, children)));
7482    })); // Apply focus to element as long as focusOnMount is truthy; false is
7483    // the only "disabled" value.
7484  
7485    if (focusOnMount) {
7486      content = Object(external_this_wp_element_["createElement"])(FocusManaged, null, content);
7487    }
7488  
7489    if (slot.ref) {
7490      content = Object(external_this_wp_element_["createElement"])(slot_fill["a" /* Fill */], {
7491        name: __unstableSlotName
7492      }, content);
7493    }
7494  
7495    if (anchorRef || anchorRect) {
7496      return content;
7497    }
7498  
7499    return Object(external_this_wp_element_["createElement"])("span", {
7500      ref: anchorRefFallback
7501    }, content);
7502  };
7503  
7504  var PopoverContainer = popover_Popover;
7505  
7506  PopoverContainer.Slot = function (_ref4) {
7507    var _ref4$name = _ref4.name,
7508        name = _ref4$name === void 0 ? SLOT_NAME : _ref4$name;
7509    return Object(external_this_wp_element_["createElement"])(slot_fill["b" /* Slot */], {
7510      bubblesVirtually: true,
7511      name: name,
7512      className: "popover-slot"
7513    });
7514  };
7515  
7516  /* harmony default export */ var popover = __webpack_exports__["a"] = (PopoverContainer);
7517  
7518  
7519  /***/ }),
7520  /* 113 */
7521  /***/ (function(module, exports, __webpack_require__) {
7522  
7523  "use strict";
7524  
7525  
7526  Object.defineProperty(exports, '__esModule', { value: true });
7527  
7528  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
7529  
7530  var _extends = _interopDefault(__webpack_require__(169));
7531  var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(170));
7532  var React = __webpack_require__(13);
7533  var React__default = _interopDefault(React);
7534  var _inheritsLoose = _interopDefault(__webpack_require__(145));
7535  var _assertThisInitialized = _interopDefault(__webpack_require__(171));
7536  
7537  var is = {
7538    arr: Array.isArray,
7539    obj: function obj(a) {
7540      return Object.prototype.toString.call(a) === '[object Object]';
7541    },
7542    fun: function fun(a) {
7543      return typeof a === 'function';
7544    },
7545    str: function str(a) {
7546      return typeof a === 'string';
7547    },
7548    num: function num(a) {
7549      return typeof a === 'number';
7550    },
7551    und: function und(a) {
7552      return a === void 0;
7553    },
7554    nul: function nul(a) {
7555      return a === null;
7556    },
7557    set: function set(a) {
7558      return a instanceof Set;
7559    },
7560    map: function map(a) {
7561      return a instanceof Map;
7562    },
7563    equ: function equ(a, b) {
7564      if (typeof a !== typeof b) return false;
7565      if (is.str(a) || is.num(a)) return a === b;
7566      if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
7567      var i;
7568  
7569      for (i in a) {
7570        if (!(i in b)) return false;
7571      }
7572  
7573      for (i in b) {
7574        if (a[i] !== b[i]) return false;
7575      }
7576  
7577      return is.und(i) ? a === b : true;
7578    }
7579  };
7580  function merge(target, lowercase) {
7581    if (lowercase === void 0) {
7582      lowercase = true;
7583    }
7584  
7585    return function (object) {
7586      return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
7587        var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
7588        acc[key] = target(key);
7589        return acc;
7590      }, target);
7591    };
7592  }
7593  function useForceUpdate() {
7594    var _useState = React.useState(false),
7595        f = _useState[1];
7596  
7597    var forceUpdate = React.useCallback(function () {
7598      return f(function (v) {
7599        return !v;
7600      });
7601    }, []);
7602    return forceUpdate;
7603  }
7604  function withDefault(value, defaultValue) {
7605    return is.und(value) || is.nul(value) ? defaultValue : value;
7606  }
7607  function toArray(a) {
7608    return !is.und(a) ? is.arr(a) ? a : [a] : [];
7609  }
7610  function callProp(obj) {
7611    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
7612      args[_key - 1] = arguments[_key];
7613    }
7614  
7615    return is.fun(obj) ? obj.apply(void 0, args) : obj;
7616  }
7617  
7618  function getForwardProps(props) {
7619    var to = props.to,
7620        from = props.from,
7621        config = props.config,
7622        onStart = props.onStart,
7623        onRest = props.onRest,
7624        onFrame = props.onFrame,
7625        children = props.children,
7626        reset = props.reset,
7627        reverse = props.reverse,
7628        force = props.force,
7629        immediate = props.immediate,
7630        delay = props.delay,
7631        attach = props.attach,
7632        destroyed = props.destroyed,
7633        interpolateTo = props.interpolateTo,
7634        ref = props.ref,
7635        lazy = props.lazy,
7636        forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
7637  
7638    return forward;
7639  }
7640  
7641  function interpolateTo(props) {
7642    var forward = getForwardProps(props);
7643    if (is.und(forward)) return _extends({
7644      to: forward
7645    }, props);
7646    var rest = Object.keys(props).reduce(function (a, k) {
7647      var _extends2;
7648  
7649      return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
7650    }, {});
7651    return _extends({
7652      to: forward
7653    }, rest);
7654  }
7655  function handleRef(ref, forward) {
7656    if (forward) {
7657      // If it's a function, assume it's a ref callback
7658      if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
7659        forward.current = ref;
7660      }
7661    }
7662  
7663    return ref;
7664  }
7665  
7666  var Animated =
7667  /*#__PURE__*/
7668  function () {
7669    function Animated() {
7670      this.payload = void 0;
7671      this.children = [];
7672    }
7673  
7674    var _proto = Animated.prototype;
7675  
7676    _proto.getAnimatedValue = function getAnimatedValue() {
7677      return this.getValue();
7678    };
7679  
7680    _proto.getPayload = function getPayload() {
7681      return this.payload || this;
7682    };
7683  
7684    _proto.attach = function attach() {};
7685  
7686    _proto.detach = function detach() {};
7687  
7688    _proto.getChildren = function getChildren() {
7689      return this.children;
7690    };
7691  
7692    _proto.addChild = function addChild(child) {
7693      if (this.children.length === 0) this.attach();
7694      this.children.push(child);
7695    };
7696  
7697    _proto.removeChild = function removeChild(child) {
7698      var index = this.children.indexOf(child);
7699      this.children.splice(index, 1);
7700      if (this.children.length === 0) this.detach();
7701    };
7702  
7703    return Animated;
7704  }();
7705  var AnimatedArray =
7706  /*#__PURE__*/
7707  function (_Animated) {
7708    _inheritsLoose(AnimatedArray, _Animated);
7709  
7710    function AnimatedArray() {
7711      var _this;
7712  
7713      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7714        args[_key] = arguments[_key];
7715      }
7716  
7717      _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
7718      _this.payload = [];
7719  
7720      _this.attach = function () {
7721        return _this.payload.forEach(function (p) {
7722          return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
7723        });
7724      };
7725  
7726      _this.detach = function () {
7727        return _this.payload.forEach(function (p) {
7728          return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
7729        });
7730      };
7731  
7732      return _this;
7733    }
7734  
7735    return AnimatedArray;
7736  }(Animated);
7737  var AnimatedObject =
7738  /*#__PURE__*/
7739  function (_Animated2) {
7740    _inheritsLoose(AnimatedObject, _Animated2);
7741  
7742    function AnimatedObject() {
7743      var _this2;
7744  
7745      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
7746        args[_key3] = arguments[_key3];
7747      }
7748  
7749      _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
7750      _this2.payload = {};
7751  
7752      _this2.attach = function () {
7753        return Object.values(_this2.payload).forEach(function (s) {
7754          return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
7755        });
7756      };
7757  
7758      _this2.detach = function () {
7759        return Object.values(_this2.payload).forEach(function (s) {
7760          return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
7761        });
7762      };
7763  
7764      return _this2;
7765    }
7766  
7767    var _proto2 = AnimatedObject.prototype;
7768  
7769    _proto2.getValue = function getValue(animated) {
7770      if (animated === void 0) {
7771        animated = false;
7772      }
7773  
7774      var payload = {};
7775  
7776      for (var _key4 in this.payload) {
7777        var value = this.payload[_key4];
7778        if (animated && !(value instanceof Animated)) continue;
7779        payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
7780      }
7781  
7782      return payload;
7783    };
7784  
7785    _proto2.getAnimatedValue = function getAnimatedValue() {
7786      return this.getValue(true);
7787    };
7788  
7789    return AnimatedObject;
7790  }(Animated);
7791  
7792  var applyAnimatedValues;
7793  function injectApplyAnimatedValues(fn, transform) {
7794    applyAnimatedValues = {
7795      fn: fn,
7796      transform: transform
7797    };
7798  }
7799  var colorNames;
7800  function injectColorNames(names) {
7801    colorNames = names;
7802  }
7803  var requestFrame = function requestFrame(cb) {
7804    return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
7805  };
7806  var cancelFrame = function cancelFrame(id) {
7807    typeof window !== 'undefined' && window.cancelAnimationFrame(id);
7808  };
7809  function injectFrame(raf, caf) {
7810    requestFrame = raf;
7811    cancelFrame = caf;
7812  }
7813  var interpolation;
7814  function injectStringInterpolator(fn) {
7815    interpolation = fn;
7816  }
7817  var now = function now() {
7818    return Date.now();
7819  };
7820  function injectNow(nowFn) {
7821    now = nowFn;
7822  }
7823  var defaultElement;
7824  function injectDefaultElement(el) {
7825    defaultElement = el;
7826  }
7827  var animatedApi = function animatedApi(node) {
7828    return node.current;
7829  };
7830  function injectAnimatedApi(fn) {
7831    animatedApi = fn;
7832  }
7833  var createAnimatedStyle;
7834  function injectCreateAnimatedStyle(factory) {
7835    createAnimatedStyle = factory;
7836  }
7837  var manualFrameloop;
7838  function injectManualFrameloop(callback) {
7839    manualFrameloop = callback;
7840  }
7841  
7842  var Globals = /*#__PURE__*/Object.freeze({
7843    get applyAnimatedValues () { return applyAnimatedValues; },
7844    injectApplyAnimatedValues: injectApplyAnimatedValues,
7845    get colorNames () { return colorNames; },
7846    injectColorNames: injectColorNames,
7847    get requestFrame () { return requestFrame; },
7848    get cancelFrame () { return cancelFrame; },
7849    injectFrame: injectFrame,
7850    get interpolation () { return interpolation; },
7851    injectStringInterpolator: injectStringInterpolator,
7852    get now () { return now; },
7853    injectNow: injectNow,
7854    get defaultElement () { return defaultElement; },
7855    injectDefaultElement: injectDefaultElement,
7856    get animatedApi () { return animatedApi; },
7857    injectAnimatedApi: injectAnimatedApi,
7858    get createAnimatedStyle () { return createAnimatedStyle; },
7859    injectCreateAnimatedStyle: injectCreateAnimatedStyle,
7860    get manualFrameloop () { return manualFrameloop; },
7861    injectManualFrameloop: injectManualFrameloop
7862  });
7863  
7864  /**
7865   * Wraps the `style` property with `AnimatedStyle`.
7866   */
7867  
7868  var AnimatedProps =
7869  /*#__PURE__*/
7870  function (_AnimatedObject) {
7871    _inheritsLoose(AnimatedProps, _AnimatedObject);
7872  
7873    function AnimatedProps(props, callback) {
7874      var _this;
7875  
7876      _this = _AnimatedObject.call(this) || this;
7877      _this.update = void 0;
7878      _this.payload = !props.style ? props : _extends({}, props, {
7879        style: createAnimatedStyle(props.style)
7880      });
7881      _this.update = callback;
7882  
7883      _this.attach();
7884  
7885      return _this;
7886    }
7887  
7888    return AnimatedProps;
7889  }(AnimatedObject);
7890  
7891  var isFunctionComponent = function isFunctionComponent(val) {
7892    return is.fun(val) && !(val.prototype instanceof React__default.Component);
7893  };
7894  
7895  var createAnimatedComponent = function createAnimatedComponent(Component) {
7896    var AnimatedComponent = React.forwardRef(function (props, ref) {
7897      var forceUpdate = useForceUpdate();
7898      var mounted = React.useRef(true);
7899      var propsAnimated = React.useRef(null);
7900      var node = React.useRef(null);
7901      var attachProps = React.useCallback(function (props) {
7902        var oldPropsAnimated = propsAnimated.current;
7903  
7904        var callback = function callback() {
7905          var didUpdate = false;
7906  
7907          if (node.current) {
7908            didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
7909          }
7910  
7911          if (!node.current || didUpdate === false) {
7912            // If no referenced node has been found, or the update target didn't have a
7913            // native-responder, then forceUpdate the animation ...
7914            forceUpdate();
7915          }
7916        };
7917  
7918        propsAnimated.current = new AnimatedProps(props, callback);
7919        oldPropsAnimated && oldPropsAnimated.detach();
7920      }, []);
7921      React.useEffect(function () {
7922        return function () {
7923          mounted.current = false;
7924          propsAnimated.current && propsAnimated.current.detach();
7925        };
7926      }, []);
7927      React.useImperativeHandle(ref, function () {
7928        return animatedApi(node, mounted, forceUpdate);
7929      });
7930      attachProps(props);
7931  
7932      var _getValue = propsAnimated.current.getValue(),
7933          scrollTop = _getValue.scrollTop,
7934          scrollLeft = _getValue.scrollLeft,
7935          animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
7936      // See: https://github.com/react-spring/react-spring/issues/569
7937  
7938  
7939      var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
7940        return node.current = handleRef(childRef, ref);
7941      };
7942      return React__default.createElement(Component, _extends({}, animatedProps, {
7943        ref: refFn
7944      }));
7945    });
7946    return AnimatedComponent;
7947  };
7948  
7949  var active = false;
7950  var controllers = new Set();
7951  
7952  var update = function update() {
7953    if (!active) return false;
7954    var time = now();
7955  
7956    for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
7957      var _ref;
7958  
7959      if (_isArray) {
7960        if (_i >= _iterator.length) break;
7961        _ref = _iterator[_i++];
7962      } else {
7963        _i = _iterator.next();
7964        if (_i.done) break;
7965        _ref = _i.value;
7966      }
7967  
7968      var controller = _ref;
7969      var isActive = false;
7970  
7971      for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
7972        var config = controller.configs[configIdx];
7973        var endOfAnimation = void 0,
7974            lastTime = void 0;
7975  
7976        for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
7977          var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
7978  
7979          if (animation.done) continue;
7980          var from = config.fromValues[valIdx];
7981          var to = config.toValues[valIdx];
7982          var position = animation.lastPosition;
7983          var isAnimated = to instanceof Animated;
7984          var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
7985          if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
7986  
7987          if (config.immediate) {
7988            animation.setValue(to);
7989            animation.done = true;
7990            continue;
7991          } // Break animation when string values are involved
7992  
7993  
7994          if (typeof from === 'string' || typeof to === 'string') {
7995            animation.setValue(to);
7996            animation.done = true;
7997            continue;
7998          }
7999  
8000          if (config.duration !== void 0) {
8001            /** Duration easing */
8002            position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
8003            endOfAnimation = time >= animation.startTime + config.duration;
8004          } else if (config.decay) {
8005            /** Decay easing */
8006            position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
8007            endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
8008            if (endOfAnimation) to = position;
8009          } else {
8010            /** Spring easing */
8011            lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
8012            velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
8013  
8014            if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
8015</