1(function() { 2"use strict";var wp;(wp||={}).preferences=(()=>{var Aa=Object.create;var k=Object.defineProperty;var Ia=Object.getOwnPropertyDescriptor;var Da=Object.getOwnPropertyNames;var ja=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty;var i=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),V=(a,t)=>{for(var e in t)k(a,e,{get:t[e],enumerable:!0})},K=(a,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Da(t))!Fa.call(a,s)&&s!==e&&k(a,s,{get:()=>t[s],enumerable:!(r=Ia(t,s))||r.enumerable});return a};var o=(a,t,e)=>(e=a!=null?Aa(ja(a)):{},K(t||!a||!a.__esModule?k(e,"default",{value:a,enumerable:!0}):e,a)),Ua=a=>K(k({},"__esModule",{value:!0}),a);var b=i((at,X)=>{X.exports=window.wp.data});var x=i((tt,Q)=>{Q.exports=window.wp.components});var L=i((et,Z)=>{Z.exports=window.wp.i18n});var O=i((rt,aa)=>{aa.exports=window.wp.element});var E=i((ft,ta)=>{ta.exports=window.wp.primitives});var p=i((st,ea)=>{ea.exports=window.ReactJSXRuntime});var oa=i((wt,ra)=>{ra.exports=window.wp.a11y});var ma=i((bt,la)=>{la.exports=window.wp.deprecated});var ka=i((It,ya)=>{ya.exports=window.wp.compose});var Ca=i((Dt,La)=>{La.exports=window.wp.privateApis});var Qa={};V(Qa,{PreferenceToggleMenuItem:()=>na,privateApis:()=>Na,store:()=>n});var M=o(b(),1),ia=o(x(),1),g=o(L(),1);var C=o(O(),1),H=(0,C.forwardRef)(({icon:a,size:t=24,style:e,...r},s)=>{let u=a.props.style,d=u||e?{...u,...e}:void 0;return(0,C.cloneElement)(a,{width:t,height:t,...r,...d?{style:d}:{},ref:s})});var T=o(E(),1),z=o(p(),1),q=(0,z.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,z.jsx)(T.Path,{d:"M7 12L10 15L17 8",vectorEffect:"non-scaling-stroke"})});var S=o(E(),1),W=o(p(),1),R=(0,W.jsx)(S.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,W.jsx)(S.Path,{d:"M14 6.5L9 12L14 17.5",vectorEffect:"non-scaling-stroke"})});var P=o(E(),1),$=o(p(),1),B=(0,$.jsx)(P.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,$.jsx)(P.Path,{d:"M10 6.5L15 12L10 17.5",vectorEffect:"non-scaling-stroke"})});var Y=o(oa(),1);var N=o(b(),1);var fa=o(b(),1);function Va(a={},t){if(t.type==="SET_PREFERENCE_DEFAULTS"){let{scope:e,defaults:r}=t;return{...a,[e]:{...a[e],...r}}}return a}function Oa(a){let t;return(e,r)=>{if(r.type==="SET_PERSISTENCE_LAYER"){let{persistenceLayer:u,persistedData:d}=r;return t=u,d}let s=a(e,r);return r.type==="SET_PREFERENCE_VALUE"&&t?.set(s),s}}var Ha=Oa((a={},t)=>{if(t.type==="SET_PREFERENCE_VALUE"){let{scope:e,name:r,value:s}=t;return{...a,[e]:{...a[e],[r]:s}}}return a}),sa=(0,fa.combineReducers)({defaults:Va,preferences:Ha});var G={};V(G,{set:()=>qa,setDefaults:()=>Wa,setPersistenceLayer:()=>$a,toggle:()=>za});function za(a,t){return function({select:e,dispatch:r}){let s=e.get(a,t);r.set(a,t,!s)}}function qa(a,t,e){return{type:"SET_PREFERENCE_VALUE",scope:a,name:t,value:e}}function Wa(a,t){return{type:"SET_PREFERENCE_DEFAULTS",scope:a,defaults:t}}async function $a(a){let t=await a.get();return{type:"SET_PERSISTENCE_LAYER",persistenceLayer:a,persistedData:t}}var J={};V(J,{get:()=>Ja});var da=o(ma(),1),Ga=a=>(t,e,r)=>["allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","hiddenBlockTypes","inactivePanels","keepCaretInsideBlock","mostUsedBlocks","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","isComplementaryAreaVisible","pinnedItems"].includes(r)&&["core/edit-post","core/edit-site"].includes(e)?((0,da.default)(`wp.data.select( 'core/preferences' ).get( '${e}', '${r}' )`,{since:"6.5",alternative:`wp.data.select( 'core/preferences' ).get( 'core', '${r}' )`}),a(t,"core",r)):a(t,e,r),Ja=Ga((a,t,e)=>{let r=a.preferences[t]?.[e];return r!==void 0?r:a.defaults[t]?.[e]});var ua="core/preferences";var n=(0,N.createReduxStore)(ua,{reducer:sa,actions:G,selectors:J});(0,N.register)(n);var pa=o(p(),1);function na({scope:a,name:t,label:e,info:r,messageActivated:s,messageDeactivated:u,shortcut:d,handleToggling:m=!0,onToggle:c=()=>null,disabled:y=!1}){let w=(0,M.useSelect)(v=>!!v(n).get(a,t),[a,t]),{toggle:U}=(0,M.useDispatch)(n),Ma=()=>
2{if(w){let v=u||(0,g.sprintf)((0,g.__)("Preference deactivated - %s"),e);(0,Y.speak)(v)}else{let v=s||(0,g.sprintf)((0,g.__)("Preference activated - %s"),e);(0,Y.speak)(v)}};return(0,pa.jsx)(ia.MenuItem,{icon:w?q:null,isSelected:w,onClick:()=>{c(),m&&U(a,t),Ma()},role:"menuitemcheckbox",info:r,shortcut:d,disabled:y,children:e})}var ca=o(x(),1),A=o(p(),1);function Ya({help:a,label:t,isChecked:e,onChange:r,children:s}){return(0,A.jsxs)("div",{className:"preference-base-option",children:[(0,A.jsx)(ca.ToggleControl,{help:a,label:t,checked:e,onChange:r}),s]})}var I=Ya;var D=o(b(),1);var ha=o(p(),1);function Ka(a){let{scope:t,featureName:e,onToggle:r=()=>{},...s}=a,u=(0,D.useSelect)(c=>!!c(n).get(t,e),[t,e]),{toggle:d}=(0,D.useDispatch)(n);return(0,ha.jsx)(I,{...s,onChange:()=>{r(),d(t,e)},isChecked:u})}var ga=Ka;var wa=o(x(),1),va=o(L(),1),ba=o(p(),1);function xa({closeModal:a,children:t}){return(0,ba.jsx)(wa.Modal,{className:"preferences-modal",title:(0,va.__)("Preferences"),onRequestClose:a,children:t})}var h=o(p(),1),Xa=({description:a,title:t,children:e})=>(0,h.jsxs)("fieldset",{className:"preferences-modal__section",children:[(0,h.jsxs)("legend",{className:"preferences-modal__section-legend",children:[(0,h.jsx)("h2",{className:"preferences-modal__section-title",children:t}),a&&(0,h.jsx)("p",{className:"preferences-modal__section-description",children:a})]}),(0,h.jsx)("div",{className:"preferences-modal__section-content",children:e})]}),_a=Xa;var Pa=o(ka(),1),f=o(x(),1),F=o(O(),1);var _=o(L(),1);var Ea=o(Ca(),1),{lock:Ta,unlock:Sa}=(0,Ea.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/preferences");var l=o(p(),1),{Tabs:j}=Sa(f.privateApis),Ra="preferences-menu";function Ba({sections:a}){let t=(0,Pa.useViewportMatch)("medium"),[e,r]=(0,F.useState)(Ra),{tabs:s,sectionsContentMap:u}=(0,F.useMemo)(()=>{let m={tabs:[],sectionsContentMap:{}};return a.length&&(m=a.reduce((c,{name:y,tabLabel:w,content:U})=>(c.tabs.push({name:y,title:w}),c.sectionsContentMap[y]=U,c),{tabs:[],sectionsContentMap:{}})),m},[a]),d;return t?d=(0,l.jsx)("div",{className:"preferences__tabs",children:(0,l.jsxs)(j,{defaultTabId:e!==Ra?e:void 0,onSelect:r,orientation:"vertical",children:[(0,l.jsx)(j.TabList,{className:"preferences__tabs-tablist",children:s.map(m=>(0,l.jsx)(j.Tab,{tabId:m.name,className:"preferences__tabs-tab",children:m.title},m.name))}),s.map(m=>(0,l.jsx)(j.TabPanel,{tabId:m.name,className:"preferences__tabs-tabpanel",focusable:!1,children:u[m.name]||null},m.name))]})}):d=(0,l.jsxs)(f.Navigator,{initialPath:"/",className:"preferences__provider",children:[(0,l.jsx)(f.Navigator.Screen,{path:"/",children:(0,l.jsx)(f.Card,{isBorderless:!0,size:"small",children:(0,l.jsx)(f.CardBody,{children:(0,l.jsx)(f.__experimentalItemGroup,{children:s.map(m=>(0,l.jsx)(f.Navigator.Button,{path:`/${m.name}`,as:f.__experimentalItem,children:(0,l.jsxs)(f.__experimentalHStack,{justify:"space-between",children:[(0,l.jsx)(f.FlexItem,{children:(0,l.jsx)(f.__experimentalTruncate,{children:m.title})}),(0,l.jsx)(f.FlexItem,{children:(0,l.jsx)(H,{icon:(0,_.isRTL)()?R:B})})]})},m.name))})})})}),a.length&&a.map(m=>(0,l.jsx)(f.Navigator.Screen,{path:`/${m.name}`,children:(0,l.jsxs)(f.Card,{isBorderless:!0,size:"large",children:[(0,l.jsxs)(f.CardHeader,{isBorderless:!1,justify:"left",size:"small",gap:"6",as:"div",children:[(0,l.jsx)(f.Navigator.BackButton,{icon:(0,_.isRTL)()?B:R,label:(0,_.__)("Back")}),(0,l.jsx)(f.__experimentalText,{size:"16",children:m.tabLabel})]}),(0,l.jsx)(f.CardBody,{children:m.content})]})},`${m.name}-menu`))]}),d}var Na={};Ta(Na,{PreferenceBaseOption:I,PreferenceToggleControl:ga,PreferencesModal:xa,PreferencesModalSection:_a,PreferencesModalTabs:Ba});return Ua(Qa);})(); 3(window.wp ||= {}).preferences = wp.preferences; 4})(); 5//# sourceMappingURL=index.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.