File: /wordpress/core/beta/wp-includes/js/dist/plugins.min.js
/*! This file is auto-generated */
"use strict";var wp;(wp||={}).plugins=(()=>{var ga=Object.create;var y=Object.defineProperty;var ha=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var va=Object.getPrototypeOf,wa=Object.prototype.hasOwnProperty;var i=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),ba=(a,t)=>{for(var o in t)y(a,o,{get:t[o],enumerable:!0})},M=(a,t,o,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of ya(t))!wa.call(a,l)&&l!==o&&y(a,l,{get:()=>t[l],enumerable:!(f=ha(t,l))||f.enumerable});return a};var s=(a,t,o)=>(o=a!=null?ga(va(a)):{},M(t||!a||!a.__esModule?y(o,"default",{value:a,enumerable:!0}):o,a)),xa=a=>M(y({},"__esModule",{value:!0}),a);var v=i(($a,I)=>{I.exports=window.wp.element});var D=i((za,_)=>{_.exports=window.wp.hooks});var W=i((Aa,J)=>{J.exports=window.wp.isShallowEqual});var X=i((Da,G)=>{G.exports=window.wp.compose});var Q=i((Ta,K)=>{K.exports=window.wp.deprecated});var w=i((Fa,Y)=>{Y.exports=window.ReactJSXRuntime});var sa=i(e=>{"use strict";var F=Symbol.for("react.element"),U=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),R=Symbol.for("react.context"),Ca=Symbol.for("react.server_context"),k=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),Pa=Symbol.for("react.offscreen"),la;la=Symbol.for("react.module.reference");function m(a){if(typeof a=="object"&&a!==null){var t=a.$$typeof;switch(t){case F:switch(a=a.type,a){case C:case S:case P:case E:case j:return a;default:switch(a=a&&a.$$typeof,a){case Ca:case R:case k:case V:case B:case L:return a;default:return t}}case U:return t}}}e.ContextConsumer=R;e.ContextProvider=L;e.Element=F;e.ForwardRef=k;e.Fragment=C;e.Lazy=V;e.Memo=B;e.Portal=U;e.Profiler=S;e.StrictMode=P;e.Suspense=E;e.SuspenseList=j;e.isAsyncMode=function(){return!1};e.isConcurrentMode=function(){return!1};e.isContextConsumer=function(a){return m(a)===R};e.isContextProvider=function(a){return m(a)===L};e.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===F};e.isForwardRef=function(a){return m(a)===k};e.isFragment=function(a){return m(a)===C};e.isLazy=function(a){return m(a)===V};e.isMemo=function(a){return m(a)===B};e.isPortal=function(a){return m(a)===U};e.isProfiler=function(a){return m(a)===S};e.isStrictMode=function(a){return m(a)===P};e.isSuspense=function(a){return m(a)===E};e.isSuspenseList=function(a){return m(a)===j};e.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===C||a===S||a===P||a===E||a===j||a===Pa||typeof a=="object"&&a!==null&&(a.$$typeof===V||a.$$typeof===B||a.$$typeof===L||a.$$typeof===R||a.$$typeof===k||a.$$typeof===la||a.getModuleId!==void 0)};e.typeOf=m});var ma=i((Ma,ua)=>{"use strict";ua.exports=sa()});var ia=i((Oa,da)=>{da.exports=window.wp.primitives});var ja={};ba(ja,{PluginArea:()=>ca,getPlugin:()=>Ra,getPlugins:()=>N,registerPlugin:()=>Sa,unregisterPlugin:()=>La,usePluginContext:()=>ea,withPluginContext:()=>ra});function O(a,t){var o=0,f,l;t=t||{};function u(){var r=f,A=arguments.length,h,d;a:for(;r;){if(r.args.length!==arguments.length){r=r.next;continue}for(d=0;d<A;d++)if(r.args[d]!==arguments[d]){r=r.next;continue a}return r!==f&&(r===l&&(l=r.prev),r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=f,r.prev=null,f.prev=r,f=r),r.val}for(h=new Array(A),d=0;d<A;d++)h[d]=arguments[d];return r={args:h,val:a.apply(null,h)},f?(f.prev=r,r.next=f):l=r,o===t.maxSize?(l=l.prev,l.next=null):o++,f=r,r.val}return u.clear=function(){f=null,l=null,o=0},u}var z=s(v(),1),n=s(D(),1),na=s(W(),1);var b=s(v(),1),Z=s(X(),1),aa=s(Q(),1),T=s(w(),1),x=(0,b.createContext)({name:null,icon:null});x.displayName="PluginContext";var ta=x.Provider;function ea(){return(0,b.useContext)(x)}var ra=a=>(0,Z.createHigherOrderComponent)(t=>((0,aa.default)("wp.plugins.withPluginContext",{since:"6.8.0",alternative:"wp.plugins.usePluginContext"}),o=>(0,T.jsx)(x.Consumer,{children:f=>(0,T.jsx)(t,{...o,...a(f,o)})})),"withPluginContext");var oa=s(v(),1),fa=class extends oa.Component{constructor(a){super(a),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){let{name:t,onError:o}=this.props;o&&o(t,a)}render(){return this.state.hasError?null:this.props.children}};var pa=s(ma(),1),c=s(D(),1);var $=s(ia(),1),q=s(w(),1),H=(0,q.jsx)($.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,q.jsx)($.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})});var p={};function Sa(a,t){if(typeof t!="object")return console.error("No settings object provided!"),null;if(typeof a!="string")return console.error("Plugin name must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(a))return console.error('Plugin name must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".'),null;p[a]&&console.error(`Plugin "${a}" is already registered.`),t=(0,c.applyFilters)("plugins.registerPlugin",t,a);let{render:o,scope:f}=t;if(!(0,pa.isValidElementType)(o))return console.error('The "render" property must be specified and must be a valid component.'),null;if(f){if(typeof f!="string")return console.error("Plugin scope must be string."),null;if(!/^[a-z][a-z0-9-]*$/.test(f))return console.error('Plugin scope must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-page".'),null}return p[a]={name:a,icon:H,...t},(0,c.doAction)("plugins.pluginRegistered",t,a),t}function La(a){if(!p[a]){console.error('Plugin "'+a+'" is not registered.');return}let t=p[a];return delete p[a],(0,c.doAction)("plugins.pluginUnregistered",t,a),t}function Ra(a){return p[a]}function N(a){return Object.values(p).filter(t=>t.scope===a)}var g=s(w(),1),ka=O((a,t)=>({icon:a,name:t}));function Ea({scope:a,onError:t}){let o=(0,z.useMemo)(()=>{let l=[];return{subscribe(u){return(0,n.addAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered",u),(0,n.addAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered",u),()=>{(0,n.removeAction)("plugins.pluginRegistered","core/plugins/plugin-area/plugins-registered"),(0,n.removeAction)("plugins.pluginUnregistered","core/plugins/plugin-area/plugins-unregistered")}},getValue(){let u=N(a);return(0,na.isShallowEqual)(l,u)||(l=u),l}}},[a]),f=(0,z.useSyncExternalStore)(o.subscribe,o.getValue,o.getValue);return(0,g.jsx)("div",{style:{display:"none"},children:f.map(({icon:l,name:u,render:r})=>(0,g.jsx)(ta,{value:ka(l,u),children:(0,g.jsx)(fa,{name:u,onError:t,children:(0,g.jsx)(r,{})})},u))})}var ca=Ea;return xa(ja);})();
/*! Bundled license information:
react-is/cjs/react-is.production.min.js:
(**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
*/