mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 18:32:23 +01:00
6e4458c935
Props peterwilsoncc, desrosj. Fixes #53192. Built from https://develop.svn.wordpress.org/trunk@50940 git-svn-id: http://core.svn.wordpress.org/trunk@50549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
3.5 KiB
JavaScript
2 lines
3.5 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.keycodes=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="./node_modules/@wordpress/keycodes/build-module/index.js")}({"./node_modules/@wordpress/keycodes/build-module/index.js":function(t,n,e){"use strict";e.r(n),e.d(n,"BACKSPACE",(function(){return i})),e.d(n,"TAB",(function(){return c})),e.d(n,"ENTER",(function(){return d})),e.d(n,"ESCAPE",(function(){return f})),e.d(n,"SPACE",(function(){return s})),e.d(n,"LEFT",(function(){return a})),e.d(n,"UP",(function(){return l})),e.d(n,"RIGHT",(function(){return p})),e.d(n,"DOWN",(function(){return b})),e.d(n,"DELETE",(function(){return j})),e.d(n,"F10",(function(){return O})),e.d(n,"ALT",(function(){return m})),e.d(n,"CTRL",(function(){return y})),e.d(n,"COMMAND",(function(){return h})),e.d(n,"SHIFT",(function(){return w})),e.d(n,"ZERO",(function(){return S})),e.d(n,"modifiers",(function(){return _})),e.d(n,"rawShortcut",(function(){return C})),e.d(n,"displayShortcutList",(function(){return A})),e.d(n,"displayShortcut",(function(){return E})),e.d(n,"shortcutAriaLabel",(function(){return P})),e.d(n,"isKeyboardEvent",(function(){return v}));var r=e("lodash"),o=e("@wordpress/i18n");function u(t=null){if(!t){if("undefined"==typeof window)return!1;t=window}const{platform:n}=t.navigator;return-1!==n.indexOf("Mac")||Object(r.includes)(["iPad","iPhone"],n)}const i=8,c=9,d=13,f=27,s=32,a=37,l=38,p=39,b=40,j=46,O=121,m="alt",y="ctrl",h="meta",w="shift",S=48,_={primary:t=>t()?[h]:[y],primaryShift:t=>t()?[w,h]:[y,w],primaryAlt:t=>t()?[m,h]:[y,m],secondary:t=>t()?[w,m,h]:[y,w,m],access:t=>t()?[y,m]:[w,m],ctrl:()=>[y],alt:()=>[m],ctrlShift:()=>[y,w],shift:()=>[w],shiftAlt:()=>[w,m]},C=Object(r.mapValues)(_,t=>(n,e=u)=>[...t(e),n.toLowerCase()].join("+")),A=Object(r.mapValues)(_,t=>(n,e=u)=>{const o=e(),i={[m]:o?"⌥":"Alt",[y]:o?"⌃":"Ctrl",[h]:"⌘",[w]:o?"⇧":"Shift"};return[...t(e).reduce((t,n)=>{const e=Object(r.get)(i,n,n);return o?[...t,e]:[...t,e,"+"]},[]),Object(r.capitalize)(n)]}),E=Object(r.mapValues)(A,t=>(n,e=u)=>t(n,e).join("")),P=Object(r.mapValues)(_,t=>(n,e=u)=>{const i=e(),c={[w]:"Shift",[h]:i?"Command":"Control",[y]:"Control",[m]:i?"Option":"Alt",",":Object(o.__)("Comma"),".":Object(o.__)("Period"),"`":Object(o.__)("Backtick")};return[...t(e),n].map(t=>Object(r.capitalize)(Object(r.get)(c,t,t))).join(i?" ":" + ")});const v=Object(r.mapValues)(_,t=>(n,e,o=u)=>{const i=t(o),c=function(t){return[m,y,h,w].filter(n=>t[n+"Key"])}(n);return!Object(r.xor)(i,c).length&&(e?n.key===e:Object(r.includes)(i,n.key.toLowerCase()))})},"@wordpress/i18n":function(t,n){t.exports=window.wp.i18n},lodash:function(t,n){t.exports=window.lodash}}); |