(()=>{"use strict";const l=window.wp.commands,e=window.wp.data,o=window.wp.element,n=window.wp.primitives,a=window.ReactJSXRuntime,c=(0,a.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(n.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})}),s=window.wp.i18n;(0,e.dispatch)(l.store).registerCommandLoader({name:"wp-rollback/rollback-asset",hook:function({search:l}){const{plugins:e=[],themes:n=[],adminUrl:a=""}=window.wprCommandPaletteData||{};return{commands:(0,o.useMemo)(()=>{const o=l.toLowerCase().trim(),t=[],i=o.match(/^rollback(?:\s+(plugin|theme))?(?:\s+(.+))?$/),r=""===o||null!==i,m=i?.[1]??null,w=(i?.[2]??"").trim(),u=!r||"plugin"!==m;return(!r||"theme"!==m)&&e.filter(l=>r?""===w||l.name.toLowerCase().includes(w):l.name.toLowerCase().includes(o)).slice(0,10).forEach(l=>t.push({name:`wp-rollback/plugin-${l.slug}`,label:(0,s.sprintf)(
// translators: %s: Plugin name
// translators: %s: Plugin name
(0,s.__)("Rollback plugin: %s","wp-rollback"),l.name),icon:c,callback:({close:e})=>{document.location.href=`${a}#/rollback/plugin/${l.slug}`,e()}})),u&&n.filter(l=>r?""===w||l.name.toLowerCase().includes(w):l.name.toLowerCase().includes(o)).slice(0,5).forEach(l=>t.push({name:`wp-rollback/theme-${l.slug}`,label:(0,s.sprintf)(
// translators: %s: Theme name
// translators: %s: Theme name
(0,s.__)("Rollback theme: %s","wp-rollback"),l.name),icon:c,callback:({close:e})=>{document.location.href=`${a}#/rollback/theme/${l.slug}`,e()}})),t},[l,e,n,a]),isLoading:!1}}})})();