[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

   1  this["wp"] = this["wp"] || {}; this["wp"]["compose"] =
   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 = 463);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ({
  89  
  90  /***/ 0:
  91  /***/ (function(module, exports) {
  92  
  93  (function() { module.exports = this["wp"]["element"]; }());
  94  
  95  /***/ }),
  96  
  97  /***/ 12:
  98  /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99  
 100  "use strict";
 101  
 102  // EXPORTS
 103  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 104  
 105  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 106  var arrayWithHoles = __webpack_require__(38);
 107  
 108  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 109  function _iterableToArrayLimit(arr, i) {
 110    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 111    var _arr = [];
 112    var _n = true;
 113    var _d = false;
 114    var _e = undefined;
 115  
 116    try {
 117      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 118        _arr.push(_s.value);
 119  
 120        if (i && _arr.length === i) break;
 121      }
 122    } catch (err) {
 123      _d = true;
 124      _e = err;
 125    } finally {
 126      try {
 127        if (!_n && _i["return"] != null) _i["return"]();
 128      } finally {
 129        if (_d) throw _e;
 130      }
 131    }
 132  
 133    return _arr;
 134  }
 135  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 136  var unsupportedIterableToArray = __webpack_require__(30);
 137  
 138  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 139  var nonIterableRest = __webpack_require__(39);
 140  
 141  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 142  
 143  
 144  
 145  
 146  function _slicedToArray(arr, i) {
 147    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 148  }
 149  
 150  /***/ }),
 151  
 152  /***/ 13:
 153  /***/ (function(module, exports) {
 154  
 155  (function() { module.exports = this["React"]; }());
 156  
 157  /***/ }),
 158  
 159  /***/ 152:
 160  /***/ (function(module, exports, __webpack_require__) {
 161  
 162  var e=__webpack_require__(13),n={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},t=function(t){var r=t.onResize,u=e.useRef();return function(n,t){var r=function(){return n.current&&n.current.contentDocument&&n.current.contentDocument.defaultView};function u(){t();var e=r();e&&e.addEventListener("resize",t)}e.useEffect((function(){return r()?u():n.current&&n.current.addEventListener&&n.current.addEventListener("load",u),function(){var e=r();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(u,(function(){return r(u)})),e.createElement("iframe",{style:n,src:"about:blank",ref:u,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},r=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};module.exports=function(n){void 0===n&&(n=r);var u=e.useState(n(null)),o=u[0],i=u[1],c=e.useCallback((function(e){return i(n(e.current))}),[n]);return[e.useMemo((function(){return e.createElement(t,{onResize:c})}),[c]),o]};
 163  
 164  
 165  /***/ }),
 166  
 167  /***/ 153:
 168  /***/ (function(module, exports) {
 169  
 170  (function() { module.exports = this["wp"]["priorityQueue"]; }());
 171  
 172  /***/ }),
 173  
 174  /***/ 154:
 175  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 176  
 177  "use strict";
 178  /* unused harmony export useCallback */
 179  /* unused harmony export useCallbackOne */
 180  /* unused harmony export useMemo */
 181  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMemoOne; });
 182  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
 183  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
 184  
 185  
 186  function areInputsEqual(newInputs, lastInputs) {
 187    if (newInputs.length !== lastInputs.length) {
 188      return false;
 189    }
 190  
 191    for (var i = 0; i < newInputs.length; i++) {
 192      if (newInputs[i] !== lastInputs[i]) {
 193        return false;
 194      }
 195    }
 196  
 197    return true;
 198  }
 199  
 200  function useMemoOne(getResult, inputs) {
 201    var initial = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(function () {
 202      return {
 203        inputs: inputs,
 204        result: getResult()
 205      };
 206    })[0];
 207    var committed = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(initial);
 208    var isInputMatch = Boolean(inputs && committed.current.inputs && areInputsEqual(inputs, committed.current.inputs));
 209    var cache = isInputMatch ? committed.current : {
 210      inputs: inputs,
 211      result: getResult()
 212    };
 213    Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
 214      committed.current = cache;
 215    }, [cache]);
 216    return cache.result;
 217  }
 218  function useCallbackOne(callback, inputs) {
 219    return useMemoOne(function () {
 220      return callback;
 221    }, inputs);
 222  }
 223  var useMemo = useMemoOne;
 224  var useCallback = useCallbackOne;
 225  
 226  
 227  
 228  
 229  /***/ }),
 230  
 231  /***/ 16:
 232  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 233  
 234  "use strict";
 235  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 236  function _assertThisInitialized(self) {
 237    if (self === void 0) {
 238      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 239    }
 240  
 241    return self;
 242  }
 243  
 244  /***/ }),
 245  
 246  /***/ 17:
 247  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 248  
 249  "use strict";
 250  
 251  // EXPORTS
 252  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 253  
 254  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 255  var arrayLikeToArray = __webpack_require__(27);
 256  
 257  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 258  
 259  function _arrayWithoutHoles(arr) {
 260    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 261  }
 262  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 263  var iterableToArray = __webpack_require__(37);
 264  
 265  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 266  var unsupportedIterableToArray = __webpack_require__(30);
 267  
 268  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 269  function _nonIterableSpread() {
 270    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 271  }
 272  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 273  
 274  
 275  
 276  
 277  function _toConsumableArray(arr) {
 278    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 279  }
 280  
 281  /***/ }),
 282  
 283  /***/ 19:
 284  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 285  
 286  "use strict";
 287  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 288  function _getPrototypeOf(o) {
 289    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 290      return o.__proto__ || Object.getPrototypeOf(o);
 291    };
 292    return _getPrototypeOf(o);
 293  }
 294  
 295  /***/ }),
 296  
 297  /***/ 2:
 298  /***/ (function(module, exports) {
 299  
 300  (function() { module.exports = this["lodash"]; }());
 301  
 302  /***/ }),
 303  
 304  /***/ 21:
 305  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 306  
 307  "use strict";
 308  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 309  function _classCallCheck(instance, Constructor) {
 310    if (!(instance instanceof Constructor)) {
 311      throw new TypeError("Cannot call a class as a function");
 312    }
 313  }
 314  
 315  /***/ }),
 316  
 317  /***/ 22:
 318  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 319  
 320  "use strict";
 321  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 322  function _defineProperties(target, props) {
 323    for (var i = 0; i < props.length; i++) {
 324      var descriptor = props[i];
 325      descriptor.enumerable = descriptor.enumerable || false;
 326      descriptor.configurable = true;
 327      if ("value" in descriptor) descriptor.writable = true;
 328      Object.defineProperty(target, descriptor.key, descriptor);
 329    }
 330  }
 331  
 332  function _createClass(Constructor, protoProps, staticProps) {
 333    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 334    if (staticProps) _defineProperties(Constructor, staticProps);
 335    return Constructor;
 336  }
 337  
 338  /***/ }),
 339  
 340  /***/ 23:
 341  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 342  
 343  "use strict";
 344  
 345  // EXPORTS
 346  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 347  
 348  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 349  function _setPrototypeOf(o, p) {
 350    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 351      o.__proto__ = p;
 352      return o;
 353    };
 354  
 355    return _setPrototypeOf(o, p);
 356  }
 357  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 358  
 359  function _inherits(subClass, superClass) {
 360    if (typeof superClass !== "function" && superClass !== null) {
 361      throw new TypeError("Super expression must either be null or a function");
 362    }
 363  
 364    subClass.prototype = Object.create(superClass && superClass.prototype, {
 365      constructor: {
 366        value: subClass,
 367        writable: true,
 368        configurable: true
 369      }
 370    });
 371    if (superClass) _setPrototypeOf(subClass, superClass);
 372  }
 373  
 374  /***/ }),
 375  
 376  /***/ 24:
 377  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 378  
 379  "use strict";
 380  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 381  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
 382  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
 383  
 384  
 385  function _possibleConstructorReturn(self, call) {
 386    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 387      return call;
 388    }
 389  
 390    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 391  }
 392  
 393  /***/ }),
 394  
 395  /***/ 27:
 396  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 397  
 398  "use strict";
 399  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 400  function _arrayLikeToArray(arr, len) {
 401    if (len == null || len > arr.length) len = arr.length;
 402  
 403    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 404      arr2[i] = arr[i];
 405    }
 406  
 407    return arr2;
 408  }
 409  
 410  /***/ }),
 411  
 412  /***/ 287:
 413  /***/ (function(module, exports, __webpack_require__) {
 414  
 415  /*!
 416   * clipboard.js v2.0.6
 417   * https://clipboardjs.com/
 418   * 
 419   * Licensed MIT © Zeno Rocha
 420   */
 421  (function webpackUniversalModuleDefinition(root, factory) {
 422      if(true)
 423          module.exports = factory();
 424      else {}
 425  })(this, function() {
 426  return /******/ (function(modules) { // webpackBootstrap
 427  /******/     // The module cache
 428  /******/     var installedModules = {};
 429  /******/
 430  /******/     // The require function
 431  /******/ 	function __webpack_require__(moduleId) {
 432  /******/
 433  /******/         // Check if module is in cache
 434  /******/         if(installedModules[moduleId]) {
 435  /******/             return installedModules[moduleId].exports;
 436  /******/         }
 437  /******/         // Create a new module (and put it into the cache)
 438  /******/         var module = installedModules[moduleId] = {
 439  /******/             i: moduleId,
 440  /******/             l: false,
 441  /******/             exports: {}
 442  /******/         };
 443  /******/
 444  /******/         // Execute the module function
 445  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
 446  /******/
 447  /******/         // Flag the module as loaded
 448  /******/         module.l = true;
 449  /******/
 450  /******/         // Return the exports of the module
 451  /******/         return module.exports;
 452  /******/     }
 453  /******/
 454  /******/
 455  /******/     // expose the modules object (__webpack_modules__)
 456  /******/     __webpack_require__.m = modules;
 457  /******/
 458  /******/     // expose the module cache
 459  /******/     __webpack_require__.c = installedModules;
 460  /******/
 461  /******/     // define getter function for harmony exports
 462  /******/     __webpack_require__.d = function(exports, name, getter) {
 463  /******/         if(!__webpack_require__.o(exports, name)) {
 464  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
 465  /******/         }
 466  /******/     };
 467  /******/
 468  /******/     // define __esModule on exports
 469  /******/     __webpack_require__.r = function(exports) {
 470  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
 471  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
 472  /******/         }
 473  /******/         Object.defineProperty(exports, '__esModule', { value: true });
 474  /******/     };
 475  /******/
 476  /******/     // create a fake namespace object
 477  /******/     // mode & 1: value is a module id, require it
 478  /******/     // mode & 2: merge all properties of value into the ns
 479  /******/     // mode & 4: return value when already ns object
 480  /******/     // mode & 8|1: behave like require
 481  /******/     __webpack_require__.t = function(value, mode) {
 482  /******/         if(mode & 1) value = __webpack_require__(value);
 483  /******/         if(mode & 8) return value;
 484  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
 485  /******/         var ns = Object.create(null);
 486  /******/         __webpack_require__.r(ns);
 487  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
 488  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
 489  /******/         return ns;
 490  /******/     };
 491  /******/
 492  /******/     // getDefaultExport function for compatibility with non-harmony modules
 493  /******/     __webpack_require__.n = function(module) {
 494  /******/         var getter = module && module.__esModule ?
 495  /******/ 			function getDefault() { return module['default']; } :
 496  /******/ 			function getModuleExports() { return module; };
 497  /******/         __webpack_require__.d(getter, 'a', getter);
 498  /******/         return getter;
 499  /******/     };
 500  /******/
 501  /******/     // Object.prototype.hasOwnProperty.call
 502  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
 503  /******/
 504  /******/     // __webpack_public_path__
 505  /******/     __webpack_require__.p = "";
 506  /******/
 507  /******/
 508  /******/     // Load entry module and return exports
 509  /******/     return __webpack_require__(__webpack_require__.s = 6);
 510  /******/ })
 511  /************************************************************************/
 512  /******/ ([
 513  /* 0 */
 514  /***/ (function(module, exports) {
 515  
 516  function select(element) {
 517      var selectedText;
 518  
 519      if (element.nodeName === 'SELECT') {
 520          element.focus();
 521  
 522          selectedText = element.value;
 523      }
 524      else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
 525          var isReadOnly = element.hasAttribute('readonly');
 526  
 527          if (!isReadOnly) {
 528              element.setAttribute('readonly', '');
 529          }
 530  
 531          element.select();
 532          element.setSelectionRange(0, element.value.length);
 533  
 534          if (!isReadOnly) {
 535              element.removeAttribute('readonly');
 536          }
 537  
 538          selectedText = element.value;
 539      }
 540      else {
 541          if (element.hasAttribute('contenteditable')) {
 542              element.focus();
 543          }
 544  
 545          var selection = window.getSelection();
 546          var range = document.createRange();
 547  
 548          range.selectNodeContents(element);
 549          selection.removeAllRanges();
 550          selection.addRange(range);
 551  
 552          selectedText = selection.toString();
 553      }
 554  
 555      return selectedText;
 556  }
 557  
 558  module.exports = select;
 559  
 560  
 561  /***/ }),
 562  /* 1 */
 563  /***/ (function(module, exports) {
 564  
 565  function E () {
 566    // Keep this empty so it's easier to inherit from
 567    // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
 568  }
 569  
 570  E.prototype = {
 571    on: function (name, callback, ctx) {
 572      var e = this.e || (this.e = {});
 573  
 574      (e[name] || (e[name] = [])).push({
 575        fn: callback,
 576        ctx: ctx
 577      });
 578  
 579      return this;
 580    },
 581  
 582    once: function (name, callback, ctx) {
 583      var self = this;
 584      function listener () {
 585        self.off(name, listener);
 586        callback.apply(ctx, arguments);
 587      };
 588  
 589      listener._ = callback
 590      return this.on(name, listener, ctx);
 591    },
 592  
 593    emit: function (name) {
 594      var data = [].slice.call(arguments, 1);
 595      var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
 596      var i = 0;
 597      var len = evtArr.length;
 598  
 599      for (i; i < len; i++) {
 600        evtArr[i].fn.apply(evtArr[i].ctx, data);
 601      }
 602  
 603      return this;
 604    },
 605  
 606    off: function (name, callback) {
 607      var e = this.e || (this.e = {});
 608      var evts = e[name];
 609      var liveEvents = [];
 610  
 611      if (evts && callback) {
 612        for (var i = 0, len = evts.length; i < len; i++) {
 613          if (evts[i].fn !== callback && evts[i].fn._ !== callback)
 614            liveEvents.push(evts[i]);
 615        }
 616      }
 617  
 618      // Remove event from queue to prevent memory leak
 619      // Suggested by https://github.com/lazd
 620      // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
 621  
 622      (liveEvents.length)
 623        ? e[name] = liveEvents
 624        : delete e[name];
 625  
 626      return this;
 627    }
 628  };
 629  
 630  module.exports = E;
 631  module.exports.TinyEmitter = E;
 632  
 633  
 634  /***/ }),
 635  /* 2 */
 636  /***/ (function(module, exports, __webpack_require__) {
 637  
 638  var is = __webpack_require__(3);
 639  var delegate = __webpack_require__(4);
 640  
 641  /**
 642   * Validates all params and calls the right
 643   * listener function based on its target type.
 644   *
 645   * @param {String|HTMLElement|HTMLCollection|NodeList} target
 646   * @param {String} type
 647   * @param {Function} callback
 648   * @return {Object}
 649   */
 650  function listen(target, type, callback) {
 651      if (!target && !type && !callback) {
 652          throw new Error('Missing required arguments');
 653      }
 654  
 655      if (!is.string(type)) {
 656          throw new TypeError('Second argument must be a String');
 657      }
 658  
 659      if (!is.fn(callback)) {
 660          throw new TypeError('Third argument must be a Function');
 661      }
 662  
 663      if (is.node(target)) {
 664          return listenNode(target, type, callback);
 665      }
 666      else if (is.nodeList(target)) {
 667          return listenNodeList(target, type, callback);
 668      }
 669      else if (is.string(target)) {
 670          return listenSelector(target, type, callback);
 671      }
 672      else {
 673          throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
 674      }
 675  }
 676  
 677  /**
 678   * Adds an event listener to a HTML element
 679   * and returns a remove listener function.
 680   *
 681   * @param {HTMLElement} node
 682   * @param {String} type
 683   * @param {Function} callback
 684   * @return {Object}
 685   */
 686  function listenNode(node, type, callback) {
 687      node.addEventListener(type, callback);
 688  
 689      return {
 690          destroy: function() {
 691              node.removeEventListener(type, callback);
 692          }
 693      }
 694  }
 695  
 696  /**
 697   * Add an event listener to a list of HTML elements
 698   * and returns a remove listener function.
 699   *
 700   * @param {NodeList|HTMLCollection} nodeList
 701   * @param {String} type
 702   * @param {Function} callback
 703   * @return {Object}
 704   */
 705  function listenNodeList(nodeList, type, callback) {
 706      Array.prototype.forEach.call(nodeList, function(node) {
 707          node.addEventListener(type, callback);
 708      });
 709  
 710      return {
 711          destroy: function() {
 712              Array.prototype.forEach.call(nodeList, function(node) {
 713                  node.removeEventListener(type, callback);
 714              });
 715          }
 716      }
 717  }
 718  
 719  /**
 720   * Add an event listener to a selector
 721   * and returns a remove listener function.
 722   *
 723   * @param {String} selector
 724   * @param {String} type
 725   * @param {Function} callback
 726   * @return {Object}
 727   */
 728  function listenSelector(selector, type, callback) {
 729      return delegate(document.body, selector, type, callback);
 730  }
 731  
 732  module.exports = listen;
 733  
 734  
 735  /***/ }),
 736  /* 3 */
 737  /***/ (function(module, exports) {
 738  
 739  /**
 740   * Check if argument is a HTML element.
 741   *
 742   * @param {Object} value
 743   * @return {Boolean}
 744   */
 745  exports.node = function(value) {
 746      return value !== undefined
 747          && value instanceof HTMLElement
 748          && value.nodeType === 1;
 749  };
 750  
 751  /**
 752   * Check if argument is a list of HTML elements.
 753   *
 754   * @param {Object} value
 755   * @return {Boolean}
 756   */
 757  exports.nodeList = function(value) {
 758      var type = Object.prototype.toString.call(value);
 759  
 760      return value !== undefined
 761          && (type === '[object NodeList]' || type === '[object HTMLCollection]')
 762          && ('length' in value)
 763          && (value.length === 0 || exports.node(value[0]));
 764  };
 765  
 766  /**
 767   * Check if argument is a string.
 768   *
 769   * @param {Object} value
 770   * @return {Boolean}
 771   */
 772  exports.string = function(value) {
 773      return typeof value === 'string'
 774          || value instanceof String;
 775  };
 776  
 777  /**
 778   * Check if argument is a function.
 779   *
 780   * @param {Object} value
 781   * @return {Boolean}
 782   */
 783  exports.fn = function(value) {
 784      var type = Object.prototype.toString.call(value);
 785  
 786      return type === '[object Function]';
 787  };
 788  
 789  
 790  /***/ }),
 791  /* 4 */
 792  /***/ (function(module, exports, __webpack_require__) {
 793  
 794  var closest = __webpack_require__(5);
 795  
 796  /**
 797   * Delegates event to a selector.
 798   *
 799   * @param {Element} element
 800   * @param {String} selector
 801   * @param {String} type
 802   * @param {Function} callback
 803   * @param {Boolean} useCapture
 804   * @return {Object}
 805   */
 806  function _delegate(element, selector, type, callback, useCapture) {
 807      var listenerFn = listener.apply(this, arguments);
 808  
 809      element.addEventListener(type, listenerFn, useCapture);
 810  
 811      return {
 812          destroy: function() {
 813              element.removeEventListener(type, listenerFn, useCapture);
 814          }
 815      }
 816  }
 817  
 818  /**
 819   * Delegates event to a selector.
 820   *
 821   * @param {Element|String|Array} [elements]
 822   * @param {String} selector
 823   * @param {String} type
 824   * @param {Function} callback
 825   * @param {Boolean} useCapture
 826   * @return {Object}
 827   */
 828  function delegate(elements, selector, type, callback, useCapture) {
 829      // Handle the regular Element usage
 830      if (typeof elements.addEventListener === 'function') {
 831          return _delegate.apply(null, arguments);
 832      }
 833  
 834      // Handle Element-less usage, it defaults to global delegation
 835      if (typeof type === 'function') {
 836          // Use `document` as the first parameter, then apply arguments
 837          // This is a short way to .unshift `arguments` without running into deoptimizations
 838          return _delegate.bind(null, document).apply(null, arguments);
 839      }
 840  
 841      // Handle Selector-based usage
 842      if (typeof elements === 'string') {
 843          elements = document.querySelectorAll(elements);
 844      }
 845  
 846      // Handle Array-like based usage
 847      return Array.prototype.map.call(elements, function (element) {
 848          return _delegate(element, selector, type, callback, useCapture);
 849      });
 850  }
 851  
 852  /**
 853   * Finds closest match and invokes callback.
 854   *
 855   * @param {Element} element
 856   * @param {String} selector
 857   * @param {String} type
 858   * @param {Function} callback
 859   * @return {Function}
 860   */
 861  function listener(element, selector, type, callback) {
 862      return function(e) {
 863          e.delegateTarget = closest(e.target, selector);
 864  
 865          if (e.delegateTarget) {
 866              callback.call(element, e);
 867          }
 868      }
 869  }
 870  
 871  module.exports = delegate;
 872  
 873  
 874  /***/ }),
 875  /* 5 */
 876  /***/ (function(module, exports) {
 877  
 878  var DOCUMENT_NODE_TYPE = 9;
 879  
 880  /**
 881   * A polyfill for Element.matches()
 882   */
 883  if (typeof Element !== 'undefined' && !Element.prototype.matches) {
 884      var proto = Element.prototype;
 885  
 886      proto.matches = proto.matchesSelector ||
 887                      proto.mozMatchesSelector ||
 888                      proto.msMatchesSelector ||
 889                      proto.oMatchesSelector ||
 890                      proto.webkitMatchesSelector;
 891  }
 892  
 893  /**
 894   * Finds the closest parent that matches a selector.
 895   *
 896   * @param {Element} element
 897   * @param {String} selector
 898   * @return {Function}
 899   */
 900  function closest (element, selector) {
 901      while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
 902          if (typeof element.matches === 'function' &&
 903              element.matches(selector)) {
 904            return element;
 905          }
 906          element = element.parentNode;
 907      }
 908  }
 909  
 910  module.exports = closest;
 911  
 912  
 913  /***/ }),
 914  /* 6 */
 915  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 916  
 917  "use strict";
 918  __webpack_require__.r(__webpack_exports__);
 919  
 920  // EXTERNAL MODULE: ./node_modules/select/src/select.js
 921  var src_select = __webpack_require__(0);
 922  var select_default = /*#__PURE__*/__webpack_require__.n(src_select);
 923  
 924  // CONCATENATED MODULE: ./src/clipboard-action.js
 925  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 926  
 927  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; }; }();
 928  
 929  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 930  
 931  
 932  
 933  /**
 934   * Inner class which performs selection from either `text` or `target`
 935   * properties and then executes copy or cut operations.
 936   */
 937  
 938  var clipboard_action_ClipboardAction = function () {
 939      /**
 940       * @param {Object} options
 941       */
 942      function ClipboardAction(options) {
 943          _classCallCheck(this, ClipboardAction);
 944  
 945          this.resolveOptions(options);
 946          this.initSelection();
 947      }
 948  
 949      /**
 950       * Defines base properties passed from constructor.
 951       * @param {Object} options
 952       */
 953  
 954  
 955      _createClass(ClipboardAction, [{
 956          key: 'resolveOptions',
 957          value: function resolveOptions() {
 958              var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 959  
 960              this.action = options.action;
 961              this.container = options.container;
 962              this.emitter = options.emitter;
 963              this.target = options.target;
 964              this.text = options.text;
 965              this.trigger = options.trigger;
 966  
 967              this.selectedText = '';
 968          }
 969  
 970          /**
 971           * Decides which selection strategy is going to be applied based
 972           * on the existence of `text` and `target` properties.
 973           */
 974  
 975      }, {
 976          key: 'initSelection',
 977          value: function initSelection() {
 978              if (this.text) {
 979                  this.selectFake();
 980              } else if (this.target) {
 981                  this.selectTarget();
 982              }
 983          }
 984  
 985          /**
 986           * Creates a fake textarea element, sets its value from `text` property,
 987           * and makes a selection on it.
 988           */
 989  
 990      }, {
 991          key: 'selectFake',
 992          value: function selectFake() {
 993              var _this = this;
 994  
 995              var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
 996  
 997              this.removeFake();
 998  
 999              this.fakeHandlerCallback = function () {
1000                  return _this.removeFake();
1001              };
1002              this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;
1003  
1004              this.fakeElem = document.createElement('textarea');
1005              // Prevent zooming on iOS
1006              this.fakeElem.style.fontSize = '12pt';
1007              // Reset box model
1008              this.fakeElem.style.border = '0';
1009              this.fakeElem.style.padding = '0';
1010              this.fakeElem.style.margin = '0';
1011              // Move element out of screen horizontally
1012              this.fakeElem.style.position = 'absolute';
1013              this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';
1014              // Move element to the same position vertically
1015              var yPosition = window.pageYOffset || document.documentElement.scrollTop;
1016              this.fakeElem.style.top = yPosition + 'px';
1017  
1018              this.fakeElem.setAttribute('readonly', '');
1019              this.fakeElem.value = this.text;
1020  
1021              this.container.appendChild(this.fakeElem);
1022  
1023              this.selectedText = select_default()(this.fakeElem);
1024              this.copyText();
1025          }
1026  
1027          /**
1028           * Only removes the fake element after another click event, that way
1029           * a user can hit `Ctrl+C` to copy because selection still exists.
1030           */
1031  
1032      }, {
1033          key: 'removeFake',
1034          value: function removeFake() {
1035              if (this.fakeHandler) {
1036                  this.container.removeEventListener('click', this.fakeHandlerCallback);
1037                  this.fakeHandler = null;
1038                  this.fakeHandlerCallback = null;
1039              }
1040  
1041              if (this.fakeElem) {
1042                  this.container.removeChild(this.fakeElem);
1043                  this.fakeElem = null;
1044              }
1045          }
1046  
1047          /**
1048           * Selects the content from element passed on `target` property.
1049           */
1050  
1051      }, {
1052          key: 'selectTarget',
1053          value: function selectTarget() {
1054              this.selectedText = select_default()(this.target);
1055              this.copyText();
1056          }
1057  
1058          /**
1059           * Executes the copy operation based on the current selection.
1060           */
1061  
1062      }, {
1063          key: 'copyText',
1064          value: function copyText() {
1065              var succeeded = void 0;
1066  
1067              try {
1068                  succeeded = document.execCommand(this.action);
1069              } catch (err) {
1070                  succeeded = false;
1071              }
1072  
1073              this.handleResult(succeeded);
1074          }
1075  
1076          /**
1077           * Fires an event based on the copy operation result.
1078           * @param {Boolean} succeeded
1079           */
1080  
1081      }, {
1082          key: 'handleResult',
1083          value: function handleResult(succeeded) {
1084              this.emitter.emit(succeeded ? 'success' : 'error', {
1085                  action: this.action,
1086                  text: this.selectedText,
1087                  trigger: this.trigger,
1088                  clearSelection: this.clearSelection.bind(this)
1089              });
1090          }
1091  
1092          /**
1093           * Moves focus away from `target` and back to the trigger, removes current selection.
1094           */
1095  
1096      }, {
1097          key: 'clearSelection',
1098          value: function clearSelection() {
1099              if (this.trigger) {
1100                  this.trigger.focus();
1101              }
1102              document.activeElement.blur();
1103              window.getSelection().removeAllRanges();
1104          }
1105  
1106          /**
1107           * Sets the `action` to be performed which can be either 'copy' or 'cut'.
1108           * @param {String} action
1109           */
1110  
1111      }, {
1112          key: 'destroy',
1113  
1114  
1115          /**
1116           * Destroy lifecycle.
1117           */
1118          value: function destroy() {
1119              this.removeFake();
1120          }
1121      }, {
1122          key: 'action',
1123          set: function set() {
1124              var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';
1125  
1126              this._action = action;
1127  
1128              if (this._action !== 'copy' && this._action !== 'cut') {
1129                  throw new Error('Invalid "action" value, use either "copy" or "cut"');
1130              }
1131          }
1132  
1133          /**
1134           * Gets the `action` property.
1135           * @return {String}
1136           */
1137          ,
1138          get: function get() {
1139              return this._action;
1140          }
1141  
1142          /**
1143           * Sets the `target` property using an element
1144           * that will be have its content copied.
1145           * @param {Element} target
1146           */
1147  
1148      }, {
1149          key: 'target',
1150          set: function set(target) {
1151              if (target !== undefined) {
1152                  if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
1153                      if (this.action === 'copy' && target.hasAttribute('disabled')) {
1154                          throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
1155                      }
1156  
1157                      if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {
1158                          throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
1159                      }
1160  
1161                      this._target = target;
1162                  } else {
1163                      throw new Error('Invalid "target" value, use a valid Element');
1164                  }
1165              }
1166          }
1167  
1168          /**
1169           * Gets the `target` property.
1170           * @return {String|HTMLElement}
1171           */
1172          ,
1173          get: function get() {
1174              return this._target;
1175          }
1176      }]);
1177  
1178      return ClipboardAction;
1179  }();
1180  
1181  /* harmony default export */ var clipboard_action = (clipboard_action_ClipboardAction);
1182  // EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js
1183  var tiny_emitter = __webpack_require__(1);
1184  var tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);
1185  
1186  // EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js
1187  var listen = __webpack_require__(2);
1188  var listen_default = /*#__PURE__*/__webpack_require__.n(listen);
1189  
1190  // CONCATENATED MODULE: ./src/clipboard.js
1191  var clipboard_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1192  
1193  var clipboard_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; }; }();
1194  
1195  function clipboard_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1196  
1197  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; }
1198  
1199  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; }
1200  
1201  
1202  
1203  
1204  
1205  /**
1206   * Base class which takes one or more elements, adds event listeners to them,
1207   * and instantiates a new `ClipboardAction` on each click.
1208   */
1209  
1210  var clipboard_Clipboard = function (_Emitter) {
1211      _inherits(Clipboard, _Emitter);
1212  
1213      /**
1214       * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
1215       * @param {Object} options
1216       */
1217      function Clipboard(trigger, options) {
1218          clipboard_classCallCheck(this, Clipboard);
1219  
1220          var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));
1221  
1222          _this.resolveOptions(options);
1223          _this.listenClick(trigger);
1224          return _this;
1225      }
1226  
1227      /**
1228       * Defines if attributes would be resolved using internal setter functions
1229       * or custom functions that were passed in the constructor.
1230       * @param {Object} options
1231       */
1232  
1233  
1234      clipboard_createClass(Clipboard, [{
1235          key: 'resolveOptions',
1236          value: function resolveOptions() {
1237              var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1238  
1239              this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
1240              this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
1241              this.text = typeof options.text === 'function' ? options.text : this.defaultText;
1242              this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;
1243          }
1244  
1245          /**
1246           * Adds a click event listener to the passed trigger.
1247           * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
1248           */
1249  
1250      }, {
1251          key: 'listenClick',
1252          value: function listenClick(trigger) {
1253              var _this2 = this;
1254  
1255              this.listener = listen_default()(trigger, 'click', function (e) {
1256                  return _this2.onClick(e);
1257              });
1258          }
1259  
1260          /**
1261           * Defines a new `ClipboardAction` on each click event.
1262           * @param {Event} e
1263           */
1264  
1265      }, {
1266          key: 'onClick',
1267          value: function onClick(e) {
1268              var trigger = e.delegateTarget || e.currentTarget;
1269  
1270              if (this.clipboardAction) {
1271                  this.clipboardAction = null;
1272              }
1273  
1274              this.clipboardAction = new clipboard_action({
1275                  action: this.action(trigger),
1276                  target: this.target(trigger),
1277                  text: this.text(trigger),
1278                  container: this.container,
1279                  trigger: trigger,
1280                  emitter: this
1281              });
1282          }
1283  
1284          /**
1285           * Default `action` lookup function.
1286           * @param {Element} trigger
1287           */
1288  
1289      }, {
1290          key: 'defaultAction',
1291          value: function defaultAction(trigger) {
1292              return getAttributeValue('action', trigger);
1293          }
1294  
1295          /**
1296           * Default `target` lookup function.
1297           * @param {Element} trigger
1298           */
1299  
1300      }, {
1301          key: 'defaultTarget',
1302          value: function defaultTarget(trigger) {
1303              var selector = getAttributeValue('target', trigger);
1304  
1305              if (selector) {
1306                  return document.querySelector(selector);
1307              }
1308          }
1309  
1310          /**
1311           * Returns the support of the given action, or all actions if no action is
1312           * given.
1313           * @param {String} [action]
1314           */
1315  
1316      }, {
1317          key: 'defaultText',
1318  
1319  
1320          /**
1321           * Default `text` lookup function.
1322           * @param {Element} trigger
1323           */
1324          value: function defaultText(trigger) {
1325              return getAttributeValue('text', trigger);
1326          }
1327  
1328          /**
1329           * Destroy lifecycle.
1330           */
1331  
1332      }, {
1333          key: 'destroy',
1334          value: function destroy() {
1335              this.listener.destroy();
1336  
1337              if (this.clipboardAction) {
1338                  this.clipboardAction.destroy();
1339                  this.clipboardAction = null;
1340              }
1341          }
1342      }], [{
1343          key: 'isSupported',
1344          value: function isSupported() {
1345              var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];
1346  
1347              var actions = typeof action === 'string' ? [action] : action;
1348              var support = !!document.queryCommandSupported;
1349  
1350              actions.forEach(function (action) {
1351                  support = support && !!document.queryCommandSupported(action);
1352              });
1353  
1354              return support;
1355          }
1356      }]);
1357  
1358      return Clipboard;
1359  }(tiny_emitter_default.a);
1360  
1361  /**
1362   * Helper function to retrieve attribute value.
1363   * @param {String} suffix
1364   * @param {Element} element
1365   */
1366  
1367  
1368  function getAttributeValue(suffix, element) {
1369      var attribute = 'data-clipboard-' + suffix;
1370  
1371      if (!element.hasAttribute(attribute)) {
1372          return;
1373      }
1374  
1375      return element.getAttribute(attribute);
1376  }
1377  
1378  /* harmony default export */ var clipboard = __webpack_exports__["default"] = (clipboard_Clipboard);
1379  
1380  /***/ })
1381  /******/ ])["default"];
1382  });
1383  
1384  /***/ }),
1385  
1386  /***/ 288:
1387  /***/ (function(module, exports, __webpack_require__) {
1388  
1389  var __WEBPACK_AMD_DEFINE_RESULT__;/*global define:false */
1390  /**
1391   * Copyright 2012-2017 Craig Campbell
1392   *
1393   * Licensed under the Apache License, Version 2.0 (the "License");
1394   * you may not use this file except in compliance with the License.
1395   * You may obtain a copy of the License at
1396   *
1397   * http://www.apache.org/licenses/LICENSE-2.0
1398   *
1399   * Unless required by applicable law or agreed to in writing, software
1400   * distributed under the License is distributed on an "AS IS" BASIS,
1401   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1402   * See the License for the specific language governing permissions and
1403   * limitations under the License.
1404   *
1405   * Mousetrap is a simple keyboard shortcut library for Javascript with
1406   * no external dependencies
1407   *
1408   * @version 1.6.5
1409   * @url craig.is/killing/mice
1410   */
1411  (function(window, document, undefined) {
1412  
1413      // Check if mousetrap is used inside browser, if not, return
1414      if (!window) {
1415          return;
1416      }
1417  
1418      /**
1419       * mapping of special keycodes to their corresponding keys
1420       *
1421       * everything in this dictionary cannot use keypress events
1422       * so it has to be here to map to the correct keycodes for
1423       * keyup/keydown events
1424       *
1425       * @type {Object}
1426       */
1427      var _MAP = {
1428          8: 'backspace',
1429          9: 'tab',
1430          13: 'enter',
1431          16: 'shift',
1432          17: 'ctrl',
1433          18: 'alt',
1434          20: 'capslock',
1435          27: 'esc',
1436          32: 'space',
1437          33: 'pageup',
1438          34: 'pagedown',
1439          35: 'end',
1440          36: 'home',
1441          37: 'left',
1442          38: 'up',
1443          39: 'right',
1444          40: 'down',
1445          45: 'ins',
1446          46: 'del',
1447          91: 'meta',
1448          93: 'meta',
1449          224: 'meta'
1450      };
1451  
1452      /**
1453       * mapping for special characters so they can support
1454       *
1455       * this dictionary is only used incase you want to bind a
1456       * keyup or keydown event to one of these keys
1457       *
1458       * @type {Object}
1459       */
1460      var _KEYCODE_MAP = {
1461          106: '*',
1462          107: '+',
1463          109: '-',
1464          110: '.',
1465          111 : '/',
1466          186: ';',
1467          187: '=',
1468          188: ',',
1469          189: '-',
1470          190: '.',
1471          191: '/',
1472          192: '`',
1473          219: '[',
1474          220: '\\',
1475          221: ']',
1476          222: '\''
1477      };
1478  
1479      /**
1480       * this is a mapping of keys that require shift on a US keypad
1481       * back to the non shift equivelents
1482       *
1483       * this is so you can use keyup events with these keys
1484       *
1485       * note that this will only work reliably on US keyboards
1486       *
1487       * @type {Object}
1488       */
1489      var _SHIFT_MAP = {
1490          '~': '`',
1491          '!': '1',
1492          '@': '2',
1493          '#': '3',
1494          '$': '4',
1495          '%': '5',
1496          '^': '6',
1497          '&': '7',
1498          '*': '8',
1499          '(': '9',
1500          ')': '0',
1501          '_': '-',
1502          '+': '=',
1503          ':': ';',
1504          '\"': '\'',
1505          '<': ',',
1506          '>': '.',
1507          '?': '/',
1508          '|': '\\'
1509      };
1510  
1511      /**
1512       * this is a list of special strings you can use to map
1513       * to modifier keys when you specify your keyboard shortcuts
1514       *
1515       * @type {Object}
1516       */
1517      var _SPECIAL_ALIASES = {
1518          'option': 'alt',
1519          'command': 'meta',
1520          'return': 'enter',
1521          'escape': 'esc',
1522          'plus': '+',
1523          'mod': /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'
1524      };
1525  
1526      /**
1527       * variable to store the flipped version of _MAP from above
1528       * needed to check if we should use keypress or not when no action
1529       * is specified
1530       *
1531       * @type {Object|undefined}
1532       */
1533      var _REVERSE_MAP;
1534  
1535      /**
1536       * loop through the f keys, f1 to f19 and add them to the map
1537       * programatically
1538       */
1539      for (var i = 1; i < 20; ++i) {
1540          _MAP[111 + i] = 'f' + i;
1541      }
1542  
1543      /**
1544       * loop through to map numbers on the numeric keypad
1545       */
1546      for (i = 0; i <= 9; ++i) {
1547  
1548          // This needs to use a string cause otherwise since 0 is falsey
1549          // mousetrap will never fire for numpad 0 pressed as part of a keydown
1550          // event.
1551          //
1552          // @see https://github.com/ccampbell/mousetrap/pull/258
1553          _MAP[i + 96] = i.toString();
1554      }
1555  
1556      /**
1557       * cross browser add event method
1558       *
1559       * @param {Element|HTMLDocument} object
1560       * @param {string} type
1561       * @param {Function} callback
1562       * @returns void
1563       */
1564      function _addEvent(object, type, callback) {
1565          if (object.addEventListener) {
1566              object.addEventListener(type, callback, false);
1567              return;
1568          }
1569  
1570          object.attachEvent('on' + type, callback);
1571      }
1572  
1573      /**
1574       * takes the event and returns the key character
1575       *
1576       * @param {Event} e
1577       * @return {string}
1578       */
1579      function _characterFromEvent(e) {
1580  
1581          // for keypress events we should return the character as is
1582          if (e.type == 'keypress') {
1583              var character = String.fromCharCode(e.which);
1584  
1585              // if the shift key is not pressed then it is safe to assume
1586              // that we want the character to be lowercase.  this means if
1587              // you accidentally have caps lock on then your key bindings
1588              // will continue to work
1589              //
1590              // the only side effect that might not be desired is if you
1591              // bind something like 'A' cause you want to trigger an
1592              // event when capital A is pressed caps lock will no longer
1593              // trigger the event.  shift+a will though.
1594              if (!e.shiftKey) {
1595                  character = character.toLowerCase();
1596              }
1597  
1598              return character;
1599          }
1600  
1601          // for non keypress events the special maps are needed
1602          if (_MAP[e.which]) {
1603              return _MAP[e.which];
1604          }
1605  
1606          if (_KEYCODE_MAP[e.which]) {
1607              return _KEYCODE_MAP[e.which];
1608          }
1609  
1610          // if it is not in the special map
1611  
1612          // with keydown and keyup events the character seems to always
1613          // come in as an uppercase character whether you are pressing shift
1614          // or not.  we should make sure it is always lowercase for comparisons
1615          return String.fromCharCode(e.which).toLowerCase();
1616      }
1617  
1618      /**
1619       * checks if two arrays are equal
1620       *
1621       * @param {Array} modifiers1
1622       * @param {Array} modifiers2
1623       * @returns {boolean}
1624       */
1625      function _modifiersMatch(modifiers1, modifiers2) {
1626          return modifiers1.sort().join(',') === modifiers2.sort().join(',');
1627      }
1628  
1629      /**
1630       * takes a key event and figures out what the modifiers are
1631       *
1632       * @param {Event} e
1633       * @returns {Array}
1634       */
1635      function _eventModifiers(e) {
1636          var modifiers = [];
1637  
1638          if (e.shiftKey) {
1639              modifiers.push('shift');
1640          }
1641  
1642          if (e.altKey) {
1643              modifiers.push('alt');
1644          }
1645  
1646          if (e.ctrlKey) {
1647              modifiers.push('ctrl');
1648          }
1649  
1650          if (e.metaKey) {
1651              modifiers.push('meta');
1652          }
1653  
1654          return modifiers;
1655      }
1656  
1657      /**
1658       * prevents default for this event
1659       *
1660       * @param {Event} e
1661       * @returns void
1662       */
1663      function _preventDefault(e) {
1664          if (e.preventDefault) {
1665              e.preventDefault();
1666              return;
1667          }
1668  
1669          e.returnValue = false;
1670      }
1671  
1672      /**
1673       * stops propogation for this event
1674       *
1675       * @param {Event} e
1676       * @returns void
1677       */
1678      function _stopPropagation(e) {
1679          if (e.stopPropagation) {
1680              e.stopPropagation();
1681              return;
1682          }
1683  
1684          e.cancelBubble = true;
1685      }
1686  
1687      /**
1688       * determines if the keycode specified is a modifier key or not
1689       *
1690       * @param {string} key
1691       * @returns {boolean}
1692       */
1693      function _isModifier(key) {
1694          return key == 'shift' || key == 'ctrl' || key == 'alt' || key == 'meta';
1695      }
1696  
1697      /**
1698       * reverses the map lookup so that we can look for specific keys
1699       * to see what can and can't use keypress
1700       *
1701       * @return {Object}
1702       */
1703      function _getReverseMap() {
1704          if (!_REVERSE_MAP) {
1705              _REVERSE_MAP = {};
1706              for (var key in _MAP) {
1707  
1708                  // pull out the numeric keypad from here cause keypress should
1709                  // be able to detect the keys from the character
1710                  if (key > 95 && key < 112) {
1711                      continue;
1712                  }
1713  
1714                  if (_MAP.hasOwnProperty(key)) {
1715                      _REVERSE_MAP[_MAP[key]] = key;
1716                  }
1717              }
1718          }
1719          return _REVERSE_MAP;
1720      }
1721  
1722      /**
1723       * picks the best action based on the key combination
1724       *
1725       * @param {string} key - character for key
1726       * @param {Array} modifiers
1727       * @param {string=} action passed in
1728       */
1729      function _pickBestAction(key, modifiers, action) {
1730  
1731          // if no action was picked in we should try to pick the one
1732          // that we think would work best for this key
1733          if (!action) {
1734              action = _getReverseMap()[key] ? 'keydown' : 'keypress';
1735          }
1736  
1737          // modifier keys don't work as expected with keypress,
1738          // switch to keydown
1739          if (action == 'keypress' && modifiers.length) {
1740              action = 'keydown';
1741          }
1742  
1743          return action;
1744      }
1745  
1746      /**
1747       * Converts from a string key combination to an array
1748       *
1749       * @param  {string} combination like "command+shift+l"
1750       * @return {Array}
1751       */
1752      function _keysFromString(combination) {
1753          if (combination === '+') {
1754              return ['+'];
1755          }
1756  
1757          combination = combination.replace(/\+{2}/g, '+plus');
1758          return combination.split('+');
1759      }
1760  
1761      /**
1762       * Gets info for a specific key combination
1763       *
1764       * @param  {string} combination key combination ("command+s" or "a" or "*")
1765       * @param  {string=} action
1766       * @returns {Object}
1767       */
1768      function _getKeyInfo(combination, action) {
1769          var keys;
1770          var key;
1771          var i;
1772          var modifiers = [];
1773  
1774          // take the keys from this pattern and figure out what the actual
1775          // pattern is all about
1776          keys = _keysFromString(combination);
1777  
1778          for (i = 0; i < keys.length; ++i) {
1779              key = keys[i];
1780  
1781              // normalize key names
1782              if (_SPECIAL_ALIASES[key]) {
1783                  key = _SPECIAL_ALIASES[key];
1784              }
1785  
1786              // if this is not a keypress event then we should
1787              // be smart about using shift keys
1788              // this will only work for US keyboards however
1789              if (action && action != 'keypress' && _SHIFT_MAP[key]) {
1790                  key = _SHIFT_MAP[key];
1791                  modifiers.push('shift');
1792              }
1793  
1794              // if this key is a modifier then add it to the list of modifiers
1795              if (_isModifier(key)) {
1796                  modifiers.push(key);
1797              }
1798          }
1799  
1800          // depending on what the key combination is
1801          // we will try to pick the best event for it
1802          action = _pickBestAction(key, modifiers, action);
1803  
1804          return {
1805              key: key,
1806              modifiers: modifiers,
1807              action: action
1808          };
1809      }
1810  
1811      function _belongsTo(element, ancestor) {
1812          if (element === null || element === document) {
1813              return false;
1814          }
1815  
1816          if (element === ancestor) {
1817              return true;
1818          }
1819  
1820          return _belongsTo(element.parentNode, ancestor);
1821      }
1822  
1823      function Mousetrap(targetElement) {
1824          var self = this;
1825  
1826          targetElement = targetElement || document;
1827  
1828          if (!(self instanceof Mousetrap)) {
1829              return new Mousetrap(targetElement);
1830          }
1831  
1832          /**
1833           * element to attach key events to
1834           *
1835           * @type {Element}
1836           */
1837          self.target = targetElement;
1838  
1839          /**
1840           * a list of all the callbacks setup via Mousetrap.bind()
1841           *
1842           * @type {Object}
1843           */
1844          self._callbacks = {};
1845  
1846          /**
1847           * direct map of string combinations to callbacks used for trigger()
1848           *
1849           * @type {Object}
1850           */
1851          self._directMap = {};
1852  
1853          /**
1854           * keeps track of what level each sequence is at since multiple
1855           * sequences can start out with the same sequence
1856           *
1857           * @type {Object}
1858           */
1859          var _sequenceLevels = {};
1860  
1861          /**
1862           * variable to store the setTimeout call
1863           *
1864           * @type {null|number}
1865           */
1866          var _resetTimer;
1867  
1868          /**
1869           * temporary state where we will ignore the next keyup
1870           *
1871           * @type {boolean|string}
1872           */
1873          var _ignoreNextKeyup = false;
1874  
1875          /**
1876           * temporary state where we will ignore the next keypress
1877           *
1878           * @type {boolean}
1879           */
1880          var _ignoreNextKeypress = false;
1881  
1882          /**
1883           * are we currently inside of a sequence?
1884           * type of action ("keyup" or "keydown" or "keypress") or false
1885           *
1886           * @type {boolean|string}
1887           */
1888          var _nextExpectedAction = false;
1889  
1890          /**
1891           * resets all sequence counters except for the ones passed in
1892           *
1893           * @param {Object} doNotReset
1894           * @returns void
1895           */
1896          function _resetSequences(doNotReset) {
1897              doNotReset = doNotReset || {};
1898  
1899              var activeSequences = false,
1900                  key;
1901  
1902              for (key in _sequenceLevels) {
1903                  if (doNotReset[key]) {
1904                      activeSequences = true;
1905                      continue;
1906                  }
1907                  _sequenceLevels[key] = 0;
1908              }
1909  
1910              if (!activeSequences) {
1911                  _nextExpectedAction = false;
1912              }
1913          }
1914  
1915          /**
1916           * finds all callbacks that match based on the keycode, modifiers,
1917           * and action
1918           *
1919           * @param {string} character
1920           * @param {Array} modifiers
1921           * @param {Event|Object} e
1922           * @param {string=} sequenceName - name of the sequence we are looking for
1923           * @param {string=} combination
1924           * @param {number=} level
1925           * @returns {Array}
1926           */
1927          function _getMatches(character, modifiers, e, sequenceName, combination, level) {
1928              var i;
1929              var callback;
1930              var matches = [];
1931              var action = e.type;
1932  
1933              // if there are no events related to this keycode
1934              if (!self._callbacks[character]) {
1935                  return [];
1936              }
1937  
1938              // if a modifier key is coming up on its own we should allow it
1939              if (action == 'keyup' && _isModifier(character)) {
1940                  modifiers = [character];
1941              }
1942  
1943              // loop through all callbacks for the key that was pressed
1944              // and see if any of them match
1945              for (i = 0; i < self._callbacks[character].length; ++i) {
1946                  callback = self._callbacks[character][i];
1947  
1948                  // if a sequence name is not specified, but this is a sequence at
1949                  // the wrong level then move onto the next match
1950                  if (!sequenceName && callback.seq && _sequenceLevels[callback.seq] != callback.level) {
1951                      continue;
1952                  }
1953  
1954                  // if the action we are looking for doesn't match the action we got
1955                  // then we should keep going
1956                  if (action != callback.action) {
1957                      continue;
1958                  }
1959  
1960                  // if this is a keypress event and the meta key and control key
1961                  // are not pressed that means that we need to only look at the
1962                  // character, otherwise check the modifiers as well
1963                  //
1964                  // chrome will not fire a keypress if meta or control is down
1965                  // safari will fire a keypress if meta or meta+shift is down
1966                  // firefox will fire a keypress if meta or control is down
1967                  if ((action == 'keypress' && !e.metaKey && !e.ctrlKey) || _modifiersMatch(modifiers, callback.modifiers)) {
1968  
1969                      // when you bind a combination or sequence a second time it
1970                      // should overwrite the first one.  if a sequenceName or
1971                      // combination is specified in this call it does just that
1972                      //
1973                      // @todo make deleting its own method?
1974                      var deleteCombo = !sequenceName && callback.combo == combination;
1975                      var deleteSequence = sequenceName && callback.seq == sequenceName && callback.level == level;
1976                      if (deleteCombo || deleteSequence) {
1977                          self._callbacks[character].splice(i, 1);
1978                      }
1979  
1980                      matches.push(callback);
1981                  }
1982              }
1983  
1984              return matches;
1985          }
1986  
1987          /**
1988           * actually calls the callback function
1989           *
1990           * if your callback function returns false this will use the jquery
1991           * convention - prevent default and stop propogation on the event
1992           *
1993           * @param {Function} callback
1994           * @param {Event} e
1995           * @returns void
1996           */
1997          function _fireCallback(callback, e, combo, sequence) {
1998  
1999              // if this event should not happen stop here
2000              if (self.stopCallback(e, e.target || e.srcElement, combo, sequence)) {
2001                  return;
2002              }
2003  
2004              if (callback(e, combo) === false) {
2005                  _preventDefault(e);
2006                  _stopPropagation(e);
2007              }
2008          }
2009  
2010          /**
2011           * handles a character key event
2012           *
2013           * @param {string} character
2014           * @param {Array} modifiers
2015           * @param {Event} e
2016           * @returns void
2017           */
2018          self._handleKey = function(character, modifiers, e) {
2019              var callbacks = _getMatches(character, modifiers, e);
2020              var i;
2021              var doNotReset = {};
2022              var maxLevel = 0;
2023              var processedSequenceCallback = false;
2024  
2025              // Calculate the maxLevel for sequences so we can only execute the longest callback sequence
2026              for (i = 0; i < callbacks.length; ++i) {
2027                  if (callbacks[i].seq) {
2028                      maxLevel = Math.max(maxLevel, callbacks[i].level);
2029                  }
2030              }
2031  
2032              // loop through matching callbacks for this key event
2033              for (i = 0; i < callbacks.length; ++i) {
2034  
2035                  // fire for all sequence callbacks
2036                  // this is because if for example you have multiple sequences
2037                  // bound such as "g i" and "g t" they both need to fire the
2038                  // callback for matching g cause otherwise you can only ever
2039                  // match the first one
2040                  if (callbacks[i].seq) {
2041  
2042                      // only fire callbacks for the maxLevel to prevent
2043                      // subsequences from also firing
2044                      //
2045                      // for example 'a option b' should not cause 'option b' to fire
2046                      // even though 'option b' is part of the other sequence
2047                      //
2048                      // any sequences that do not match here will be discarded
2049                      // below by the _resetSequences call
2050                      if (callbacks[i].level != maxLevel) {
2051                          continue;
2052                      }
2053  
2054                      processedSequenceCallback = true;
2055  
2056                      // keep a list of which sequences were matches for later
2057                      doNotReset[callbacks[i].seq] = 1;
2058                      _fireCallback(callbacks[i].callback, e, callbacks[i].combo, callbacks[i].seq);
2059                      continue;
2060                  }
2061  
2062                  // if there were no sequence matches but we are still here
2063                  // that means this is a regular match so we should fire that
2064                  if (!processedSequenceCallback) {
2065                      _fireCallback(callbacks[i].callback, e, callbacks[i].combo);
2066                  }
2067              }
2068  
2069              // if the key you pressed matches the type of sequence without
2070              // being a modifier (ie "keyup" or "keypress") then we should
2071              // reset all sequences that were not matched by this event
2072              //
2073              // this is so, for example, if you have the sequence "h a t" and you
2074              // type "h e a r t" it does not match.  in this case the "e" will
2075              // cause the sequence to reset
2076              //
2077              // modifier keys are ignored because you can have a sequence
2078              // that contains modifiers such as "enter ctrl+space" and in most
2079              // cases the modifier key will be pressed before the next key
2080              //
2081              // also if you have a sequence such as "ctrl+b a" then pressing the
2082              // "b" key will trigger a "keypress" and a "keydown"
2083              //
2084              // the "keydown" is expected when there is a modifier, but the
2085              // "keypress" ends up matching the _nextExpectedAction since it occurs
2086              // after and that causes the sequence to reset
2087              //
2088              // we ignore keypresses in a sequence that directly follow a keydown
2089              // for the same character
2090              var ignoreThisKeypress = e.type == 'keypress' && _ignoreNextKeypress;
2091              if (e.type == _nextExpectedAction && !_isModifier(character) && !ignoreThisKeypress) {
2092                  _resetSequences(doNotReset);
2093              }
2094  
2095              _ignoreNextKeypress = processedSequenceCallback && e.type == 'keydown';
2096          };
2097  
2098          /**
2099           * handles a keydown event
2100           *
2101           * @param {Event} e
2102           * @returns void
2103           */
2104          function _handleKeyEvent(e) {
2105  
2106              // normalize e.which for key events
2107              // @see http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion
2108              if (typeof e.which !== 'number') {
2109                  e.which = e.keyCode;
2110              }
2111  
2112              var character = _characterFromEvent(e);
2113  
2114              // no character found then stop
2115              if (!character) {
2116                  return;
2117              }
2118  
2119              // need to use === for the character check because the character can be 0
2120              if (e.type == 'keyup' && _ignoreNextKeyup === character) {
2121                  _ignoreNextKeyup = false;
2122                  return;
2123              }
2124  
2125              self.handleKey(character, _eventModifiers(e), e);
2126          }
2127  
2128          /**
2129           * called to set a 1 second timeout on the specified sequence
2130           *
2131           * this is so after each key press in the sequence you have 1 second
2132           * to press the next key before you have to start over
2133           *
2134           * @returns void
2135           */
2136          function _resetSequenceTimer() {
2137              clearTimeout(_resetTimer);
2138              _resetTimer = setTimeout(_resetSequences, 1000);
2139          }
2140  
2141          /**
2142           * binds a key sequence to an event
2143           *
2144           * @param {string} combo - combo specified in bind call
2145           * @param {Array} keys
2146           * @param {Function} callback
2147           * @param {string=} action
2148           * @returns void
2149           */
2150          function _bindSequence(combo, keys, callback, action) {
2151  
2152              // start off by adding a sequence level record for this combination
2153              // and setting the level to 0
2154              _sequenceLevels[combo] = 0;
2155  
2156              /**
2157               * callback to increase the sequence level for this sequence and reset
2158               * all other sequences that were active
2159               *
2160               * @param {string} nextAction
2161               * @returns {Function}
2162               */
2163              function _increaseSequence(nextAction) {
2164                  return function() {
2165                      _nextExpectedAction = nextAction;
2166                      ++_sequenceLevels[combo];
2167                      _resetSequenceTimer();
2168                  };
2169              }
2170  
2171              /**
2172               * wraps the specified callback inside of another function in order
2173               * to reset all sequence counters as soon as this sequence is done
2174               *
2175               * @param {Event} e
2176               * @returns void
2177               */
2178              function _callbackAndReset(e) {
2179                  _fireCallback(callback, e, combo);
2180  
2181                  // we should ignore the next key up if the action is key down
2182                  // or keypress.  this is so if you finish a sequence and
2183                  // release the key the final key will not trigger a keyup
2184                  if (action !== 'keyup') {
2185                      _ignoreNextKeyup = _characterFromEvent(e);
2186                  }
2187  
2188                  // weird race condition if a sequence ends with the key
2189                  // another sequence begins with
2190                  setTimeout(_resetSequences, 10);
2191              }
2192  
2193              // loop through keys one at a time and bind the appropriate callback
2194              // function.  for any key leading up to the final one it should
2195              // increase the sequence. after the final, it should reset all sequences
2196              //
2197              // if an action is specified in the original bind call then that will
2198              // be used throughout.  otherwise we will pass the action that the
2199              // next key in the sequence should match.  this allows a sequence
2200              // to mix and match keypress and keydown events depending on which
2201              // ones are better suited to the key provided
2202              for (var i = 0; i < keys.length; ++i) {
2203                  var isFinal = i + 1 === keys.length;
2204                  var wrappedCallback = isFinal ? _callbackAndReset : _increaseSequence(action || _getKeyInfo(keys[i + 1]).action);
2205                  _bindSingle(keys[i], wrappedCallback, action, combo, i);
2206              }
2207          }
2208  
2209          /**
2210           * binds a single keyboard combination
2211           *
2212           * @param {string} combination
2213           * @param {Function} callback
2214           * @param {string=} action
2215           * @param {string=} sequenceName - name of sequence if part of sequence
2216           * @param {number=} level - what part of the sequence the command is
2217           * @returns void
2218           */
2219          function _bindSingle(combination, callback, action, sequenceName, level) {
2220  
2221              // store a direct mapped reference for use with Mousetrap.trigger
2222              self._directMap[combination + ':' + action] = callback;
2223  
2224              // make sure multiple spaces in a row become a single space
2225              combination = combination.replace(/\s+/g, ' ');
2226  
2227              var sequence = combination.split(' ');
2228              var info;
2229  
2230              // if this pattern is a sequence of keys then run through this method
2231              // to reprocess each pattern one key at a time
2232              if (sequence.length > 1) {
2233                  _bindSequence(combination, sequence, callback, action);
2234                  return;
2235              }
2236  
2237              info = _getKeyInfo(combination, action);
2238  
2239              // make sure to initialize array if this is the first time
2240              // a callback is added for this key
2241              self._callbacks[info.key] = self._callbacks[info.key] || [];
2242  
2243              // remove an existing match if there is one
2244              _getMatches(info.key, info.modifiers, {type: info.action}, sequenceName, combination, level);
2245  
2246              // add this call back to the array
2247              // if it is a sequence put it at the beginning
2248              // if not put it at the end
2249              //
2250              // this is important because the way these are processed expects
2251              // the sequence ones to come first
2252              self._callbacks[info.key][sequenceName ? 'unshift' : 'push']({
2253                  callback: callback,
2254                  modifiers: info.modifiers,
2255                  action: info.action,
2256                  seq: sequenceName,
2257                  level: level,
2258                  combo: combination
2259              });
2260          }
2261  
2262          /**
2263           * binds multiple combinations to the same callback
2264           *
2265           * @param {Array} combinations
2266           * @param {Function} callback
2267           * @param {string|undefined} action
2268           * @returns void
2269           */
2270          self._bindMultiple = function(combinations, callback, action) {
2271              for (var i = 0; i < combinations.length; ++i) {
2272                  _bindSingle(combinations[i], callback, action);
2273              }
2274          };
2275  
2276          // start!
2277          _addEvent(targetElement, 'keypress', _handleKeyEvent);
2278          _addEvent(targetElement, 'keydown', _handleKeyEvent);
2279          _addEvent(targetElement, 'keyup', _handleKeyEvent);
2280      }
2281  
2282      /**
2283       * binds an event to mousetrap
2284       *
2285       * can be a single key, a combination of keys separated with +,
2286       * an array of keys, or a sequence of keys separated by spaces
2287       *
2288       * be sure to list the modifier keys first to make sure that the
2289       * correct key ends up getting bound (the last key in the pattern)
2290       *
2291       * @param {string|Array} keys
2292       * @param {Function} callback
2293       * @param {string=} action - 'keypress', 'keydown', or 'keyup'
2294       * @returns void
2295       */
2296      Mousetrap.prototype.bind = function(keys, callback, action) {
2297          var self = this;
2298          keys = keys instanceof Array ? keys : [keys];
2299          self._bindMultiple.call(self, keys, callback, action);
2300          return self;
2301      };
2302  
2303      /**
2304       * unbinds an event to mousetrap
2305       *
2306       * the unbinding sets the callback function of the specified key combo
2307       * to an empty function and deletes the corresponding key in the
2308       * _directMap dict.
2309       *
2310       * TODO: actually remove this from the _callbacks dictionary instead
2311       * of binding an empty function
2312       *
2313       * the keycombo+action has to be exactly the same as
2314       * it was defined in the bind method
2315       *
2316       * @param {string|Array} keys
2317       * @param {string} action
2318       * @returns void
2319       */
2320      Mousetrap.prototype.unbind = function(keys, action) {
2321          var self = this;
2322          return self.bind.call(self, keys, function() {}, action);
2323      };
2324  
2325      /**
2326       * triggers an event that has already been bound
2327       *
2328       * @param {string} keys
2329       * @param {string=} action
2330       * @returns void
2331       */
2332      Mousetrap.prototype.trigger = function(keys, action) {
2333          var self = this;
2334          if (self._directMap[keys + ':' + action]) {
2335              self._directMap[keys + ':' + action]({}, keys);
2336          }
2337          return self;
2338      };
2339  
2340      /**
2341       * resets the library back to its initial state.  this is useful
2342       * if you want to clear out the current keyboard shortcuts and bind
2343       * new ones - for example if you switch to another page
2344       *
2345       * @returns void
2346       */
2347      Mousetrap.prototype.reset = function() {
2348          var self = this;
2349          self._callbacks = {};
2350          self._directMap = {};
2351          return self;
2352      };
2353  
2354      /**
2355       * should we stop this event before firing off callbacks
2356       *
2357       * @param {Event} e
2358       * @param {Element} element
2359       * @return {boolean}
2360       */
2361      Mousetrap.prototype.stopCallback = function(e, element) {
2362          var self = this;
2363  
2364          // if the element has the class "mousetrap" then no need to stop
2365          if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {
2366              return false;
2367          }
2368  
2369          if (_belongsTo(element, self.target)) {
2370              return false;
2371          }
2372  
2373          // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host,
2374          // not the initial event target in the shadow tree. Note that not all events cross the
2375          // shadow boundary.
2376          // For shadow trees with `mode: 'open'`, the initial event target is the first element in
2377          // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event
2378          // target cannot be obtained.
2379          if ('composedPath' in e && typeof e.composedPath === 'function') {
2380              // For open shadow trees, update `element` so that the following check works.
2381              var initialEventTarget = e.composedPath()[0];
2382              if (initialEventTarget !== e.target) {
2383                  element = initialEventTarget;
2384              }
2385          }
2386  
2387          // stop for input, select, and textarea
2388          return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable;
2389      };
2390  
2391      /**
2392       * exposes _handleKey publicly so it can be overwritten by extensions
2393       */
2394      Mousetrap.prototype.handleKey = function() {
2395          var self = this;
2396          return self._handleKey.apply(self, arguments);
2397      };
2398  
2399      /**
2400       * allow custom key mappings
2401       */
2402      Mousetrap.addKeycodes = function(object) {
2403          for (var key in object) {
2404              if (object.hasOwnProperty(key)) {
2405                  _MAP[key] = object[key];
2406              }
2407          }
2408          _REVERSE_MAP = null;
2409      };
2410  
2411      /**
2412       * Init the global mousetrap functions
2413       *
2414       * This method is needed to allow the global mousetrap functions to work
2415       * now that mousetrap is a constructor function.
2416       */
2417      Mousetrap.init = function() {
2418          var documentMousetrap = Mousetrap(document);
2419          for (var method in documentMousetrap) {
2420              if (method.charAt(0) !== '_') {
2421                  Mousetrap[method] = (function(method) {
2422                      return function() {
2423                          return documentMousetrap[method].apply(documentMousetrap, arguments);
2424                      };
2425                  } (method));
2426              }
2427          }
2428      };
2429  
2430      Mousetrap.init();
2431  
2432      // expose mousetrap to the global object
2433      window.Mousetrap = Mousetrap;
2434  
2435      // expose as a common js module
2436      if ( true && module.exports) {
2437          module.exports = Mousetrap;
2438      }
2439  
2440      // expose mousetrap as an AMD module
2441      if (true) {
2442          !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
2443              return Mousetrap;
2444          }).call(exports, __webpack_require__, exports, module),
2445                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2446      }
2447  }) (typeof window !== 'undefined' ? window : null, typeof  window !== 'undefined' ? document : null);
2448  
2449  
2450  /***/ }),
2451  
2452  /***/ 30:
2453  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2454  
2455  "use strict";
2456  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
2457  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
2458  
2459  function _unsupportedIterableToArray(o, minLen) {
2460    if (!o) return;
2461    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
2462    var n = Object.prototype.toString.call(o).slice(8, -1);
2463    if (n === "Object" && o.constructor) n = o.constructor.name;
2464    if (n === "Map" || n === "Set") return Array.from(o);
2465    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
2466  }
2467  
2468  /***/ }),
2469  
2470  /***/ 37:
2471  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2472  
2473  "use strict";
2474  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
2475  function _iterableToArray(iter) {
2476    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
2477  }
2478  
2479  /***/ }),
2480  
2481  /***/ 38:
2482  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2483  
2484  "use strict";
2485  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
2486  function _arrayWithHoles(arr) {
2487    if (Array.isArray(arr)) return arr;
2488  }
2489  
2490  /***/ }),
2491  
2492  /***/ 39:
2493  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2494  
2495  "use strict";
2496  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
2497  function _nonIterableRest() {
2498    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2499  }
2500  
2501  /***/ }),
2502  
2503  /***/ 40:
2504  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2505  
2506  "use strict";
2507  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
2508  function _typeof(obj) {
2509    "@babel/helpers - typeof";
2510  
2511    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
2512      _typeof = function _typeof(obj) {
2513        return typeof obj;
2514      };
2515    } else {
2516      _typeof = function _typeof(obj) {
2517        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2518      };
2519    }
2520  
2521    return _typeof(obj);
2522  }
2523  
2524  /***/ }),
2525  
2526  /***/ 429:
2527  /***/ (function(module, exports) {
2528  
2529  /**
2530   * adds a bindGlobal method to Mousetrap that allows you to
2531   * bind specific keyboard shortcuts that will still work
2532   * inside a text input field
2533   *
2534   * usage:
2535   * Mousetrap.bindGlobal('ctrl+s', _saveChanges);
2536   */
2537  /* global Mousetrap:true */
2538  (function(Mousetrap) {
2539      if (! Mousetrap) {
2540          return;
2541      }
2542      var _globalCallbacks = {};
2543      var _originalStopCallback = Mousetrap.prototype.stopCallback;
2544  
2545      Mousetrap.prototype.stopCallback = function(e, element, combo, sequence) {
2546          var self = this;
2547  
2548          if (self.paused) {
2549              return true;
2550          }
2551  
2552          if (_globalCallbacks[combo] || _globalCallbacks[sequence]) {
2553              return false;
2554          }
2555  
2556          return _originalStopCallback.call(self, e, element, combo);
2557      };
2558  
2559      Mousetrap.prototype.bindGlobal = function(keys, callback, action) {
2560          var self = this;
2561          self.bind(keys, callback, action);
2562  
2563          if (keys instanceof Array) {
2564              for (var i = 0; i < keys.length; i++) {
2565                  _globalCallbacks[keys[i]] = true;
2566              }
2567              return;
2568          }
2569  
2570          _globalCallbacks[keys] = true;
2571      };
2572  
2573      Mousetrap.init();
2574  }) (typeof Mousetrap !== "undefined" ? Mousetrap : undefined);
2575  
2576  
2577  /***/ }),
2578  
2579  /***/ 463:
2580  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2581  
2582  "use strict";
2583  // ESM COMPAT FLAG
2584  __webpack_require__.r(__webpack_exports__);
2585  
2586  // EXPORTS
2587  __webpack_require__.d(__webpack_exports__, "createHigherOrderComponent", function() { return /* reexport */ create_higher_order_component; });
2588  __webpack_require__.d(__webpack_exports__, "compose", function() { return /* reexport */ compose; });
2589  __webpack_require__.d(__webpack_exports__, "ifCondition", function() { return /* reexport */ if_condition; });
2590  __webpack_require__.d(__webpack_exports__, "pure", function() { return /* reexport */ higher_order_pure; });
2591  __webpack_require__.d(__webpack_exports__, "withGlobalEvents", function() { return /* reexport */ with_global_events; });
2592  __webpack_require__.d(__webpack_exports__, "withInstanceId", function() { return /* reexport */ with_instance_id; });
2593  __webpack_require__.d(__webpack_exports__, "withSafeTimeout", function() { return /* reexport */ with_safe_timeout; });
2594  __webpack_require__.d(__webpack_exports__, "withState", function() { return /* reexport */ withState; });
2595  __webpack_require__.d(__webpack_exports__, "useCopyOnClick", function() { return /* reexport */ useCopyOnClick; });
2596  __webpack_require__.d(__webpack_exports__, "__experimentalUseDragging", function() { return /* reexport */ useDragging; });
2597  __webpack_require__.d(__webpack_exports__, "useInstanceId", function() { return /* reexport */ useInstanceId; });
2598  __webpack_require__.d(__webpack_exports__, "useKeyboardShortcut", function() { return /* reexport */ use_keyboard_shortcut; });
2599  __webpack_require__.d(__webpack_exports__, "useMediaQuery", function() { return /* reexport */ useMediaQuery; });
2600  __webpack_require__.d(__webpack_exports__, "usePrevious", function() { return /* reexport */ usePrevious; });
2601  __webpack_require__.d(__webpack_exports__, "useReducedMotion", function() { return /* reexport */ use_reduced_motion; });
2602  __webpack_require__.d(__webpack_exports__, "useViewportMatch", function() { return /* reexport */ use_viewport_match; });
2603  __webpack_require__.d(__webpack_exports__, "useResizeObserver", function() { return /* reexport */ use_resize_observer; });
2604  __webpack_require__.d(__webpack_exports__, "useAsyncList", function() { return /* reexport */ use_async_list; });
2605  __webpack_require__.d(__webpack_exports__, "useWarnOnChange", function() { return /* reexport */ use_warn_on_change; });
2606  __webpack_require__.d(__webpack_exports__, "useDebounce", function() { return /* reexport */ useDebounce; });
2607  
2608  // EXTERNAL MODULE: external {"this":"lodash"}
2609  var external_this_lodash_ = __webpack_require__(2);
2610  
2611  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/utils/create-higher-order-component/index.js
2612  /**
2613   * External dependencies
2614   */
2615  
2616  /**
2617   * Given a function mapping a component to an enhanced component and modifier
2618   * name, returns the enhanced component augmented with a generated displayName.
2619   *
2620   * @param {Function} mapComponentToEnhancedComponent Function mapping component
2621   *                                                   to enhanced component.
2622   * @param {string}   modifierName                    Seed name from which to
2623   *                                                   generated display name.
2624   *
2625   * @return {WPComponent} Component class with generated display name assigned.
2626   */
2627  
2628  function createHigherOrderComponent(mapComponentToEnhancedComponent, modifierName) {
2629    return function (OriginalComponent) {
2630      var EnhancedComponent = mapComponentToEnhancedComponent(OriginalComponent);
2631      var _OriginalComponent$di = OriginalComponent.displayName,
2632          displayName = _OriginalComponent$di === void 0 ? OriginalComponent.name || 'Component' : _OriginalComponent$di;
2633      EnhancedComponent.displayName = "".concat(Object(external_this_lodash_["upperFirst"])(Object(external_this_lodash_["camelCase"])(modifierName)), "(").concat(displayName, ")");
2634      return EnhancedComponent;
2635    };
2636  }
2637  
2638  /* harmony default export */ var create_higher_order_component = (createHigherOrderComponent);
2639  
2640  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/compose.js
2641  /**
2642   * External dependencies
2643   */
2644  
2645  /**
2646   * Composes multiple higher-order components into a single higher-order component. Performs right-to-left function
2647   * composition, where each successive invocation is supplied the return value of the previous.
2648   *
2649   * @param {...Function} hocs The HOC functions to invoke.
2650   *
2651   * @return {Function} Returns the new composite function.
2652   */
2653  
2654  /* harmony default export */ var compose = (external_this_lodash_["flowRight"]);
2655  
2656  // EXTERNAL MODULE: external {"this":["wp","element"]}
2657  var external_this_wp_element_ = __webpack_require__(0);
2658  
2659  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/if-condition/index.js
2660  
2661  
2662  /**
2663   * Internal dependencies
2664   */
2665  
2666  /**
2667   * Higher-order component creator, creating a new component which renders if
2668   * the given condition is satisfied or with the given optional prop name.
2669   *
2670   * @param {Function} predicate Function to test condition.
2671   *
2672   * @return {Function} Higher-order component.
2673   */
2674  
2675  var if_condition_ifCondition = function ifCondition(predicate) {
2676    return create_higher_order_component(function (WrappedComponent) {
2677      return function (props) {
2678        if (!predicate(props)) {
2679          return null;
2680        }
2681  
2682        return Object(external_this_wp_element_["createElement"])(WrappedComponent, props);
2683      };
2684    }, 'ifCondition');
2685  };
2686  
2687  /* harmony default export */ var if_condition = (if_condition_ifCondition);
2688  
2689  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
2690  var classCallCheck = __webpack_require__(21);
2691  
2692  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
2693  var createClass = __webpack_require__(22);
2694  
2695  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
2696  var inherits = __webpack_require__(23);
2697  
2698  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
2699  var possibleConstructorReturn = __webpack_require__(24);
2700  
2701  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
2702  var getPrototypeOf = __webpack_require__(19);
2703  
2704  // EXTERNAL MODULE: external {"this":["wp","isShallowEqual"]}
2705  var external_this_wp_isShallowEqual_ = __webpack_require__(64);
2706  var external_this_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_isShallowEqual_);
2707  
2708  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/pure/index.js
2709  
2710  
2711  
2712  
2713  
2714  
2715  
2716  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { 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); }; }
2717  
2718  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; } }
2719  
2720  /**
2721   * WordPress dependencies
2722   */
2723  
2724  
2725  /**
2726   * Internal dependencies
2727   */
2728  
2729  
2730  /**
2731   * Given a component returns the enhanced component augmented with a component
2732   * only rerendering when its props/state change
2733   *
2734   * @param {Function} mapComponentToEnhancedComponent Function mapping component
2735   *                                                   to enhanced component.
2736   * @param {string}   modifierName                    Seed name from which to
2737   *                                                   generated display name.
2738   *
2739   * @return {WPComponent} Component class with generated display name assigned.
2740   */
2741  
2742  var pure = create_higher_order_component(function (Wrapped) {
2743    if (Wrapped.prototype instanceof external_this_wp_element_["Component"]) {
2744      return /*#__PURE__*/function (_Wrapped) {
2745        Object(inherits["a" /* default */])(_class, _Wrapped);
2746  
2747        var _super = _createSuper(_class);
2748  
2749        function _class() {
2750          Object(classCallCheck["a" /* default */])(this, _class);
2751  
2752          return _super.apply(this, arguments);
2753        }
2754  
2755        Object(createClass["a" /* default */])(_class, [{
2756          key: "shouldComponentUpdate",
2757          value: function shouldComponentUpdate(nextProps, nextState) {
2758            return !external_this_wp_isShallowEqual_default()(nextProps, this.props) || !external_this_wp_isShallowEqual_default()(nextState, this.state);
2759          }
2760        }]);
2761  
2762        return _class;
2763      }(Wrapped);
2764    }
2765  
2766    return /*#__PURE__*/function (_Component) {
2767      Object(inherits["a" /* default */])(_class2, _Component);
2768  
2769      var _super2 = _createSuper(_class2);
2770  
2771      function _class2() {
2772        Object(classCallCheck["a" /* default */])(this, _class2);
2773  
2774        return _super2.apply(this, arguments);
2775      }
2776  
2777      Object(createClass["a" /* default */])(_class2, [{
2778        key: "shouldComponentUpdate",
2779        value: function shouldComponentUpdate(nextProps) {
2780          return !external_this_wp_isShallowEqual_default()(nextProps, this.props);
2781        }
2782      }, {
2783        key: "render",
2784        value: function render() {
2785          return Object(external_this_wp_element_["createElement"])(Wrapped, this.props);
2786        }
2787      }]);
2788  
2789      return _class2;
2790    }(external_this_wp_element_["Component"]);
2791  }, 'pure');
2792  /* harmony default export */ var higher_order_pure = (pure);
2793  
2794  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
2795  var esm_extends = __webpack_require__(8);
2796  
2797  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
2798  var assertThisInitialized = __webpack_require__(16);
2799  
2800  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/listener.js
2801  
2802  
2803  
2804  /**
2805   * External dependencies
2806   */
2807  
2808  /**
2809   * Class responsible for orchestrating event handling on the global window,
2810   * binding a single event to be shared across all handling instances, and
2811   * removing the handler when no instances are listening for the event.
2812   */
2813  
2814  var listener_Listener = /*#__PURE__*/function () {
2815    function Listener() {
2816      Object(classCallCheck["a" /* default */])(this, Listener);
2817  
2818      this.listeners = {};
2819      this.handleEvent = this.handleEvent.bind(this);
2820    }
2821  
2822    Object(createClass["a" /* default */])(Listener, [{
2823      key: "add",
2824      value: function add(eventType, instance) {
2825        if (!this.listeners[eventType]) {
2826          // Adding first listener for this type, so bind event.
2827          window.addEventListener(eventType, this.handleEvent);
2828          this.listeners[eventType] = [];
2829        }
2830  
2831        this.listeners[eventType].push(instance);
2832      }
2833    }, {
2834      key: "remove",
2835      value: function remove(eventType, instance) {
2836        this.listeners[eventType] = Object(external_this_lodash_["without"])(this.listeners[eventType], instance);
2837  
2838        if (!this.listeners[eventType].length) {
2839          // Removing last listener for this type, so unbind event.
2840          window.removeEventListener(eventType, this.handleEvent);
2841          delete this.listeners[eventType];
2842        }
2843      }
2844    }, {
2845      key: "handleEvent",
2846      value: function handleEvent(event) {
2847        Object(external_this_lodash_["forEach"])(this.listeners[event.type], function (instance) {
2848          instance.handleEvent(event);
2849        });
2850      }
2851    }]);
2852  
2853    return Listener;
2854  }();
2855  
2856  /* harmony default export */ var listener = (listener_Listener);
2857  
2858  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-global-events/index.js
2859  
2860  
2861  
2862  
2863  
2864  
2865  
2866  
2867  
2868  function with_global_events_createSuper(Derived) { var hasNativeReflectConstruct = with_global_events_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { 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); }; }
2869  
2870  function with_global_events_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; } }
2871  
2872  /**
2873   * External dependencies
2874   */
2875  
2876  /**
2877   * WordPress dependencies
2878   */
2879  
2880  
2881  /**
2882   * Internal dependencies
2883   */
2884  
2885  
2886  
2887  /**
2888   * Listener instance responsible for managing document event handling.
2889   *
2890   * @type {Listener}
2891   */
2892  
2893  var with_global_events_listener = new listener();
2894  /**
2895   * Higher-order component creator which, given an object of DOM event types and
2896   * values corresponding to a callback function name on the component, will
2897   * create or update a window event handler to invoke the callback when an event
2898   * occurs. On behalf of the consuming developer, the higher-order component
2899   * manages unbinding when the component unmounts, and binding at most a single
2900   * event handler for the entire application.
2901   *
2902   * @param {Object<string,string>} eventTypesToHandlers Object with keys of DOM
2903   *                                                     event type, the value a
2904   *                                                     name of the function on
2905   *                                                     the original component's
2906   *                                                     instance which handles
2907   *                                                     the event.
2908   *
2909   * @return {Function} Higher-order component.
2910   */
2911  
2912  function withGlobalEvents(eventTypesToHandlers) {
2913    return create_higher_order_component(function (WrappedComponent) {
2914      var Wrapper = /*#__PURE__*/function (_Component) {
2915        Object(inherits["a" /* default */])(Wrapper, _Component);
2916  
2917        var _super = with_global_events_createSuper(Wrapper);
2918  
2919        function Wrapper() {
2920          var _this;
2921  
2922          Object(classCallCheck["a" /* default */])(this, Wrapper);
2923  
2924          _this = _super.apply(this, arguments);
2925          _this.handleEvent = _this.handleEvent.bind(Object(assertThisInitialized["a" /* default */])(_this));
2926          _this.handleRef = _this.handleRef.bind(Object(assertThisInitialized["a" /* default */])(_this));
2927          return _this;
2928        }
2929  
2930        Object(createClass["a" /* default */])(Wrapper, [{
2931          key: "componentDidMount",
2932          value: function componentDidMount() {
2933            var _this2 = this;
2934  
2935            Object(external_this_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
2936              with_global_events_listener.add(eventType, _this2);
2937            });
2938          }
2939        }, {
2940          key: "componentWillUnmount",
2941          value: function componentWillUnmount() {
2942            var _this3 = this;
2943  
2944            Object(external_this_lodash_["forEach"])(eventTypesToHandlers, function (handler, eventType) {
2945              with_global_events_listener.remove(eventType, _this3);
2946            });
2947          }
2948        }, {
2949          key: "handleEvent",
2950          value: function handleEvent(event) {
2951            var handler = eventTypesToHandlers[event.type];
2952  
2953            if (typeof this.wrappedRef[handler] === 'function') {
2954              this.wrappedRef[handler](event);
2955            }
2956          }
2957        }, {
2958          key: "handleRef",
2959          value: function handleRef(el) {
2960            this.wrappedRef = el; // Any component using `withGlobalEvents` that is not setting a `ref`
2961            // will cause `this.props.forwardedRef` to be `null`, so we need this
2962            // check.
2963  
2964            if (this.props.forwardedRef) {
2965              this.props.forwardedRef(el);
2966            }
2967          }
2968        }, {
2969          key: "render",
2970          value: function render() {
2971            return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, this.props.ownProps, {
2972              ref: this.handleRef
2973            }));
2974          }
2975        }]);
2976  
2977        return Wrapper;
2978      }(external_this_wp_element_["Component"]);
2979  
2980      return Object(external_this_wp_element_["forwardRef"])(function (props, ref) {
2981        return Object(external_this_wp_element_["createElement"])(Wrapper, {
2982          ownProps: props,
2983          forwardedRef: ref
2984        });
2985      });
2986    }, 'withGlobalEvents');
2987  }
2988  
2989  /* harmony default export */ var with_global_events = (withGlobalEvents);
2990  
2991  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js
2992  /**
2993   * WordPress dependencies
2994   */
2995  
2996  var instanceMap = new WeakMap();
2997  /**
2998   * Creates a new id for a given object.
2999   *
3000   * @param {Object} object Object reference to create an id for.
3001   */
3002  
3003  function createId(object) {
3004    var instances = instanceMap.get(object) || 0;
3005    instanceMap.set(object, instances + 1);
3006    return instances;
3007  }
3008  /**
3009   * Provides a unique instance ID.
3010   *
3011   * @param {Object} object Object reference to create an id for.
3012   * @param {string} prefix Prefix for the unique id.
3013   */
3014  
3015  
3016  function useInstanceId(object, prefix) {
3017    return Object(external_this_wp_element_["useMemo"])(function () {
3018      var id = createId(object);
3019      return prefix ? "".concat(prefix, "-").concat(id) : id;
3020    }, [object]);
3021  }
3022  
3023  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-instance-id/index.js
3024  
3025  
3026  
3027  /**
3028   * Internal dependencies
3029   */
3030  
3031  
3032  /**
3033   * A Higher Order Component used to be provide a unique instance ID by
3034   * component.
3035   *
3036   * @param {WPComponent} WrappedComponent The wrapped component.
3037   *
3038   * @return {WPComponent} Component with an instanceId prop.
3039   */
3040  
3041  /* harmony default export */ var with_instance_id = (create_higher_order_component(function (WrappedComponent) {
3042    return function (props) {
3043      var instanceId = useInstanceId(WrappedComponent);
3044      return Object(external_this_wp_element_["createElement"])(WrappedComponent, Object(esm_extends["a" /* default */])({}, props, {
3045        instanceId: instanceId
3046      }));
3047    };
3048  }, 'withInstanceId'));
3049  
3050  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-safe-timeout/index.js
3051  
3052  
3053  
3054  
3055  
3056  
3057  
3058  
3059  
3060  function with_safe_timeout_createSuper(Derived) { var hasNativeReflectConstruct = with_safe_timeout_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { 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); }; }
3061  
3062  function with_safe_timeout_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; } }
3063  
3064  /**
3065   * External dependencies
3066   */
3067  
3068  /**
3069   * WordPress dependencies
3070   */
3071  
3072  
3073  /**
3074   * Internal dependencies
3075   */
3076  
3077  
3078  /**
3079   * A higher-order component used to provide and manage delayed function calls
3080   * that ought to be bound to a component's lifecycle.
3081   *
3082   * @param {WPComponent} OriginalComponent Component requiring setTimeout
3083   *
3084   * @return {WPComponent} Wrapped component.
3085   */
3086  
3087  var withSafeTimeout = create_higher_order_component(function (OriginalComponent) {
3088    return /*#__PURE__*/function (_Component) {
3089      Object(inherits["a" /* default */])(WrappedComponent, _Component);
3090  
3091      var _super = with_safe_timeout_createSuper(WrappedComponent);
3092  
3093      function WrappedComponent() {
3094        var _this;
3095  
3096        Object(classCallCheck["a" /* default */])(this, WrappedComponent);
3097  
3098        _this = _super.apply(this, arguments);
3099        _this.timeouts = [];
3100        _this.setTimeout = _this.setTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
3101        _this.clearTimeout = _this.clearTimeout.bind(Object(assertThisInitialized["a" /* default */])(_this));
3102        return _this;
3103      }
3104  
3105      Object(createClass["a" /* default */])(WrappedComponent, [{
3106        key: "componentWillUnmount",
3107        value: function componentWillUnmount() {
3108          this.timeouts.forEach(clearTimeout);
3109        }
3110      }, {
3111        key: "setTimeout",
3112        value: function (_setTimeout) {
3113          function setTimeout(_x, _x2) {
3114            return _setTimeout.apply(this, arguments);
3115          }
3116  
3117          setTimeout.toString = function () {
3118            return _setTimeout.toString();
3119          };
3120  
3121          return setTimeout;
3122        }(function (fn, delay) {
3123          var _this2 = this;
3124  
3125          var id = setTimeout(function () {
3126            fn();
3127  
3128            _this2.clearTimeout(id);
3129          }, delay);
3130          this.timeouts.push(id);
3131          return id;
3132        })
3133      }, {
3134        key: "clearTimeout",
3135        value: function (_clearTimeout) {
3136          function clearTimeout(_x3) {
3137            return _clearTimeout.apply(this, arguments);
3138          }
3139  
3140          clearTimeout.toString = function () {
3141            return _clearTimeout.toString();
3142          };
3143  
3144          return clearTimeout;
3145        }(function (id) {
3146          clearTimeout(id);
3147          this.timeouts = Object(external_this_lodash_["without"])(this.timeouts, id);
3148        })
3149      }, {
3150        key: "render",
3151        value: function render() {
3152          return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, {
3153            setTimeout: this.setTimeout,
3154            clearTimeout: this.clearTimeout
3155          }));
3156        }
3157      }]);
3158  
3159      return WrappedComponent;
3160    }(external_this_wp_element_["Component"]);
3161  }, 'withSafeTimeout');
3162  /* harmony default export */ var with_safe_timeout = (withSafeTimeout);
3163  
3164  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/higher-order/with-state/index.js
3165  
3166  
3167  
3168  
3169  
3170  
3171  
3172  
3173  
3174  function with_state_createSuper(Derived) { var hasNativeReflectConstruct = with_state_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { 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); }; }
3175  
3176  function with_state_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; } }
3177  
3178  /**
3179   * WordPress dependencies
3180   */
3181  
3182  /**
3183   * Internal dependencies
3184   */
3185  
3186  
3187  /**
3188   * A Higher Order Component used to provide and manage internal component state
3189   * via props.
3190   *
3191   * @param {?Object} initialState Optional initial state of the component.
3192   *
3193   * @return {WPComponent} Wrapped component.
3194   */
3195  
3196  function withState() {
3197    var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3198    return create_higher_order_component(function (OriginalComponent) {
3199      return /*#__PURE__*/function (_Component) {
3200        Object(inherits["a" /* default */])(WrappedComponent, _Component);
3201  
3202        var _super = with_state_createSuper(WrappedComponent);
3203  
3204        function WrappedComponent() {
3205          var _this;
3206  
3207          Object(classCallCheck["a" /* default */])(this, WrappedComponent);
3208  
3209          _this = _super.apply(this, arguments);
3210          _this.setState = _this.setState.bind(Object(assertThisInitialized["a" /* default */])(_this));
3211          _this.state = initialState;
3212          return _this;
3213        }
3214  
3215        Object(createClass["a" /* default */])(WrappedComponent, [{
3216          key: "render",
3217          value: function render() {
3218            return Object(external_this_wp_element_["createElement"])(OriginalComponent, Object(esm_extends["a" /* default */])({}, this.props, this.state, {
3219              setState: this.setState
3220            }));
3221          }
3222        }]);
3223  
3224        return WrappedComponent;
3225      }(external_this_wp_element_["Component"]);
3226    }, 'withState');
3227  }
3228  
3229  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
3230  var slicedToArray = __webpack_require__(12);
3231  
3232  // EXTERNAL MODULE: ./node_modules/clipboard/dist/clipboard.js
3233  var dist_clipboard = __webpack_require__(287);
3234  var clipboard_default = /*#__PURE__*/__webpack_require__.n(dist_clipboard);
3235  
3236  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-copy-on-click/index.js
3237  
3238  
3239  /**
3240   * External dependencies
3241   */
3242  
3243  /**
3244   * WordPress dependencies
3245   */
3246  
3247  
3248  /**
3249   * Copies the text to the clipboard when the element is clicked.
3250   *
3251   * @param {Object}          ref     Reference with the element.
3252   * @param {string|Function} text    The text to copy.
3253   * @param {number}          timeout Optional timeout to reset the returned
3254   *                                  state. 4 seconds by default.
3255   *
3256   * @return {boolean} Whether or not the text has been copied. Resets after the
3257   *                   timeout.
3258   */
3259  
3260  function useCopyOnClick(ref, _text) {
3261    var timeout = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 4000;
3262    var clipboard = Object(external_this_wp_element_["useRef"])();
3263  
3264    var _useState = Object(external_this_wp_element_["useState"])(false),
3265        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
3266        hasCopied = _useState2[0],
3267        setHasCopied = _useState2[1];
3268  
3269    Object(external_this_wp_element_["useEffect"])(function () {
3270      var timeoutId; // Clipboard listens to click events.
3271  
3272      clipboard.current = new clipboard_default.a(ref.current, {
3273        text: function text() {
3274          return typeof _text === 'function' ? _text() : _text;
3275        }
3276      });
3277      clipboard.current.on('success', function (_ref) {
3278        var clearSelection = _ref.clearSelection,
3279            trigger = _ref.trigger;
3280        // Clearing selection will move focus back to the triggering button,
3281        // ensuring that it is not reset to the body, and further that it is
3282        // kept within the rendered node.
3283        clearSelection(); // Handle ClipboardJS focus bug, see https://github.com/zenorocha/clipboard.js/issues/680
3284  
3285        if (trigger) {
3286          trigger.focus();
3287        }
3288  
3289        if (timeout) {
3290          setHasCopied(true);
3291          clearTimeout(timeoutId);
3292          timeoutId = setTimeout(function () {
3293            return setHasCopied(false);
3294          }, timeout);
3295        }
3296      });
3297      return function () {
3298        clipboard.current.destroy();
3299        clearTimeout(timeoutId);
3300      };
3301    }, [_text, timeout, setHasCopied]);
3302    return hasCopied;
3303  }
3304  
3305  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-dragging/index.js
3306  
3307  
3308  /**
3309   * WordPress dependencies
3310   */
3311  
3312  var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_this_wp_element_["useLayoutEffect"] : external_this_wp_element_["useEffect"];
3313  function useDragging(_ref) {
3314    var onDragStart = _ref.onDragStart,
3315        onDragMove = _ref.onDragMove,
3316        onDragEnd = _ref.onDragEnd;
3317  
3318    var _useState = Object(external_this_wp_element_["useState"])(false),
3319        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
3320        isDragging = _useState2[0],
3321        setIsDragging = _useState2[1];
3322  
3323    var eventsRef = Object(external_this_wp_element_["useRef"])({
3324      onDragStart: onDragStart,
3325      onDragMove: onDragMove,
3326      onDragEnd: onDragEnd
3327    });
3328    useIsomorphicLayoutEffect(function () {
3329      eventsRef.current.onDragStart = onDragStart;
3330      eventsRef.current.onDragMove = onDragMove;
3331      eventsRef.current.onDragEnd = onDragEnd;
3332    }, [onDragStart, onDragMove, onDragEnd]);
3333    var onMouseMove = Object(external_this_wp_element_["useCallback"])(function () {
3334      var _eventsRef$current;
3335  
3336      return eventsRef.current.onDragMove && (_eventsRef$current = eventsRef.current).onDragMove.apply(_eventsRef$current, arguments);
3337    }, []);
3338    var endDrag = Object(external_this_wp_element_["useCallback"])(function () {
3339      if (eventsRef.current.onDragEnd) {
3340        var _eventsRef$current2;
3341  
3342        (_eventsRef$current2 = eventsRef.current).onDragEnd.apply(_eventsRef$current2, arguments);
3343      }
3344  
3345      document.removeEventListener('mousemove', onMouseMove);
3346      document.removeEventListener('mouseup', endDrag);
3347      setIsDragging(false);
3348    }, []);
3349    var startDrag = Object(external_this_wp_element_["useCallback"])(function () {
3350      if (eventsRef.current.onDragStart) {
3351        var _eventsRef$current3;
3352  
3353        (_eventsRef$current3 = eventsRef.current).onDragStart.apply(_eventsRef$current3, arguments);
3354      }
3355  
3356      document.addEventListener('mousemove', onMouseMove);
3357      document.addEventListener('mouseup', endDrag);
3358      setIsDragging(true);
3359    }, []); // Remove the global events when unmounting if needed.
3360  
3361    Object(external_this_wp_element_["useEffect"])(function () {
3362      return function () {
3363        if (isDragging) {
3364          document.removeEventListener('mousemove', onMouseMove);
3365          document.removeEventListener('mouseup', endDrag);
3366        }
3367      };
3368    }, [isDragging]);
3369    return {
3370      startDrag: startDrag,
3371      endDrag: endDrag,
3372      isDragging: isDragging
3373    };
3374  }
3375  
3376  // EXTERNAL MODULE: ./node_modules/mousetrap/mousetrap.js
3377  var mousetrap_mousetrap = __webpack_require__(288);
3378  var mousetrap_default = /*#__PURE__*/__webpack_require__.n(mousetrap_mousetrap);
3379  
3380  // EXTERNAL MODULE: ./node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.js
3381  var mousetrap_global_bind = __webpack_require__(429);
3382  
3383  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-keyboard-shortcut/index.js
3384  /**
3385   * External dependencies
3386   */
3387  
3388  
3389  
3390  /**
3391   * WordPress dependencies
3392   */
3393  
3394  
3395  /**
3396   * A block selection object.
3397   *
3398   * @typedef {Object} WPKeyboardShortcutConfig
3399   *
3400   * @property {boolean} [bindGlobal]  Handle keyboard events anywhere including inside textarea/input fields.
3401   * @property {string}  [eventName]   Event name used to trigger the handler, defaults to keydown.
3402   * @property {boolean} [isDisabled]  Disables the keyboard handler if the value is true.
3403   * @property {Object}  [target]      React reference to the DOM element used to catch the keyboard event.
3404   */
3405  
3406  /**
3407   * Return true if platform is MacOS.
3408   *
3409   * @param {Object} _window   window object by default; used for DI testing.
3410   *
3411   * @return {boolean} True if MacOS; false otherwise.
3412   */
3413  
3414  function isAppleOS() {
3415    var _window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
3416  
3417    var platform = _window.navigator.platform;
3418    return platform.indexOf('Mac') !== -1 || Object(external_this_lodash_["includes"])(['iPad', 'iPhone'], platform);
3419  }
3420  /**
3421   * Attach a keyboard shortcut handler.
3422   *
3423   * @param {string[]|string}         shortcuts  Keyboard Shortcuts.
3424   * @param {Function}                callback   Shortcut callback.
3425   * @param {WPKeyboardShortcutConfig} options    Shortcut options.
3426   */
3427  
3428  
3429  function useKeyboardShortcut(shortcuts, callback) {
3430    var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
3431        _ref$bindGlobal = _ref.bindGlobal,
3432        bindGlobal = _ref$bindGlobal === void 0 ? false : _ref$bindGlobal,
3433        _ref$eventName = _ref.eventName,
3434        eventName = _ref$eventName === void 0 ? 'keydown' : _ref$eventName,
3435        _ref$isDisabled = _ref.isDisabled,
3436        isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
3437        target = _ref.target;
3438  
3439    var currentCallback = Object(external_this_wp_element_["useRef"])(callback);
3440    Object(external_this_wp_element_["useEffect"])(function () {
3441      currentCallback.current = callback;
3442    }, [callback]);
3443    Object(external_this_wp_element_["useEffect"])(function () {
3444      if (isDisabled) {
3445        return;
3446      }
3447  
3448      var mousetrap = new mousetrap_default.a(target ? target.current : document);
3449      Object(external_this_lodash_["castArray"])(shortcuts).forEach(function (shortcut) {
3450        var keys = shortcut.split('+'); // Determines whether a key is a modifier by the length of the string.
3451        // E.g. if I add a pass a shortcut Shift+Cmd+M, it'll determine that
3452        // the modifiers are Shift and Cmd because they're not a single character.
3453  
3454        var modifiers = new Set(keys.filter(function (value) {
3455          return value.length > 1;
3456        }));
3457        var hasAlt = modifiers.has('alt');
3458        var hasShift = modifiers.has('shift'); // This should be better moved to the shortcut registration instead.
3459  
3460        if (isAppleOS() && (modifiers.size === 1 && hasAlt || modifiers.size === 2 && hasAlt && hasShift)) {
3461          throw new Error("Cannot bind ".concat(shortcut, ". Alt and Shift+Alt modifiers are reserved for character input."));
3462        }
3463  
3464        var bindFn = bindGlobal ? 'bindGlobal' : 'bind';
3465        mousetrap[bindFn](shortcut, function () {
3466          return currentCallback.current.apply(currentCallback, arguments);
3467        }, eventName);
3468      });
3469      return function () {
3470        mousetrap.reset();
3471      };
3472    }, [shortcuts, bindGlobal, eventName, target, isDisabled]);
3473  }
3474  
3475  /* harmony default export */ var use_keyboard_shortcut = (useKeyboardShortcut);
3476  
3477  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-media-query/index.js
3478  
3479  
3480  /**
3481   * WordPress dependencies
3482   */
3483  
3484  /**
3485   * Runs a media query and returns its value when it changes.
3486   *
3487   * @param {string} [query] Media Query.
3488   * @return {boolean} return value of the media query.
3489   */
3490  
3491  function useMediaQuery(query) {
3492    var _useState = Object(external_this_wp_element_["useState"])(query && window.matchMedia(query).matches),
3493        _useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
3494        match = _useState2[0],
3495        setMatch = _useState2[1];
3496  
3497    Object(external_this_wp_element_["useEffect"])(function () {
3498      if (!query) {
3499        return;
3500      }
3501  
3502      var updateMatch = function updateMatch() {
3503        return setMatch(window.matchMedia(query).matches);
3504      };
3505  
3506      updateMatch();
3507      var list = window.matchMedia(query);
3508      list.addListener(updateMatch);
3509      return function () {
3510        list.removeListener(updateMatch);
3511      };
3512    }, [query]);
3513    return query && match;
3514  }
3515  
3516  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-previous/index.js
3517  /**
3518   * WordPress dependencies
3519   */
3520  
3521  /**
3522   * Use something's value from the previous render.
3523   * Based on https://usehooks.com/usePrevious/.
3524   *
3525   * @template T
3526   *
3527   * @param {T} value The value to track.
3528   *
3529   * @return {T|undefined} The value from the previous render.
3530   */
3531  
3532  function usePrevious(value) {
3533    // Disable reason: without an explicit type detail, the type of ref will be
3534    // inferred based on the initial useRef argument, which is undefined.
3535    // https://github.com/WordPress/gutenberg/pull/22597#issuecomment-633588366
3536  
3537    /* eslint-disable jsdoc/no-undefined-types */
3538    var ref = Object(external_this_wp_element_["useRef"])(
3539    /** @type {T|undefined} */
3540    undefined);
3541    /* eslint-enable jsdoc/no-undefined-types */
3542    // Store current value in ref.
3543  
3544    Object(external_this_wp_element_["useEffect"])(function () {
3545      ref.current = value;
3546    }, [value]); // Re-run when value changes.
3547    // Return previous value (happens before update in useEffect above).
3548  
3549    return ref.current;
3550  }
3551  
3552  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-reduced-motion/index.js
3553  /**
3554   * Internal dependencies
3555   */
3556  
3557  /**
3558   * Whether or not the user agent is Internet Explorer.
3559   *
3560   * @type {boolean}
3561   */
3562  
3563  var IS_IE = typeof window !== 'undefined' && window.navigator.userAgent.indexOf('Trident') >= 0;
3564  /**
3565   * Hook returning whether the user has a preference for reduced motion.
3566   *
3567   * @return {boolean} Reduced motion preference value.
3568   */
3569  
3570  var useReducedMotion = undefined || IS_IE ? function () {
3571    return true;
3572  } : function () {
3573    return useMediaQuery('(prefers-reduced-motion: reduce)');
3574  };
3575  /* harmony default export */ var use_reduced_motion = (useReducedMotion);
3576  
3577  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-viewport-match/index.js
3578  /**
3579   * WordPress dependencies
3580   */
3581  
3582  /**
3583   * Internal dependencies
3584   */
3585  
3586  
3587  /**
3588   * @typedef {"huge"|"wide"|"large"|"medium"|"small"|"mobile"} WPBreakpoint
3589   */
3590  
3591  /**
3592   * Hash of breakpoint names with pixel width at which it becomes effective.
3593   *
3594   * @see _breakpoints.scss
3595   *
3596   * @type {Object<WPBreakpoint,number>}
3597   */
3598  
3599  var BREAKPOINTS = {
3600    huge: 1440,
3601    wide: 1280,
3602    large: 960,
3603    medium: 782,
3604    small: 600,
3605    mobile: 480
3606  };
3607  /**
3608   * @typedef {">="|"<"} WPViewportOperator
3609   */
3610  
3611  /**
3612   * Object mapping media query operators to the condition to be used.
3613   *
3614   * @type {Object<WPViewportOperator,string>}
3615   */
3616  
3617  var CONDITIONS = {
3618    '>=': 'min-width',
3619    '<': 'max-width'
3620  };
3621  /**
3622   * Object mapping media query operators to a function that given a breakpointValue and a width evaluates if the operator matches the values.
3623   *
3624   * @type {Object<WPViewportOperator,Function>}
3625   */
3626  
3627  var OPERATOR_EVALUATORS = {
3628    '>=': function _(breakpointValue, width) {
3629      return width >= breakpointValue;
3630    },
3631    '<': function _(breakpointValue, width) {
3632      return width < breakpointValue;
3633    }
3634  };
3635  var ViewportMatchWidthContext = Object(external_this_wp_element_["createContext"])(null);
3636  /**
3637   * Returns true if the viewport matches the given query, or false otherwise.
3638   *
3639   * @param {WPBreakpoint}       breakpoint      Breakpoint size name.
3640   * @param {WPViewportOperator} [operator=">="] Viewport operator.
3641   *
3642   * @example
3643   *
3644   * ```js
3645   * useViewportMatch( 'huge', '<' );
3646   * useViewportMatch( 'medium' );
3647   * ```
3648   *
3649   * @return {boolean} Whether viewport matches query.
3650   */
3651  
3652  var use_viewport_match_useViewportMatch = function useViewportMatch(breakpoint) {
3653    var operator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '>=';
3654    var simulatedWidth = Object(external_this_wp_element_["useContext"])(ViewportMatchWidthContext);
3655    var mediaQuery = !simulatedWidth && "(".concat(CONDITIONS[operator], ": ").concat(BREAKPOINTS[breakpoint], "px)");
3656    var mediaQueryResult = useMediaQuery(mediaQuery);
3657  
3658    if (simulatedWidth) {
3659      return OPERATOR_EVALUATORS[operator](BREAKPOINTS[breakpoint], simulatedWidth);
3660    }
3661  
3662    return mediaQueryResult;
3663  };
3664  
3665  use_viewport_match_useViewportMatch.__experimentalWidthProvider = ViewportMatchWidthContext.Provider;
3666  /* harmony default export */ var use_viewport_match = (use_viewport_match_useViewportMatch);
3667  
3668  // EXTERNAL MODULE: ./node_modules/react-resize-aware/dist/index.js
3669  var dist = __webpack_require__(152);
3670  var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
3671  
3672  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-resize-observer/index.js
3673  /**
3674   * External dependencies
3675   */
3676  
3677  /**
3678   * Hook which allows to listen the resize event of any target element when it changes sizes.
3679   * _Note: `useResizeObserver` will report `null` until after first render_
3680   *
3681   * @return {Array} An array of {Element} `resizeListener` and {?Object} `sizes` with properties `width` and `height`
3682   *
3683   * @example
3684   *
3685   * ```js
3686   * const App = () => {
3687   *     const [ resizeListener, sizes ] = useResizeObserver();
3688   *
3689   *     return (
3690   *         <div>
3691   *             { resizeListener }
3692   *             Your content here
3693   *         </div>
3694   *     );
3695   * };
3696   * ```
3697   *
3698   */
3699  
3700  /* harmony default export */ var use_resize_observer = (dist_default.a);
3701  
3702  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
3703  var toConsumableArray = __webpack_require__(17);
3704  
3705  // EXTERNAL MODULE: external {"this":["wp","priorityQueue"]}
3706  var external_this_wp_priorityQueue_ = __webpack_require__(153);
3707  
3708  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-async-list/index.js
3709  
3710  
3711  
3712  /**
3713   * WordPress dependencies
3714   */
3715  
3716  
3717  /**
3718   * Returns the first items from list that are present on state.
3719   *
3720   * @param {Array} list  New array.
3721   * @param {Array} state Current state.
3722   * @return {Array} First items present iin state.
3723   */
3724  
3725  function getFirstItemsPresentInState(list, state) {
3726    var firstItems = [];
3727  
3728    for (var i = 0; i < list.length; i++) {
3729      var item = list[i];
3730  
3731      if (!state.includes(item)) {
3732        break;
3733      }
3734  
3735      firstItems.push(item);
3736    }
3737  
3738    return firstItems;
3739  }
3740  /**
3741   * Reducer keeping track of a list of appended items.
3742   *
3743   * @param {Array}  state  Current state
3744   * @param {Object} action Action
3745   *
3746   * @return {Array} update state.
3747   */
3748  
3749  
3750  function listReducer(state, action) {
3751    if (action.type === 'reset') {
3752      return action.list;
3753    }
3754  
3755    if (action.type === 'append') {
3756      return [].concat(Object(toConsumableArray["a" /* default */])(state), [action.item]);
3757    }
3758  
3759    return state;
3760  }
3761  /**
3762   * React hook returns an array which items get asynchronously appended from a source array.
3763   * This behavior is useful if we want to render a list of items asynchronously for performance reasons.
3764   *
3765   * @param {Array} list Source array.
3766   * @return {Array} Async array.
3767   */
3768  
3769  
3770  function useAsyncList(list) {
3771    var _useReducer = Object(external_this_wp_element_["useReducer"])(listReducer, []),
3772        _useReducer2 = Object(slicedToArray["a" /* default */])(_useReducer, 2),
3773        current = _useReducer2[0],
3774        dispatch = _useReducer2[1];
3775  
3776    Object(external_this_wp_element_["useEffect"])(function () {
3777      // On reset, we keep the first items that were previously rendered.
3778      var firstItems = getFirstItemsPresentInState(list, current);
3779      dispatch({
3780        type: 'reset',
3781        list: firstItems
3782      });
3783      var asyncQueue = Object(external_this_wp_priorityQueue_["createQueue"])();
3784  
3785      var append = function append(index) {
3786        return function () {
3787          if (list.length <= index) {
3788            return;
3789          }
3790  
3791          dispatch({
3792            type: 'append',
3793            item: list[index]
3794          });
3795          asyncQueue.add({}, append(index + 1));
3796        };
3797      };
3798  
3799      asyncQueue.add({}, append(firstItems.length));
3800      return function () {
3801        return asyncQueue.reset();
3802      };
3803    }, [list]);
3804    return current;
3805  }
3806  
3807  /* harmony default export */ var use_async_list = (useAsyncList);
3808  
3809  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-warn-on-change/index.js
3810  
3811  
3812  /**
3813   * Internal dependencies
3814   */
3815  
3816  /**
3817   * Hook that performs a shallow comparison between the preview value of an object
3818   * and the new one, if there's a difference, it prints it to the console.
3819   * this is useful in performance related work, to check why a component re-renders.
3820   *
3821   *  @example
3822   *
3823   * ```jsx
3824   * function MyComponent(props) {
3825   *    useWarnOnChange(props);
3826   *
3827   *    return "Something";
3828   * }
3829   * ```
3830   *
3831   * @param {Object} object Object which changes to compare.
3832   * @param {string} prefix Just a prefix to show when console logging.
3833   */
3834  
3835  function useWarnOnChange(object) {
3836    var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Change detection';
3837    var previousValues = usePrevious(object);
3838    Object.entries(previousValues !== null && previousValues !== void 0 ? previousValues : []).forEach(function (_ref) {
3839      var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 2),
3840          key = _ref2[0],
3841          value = _ref2[1];
3842  
3843      if (value !== object[key]) {
3844        // eslint-disable-next-line no-console
3845        console.warn("".concat(prefix, ": ").concat(key, " key changed:"), value, object[key]);
3846      }
3847    });
3848  }
3849  
3850  /* harmony default export */ var use_warn_on_change = (useWarnOnChange);
3851  
3852  // EXTERNAL MODULE: ./node_modules/use-memo-one/dist/use-memo-one.esm.js
3853  var use_memo_one_esm = __webpack_require__(154);
3854  
3855  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/hooks/use-debounce/index.js
3856  /**
3857   * External dependencies
3858   */
3859  
3860  
3861  /**
3862   * WordPress dependencies
3863   */
3864  
3865  
3866  /**
3867   * Debounces a function with Lodash's `debounce`. A new debounced function will
3868   * be returned and any scheduled calls cancelled if any of the arguments change,
3869   * including the function to debounce, so please wrap functions created on
3870   * render in components in `useCallback`.
3871   *
3872   * @param {...any} args Arguments passed to Lodash's `debounce`.
3873   */
3874  
3875  function useDebounce() {
3876    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3877      args[_key] = arguments[_key];
3878    }
3879  
3880    var debounced = Object(use_memo_one_esm["a" /* useMemoOne */])(function () {
3881      return external_this_lodash_["debounce"].apply(void 0, args);
3882    }, args);
3883    Object(external_this_wp_element_["useEffect"])(function () {
3884      return function () {
3885        return debounced.cancel();
3886      };
3887    }, [debounced]);
3888    return debounced;
3889  }
3890  
3891  // CONCATENATED MODULE: ./node_modules/@wordpress/compose/build-module/index.js
3892  // Utils
3893   // Compose helper (aliased flowRight from Lodash)
3894  
3895   // Higher-order components
3896  
3897  
3898  
3899  
3900  
3901  
3902   // Hooks
3903  
3904  
3905  
3906  
3907  
3908  
3909  
3910  
3911  
3912  
3913  
3914  
3915  
3916  
3917  
3918  /***/ }),
3919  
3920  /***/ 64:
3921  /***/ (function(module, exports) {
3922  
3923  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
3924  
3925  /***/ }),
3926  
3927  /***/ 8:
3928  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3929  
3930  "use strict";
3931  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
3932  function _extends() {
3933    _extends = Object.assign || function (target) {
3934      for (var i = 1; i < arguments.length; i++) {
3935        var source = arguments[i];
3936  
3937        for (var key in source) {
3938          if (Object.prototype.hasOwnProperty.call(source, key)) {
3939            target[key] = source[key];
3940          }
3941        }
3942      }
3943  
3944      return target;
3945    };
3946  
3947    return _extends.apply(this, arguments);
3948  }
3949  
3950  /***/ })
3951  
3952  /******/ });


Generated: Tue Dec 1 01:00:04 2020 Cross-referenced by PHPXref 0.7.1