2 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="z7pY")}({YLtl:function(t,n){t.exports=window.lodash},l3Sj:function(t,n){t.exports=window.wp.i18n},z7pY: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 f})),e.d(n,"ESCAPE",(function(){return a})),e.d(n,"SPACE",(function(){return d})),e.d(n,"LEFT",(function(){return l})),e.d(n,"UP",(function(){return s})),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 y})),e.d(n,"CTRL",(function(){return m})),e.d(n,"COMMAND",(function(){return h})),e.d(n,"SHIFT",(function(){return S})),e.d(n,"ZERO",(function(){return w})),e.d(n,"modifiers",(function(){return C})),e.d(n,"rawShortcut",(function(){return A})),e.d(n,"displayShortcutList",(function(){return E})),e.d(n,"displayShortcut",(function(){return P})),e.d(n,"shortcutAriaLabel",(function(){return _})),e.d(n,"isKeyboardEvent",(function(){return v}));var r=e("YLtl"),o=e("l3Sj");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,f=13,a=27,d=32,l=37,s=38,p=39,b=40,j=46,O=121,y="alt",m="ctrl",h="meta",S="shift",w=48,C={primary:t=>t()?[h]:[m],primaryShift:t=>t()?[S,h]:[m,S],primaryAlt:t=>t()?[y,h]:[m,y],secondary:t=>t()?[S,y,h]:[m,S,y],access:t=>t()?[m,y]:[S,y],ctrl:()=>[m],alt:()=>[y],ctrlShift:()=>[m,S],shift:()=>[S],shiftAlt:()=>[S,y]},A=Object(r.mapValues)(C,t=>(n,e=u)=>[...t(e),n.toLowerCase()].join("+")),E=Object(r.mapValues)(C,t=>(n,e=u)=>{const o=e(),i={[y]:o?"⌥":"Alt",[m]:o?"⌃":"Ctrl",[h]:"⌘",[S]: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)]}),P=Object(r.mapValues)(E,t=>(n,e=u)=>t(n,e).join("")),_=Object(r.mapValues)(C,t=>(n,e=u)=>{const i=e(),c={[S]:"Shift",[h]:i?"Command":"Control",[m]:"Control",[y]: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)(C,t=>(n,e,o=u)=>{const i=t(o),c=function(t){return[y,m,h,S].filter(n=>t[n+"Key"])}(n);return!Object(r.xor)(i,c).length&&(e?n.key===e:Object(r.includes)(i,n.key.toLowerCase()))})}}); |
2 !function(){"use strict";var n={d:function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o:function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r:function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};n.r(t),n.d(t,{ALT:function(){return S},BACKSPACE:function(){return i},COMMAND:function(){return A},CTRL:function(){return E},DELETE:function(){return C},DOWN:function(){return w},END:function(){return s},ENTER:function(){return c},ESCAPE:function(){return f},F10:function(){return g},HOME:function(){return p},LEFT:function(){return h},PAGEDOWN:function(){return d},PAGEUP:function(){return a},RIGHT:function(){return m},SHIFT:function(){return P},SPACE:function(){return l},TAB:function(){return u},UP:function(){return y},ZERO:function(){return v},displayShortcut:function(){return T},displayShortcutList:function(){return L},isKeyboardEvent:function(){return M},modifiers:function(){return O},rawShortcut:function(){return b},shortcutAriaLabel:function(){return _}});var e=window.lodash,r=window.wp.i18n;function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!n){if("undefined"==typeof window)return!1;n=window}const{platform:t}=n.navigator;return-1!==t.indexOf("Mac")||(0,e.includes)(["iPad","iPhone"],t)}const i=8,u=9,c=13,f=27,l=32,a=33,d=34,s=35,p=36,h=37,y=38,m=39,w=40,C=46,g=121,S="alt",E="ctrl",A="meta",P="shift",v=48,O={primary:n=>n()?[A]:[E],primaryShift:n=>n()?[P,A]:[E,P],primaryAlt:n=>n()?[S,A]:[E,S],secondary:n=>n()?[P,S,A]:[E,P,S],access:n=>n()?[E,S]:[P,S],ctrl:()=>[E],alt:()=>[S],ctrlShift:()=>[E,P],shift:()=>[P],shiftAlt:()=>[P,S],undefined:()=>[]},b=(0,e.mapValues)(O,(n=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;return[...n(e),t.toLowerCase()].join("+")})),L=(0,e.mapValues)(O,(n=>function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;const i=r(),u={[S]:i?"⌥":"Alt",[E]:i?"⌃":"Ctrl",[A]:"⌘",[P]:i?"⇧":"Shift"},c=n(r).reduce(((n,t)=>{const r=(0,e.get)(u,t,t);return i?[...n,r]:[...n,r,"+"]}),[]),f=(0,e.capitalize)(t);return[...c,f]})),T=(0,e.mapValues)(L,(n=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;return n(t,e).join("")})),_=(0,e.mapValues)(O,(n=>function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;const u=i(),c={[P]:"Shift",[A]:u?"Command":"Control",[E]:"Control",[S]:u?"Option":"Alt",",":(0,r.__)("Comma"),".":(0,r.__)("Period"),"`":(0,r.__)("Backtick")};return[...n(i),t].map((n=>(0,e.capitalize)((0,e.get)(c,n,n)))).join(u?" ":" + ")}));function j(n){return[S,E,A,P].filter((t=>n[`${t}Key`]))}const M=(0,e.mapValues)(O,(n=>function(t,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o;const u=n(i),c=j(t);if((0,e.xor)(u,c).length)return!1;let f=t.key.toLowerCase();return r?(t.altKey&&1===r.length&&(f=String.fromCharCode(t.keyCode).toLowerCase()),"del"===r&&(r="delete"),f===r.toLowerCase()):(0,e.includes)(u,f)}));(window.wp=window.wp||{}).keycodes=t}(); |