2021-05-19 17:09:27 +02:00
|
|
|
this.wp=this.wp||{},this.wp.keyboardShortcuts=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=575)}({10:function(e,t){e.exports=window.wp.compose},12:function(e,t){e.exports=window.wp.keycodes},2:function(e,t){e.exports=window.lodash},26:function(e,t,n){"use strict";var r,o;function a(e){return[e]}function u(){var e={clear:function(){e.head=null}};return e}function i(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,c;function s(){n=o?new WeakMap:u()}function l(){var n,r,o,a,u,s=arguments.length;for(a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];for(u=t.apply(null,a),(n=c(u)).isUniqueByDependants||(n.lastDependants&&!i(u,n.lastDependants,0)&&n.clear(),n.lastDependants=u),r=n.head;r;){if(i(r.args,a,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=a),c=o?function(e){var t,o,a,i,c,s=n,l=!0;for(t=0;t<e.length;t++){if(o=e[t],!(c=o)||"object"!=typeof c){l=!1;break}s.has(o)?s=s.get(o):(a=new WeakMap,s.set(o,a),s=a)}return s.has(r)||((i=u()).isUniqueByDependants=l,s.set(r,i)),s.get(r)}:function(){return n},l.getDependants=t,l.clear=s,s(),l}},5:function(e,t){e.exports=window.wp.data},575:function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return w})),n.d(t,"useShortcut",(function(){return j}));var r={};n.r(r),n.d(r,"registerShortcut",(function(){return c})),n.d(r,"unregisterShortcut",(function(){return s}));var o={};n.r(o),n.d(o,"getShortcutKeyCombination",(function(){return h})),n.d(o,"getShortcutRepresentation",(function(){return b})),n.d(o,"getShortcutDescription",(function(){return g})),n.d(o,"getShortcutAliases",(function(){return v})),n.d(o,"getAllShortcutRawKeyCombinations",(function(){return S})),n.d(o,"getCategoryShortcuts",(function(){return m}));var a=n(5),u=n(2);var i=function(e={},t){switch(t.type){case"REGISTER_SHORTCUT":return{...e,[t.name]:{category:t.category,keyCombination:t.keyCombination,aliases:t.aliases,description:t.description}};case"UNREGISTER_SHORTCUT":return Object(u.omit)(e,t.name)}return e};function c({name:e,category:t,description:n,keyCombination:r,aliases:o}){return{type:"REGISTER_SHORTCUT",name:e,category:t,keyCombination:r,aliases:o,description:n}}function s(e){return{type:"UNREGISTER_SHORTCUT",name:e}}var l=n(26),f=n(12);const d=[],p={display:f.displayShortcut,raw:f.rawShortcut,ariaLabel:f.shortcutAriaLabel};function y(e,t){return e?e.modifier?p[t][e.modifier](e.character):e.character:null}function h(e,t){return e[t]?e[t].keyCombination:null}function b(e,t,n="display"){return y(h(e,t),n)}function g(e,t){return e[t]?e[t].description:null}function v(e,t){return e[t]&&e[t].aliases?e[t].aliases:d}const S=Object(l.a)((e,t)=>Object(u.compact)([y(h(e,t),"raw"),...v(e,t).map(e=>y(e,"raw"))]),(e,t)=>[e[t]]),m=Object(l.a)((e,t)=>Object.entries(e).filter(([,e])=>e.category===t).map(([e])=>e),e=>[e]),w=Object(a.createReduxStore)("core/keyboard-shortcuts",{reducer:i,actions:r,selectors:o});Object(a.register)(w);var O=n(10);var j=function(e,t,n)
|